linux_dsm_epyc7002/include/uapi/linux
Daniel Borkmann d346a3fae3 packet: introduce PACKET_QDISC_BYPASS socket option
This patch introduces a PACKET_QDISC_BYPASS socket option, that
allows for using a similar xmit() function as in pktgen instead
of taking the dev_queue_xmit() path. This can be very useful when
PF_PACKET applications are required to be used in a similar
scenario as pktgen, but with full, flexible packet payload that
needs to be provided, for example.

On default, nothing changes in behaviour for normal PF_PACKET
TX users, so everything stays as is for applications. New users,
however, can now set PACKET_QDISC_BYPASS if needed to prevent
own packets from i) reentering packet_rcv() and ii) to directly
push the frame to the driver.

In doing so we can increase pps (here 64 byte packets) for
PF_PACKET a bit:

  # CPUs -- QDISC_BYPASS   -- qdisc path -- qdisc path[**]
  1 CPU  ==  1,509,628 pps --  1,208,708 --  1,247,436
  2 CPUs ==  3,198,659 pps --  2,536,012 --  1,605,779
  3 CPUs ==  4,787,992 pps --  3,788,740 --  1,735,610
  4 CPUs ==  6,173,956 pps --  4,907,799 --  1,909,114
  5 CPUs ==  7,495,676 pps --  5,956,499 --  2,014,422
  6 CPUs ==  9,001,496 pps --  7,145,064 --  2,155,261
  7 CPUs == 10,229,776 pps --  8,190,596 --  2,220,619
  8 CPUs == 11,040,732 pps --  9,188,544 --  2,241,879
  9 CPUs == 12,009,076 pps -- 10,275,936 --  2,068,447
 10 CPUs == 11,380,052 pps -- 11,265,337 --  1,578,689
 11 CPUs == 11,672,676 pps -- 11,845,344 --  1,297,412
 [...]
 20 CPUs == 11,363,192 pps -- 11,014,933 --  1,245,081

 [**]: qdisc path with packet_rcv(), how probably most people
       seem to use it (hopefully not anymore if not needed)

The test was done using a modified trafgen, sending a simple
static 64 bytes packet, on all CPUs.  The trick in the fast
"qdisc path" case, is to avoid reentering packet_rcv() by
setting the RAW socket protocol to zero, like:
socket(PF_PACKET, SOCK_RAW, 0);

Tradeoffs are documented as well in this patch, clearly, if
queues are busy, we will drop more packets, tc disciplines are
ignored, and these packets are not visible to taps anymore. For
a pktgen like scenario, we argue that this is acceptable.

The pointer to the xmit function has been placed in packet
socket structure hole between cached_dev and prot_hook that
is hot anyway as we're working on cached_dev in each send path.

Done in joint work together with Jesper Dangaard Brouer.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-09 20:23:33 -05:00
..
byteorder
caif
can can: add explicit copyrights to can's netlink header 2013-09-21 15:43:12 +02:00
cifs cifs: Move and expand MAX_SERVER_SIZE definition 2013-09-08 14:34:22 -05:00
dvb
hdlc
hsi
isdn
mmc
netfilter netfilter: Fix FSF address in file headers 2013-12-06 12:37:57 -05:00
netfilter_arp
netfilter_bridge uapi: Convert some uses of 6 to ETH_ALEN 2013-08-02 12:33:54 -07:00
netfilter_ipv4 uapi: Convert some uses of 6 to ETH_ALEN 2013-08-02 12:33:54 -07:00
netfilter_ipv6
nfsd
raid UAPI: include <asm/byteorder.h> in linux/raid/md_p.h 2013-11-19 15:19:18 +11:00
spi
sunrpc
tc_act tc: export tc_defact.h to userspace 2013-10-02 16:39:11 -04:00
tc_ematch
usb USB: move the definition of USB_MAXCHILDREN 2013-07-16 15:33:02 -07:00
wimax uapi: Convert some uses of 6 to ETH_ALEN 2013-08-02 12:33:54 -07:00
a.out.h
acct.h
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h
apm_bios.h
arcfb.h
atalk.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.h
atm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
audit.h Merge git://git.infradead.org/users/eparis/audit 2013-11-21 19:18:14 -08:00
auto_fs4.h
auto_fs.h
auxvec.h
ax25.h
b1lli.h
baycom.h
bcache.h bcache: Pull on disk data structures out into a separate header 2013-11-10 21:56:33 -08:00
bcm933xx_hcs.h MIPS: BCM63XX: recognize Cable Modem firmware format 2013-07-01 15:10:53 +02:00
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
bpqether.h
bsg.h
btrfs.h Btrfs: use __u64 in exported user headers 2013-09-01 08:16:01 -04:00
can.h
capability.h
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cgroupstats.h
chio.h
cm4000_cs.h Omnikey Cardman 4000: pull in ioctl.h in user header 2013-08-28 19:26:38 -07:00
cn_proc.h
coda_psdev.h
coda.h
coff.h
connector.h
const.h linux/const.h: Add _BITUL() and _BITULL() 2013-06-25 15:50:04 -07:00
cramfs_fs.h
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlm.h
dlmconstants.h
dm-ioctl.h dm: allow remove to be deferred 2013-11-09 18:20:22 -05:00
dm-log-userspace.h
dn.h uapi: Convert some uses of 6 to ETH_ALEN 2013-08-02 12:33:54 -07:00
dqblk_xfs.h quota: Add a new quotactl command Q_XGETQSTATV 2013-08-20 16:53:58 -05:00
edd.h
efs_fs_sb.h
elf-em.h Drop remaining references to H8/300 architecture 2013-09-16 18:20:24 -07:00
elf-fdpic.h
elf.h
elfcore.h
errno.h
errqueue.h
ethtool.h net: ethtool: disambiguate XCVR_* meaning 2013-05-27 22:42:50 -07:00
eventpoll.h
fadvise.h
falloc.h
fanotify.h
fb.h
fcntl.h
fd.h
fdreg.h
fib_rules.h fib_rules: fix suppressor names and default values 2013-08-03 10:40:23 -07:00
fiemap.h ext4: add support for extent pre-caching 2013-08-16 22:05:14 -04:00
filter.h
firewire-cdev.h firewire: fix libdc1394/FlyCap2 iso event regression 2013-07-27 20:24:36 +02:00
firewire-constants.h
flat.h
fs.h fs: bump inode and dentry counters to long 2013-09-10 18:56:29 -04:00
fsl_hypervisor.h
fuse.h fuse: add flag to turn on async direct IO 2013-05-01 14:37:21 +02:00
futex.h
gameport.h
gen_stats.h net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
genetlink.h genetlink/pmcraid: use proper genetlink multicast API 2013-11-28 18:26:30 -05:00
gfs2_ondisk.h
gigaset_dev.h
hash_info.h crypto: provide single place for hash algo information 2013-10-25 17:14:03 -04:00
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hsr_netlink.h net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0) 2013-11-03 23:20:14 -05:00
hw_breakpoint.h
hysdn_if.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO 2013-09-03 22:11:44 -04:00
if_addr.h ipv6 addrconf: introduce IFA_F_MANAGETEMPADDR to tell kernel to manage temporary addresses 2013-12-06 16:34:43 -05:00
if_addrlabel.h
if_alg.h
if_arcnet.h
if_arp.h net: if_arp: add ARPHRD_NETLINK type 2013-06-24 16:39:05 -07:00
if_bonding.h bonding: modify the old and add new xmit hash policies 2013-10-03 15:36:38 -04:00
if_bridge.h uapi: Convert some uses of 6 to ETH_ALEN 2013-08-02 12:33:54 -07:00
if_cablemodem.h if_cablemodem.h: Add parenthesis around ioctl macros 2013-05-08 13:13:30 -07:00
if_eql.h
if_ether.h net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0) 2013-11-03 23:20:14 -05:00
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h net/hsr: Support iproute print_opt ('ip -details ...') 2013-11-30 12:48:14 -05:00
if_ltalk.h
if_packet.h packet: introduce PACKET_QDISC_BYPASS socket option 2013-12-09 20:23:33 -05:00
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h
if_pppox.h pptp: fix byte order warnings 2013-08-13 15:10:22 -07:00
if_slip.h
if_team.h
if_tun.h tun: Get skfilter layout 2013-08-21 12:21:45 -07:00
if_tunnel.h
if_vlan.h
if_x25.h
if.h net: Add layer 2 hardware acceleration operations for macvlan devices 2013-11-07 19:11:41 -05:00
igmp.h
in6.h net: sync some IP headers with glibc 2013-09-04 13:12:43 -04:00
in_route.h
in.h ipv4: introduce new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACE 2013-11-05 21:52:27 -05:00
inet_diag.h
inotify.h
input.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-09-15 07:13:39 -04:00
ioctl.h
ip6_tunnel.h
ip_vs.h ipvs: fix the IPVS_CMD_ATTR_MAX definition 2013-10-15 10:36:01 +09:00
ip.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-08-26 16:37:08 -04:00
ipc.h
ipmi_msgdefs.h
ipmi.h
ipsec.h
ipv6_route.h
ipv6.h ipv6: drop fragmented ndisc packets by default (RFC 6980) 2013-08-29 15:32:08 -04:00
ipx.h
irda.h
irqnr.h
isdn_divertif.h
isdn_ppp.h
isdn.h
isdnif.h
iso_fs.h
ivtv.h
ivtvfb.h
ixjuser.h
jffs2.h
joystick.h
Kbuild Intel MIC Host Driver Changes for Virtio Devices. 2013-09-26 13:50:56 -07:00
kd.h
kdev_t.h
kernel-page-flags.h
kernel.h
kernelcapi.h
kexec.h
keyboard.h
keyctl.h KEYS: Add per-user_namespace registers for persistent per-UID kerberos caches 2013-09-24 10:35:19 +01:00
kvm_para.h kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi 2013-08-26 12:46:01 +03:00
kvm.h Merge branch 'kvm-ppc-queue' of git://github.com/agraf/linux-2.6 into queue 2013-11-04 10:20:57 +02:00
l2tp.h
libc-compat.h net: sync some IP headers with glibc 2013-09-04 13:12:43 -04:00
limits.h
llc.h
loop.h
lp.h
magic.h Btrfs: add tests for find_lock_delalloc_range 2013-11-11 21:56:51 -05:00
major.h mtd: Move major number definitions to major.h 2013-11-06 23:32:59 -08:00
map_to_7segment.h
matroxfb.h
mdio.h
media.h
mei.h
mempolicy.h
meye.h
mic_common.h misc: mic: Enable OSPM suspend and resume support. 2013-10-05 18:01:42 -07:00
mic_ioctl.h misc: mic: fix a warning in the IOCTL header file. 2013-09-27 17:20:19 -07:00
mii.h
minix_fs.h
mman.h
mmtimer.h
module.h
mqueue.h
mroute6.h
mroute.h
msdos_fs.h fatfs: add FAT_IOCTL_GET_VOLUME_ID 2013-07-09 10:33:25 -07:00
msg.h
mtio.h
n_r3964.h
nbd.h
ncp_fs.h
ncp_mount.h
ncp_no.h
ncp.h
neighbour.h
net_dropmon.h
net_tstamp.h net_tstamp: Add SIOCGHWTSTAMP ioctl to match SIOCSHWTSTAMP 2013-11-19 19:07:21 +00:00
net.h
netconf.h
netdevice.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter.h
netlink_diag.h diag: warn about missing first netlink attribute 2013-11-28 18:16:43 -05:00
netlink.h
netrom.h
nfc.h NFC: Define secure element IO API and commands 2013-09-25 02:30:47 +02:00
nfs2.h
nfs3.h
nfs4_mount.h
nfs4.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h NFS: stop using NFS_MOUNT_SECFLAVOUR server flag 2013-10-28 15:37:56 -04:00
nfs.h
nfsacl.h
nl80211.h cfg80211: fix reporting 5/10 MHz support to user space 2013-12-02 11:51:21 +01:00
nubus.h
nvme.h NVMe: Update nvme_id_power_state with latest spec 2013-09-03 16:32:26 -04:00
nvram.h
omap3isp.h
omapfb.h
oom.h
openvswitch.h openvswitch: TCP flags matching support. 2013-11-01 18:43:45 -07:00
packet_diag.h diag: warn about missing first netlink attribute 2013-11-28 18:16:43 -05:00
param.h
parport.h
patchkey.h
pci_regs.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pci.h
perf_event.h Merge branch 'perf/urgent' into perf/core to fix conflicts 2013-11-04 07:49:35 +01:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pkt_cls.h net: sched: cls_bpf: add BPF-based classifier 2013-10-29 17:33:17 -04:00
pkt_sched.h pkt_sched: fq: fix pacing for small frames 2013-11-15 21:01:52 -05:00
pktcdvd.h
pmu.h
poll.h
posix_types.h
ppdev.h
ppp_defs.h
ppp-comp.h
ppp-ioctl.h
pps.h
prctl.h
ptp_clock.h
ptrace.h ptrace: add ability to get/set signal-blocked mask 2013-07-03 16:08:01 -07:00
qnx4_fs.h
qnxtypes.h
quota.h
radeonfb.h
random.h random32: move rnd_state to linux/random.h 2013-11-11 14:32:14 -05:00
raw.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h xattr: Constify ->name member of "struct xattr". 2013-07-25 19:30:03 +10:00
resource.h
rfkill.h
romfs_fs.h
rose.h
route.h
rtc.h
rtnetlink.h tcp: introduce a per-route knob for quick ack 2013-06-19 23:06:51 -07:00
scc.h
sched.h
screen_info.h
sctp.h sctp: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
sdla.h
seccomp.h
securebits.h
selinux_netlink.h
sem.h
serial_core.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2013-09-06 11:14:33 -07:00
serial_reg.h Revert "OMAP: UART: Keep the TX fifo full when possible" 2013-08-27 16:02:18 -07:00
serial.h
serio.h
shm.h
signal.h
signalfd.h
snmp.h tcp: auto corking 2013-12-06 12:51:41 -05:00
sock_diag.h
socket.h
sockios.h net_tstamp: Add SIOCGHWTSTAMP ioctl to match SIOCSHWTSTAMP 2013-11-19 19:07:21 +00:00
som.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h
stddef.h
string.h
suspend_ioctls.h
swab.h
synclink.h
sysctl.h
sysinfo.h
taskstats.h
tcp_metrics.h
tcp.h tcp: TCP_NOTSENT_LOWAT socket option 2013-07-24 17:54:48 -07:00
telephony.h
termios.h
time.h
times.h
timex.h
tiocl.h
tipc_config.h tipc: update code comments to reflect new uapi header path 2013-06-17 15:53:00 -07:00
tipc.h tipc: update code comments to reflect new uapi header path 2013-06-17 15:53:00 -07:00
toshiba.h
tty_flags.h
tty.h
types.h
udf_fs_i.h
udp.h
uhid.h HID: uhid: use generic hidinput_input_event() 2013-07-31 10:33:05 +02:00
uinput.h
uio.h
ultrasound.h
un.h
unistd.h
unix_diag.h diag: warn about missing first netlink attribute 2013-11-28 18:16:43 -05:00
usbdevice_fs.h
utime.h
utsname.h
uuid.h
uvcvideo.h
v4l2-common.h
v4l2-controls.h [media] v4l: ti-vpe: Add VPE mem to mem driver 2013-10-28 15:17:30 -02:00
v4l2-dv-timings.h [media] v4l2-dv-timings.h: remove duplicate V4L2_DV_BT_DMT_1366X768P60 2013-08-18 08:13:51 -03:00
v4l2-mediabus.h [media] v4l: Add media format codes for ARGB8888 and AYUV8888 on 32-bit busses 2013-08-18 07:23:07 -03:00
v4l2-subdev.h
veth.h
vfio.h vfio-pci: PCI hot reset interface 2013-09-04 11:28:04 -06:00
vhost.h tcm_vhost: header split up 2013-05-02 13:40:15 +03:00
videodev2.h [media] videodev2.h: defines to calculate blanking and frame sizes 2013-08-18 08:17:35 -03:00
virtio_9p.h
virtio_balloon.h
virtio_blk.h
virtio_config.h virtio: VIRTIO_F_ANY_LAYOUT feature 2013-07-09 10:47:45 +09:30
virtio_console.h Simple warning fix for module sections. If too late to pull, no big deal. 2013-07-03 13:09:06 -07:00
virtio_ids.h
virtio_net.h uapi: Convert some uses of 6 to ETH_ALEN 2013-08-02 12:33:54 -07:00
virtio_pci.h virtio_pci: better macro exported in uapi 2013-05-20 12:08:09 +09:30
virtio_ring.h
virtio_rng.h
vm_sockets.h
vt.h
wait.h
wanrouter.h
watchdog.h
wimax.h
wireless.h
x25.h
xattr.h
xfrm.h