alistair23-linux/net
Daniel Borkmann 43279500de packet: respect devices with LLTX flag in direct xmit
Quite often it can be useful to test with dummy or similar
devices as a blackhole sink for skbs. Such devices are only
equipped with a single txq, but marked as NETIF_F_LLTX as
they do not require locking their internal queues on xmit
(or implement locking themselves). Therefore, rather use
HARD_TX_{UN,}LOCK API, so that NETIF_F_LLTX will be respected.

trafgen mmap/TX_RING example against dummy device with config
foo: { fill(0xff, 64) } results in the following performance
improvements for such scenarios on an ordinary Core i7/2.80GHz:

Before:

 Performance counter stats for 'trafgen -i foo -o du0 -n100000000' (10 runs):

   160,975,944,159 instructions:k            #    0.55  insns per cycle          ( +-  0.09% )
   293,319,390,278 cycles:k                  #    0.000 GHz                      ( +-  0.35% )
       192,501,104 branch-misses:k                                               ( +-  1.63% )
               831 context-switches:k                                            ( +-  9.18% )
                 7 cpu-migrations:k                                              ( +-  7.40% )
            69,382 cache-misses:k            #    0.010 % of all cache refs      ( +-  2.18% )
       671,552,021 cache-references:k                                            ( +-  1.29% )

      22.856401569 seconds time elapsed                                          ( +-  0.33% )

After:

 Performance counter stats for 'trafgen -i foo -o du0 -n100000000' (10 runs):

   133,788,739,692 instructions:k            #    0.92  insns per cycle          ( +-  0.06% )
   145,853,213,256 cycles:k                  #    0.000 GHz                      ( +-  0.17% )
        59,867,100 branch-misses:k                                               ( +-  4.72% )
               384 context-switches:k                                            ( +-  3.76% )
                 6 cpu-migrations:k                                              ( +-  6.28% )
            70,304 cache-misses:k            #    0.077 % of all cache refs      ( +-  1.73% )
        90,879,408 cache-references:k                                            ( +-  1.35% )

      11.719372413 seconds time elapsed                                          ( +-  0.24% )

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-28 16:49:48 -04:00
..
9p 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers 2014-02-10 17:48:54 -08:00
802
8021q vlan: make a new function vlan_dev_vlan_proto() and export 2014-03-26 16:41:28 -04:00
appletalk appletalk: fix checkpatch error with indent 2014-02-14 16:18:32 -05:00
atm atm: replace del_timer by del_timer_sync 2014-03-27 15:28:06 -04:00
ax25
batman-adv batman-adv: Start new development cycle 2014-03-22 09:18:59 +01:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-03-21 14:02:04 -04:00
bridge net/bridge: Use RCU_INIT_POINTER(x, NULL) in br_vlan.c 2014-03-27 00:18:09 -04:00
caif net: Include appropriate header file in caif/cfsrvl.c 2014-02-09 17:32:49 -08:00
can can: remove CAN FD compatibility for CAN 2.0 sockets 2014-03-03 14:29:52 +01:00
ceph net: remove unnecessary return's 2014-02-13 18:33:38 -05:00
core net/core: Use RCU_INIT_POINTER(x, NULL) in netpoll.c 2014-03-27 00:18:09 -04:00
dcb
dccp dccp: re-enable debug macro 2014-02-16 23:45:00 -05:00
decnet net: Move prototype declaration to header file include/net/dn.h from net/decnet/af_decnet.c 2014-02-09 17:32:49 -08:00
dns_resolver
dsa
ethernet
hsr hsr: replace del_timer by del_timer_sync 2014-03-27 15:28:06 -04:00
ieee802154 ieee802154: dgram: cleanup set of broadcast panid 2014-03-20 17:19:45 -04:00
ipv4 tcp: tcp_make_synack() minor changes 2014-03-27 15:10:10 -04:00
ipv6 ipv6: do not overwrite inetpeer metrics prematurely 2014-03-27 15:09:07 -04:00
ipx ipx: implement shutdown() 2014-02-12 19:26:32 -05:00
irda
iucv af_iucv: recvmsg problem for SOCK_STREAM sockets 2014-03-20 00:06:55 -04:00
key Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-25 20:29:20 -04:00
l2tp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-14 22:31:55 -04:00
lapb
llc
mac80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-03-21 14:02:04 -04:00
mac802154 ieee802154: add proper length checks to header creations 2014-03-14 22:15:26 -04:00
mpls
netfilter netfilter: Add missing vmalloc.h include to nft_hash.c 2014-03-18 23:12:02 -04:00
netlabel
netlink netlink: autosize skb lengthes 2014-03-10 13:56:26 -04:00
netrom
nfc NFC: 3.15: First pull request 2014-03-17 13:16:50 -04:00
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-25 20:29:20 -04:00
packet packet: respect devices with LLTX flag in direct xmit 2014-03-28 16:49:48 -04:00
phonet
rds
rfkill net: rfkill: move poll work to power efficient workqueue 2014-02-04 21:58:16 +01:00
rose
rxrpc af_rxrpc: Keep rxrpc_call pointers in a hashtable 2014-03-04 10:36:53 +00:00
sched net: sched: use no more than one page in struct fw_head 2014-03-18 14:17:55 -04:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-14 22:31:55 -04:00
sunrpc NFS client bugfixes for Linux 3.14 2014-02-19 12:13:02 -08:00
tipc tipc: make discovery domain a bearer attribute 2014-03-28 14:46:29 -04:00
unix net: unix socket code abuses csum_partial 2014-03-06 16:19:33 -05:00
vmw_vsock
wimax
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-03-21 14:02:04 -04:00
x25
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-25 20:29:20 -04:00
compat.c x86, x32: Correct invalid use of user timespec in the kernel 2014-01-30 18:44:13 -08:00
Kconfig
Makefile
nonet.c
socket.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-14 22:31:55 -04:00
sysctl_net.c