Date: Sat, 13 Sep 2014 22:56:55 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd <adrian@freebsd.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 Message-ID: <5414AF97.50509@selasky.org> In-Reply-To: <1935263641.35880661.1410641648947.JavaMail.root@uoguelph.ca> References: <1935263641.35880661.1410641648947.JavaMail.root@uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09/13/14 22:54, Rick Macklem wrote: > Hans Petter Selasky wrote: >> On 09/13/14 22:35, Hans Petter Selasky wrote: >>> >>> I see the default set to (65536 - 4). I don't know why you >>> subtracted 4 >>> but I would have expected the max ethernet header length to be >>> subtracted >>> here? >> >> You mean to say that the default should be >> >> 65535 - ethernet header - vlan header ? >> > Almost. It is actually: > 65536 - ethernet header - vlan header > (or the min of IP_MAXPACKET vs 32*MCLBYTES - ethernet header - vlan header > if you want to cover your butt for the case where the value of > MCLBYTES is changed) IP_MAXPACKET (65535) comes from the fact that > some devices use the iplen field of the ip header in the TSO segment > for its length, I think? (Some do not and can support TSO segments > greater than IP_MAXPACKET in length, but again, the default shouldn't > assume this nor should it assume the device does the vlan header in > hardware --> "- vlan header" to be safe for default.) > > This is because there are lots of broken drivers (basically any one > that has a limit of 32 transmit segments) and this at least makes > them work correctly. Unfortunately they still do a lot of m_defrag() > calls for this case, but with a patch like yours, the drivers may > eventually get patched to use the max_frags setting and then avoid > the need to do m_defrag() calls. > > rick Hi Rick, Thanks for shedding light into existing practices. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5414AF97.50509>