twx-linux/include
Eric Garver e7bc7db9ba net: openvswitch: add explicit drop action
From: Eric Garver <eric@garver.life>

This adds an explicit drop action. This is used by OVS to drop packets
for which it cannot determine what to do. An explicit action in the
kernel allows passing the reason _why_ the packet is being dropped or
zero to indicate no particular error happened (i.e: OVS intentionally
dropped the packet).

Since the error codes coming from userspace mean nothing for the kernel,
we squash all of them into only two drop reasons:
- OVS_DROP_EXPLICIT_WITH_ERROR to indicate a non-zero value was passed
- OVS_DROP_EXPLICIT to indicate a zero value was passed (no error)

e.g. trace all OVS dropped skbs

 # perf trace -e skb:kfree_skb --filter="reason >= 0x30000"
 [..]
 106.023 ping/2465 skb:kfree_skb(skbaddr: 0xffffa0e8765f2000, \
  location:0xffffffffc0d9b462, protocol: 2048, reason: 196611)

reason: 196611 --> 0x30003 (OVS_DROP_EXPLICIT)

Also, this patch allows ovs-dpctl.py to add explicit drop actions as:
  "drop"     -> implicit empty-action drop
  "drop(0)"  -> explicit non-error action drop
  "drop(42)" -> explicit error action drop

Signed-off-by: Eric Garver <eric@garver.life>
Co-developed-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-08-14 08:01:06 +01:00
..
acpi
asm-generic hyperv-fixes for 6.5-rc5 2023-08-04 17:16:14 -07:00
clocksource
crypto
drm drm/fb-helper: Remove unused inline function drm_fb_helper_defio_init() 2023-07-25 20:38:37 +02:00
dt-bindings
keys
kunit
kvm
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-10 18:59:43 -07:00
math-emu
media
memory
misc
net net: openvswitch: add last-action drop reason 2023-08-14 08:01:06 +01:00
pcmcia
ras
rdma
rv
scsi ata,scsi: do not issue START STOP UNIT on resume 2023-08-02 17:01:12 +09:00
soc Memory controller drivers - fixes for v6.5 2023-07-27 15:40:54 +02:00
sound
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-10 14:10:53 -07:00
uapi net: openvswitch: add explicit drop action 2023-08-14 08:01:06 +01:00
ufs
vdso
video
xen xen/evtchn: Introduce new IOCTL to bind static evtchn 2023-07-26 08:42:34 +02:00