This series adds the packet truncate action to OVS kernel and userspace.
The kernel datapath is upstreamed to net-next, so backports are provided
for Linux kernel 3.10 - 4.6. Patch 1 provides the kernel code and compiles
on each Linux version within this range. The backports are tested on
Linux-stable version 4.3, with Fedora 23 and Ubuntu 14.04. Patch 2 provides
the userspace support for packet truncation.
A travis CI build is also available at:
https://travis-ci.org/williamtu/ovs-travis/builds/137660394
v6->v7
- Kernel datapath has been upstream.
- Add support for OFPP_LOCAL and OFPP_IN_PORT.
- Disallow other OFPP_* port at decode time instead of translation time.
- Set minimum max_len size from 60 to 14 (ETH_HLEN).
- Change max_len from u16 to u32 because kernel datapath uses u32.
v5->v6
- Add sample snaplen and sFlow usecase
- Add mirror snaplen usecase
v4->v5
- Disallow truncate and output to a patch port
- Add additional testcases
- Fix sparse warnings
v4: https://patchwork.ozlabs.org/patch/626486/
v3->v4
- Save the bytes to removed in datapath, instead of max_len
- Fix issues in test cases
- Add truncate support when upcall to userspace
v3: https://patchwork.ozlabs.org/patch/618573/
v2->v3
- Separate the truncate action and output action in datapath.
- Add truncate support for tunnel push and pop.
- Fix clang error.
- Use pskb_trim instead of skb_trim.
- Fallback to userspace truncate action when the
openvswitch kernel module does not support.
- Disallow truncate port to be any OFPUTIL_NAMED_PORTS.
- Add more testcases.
v1
- Reuse max_len in OpenFlow output action.
William Tu (2):
datapath:backport: openvswitch: Add packet truncation support.
ofp-actions: Add truncate action.
datapath/actions.c | 40 +++++-
datapath/datapath.c | 29 ++--
datapath/datapath.h | 5 +-
datapath/flow_netlink.c | 9 ++
datapath/linux/compat/include/linux/openvswitch.h | 6 +
datapath/vport.c | 1 +
include/openvswitch/ofp-actions.h | 10 ++
lib/dp-packet.c | 1 +
lib/dp-packet.h | 27 ++++
lib/dpif-netdev.c | 33 ++++-
lib/dpif.c | 23 +++
lib/dpif.h | 1 +
lib/netdev-bsd.c | 5 +
lib/netdev-dpdk.c | 6 +
lib/netdev-dummy.c | 5 +
lib/netdev-linux.c | 5 +
lib/netdev.c | 8 +-
lib/odp-execute.c | 11 ++
lib/odp-util.c | 23 +++
lib/ofp-actions.c | 107 ++++++++++++++
ofproto/ofproto-dpif-sflow.c | 1 +
ofproto/ofproto-dpif-xlate.c | 57 ++++++++
ofproto/ofproto-dpif.c | 56 ++++++++
ofproto/ofproto-dpif.h | 3 +
tests/odp.at | 1 +
tests/ofp-actions.at | 3 +
tests/ofproto-dpif.at | 124 ++++++++++++++++
tests/ovs-ofctl.at | 8 ++
tests/system-traffic.at | 168 ++++++++++++++++++++++
29 files changed, 756 insertions(+), 20 deletions(-)
--
2.5.0
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev