linux/drivers/net/wan
Eric Dumazet 93f154b594 net: release dst entry in dev_hard_start_xmit()
One point of contention in high network loads is the dst_release() performed
when a transmited skb is freed. This is because NIC tx completion calls
dev_kree_skb() long after original call to dev_queue_xmit(skb).

CPU cache is cold and the atomic op in dst_release() stalls. On SMP, this is
quite visible if one CPU is 100% handling softirqs for a network device,
since dst_clone() is done by other cpus, involving cache line ping pongs.

It seems right place to release dst is in dev_hard_start_xmit(), for most
devices but ones that are virtual, and some exceptions.

David Miller suggested to define a new device flag, set in alloc_netdev_mq()
(so that most devices set it at init time), and carefuly unset in devices
which dont want a NULL skb->dst in their ndo_start_xmit().

List of devices that must clear this flag is :

- loopback device, because it calls netif_rx() and quoting Patrick :
    "ip_route_input() doesn't accept loopback addresses, so loopback packets
     already need to have a dst_entry attached."
- appletalk/ipddp.c : needs skb->dst in its xmit function

- And all devices that call again dev_queue_xmit() from their xmit function
(as some classifiers need skb->dst) : bonding, vlan, macvlan, eql, ifb, hdlc_fr

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-18 22:19:19 -07:00
..
lmc
.gitignore
Kconfig
Makefile
c101.c
cosa.c Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6 2009-03-26 16:14:02 -07:00
cosa.h
cycx_drv.c
cycx_main.c
cycx_x25.c cycx: convert to net_device_ops 2009-03-21 22:38:00 -07:00
dlci.c dlci: convert to net_device_ops 2009-03-21 22:37:59 -07:00
dscc4.c
farsync.c trivial: fix typo "varaible" -> "variable" 2009-03-30 15:21:57 +02:00
farsync.h
hd64570.c
hd64570.h
hd64572.c
hd64572.h
hdlc.c
hdlc_cisco.c
hdlc_fr.c net: release dst entry in dev_hard_start_xmit() 2009-05-18 22:19:19 -07:00
hdlc_ppp.c
hdlc_raw.c
hdlc_raw_eth.c
hdlc_x25.c
hostess_sv11.c
ixp4xx_hss.c IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization. 2009-05-09 14:55:52 +02:00
lapbether.c labether: convert to net_device_ops 2009-03-21 22:43:55 -07:00
n2.c
pc300-falc-lh.h
pc300.h
pc300_drv.c wan/pc300_drv: convert to net_device_ops 2009-04-17 01:14:53 -07:00
pc300_tty.c
pc300too.c
pci200syn.c
sbni.c sbni: convert to net_device_ops 2009-03-21 22:43:56 -07:00
sbni.h
sdla.c wan: convert sdla driver to net_device_ops 2009-03-27 00:46:44 -07:00
sealevel.c
wanxl.c dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) 2009-04-07 08:31:12 -07:00
wanxl.h
wanxlfw.S
wanxlfw.inc_shipped
x25_asy.c x25_asy: convert to net_device_ops 2009-03-21 22:37:57 -07:00
x25_asy.h
z85230.c
z85230.h