]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Add packet len info to upcall.
authorWilliam Tu <u9012063@gmail.com>
Mon, 20 Jun 2016 14:26:17 +0000 (07:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jun 2016 20:34:39 +0000 (16:34 -0400)
commit8d611f076c87662483e8d96346239ee6aaa52964
treea1957ca55d8e3a9d49af276d1b347340de0256c7
parent3040d4b7030084feb20d9a5442bbae78fae81d55
openvswitch: Add packet len info to upcall.

The commit 928a38194b51 ("openvswitch: Add packet truncation support.")
introduces packet truncation before sending to userspace upcall receiver.
This patch passes up the skb->len before truncation so that the upcall
receiver knows the original packet size. Potentially this will be used
by sFlow, where OVS translates sFlow config header=N to a sample action,
truncating packet to N byte in kernel datapath. Thus, only N bytes instead
of full-packet size is copied from kernel to userspace, saving the
kernel-to-userspace bandwidth.

Signed-off-by: William Tu <u9012063@gmail.com>
Cc: Pravin Shelar <pshelar@nicira.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/openvswitch.h
net/openvswitch/datapath.c