Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2014 18:13:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 194314] [ixgbe] driver makes some dangerous assumptions with struct mbuf sizing with IXGBE_RX_COPY_LEN
Message-ID:  <bug-194314-2472-ofdNA1Fc5e@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-194314-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-194314-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194314

--- Comment #12 from Eric Joyner <ricera10@gmail.com> ---
(In reply to Garrett Cooper from comment #10)
> (In reply to Eric Joyner from comment #8)
> > So it sounds like we may just need to change IXGBE_RX_COPY_LEN from a fixed
> > value of 160 to something that's calculated based on the length of struct
> > m_hdr and struct m_pkthdr combined.
> > 
> > I think they got 160 by adding together the size of the two header structs
> > (88 in FreeBSD amd64), adding some number (8) to make that size divisible by
> > 32 (96 % 32 == 0), and then subtracted that from MSIZE (256) to get
> > IXGBE_RX_COPY_LEN (160), while keeping the padding added as
> > IXGBE_RX_COPY_ALIGN.
> 
> A couple questions then:
> 
> - What architectures is this driver supported on?
> - Is this optimization only valid for amd64?
> - Why 32?

- At least i386 and amd64, but it should theoretically work on anything with a
PCI-E slot
- This optimization specifically was contributed by scottl/luigi, looking at
the commit logs. You should ask either of those two for details.
- Doesn't the comment in the code you posted answer that?

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194314-2472-ofdNA1Fc5e>