linux_dsm_epyc7002/drivers/net
Michael Chan 11848b9647 bnx2: Remove some unnecessary smp_mb() in tx fast path.
smp_mb() inside bnx2_tx_avail() is used twice in the normal
bnx2_start_xmit() path (see illustration below).  The full memory
barrier is only necessary during race conditions with tx completion.
We can speed up the tx path by replacing smp_mb() in bnx2_tx_avail()
with a compiler barrier.  The compiler barrier is to force the
compiler to fetch the tx_prod and tx_cons from memory.

In the race condition between bnx2_start_xmit() and bnx2_tx_int(),
we have the following situation:

bnx2_start_xmit()                       bnx2_tx_int()
    if (!bnx2_tx_avail())
            BUG();

    ...

    if (!bnx2_tx_avail())
            netif_tx_stop_queue();          update_tx_index();
            smp_mb();                       smp_mb();
            if (bnx2_tx_avail())            if (netif_tx_queue_stopped() &&
                    netif_tx_wake_queue();      bnx2_tx_avail())

With smp_mb() removed from bnx2_tx_avail(), we need to add smp_mb() to
bnx2_start_xmit() as shown above to properly order netif_tx_stop_queue()
and bnx2_tx_avail() to check the ring index.  If it is not strictly
ordered, the tx queue can be stopped forever.

This improves performance by about 5% with 2 ports running bi-directional
64-byte packets.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-19 20:30:06 -07:00
..
appletalk
arcnet arcnet: fix signed bug in probe function 2010-07-18 15:07:15 -07:00
arm net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
atl1c
atl1e
atlx
benet be2net: Patch to determine if function is VF while running in guest OS. 2010-07-10 19:42:05 -07:00
bonding bonding: avoid a warning 2010-07-19 13:34:16 -07:00
caif drivers/net/caif: Remove unnecessary casts of private_data 2010-07-12 21:13:35 -07:00
can
chelsio
cris eth_v10: Removing dead ETRAX_NETWORK_RED_ON_NO_CONNECTION 2010-07-14 13:41:53 -07:00
cxgb3 cxgb3: simplify need_skb_unmap 2010-07-08 23:12:27 -07:00
cxgb4 cxgb4: exclude registers with read side effects from register dumps 2010-07-11 17:33:48 -07:00
cxgb4vf cxgb4vf: fix SGE resource resource deallocation bug 2010-07-15 22:47:06 -07:00
e1000 e1000: allow option to limit number of descriptors down to 48 per ring 2010-07-19 20:23:35 -07:00
e1000e e1000e: disable EEE support by default 2010-06-29 23:09:19 -07:00
ehea ehea: Allocate stats buffer with GFP_KERNEL 2010-07-01 22:45:52 -07:00
enic ethtool: Change ethtool_op_set_flags to validate flags 2010-06-30 14:09:35 -07:00
fs_enet net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
hamradio
ibm_newemac
igb igb: drop support for UDP hashing w/ RSS 2010-07-05 18:50:54 -07:00
igbvf
irda drivers: irda: fix sign bug 2010-07-15 20:27:57 -07:00
ixgb
ixgbe ixgbe: fix version string for ixgbe 2010-07-19 20:23:38 -07:00
ixgbevf drivers: ixgbevf: fix unsigned underflow 2010-07-15 20:27:58 -07:00
ixp2000
mlx4 drivers/net/mlx4: Use %pV, pr_<level>, printk_once 2010-07-15 19:05:17 -07:00
myri10ge ethtool: Change ethtool_op_set_flags to validate flags 2010-06-30 14:09:35 -07:00
netxen netxen: fix for kdump 2010-07-14 17:55:35 -07:00
octeon net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
pcmcia smc91c92_cs: fix the problem that lan & modem does not work simultaneously 2010-06-25 21:16:58 -07:00
phy net: support time stamping in phy devices. 2010-07-18 19:15:26 -07:00
qlcnic qlcnic: fix pci resource leak 2010-07-18 14:51:59 -07:00
qlge Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 15:59:38 -07:00
sfc sfc: Remove unused field left from mis-merge 2010-07-08 23:12:29 -07:00
skfp
stmmac net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
tokenring
tulip tulip: formatting of pointers in printk() 2010-07-14 15:06:10 -07:00
usb hso: remove driver version 2010-07-12 21:21:27 -07:00
vmxnet3 net-next: vmxnet3 fixes [5/5] Respect the interrupt type in VM configuration 2010-07-19 13:15:50 -07:00
vxge vxge: Version update 2010-07-15 20:46:23 -07:00
wan net: autoconvert trivial BKL users to private mutex 2010-07-12 20:21:47 -07:00
wimax
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-07-13 15:57:29 -04:00
3c59x.c 3c59x: Use fine-grained locks for MII and windowed register access 2010-06-29 23:14:21 -07:00
3c501.c
3c501.h
3c503.c
3c503.h
3c505.c
3c505.h
3c507.c
3c509.c
3c515.c
3c523.c
3c523.h
3c527.c
3c527.h
7990.c
7990.h
8139cp.c
8139too.c
8390.c
8390.h
8390p.c
82596.c drivers/net/82596.c: fix warning 2010-07-19 15:27:13 -07:00
a2065.c
a2065.h
ac3200.c ac3200: fix error path 2010-07-11 18:15:08 -07:00
acenic.c
acenic.h
amd8111e.c
amd8111e.h
apne.c
ariadne.c
ariadne.h
at1700.c at1700: fix double free_irq 2010-07-11 18:15:08 -07:00
atarilance.c
atp.c
atp.h
au1000_eth.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
au1000_eth.h
ax88796.c ax88796: free irq on error 2010-07-08 23:42:40 -07:00
b44.c b44: remove unused dma_desc_align_mask 2010-07-07 18:24:29 -07:00
b44.h
bcm63xx_enet.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
bcm63xx_enet.h
bfin_mac.c
bfin_mac.h
bmac.c
bmac.h
bnx2_fw.h
bnx2.c bnx2: Remove some unnecessary smp_mb() in tx fast path. 2010-07-19 20:30:06 -07:00
bnx2.h bnx2: Call pci_enable_msix() with actual number of vectors. 2010-07-19 20:30:06 -07:00
bnx2x_dump.h
bnx2x_fw_defs.h
bnx2x_fw_file_hdr.h
bnx2x_hsi.h
bnx2x_init_ops.h
bnx2x_init.h
bnx2x_link.c
bnx2x_link.h
bnx2x_main.c bnx2x: Set RXHASH for LRO packets 2010-07-07 15:45:00 -07:00
bnx2x_reg.h
bnx2x.h
bsd_comp.c
cassini.c cassini: Removing dead CASSINI_NAPI 2010-07-14 13:36:18 -07:00
cassini.h cassini: Removing dead CASSINI_QGE_DEBUG 2010-07-14 12:18:31 -07:00
cnic_defs.h
cnic_if.h cnic: Update version to 2.1.3. 2010-06-25 20:37:21 -07:00
cnic.c cnic: Further unify kcq handling code. 2010-06-25 20:37:20 -07:00
cnic.h cnic: Unify kcq allocation for all devices. 2010-06-25 20:37:19 -07:00
cpmac.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
cs89x0.c net: Removing dead ARCH_PNX010X 2010-07-19 13:32:57 -07:00
cs89x0.h cs89x0: Removing dead SH_HICOSH4 2010-07-14 13:40:36 -07:00
davinci_emac.c davinci_emac: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:12 -07:00
de600.c
de600.h
de620.c
de620.h
declance.c
defxx.c
defxx.h
depca.c depca: fix leaks in depca_module_init() 2010-07-12 20:21:40 -07:00
depca.h
dl2k.c
dl2k.h
dm9000.c
dm9000.h
dnet.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
dnet.h
dummy.c
e100.c
e2100.c
eepro.c
eexpress.c
eexpress.h
enc28j60_hw.h
enc28j60.c
epic100.c epic100: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:14 -07:00
eql.c
es3210.c
eth16i.c eth16i: fix memory leak 2010-07-14 17:57:19 -07:00
ethoc.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
ewrk3.c
ewrk3.h
fealnx.c fealnx: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:13 -07:00
fec_mpc52xx_phy.c
fec_mpc52xx.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
fec_mpc52xx.h
fec.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
fec.h
forcedeth.c forcedeth: correct valid flag 2010-07-05 22:15:47 -07:00
fsl_pq_mdio.c
fsl_pq_mdio.h
gianfar_ethtool.c
gianfar_sysfs.c
gianfar.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
gianfar.h gianfar: Implement workaround for eTSEC-A002 erratum 2010-06-30 11:35:43 -07:00
greth.c
greth.h
hamachi.c hamachi: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:15 -07:00
hp100.c hp100: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:16 -07:00
hp100.h
hp-plus.c
hp.c
hplance.c
hplance.h
hydra.c
ibmlana.c
ibmlana.h
ibmveth.c
ibmveth.h
ifb.c
ioc3-eth.c ioc3-eth: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:12 -07:00
ipg.c
ipg.h
iseries_veth.c
jazzsonic.c jazzsonic: free irq if sonic_open() fails 2010-07-12 20:21:44 -07:00
jme.c
jme.h
Kconfig net: Removing dead ARCH_PNX010X 2010-07-19 13:32:57 -07:00
korina.c
ks8842.c ks8842: Fix ks8842_tx_frame() for 16bit case. 2010-07-19 15:25:04 -07:00
ks8851_mll.c
ks8851.c
ks8851.h
ksz884x.c ksz884x: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:17 -07:00
lance.c lance: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:16 -07:00
lasi_82596.c
lib8390.c
lib82596.c
LICENSE.SRC
ll_temac_main.c ll_temac: Fix missing validate_addr hook 2010-07-12 20:21:42 -07:00
ll_temac_mdio.c
ll_temac.h
lne390.c
loopback.c net: fix 64 bit counters on 32 bit arches 2010-07-07 14:58:56 -07:00
lp486e.c
mac89x0.c mac89x0: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:18 -07:00
mac8390.c
macb.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
macb.h
mace.c
mace.h
macmace.c
macsonic.c macsonic: free irqs if sonic_open() fails 2010-07-12 20:21:44 -07:00
macvlan.c net: Get rid of rtnl_link_stats64 / net_device_stats union 2010-07-09 17:41:56 -07:00
macvtap.c macvtap: Use dev_t for macvtap_major. 2010-07-10 19:25:50 -07:00
Makefile drivers/net/Makefile: conditionally descend to wireless 2010-06-29 15:32:44 -07:00
mdio.c
meth.c
meth.h
mii.c
mipsnet.c
mv643xx_eth.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
mvme147.c
myri_sbus.c
myri_sbus.h
natsemi.c natsemi: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:17 -07:00
ne2.c
ne2k-pci.c
ne3210.c
ne-h8300.c
ne.c net/ne: fix memory leak in ne_drv_probe() 2010-07-05 20:08:05 -07:00
netconsole.c
netx-eth.c
ni52.c ni52: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:19 -07:00
ni52.h
ni65.c
ni65.h
ni5010.c
ni5010.h
niu.c niu: BUG on inability to find page in rx page hashes. 2010-07-07 18:20:30 -07:00
niu.h
ns83820.c ns83820: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:18 -07:00
pasemi_mac_ethtool.c
pasemi_mac.c
pasemi_mac.h
pci-skeleton.c
pcnet32.c
plip.c
ppp_async.c
ppp_deflate.c
ppp_generic.c net: autoconvert trivial BKL users to private mutex 2010-07-12 20:21:47 -07:00
ppp_mppe.c
ppp_mppe.h
ppp_synctty.c
pppoe.c
pppox.c
ps3_gelic_net.c
ps3_gelic_net.h
ps3_gelic_wireless.c
ps3_gelic_wireless.h
qla3xxx.c
qla3xxx.h
r6040.c
r8169.c
rionet.c
rrunner.c
rrunner.h
s2io-regs.h vxge: Update copyright information 2010-07-15 20:46:22 -07:00
s2io.c s2io: Remove unnecessary memset of netdev private data 2010-07-19 09:28:11 -07:00
s2io.h vxge: Update copyright information 2010-07-15 20:46:22 -07:00
s6gmac.c
sb1000.c
sb1250-mac.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
sc92031.c
seeq8005.c
seeq8005.h
sgiseeq.c
sgiseeq.h
sh_eth.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
sh_eth.h
sis190.c
sis900.c
sis900.h
skge.c
skge.h
sky2.c ethtool: Change ethtool_op_set_flags to validate flags 2010-06-30 14:09:35 -07:00
sky2.h
slhc.c
slip.c
slip.h
smc91x.c
smc91x.h
smc911x.c
smc911x.h
smc9194.c
smc9194.h
smc-mca.c
smc-ultra32.c
smc-ultra.c
smsc911x.c smsc911x: Add spinlocks around registers access 2010-07-19 13:36:21 -07:00
smsc911x.h
smsc9420.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
smsc9420.h
sni_82596.c
sonic.c
sonic.h
Space.c net: Removing dead {AR,WAVE}LAN 2010-07-14 12:17:35 -07:00
spider_net_ethtool.c
spider_net.c
spider_net.h
starfire.c starfire: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:15 -07:00
stnic.c
sun3_82586.c sun3_82586: Use the instance of net_device_stats from net_device. 2010-07-05 19:41:11 -07:00
sun3_82586.h
sun3lance.c
sunbmac.c
sunbmac.h
sundance.c
sungem_phy.c
sungem_phy.h
sungem.c
sungem.h
sunhme.c
sunhme.h
sunlance.c
sunqe.c
sunqe.h
sunvnet.c
sunvnet.h
tc35815.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
tehuti.c
tehuti.h
tg3.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
tg3.h tg3: Revert PCIe tx glitch fix 2010-07-11 17:07:43 -07:00
tlan.c
tlan.h
tsi108_eth.c
tsi108_eth.h
tun.c
typhoon.c
typhoon.h
ucc_geth_ethtool.c
ucc_geth.c net: preserve ifreq parameter when calling generic phy_mii_ioctl(). 2010-07-18 19:15:25 -07:00
ucc_geth.h
veth.c
via-rhine.c
via-velocity.c
via-velocity.h
virtio_net.c virtio_net: fix oom handling on tx 2010-07-02 22:27:26 -07:00
wd.c wd: fix memory leak 2010-07-14 17:53:18 -07:00
xen-netfront.c
xilinx_emaclite.c
xtsonic.c xtsonic: free irq if sonic_open() fails 2010-07-12 20:21:45 -07:00
yellowfin.c
znet.c
zorro8390.c