linux_dsm_epyc7002/drivers/net
Kevin Hao c4bc44c65b net: fec: fix the race between xmit and bdp reclaiming path
When we transmit a fragmented skb, we may run into a race like the
following scenario (assume txq->cur_tx is next to txq->dirty_tx):
           cpu 0                                          cpu 1
  fec_enet_txq_submit_skb
    reserve a bdp for the first fragment
    fec_enet_txq_submit_frag_skb
       update the bdp for the other fragment
       update txq->cur_tx
                                                   fec_enet_tx_queue
                                                     bdp = fec_enet_get_nextdesc(txq->dirty_tx, fep, queue_id);
                                                     This bdp is the bdp reserved for the first segment. Given
                                                     that this bdp BD_ENET_TX_READY bit is not set and txq->cur_tx
                                                     is already pointed to a bdp beyond this one. We think this is a
                                                     completed bdp and try to reclaim it.
    update the bdp for the first segment
    update txq->cur_tx

So we shouldn't update the txq->cur_tx until all the update to the
bdps used for fragments are performed. Also add the corresponding
memory barrier to guarantee that the update to the bdps, dirty_tx and
cur_tx performed in the proper order.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-10 13:28:14 -07:00
..
appletalk
arcnet
bonding bonding: add tlb_dynamic_lb netlink support 2015-07-31 15:35:55 -07:00
caif
can can: mcp251x: get regulators optionally 2015-07-16 09:04:22 +02:00
cris
dsa net: dsa: mv88e6xxx: rework FDB add/del operations 2015-08-09 22:48:09 -07:00
ethernet net: fec: fix the race between xmit and bdp reclaiming path 2015-08-10 13:28:14 -07:00
fddi
hamradio
hippi
hyperv hv_netvsc: Add structs and handlers for VF messages 2015-07-27 01:12:26 -07:00
ieee802154 at86rf230: remove hrtimer on 1 usec delay 2015-07-30 14:02:21 +02:00
ipvlan ipvlan: ignore addresses from ipv6 autoconfiguration 2015-07-15 21:33:40 -07:00
irda
phy net: phy: add RealTek RTL8211DN phy id 2015-08-09 22:52:15 -07:00
plip
ppp
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-31 23:52:20 -07:00
vmxnet3
wan Doc: z8530book: Fix typo in API-z8530-sync-txdma-open.html 2015-07-10 23:45:31 -07:00
wimax
wireless Major changes: 2015-07-31 15:33:23 -07:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-23 00:41:16 -07:00
dummy.c
eql.c
geneve.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: Don't segment multiple tagged packets on macvlan device 2015-08-03 14:24:49 -07:00
macvtap.c macvtap: fix network header pointer for VLAN tagged pkts 2015-07-27 14:49:54 -07:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c tuntap: Don't segment multiple tagged packets on tap device 2015-08-03 14:24:50 -07:00
veth.c veth: Don't segment multiple tagged packets on veth device 2015-08-03 14:24:50 -07:00
virtio_net.c virtio_net: add gro capability 2015-08-03 14:22:53 -07:00
vxlan.c vxlan: combine VXLAN_FLOWBASED into VXLAN_COLLECT_METADATA 2015-08-07 11:46:34 -07:00
xen-netfront.c