Is there any way to limit the amount of data in an mbuf chain submitted to a driver?

Adrian Chadd adrian at freebsd.org
Sat May 4 17:39:44 UTC 2013


.. and please file a PR. I'm sure Jack will love this kind of feedback. :)

Thanks for doing this debugging! I'm glad to see others getting dirty
in the network stack.



Adrian


On 4 May 2013 06:52, Richard Sharpe <realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> I understand better why I am seeing EINVAL intermittently when sending
> data from Samba via SMB2.
>
> The ixgbe driver, for TSO reasons, limits the amount of data that can
> be DMA'd to 65535 bytes. It returns EINVAL for any mbuf chain larger
> than that.
>
> The SO_SNDBUF for that socket is set to 131972. Mostly there is less
> than 64kiB of space available, so that is all TCP etc can put into the
> socket in one chain of mbufs. However, every now and then there is
> more than 65535 bytes available in the socket buffers, and we have an
> SMB packet that is larger than 65535 bytes, and we get hit.
>
> To confirm this I am going to set SO_SNDBUF back to the default of
> 65536 and test again. My repros are very reliable.
>
> However, I wondered if my only way around this if I want to continue
> to use SO_SNDBUF sizes larger than 65536 is to fragment large mbuf
> chains in the driver?
>
> --
> Regards,
> Richard Sharpe
> (何以解憂?唯有杜康。--曹操)
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list