linux-stable/drivers
Daniel Borkmann 9aa1206e8f bpf: Add redirect_peer helper
Add an efficient ingress to ingress netns switch that can be used out of tc BPF
programs in order to redirect traffic from host ns ingress into a container
veth device ingress without having to go via CPU backlog queue [0]. For local
containers this can also be utilized and path via CPU backlog queue only needs
to be taken once, not twice. On a high level this borrows from ipvlan which does
similar switch in __netif_receive_skb_core() and then iterates via another_round.
This helps to reduce latency for mentioned use cases.

Pod to remote pod with redirect(), TCP_RR [1]:

  # percpu_netperf 10.217.1.33
          RT_LATENCY:         122.450         (per CPU:         122.666         122.401         122.333         122.401 )
        MEAN_LATENCY:         121.210         (per CPU:         121.100         121.260         121.320         121.160 )
      STDDEV_LATENCY:         120.040         (per CPU:         119.420         119.910         125.460         115.370 )
         MIN_LATENCY:          46.500         (per CPU:          47.000          47.000          47.000          45.000 )
         P50_LATENCY:         118.500         (per CPU:         118.000         119.000         118.000         119.000 )
         P90_LATENCY:         127.500         (per CPU:         127.000         128.000         127.000         128.000 )
         P99_LATENCY:         130.750         (per CPU:         131.000         131.000         129.000         132.000 )

    TRANSACTION_RATE:       32666.400         (per CPU:        8152.200        8169.842        8174.439        8169.897 )

Pod to remote pod with redirect_peer(), TCP_RR:

  # percpu_netperf 10.217.1.33
          RT_LATENCY:          44.449         (per CPU:          43.767          43.127          45.279          45.622 )
        MEAN_LATENCY:          45.065         (per CPU:          44.030          45.530          45.190          45.510 )
      STDDEV_LATENCY:          84.823         (per CPU:          66.770          97.290          84.380          90.850 )
         MIN_LATENCY:          33.500         (per CPU:          33.000          33.000          34.000          34.000 )
         P50_LATENCY:          43.250         (per CPU:          43.000          43.000          43.000          44.000 )
         P90_LATENCY:          46.750         (per CPU:          46.000          47.000          47.000          47.000 )
         P99_LATENCY:          52.750         (per CPU:          51.000          54.000          53.000          53.000 )

    TRANSACTION_RATE:       90039.500         (per CPU:       22848.186       23187.089       22085.077       21919.130 )

  [0] https://linuxplumbersconf.org/event/7/contributions/674/attachments/568/1002/plumbers_2020_cilium_load_balancer.pdf
  [1] https://github.com/borkmann/netperf_scripts/blob/master/percpu_netperf

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201010234006.7075-3-daniel@iogearbox.net
2020-10-11 10:21:04 -07:00
..
accessibility Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
acpi ACPI: processor: Take over RCU-idle for C3-BM idle 2020-09-16 19:36:26 +02:00
amba
android
ata libata-5.9-2020-09-04 2020-09-04 13:19:19 -07:00
atm atm: atmtcp: Constify atmtcp_v_dev_ops 2020-09-28 16:03:30 -07:00
auxdisplay A trivial patch for auxdisplay: 2020-09-05 14:22:46 -07:00
base Driver core fixes for 5.9-rc5 2020-09-13 09:02:59 -07:00
bcma
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2020-09-07 13:14:30 +02:00
bluetooth Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support 2020-09-27 23:44:50 +02:00
bus treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
clk clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe() 2020-09-10 13:42:35 -07:00
clocksource RISC-V Fixes for 5.9-rc6 (or shortly after) 2020-09-20 10:51:11 -07:00
connector connector: simplify the return expression of cn_add_callback() 2020-09-21 13:48:29 -07:00
counter counter: microchip-tcb-capture: check the correct variable 2020-08-22 11:38:42 +01:00
cpufreq cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled 2020-09-01 21:15:00 +02:00
cpuidle powerpc fixes for 5.9 #5 2020-09-18 11:48:25 -07:00
crypto crypto/chcr: move nic TLS functionality to drivers/net 2020-09-11 17:26:39 -07:00
dax dax: Fix stack overflow when mounting fsdax pmem device 2020-09-20 08:57:36 -07:00
dca
devfreq
dio
dma dmaengine fixes for v5.9-rc4 2020-09-04 12:12:39 -07:00
dma-buf dma-buf: fence-chain: Document missing dma_fence_chain_init() parameter in kerneldoc 2020-09-03 17:47:02 +05:30
edac EDAC/ghes: Check whether the driver is on the safe list correctly 2020-09-15 09:42:15 +02:00
eisa
extcon
firewire treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
firmware Single EFI fix for v5.9-rc: 2020-09-20 15:18:11 -07:00
fpga
fsi
gnss
gpio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
gpu Mediatek DRM Fixes for Linux 5.9 2020-09-18 08:52:06 +10:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-09-02 12:55:46 -07:00
hsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hv hyperv-fixes for 5.9-rc6 2020-09-15 16:20:43 -07:00
hwmon hwmon fixes for v5.9-rc3 2020-08-29 12:37:00 -07:00
hwspinlock
hwtracing treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i2c i2c: mxs: use MXS_DMA_CTRL_WAIT4END instead of DMA_CTRL_ACK 2020-09-18 23:11:44 +02:00
i3c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ide treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
idle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
iio Staging / IIO driver fixes for 5.9-rc5 2020-09-13 09:15:20 -07:00
infiniband RDMA second 5.9-rc pull request 2020-09-11 10:02:36 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-09-20 10:40:43 -07:00
interconnect interconnect: qcom: Fix small BW votes being truncated to zero 2020-09-04 00:07:12 +03:00
iommu iommu/amd: Restore IRTE.RemapEn bit for amd_iommu_activate_guest_mode 2020-09-18 11:17:19 +02:00
ipack
irqchip A set of fixes for interrupt chip drivers: 2020-08-30 11:56:54 -07:00
isdn treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
lightnvm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macintosh treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mailbox iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
mcb
md dm: Call proper helper to determine dax support 2020-09-20 08:55:09 -07:00
media media fixes for v5.9-rc4 2020-09-03 08:22:16 -07:00
memory treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
memstick treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
message treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mfd - Bug Fixes 2020-08-28 10:15:33 -07:00
misc Char / Misc driver fixes for 5.9-rc5 2020-09-13 08:52:21 -07:00
mmc mmc: sdio: Use mmc_pre_req() / mmc_post_req() 2020-09-07 08:57:44 +02:00
most
mtd Revert "mtd: spi-nor: Add capability to disable flash quad mode" 2020-09-14 20:58:27 +05:30
mux treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net bpf: Add redirect_peer helper 2020-10-11 10:21:04 -07:00
nfc nfc: s3fwrn5: Constify s3fwrn5_fw_info when not modified 2020-09-10 15:22:16 -07:00
ntb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nubus
nvdimm libnvdimm: KASAN: global-out-of-bounds Read in internal_create_group 2020-08-17 14:47:38 -06:00
nvme block-5.9-2020-09-22 2020-09-22 14:31:38 -07:00
nvmem
of of: add of_mdio_find_device() api 2020-09-24 19:49:36 -07:00
opp Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-09-01 19:44:20 +02:00
oprofile
parisc Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-08-12 12:41:15 -07:00
parport treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pci treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pcmcia treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
perf treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy phy: fixes for 5.9 2020-09-04 12:41:55 +02:00
pinctrl This is the bulk of the pin control changes for the v5.9 2020-08-09 12:52:28 -07:00
platform treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pnp
power treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
powercap powercap: RAPL: Add support for Lakefield 2020-09-16 14:16:04 +02:00
pps
ps3 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ptp ptp_qoriq: support FIPER3 2020-09-18 17:49:20 -07:00
pwm pwm: Changes for v5.9-rc1 2020-08-14 16:00:09 -07:00
rapidio rapidio: Replace 'select' DMAENGINES 'with depends on' 2020-09-05 19:52:54 +03:00
ras
regulator regulator: Fixes for v5.9 2020-09-11 11:25:55 -07:00
remoteproc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
reset treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rpmsg treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rtc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 net/smc: introduce CHID callback for ISM devices 2020-09-28 15:19:03 -07:00
sbus
scsi SCSI fixes on 20200915 2020-09-15 16:30:20 -07:00
sfi
sh iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
siox
slimbus
soc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
soundwire soundwire: fix double free of dangling pointer 2020-09-03 14:10:19 +05:30
spi spi: Fixes for v5.9 2020-09-11 11:35:55 -07:00
spmi
ssb ssb: Remove meaningless jump label to simplify the code 2020-09-21 16:01:35 +03:00
staging Staging / IIO driver fixes for 5.9-rc5 2020-09-13 09:15:20 -07:00
target SCSI fixes on 20200908 2020-09-08 11:42:58 -07:00
tc
tee
thermal - Fix bogus thermal shutdowns for omap4430 where bogus values 2020-09-04 12:49:03 -07:00
thunderbolt thunderbolt: Fix for v5.9-rc6 2020-09-15 13:52:14 +02:00
tty serial: 8250_pci: Add Realtek 816a and 816b 2020-09-16 13:23:33 +02:00
uio
usb usblp: fix race between disconnect() and read() 2020-09-17 18:45:30 +02:00
vdpa vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms 2020-08-26 08:13:59 -04:00
vfio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
video TTY/Serial/fbcon fixes for 5.9-rc6 2020-09-20 10:46:26 -07:00
virt
virtio virtio: pci: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
visorbus
vlynq
vme
w1
watchdog treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
zorro
Kconfig
Makefile