1
0
Fork 0
alistair23-linux/drivers/net
Neil Horman b203262de6 vmxnet3: cap copy length at size of skb to prevent dropped frames on tx
I was recently shown that vmxnet3 devices on transmit, will drop very small udp
frames consistently.  This is due to a regression introduced by commit
39d4a96fd7.  This commit attempts to introduce an
optimization to the tx path, indicating that the underlying hardware behaves
optimally when at least 54 bytes of header data are available for direct access.
This causes problems however, if the entire frame is less than 54 bytes long.
The subsequent pskb_may_pull in vmxnet3_parse_and_copy_hdr fails, causing an
error return code, which leads to vmxnet3_tq_xmit dropping the frame.

Fix it by placing a cap on the copy length.  For frames longer than 54 bytes, we
do the pull as we normally would.  If the frame is shorter than that, copy the
whole frame, but no more.  This ensures that we still get the optimization for
qualifying frames, but don't do any damange for frames that are too short.

Also, since I'm unable to do this, it wuold be great if vmware could follow up
this patch with some additional code commentary as to why 54 bytes is an optimal
pull length for a virtual NIC driver.  The comment that introduced this was
vague on that.  Thanks!

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Max Matveev <mmatveev@redhat.com>
CC: Max Matveev <mmatveev@redhat.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Shreyas Bhatewara <sbhatewara@vmware.com>
CC: "VMware, Inc." <pv-drivers@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-19 18:57:51 -05:00
..
appletalk
arcnet net: Revert ARCNET and PHYLIB to tristate options 2011-11-26 14:36:49 -05:00
bonding bonding: fix enslaving in alb mode when link down 2012-01-18 20:59:53 -05:00
caif module_param: make bool parameters really bool (net & drivers/net) 2011-12-19 22:27:29 -05:00
can can: peak_pci: Fix the way channels are linked together 2012-02-03 00:26:27 +01:00
cris
dsa drivers/net: dsa/mv88e6xxx.c files need linux/module.h 2012-01-24 15:44:50 -05:00
ethernet atl1c: dont use highprio tx queue 2012-02-19 18:57:50 -05:00
fddi
hamradio
hippi net: drivers/net/hippi/Kconfig should be sourced 2011-11-09 15:55:06 -05:00
hyperv net/hyperv: Fix the page buffer when an RNDIS message goes beyond page boundary 2012-02-02 14:35:12 -05:00
irda Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-01-14 13:05:21 -08:00
phy kernel-doc: fix new warning in net/phy/mdio_bus.c 2012-01-22 15:08:45 -05:00
plip
ppp pptp: Accept packet with seq zero 2012-01-12 20:05:28 -08:00
slip
team team: send only changed options/ports via netlink 2012-01-24 15:51:00 -05:00
tokenring CONFIG_TR/CONFIG_LLC: work around the problem with select 2012-02-07 13:06:14 -05:00
usb ipheth: Add iPhone 4S 2012-02-15 14:50:16 -05:00
vmxnet3 vmxnet3: cap copy length at size of skb to prevent dropped frames on tx 2012-02-19 18:57:51 -05:00
wan module_param: make bool parameters really bool (net & drivers/net) 2011-12-19 22:27:29 -05:00
wimax Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
wireless rtlwifi: Modify rtl_pci_init to return 0 on success 2012-02-09 15:17:29 -05:00
xen-netback Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08:00
Kconfig Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2012-01-09 12:18:17 -08:00
LICENSE.SRC
Makefile Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2012-01-09 12:18:17 -08:00
Space.c
dummy.c net: remove NETIF_F_NO_CSUM feature bit 2011-11-16 17:43:12 -05:00
eql.c
ifb.c net: remove NETIF_F_NO_CSUM feature bit 2011-11-16 17:43:12 -05:00
loopback.c net: remove NETIF_F_NO_CSUM feature bit 2011-11-16 17:43:12 -05:00
macvlan.c macvlan: fix a possible use after free 2012-01-23 13:56:18 -05:00
macvtap.c macvtap: Fix macvtap_get_queue to use rxhash first 2011-12-20 13:45:55 -05:00
mdio.c
mii.c net: Change mii to ethtool advertisement function names 2011-11-21 15:27:19 -05:00
netconsole.c netconsole: enable netconsole can make net_device refcnt incorrent 2011-10-18 23:55:29 -04:00
rionet.c drivers/net/rionet.c: fix ethernet address macros for LE platforms 2011-11-02 16:07:01 -07:00
sb1000.c
sungem_phy.c
tun.c Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of drivers 2011-11-22 16:43:32 -05:00
veth.c veth: Enforce minimum size of VETH_INFO_PEER 2012-02-15 14:59:20 -05:00
virtio_net.c virtio: net: Add freeze, restore handlers to support S4 2012-01-12 15:44:46 +10:30
xen-netfront.c xen-netfront: correct MAX_TX_TARGET calculation. 2012-01-26 13:48:35 -05:00