[ovs-dev] [PATCH V3 11/40] compat/erspan: refactor existing erspan code

2018-05-18 Thread Greg Rose
of the upstream commit. While doing backports it is pretty much impossible to fully reconstitute all upstream commits but we're doing our best. Other parts of this commit are introduced in the upcoming monster patch for ip6 gre support. Cc: William Tu Signed-off-by: Greg Rose ---

[ovs-dev] [PATCH V3 12/40] ip_gre: fix wrong return value of erspan_rcv

2018-05-18 Thread Greg Rose
. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan Acked-by: William Tu Signed-off-by: David S. Miller Cc: Haishuang Yan Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 2 +- 1 file

[ovs-dev] [PATCH V3 10/40] ip_gre: Refactor the erpsan tunnel code.

2018-05-18 Thread Greg Rose
use it. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/erspan.h | 51 +++ datapath/linux/compat/ip_gre.c | 55 +++--- 2 files changed, 56

[ovs-dev] [PATCH V3 09/40] ip_gre: erspan device should keep dst

2018-05-18 Thread Greg Rose
u couldn't be updated in tx path. The same fix is needed for erspan as well. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux

[ovs-dev] [PATCH V3 08/40] ip_gre: set tunnel hlen properly in erspan_tunnel_init

2018-05-18 Thread Greg Rose
g tunnel->hlen with: tunnel->tun_hlen + tunnel->encap_hlen + sizeof(struct erspanhdr) Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose

[ovs-dev] [PATCH V3 07/40] ip_gre: get key from session_id correctly in erspan_rcv

2018-05-18 Thread Greg Rose
ID_MASK' there and also remove the unnecessary variable session_id. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux/compat/ip_g

[ovs-dev] [PATCH V3 02/40] gre: introduce native tunnel support for ERSPAN

2018-05-18 Thread Greg Rose
infrastructure as well as implementing a variety of compatability layer changes for same support. Cc: William Tu Signed-off-by: Greg Rose --- acinclude.m4 | 49 +- datapath/linux/Modules.mk|3 +- datapath/linux/compat/gre.c

[ovs-dev] [PATCH V3 06/40] ip_gre: check packet length and mtu correctly in erspan tx

2018-05-18 Thread Greg Rose
Cc: Xin Long Cc: David Laight Reviewed-by: Xin Long Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/l

[ovs-dev] [PATCH V3 04/40] gre: refactor the gre_fb_xmit

2018-05-18 Thread Greg Rose
-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3bd6e92..e30e428 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux

[ovs-dev] [PATCH V3 05/40] compat/gre: add collect_md mode

2018-05-18 Thread Greg Rose
#x27; mode. bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away. OVS can use it as well in the future. Signed-off-by: William Tu Signed-off-by: David S. Miller With some adjustments for compatibility layer. Cc: William Tu Signed-off-by: Greg Rose --- datapath/li

[ovs-dev] [PATCH V3 03/40] gre: fix goto statement typo

2018-05-18 Thread Greg Rose
: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3001f3f..3bd6e92 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat

[ovs-dev] [PATCH V3 00/40] Add ERSPAN support

2018-05-18 Thread Greg Rose
ave incorporated suggestions and comments from Ben. In V3 of this patch series we have fixed up the 'make check' and 'make check-kmod' errors. No errors are encountered that aren't also occasionally seen without this patch series applied. Greg Rose (12): compat: Remove un

[ovs-dev] [PATCH V3 01/40] compat: Remove unsupported kernel compat code

2018-05-18 Thread Greg Rose
Anything less than 3.10 isn't supported since a couple of releases ago so remove the dead code. Signed-off-by: Greg Rose --- datapath/linux/compat/include/linux/etherdevice.h | 30 -- datapath/linux/compat/include/linux/if_vlan.h | 11 --- datapath/linux/compat/include/

[ovs-dev] [PATCH V2 41/41] erspan: fix invalid erspan version.

2018-05-17 Thread Greg Rose
. Reported-by: Greg Rose Signed-off-by: William Tu --- datapath/linux/compat/ip_gre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 9240ab2..484a890 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath

[ovs-dev] [PATCH V2 40/41] gre: Resolve gre receive issues

2018-05-17 Thread Greg Rose
depend on the built-in gre kernel module. Signed-off-by: Greg Rose --- datapath/linux/compat/gre.c | 113 +--- datapath/linux/compat/include/net/gre.h | 18 + datapath/linux/compat/ip_gre.c | 38 +-- datapath/vport.c

[ovs-dev] [PATCH V2 39/41] rhel: Enable ERSPAN features for RHEL 7.x

2018-05-17 Thread Greg Rose
Enable ERSPAN on RHEL 7.x Signed-off-by: Greg Rose --- acinclude.m4| 15 ++- datapath/linux/compat/ip6_gre.c | 13 ++--- datapath/linux/compat/ip_gre.c | 12 ++-- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/acinclude.m4 b

[ovs-dev] [PATCH V2 38/41] tunnel: add support for erspan and ip6erspan type.

2018-05-17 Thread Greg Rose
From: William Tu This patch adds support for erspan and ip6erspan. Signed-off-by: William Tu --- lib/odp-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 2109fac..d7b5bcd 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2882

[ovs-dev] [PATCH V2 37/41] erspan: set bso when truncated bit is set.

2018-05-17 Thread Greg Rose
From: William Tu Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not handled. BSO has 4 possible values: 00 --> Good frame with no error, or unknown integrity 11 --> Payload is a Bad Frame with CRC or Alignment Error 01 --> Payload is a Short Frame 10 --> Payload is an Over

[ovs-dev] [PATCH V2 36/41] erspan: auto detect truncated ipv6 packets.

2018-05-17 Thread Greg Rose
ed-off-by: David S. Miller Signed-off-by: William Tu Cc: Greg Rose --- datapath/linux/compat/ip6_gre.c | 6 ++ datapath/linux/compat/ip_gre.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c index c9bd80d..5

[ovs-dev] [PATCH V2 35/41] ip6erspan: make sure enough headroom at xmit.

2018-05-17 Thread Greg Rose
before pushing the erspan header to the skb. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux

[ovs-dev] [PATCH V2 34/41] ip6erspan: improve error handling for erspan version number.

2018-05-17 Thread Greg Rose
erspan_metadata uapi, current code skips pushing the erspan header but continue pushing the gre header, which is incorrect. The patch fixes it by returning error. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath

[ovs-dev] [PATCH V2 32/41] erspan: Add flow-based erspan options

2018-05-17 Thread Greg Rose
The patch add supports for flow-based erspan options. The erspan_ver, erspan_idx, erspan_dir, and erspan_hwid can be set as "flow" so that its value is set by the openflow rule, instead of statically configured at port creation time. Signed-off-by: William Tu --- V2 - A portion of this patch fro

[ovs-dev] [PATCH V2 31/41] lib/dpif-netlink: Fix miscompare of gre ports

2018-05-17 Thread Greg Rose
cause when I added the ip6gre type I ran into a very difficult to detect bug. Cc: Ben Pfaff Signed-off-by: Greg Rose --- V2 - Removed strstr for gre completely as per Ben's feedback. --- lib/dpif-netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpif-

[ovs-dev] [PATCH V2 33/41] ip6gre: add erspan v2 to tunnel lookup

2018-05-17 Thread Greg Rose
found correctly. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c

[ovs-dev] [PATCH V2 30/41] ip6gre: Add ip6gre vport type

2018-05-17 Thread Greg Rose
Add handlers for OVS_VPORT_TYPE_IP6GRE Cc: Ben Pfaff Signed-off-by: Greg Rose --- V2 - Folded in additional change from Ben Pfaff as per his suggestion. --- lib/dpif-netlink-rtnl.c | 4 +++- lib/dpif-netlink.c | 7 +-- lib/netdev-native-tnl.c | 8 ++-- lib/netdev-vport.c | 4

[ovs-dev] [PATCH V2 26/41] userspace: add erspan tunnel support.

2018-05-17 Thread Greg Rose
supported, see ovs-fields for more details. Cc: Ben Pfaff Signed-off-by: William Tu Signed-off-by: Greg Rose --- V2 - Additional changes from Ben Pfaff folded in as per his suggestion. --- include/openvswitch/flow.h | 4 +- include/openvswitch/match.h | 12 +++ include/openvs

[ovs-dev] [PATCH V2 27/41] erspan: add kernel datapath support

2018-05-17 Thread Greg Rose
From: William Tu pass check, check-kernel (4.16-rc4), check-system-userspace Signed-off-by: William Tu --- lib/dpif-netlink-rtnl.c | 20 +++--- lib/dpif-netlink.c| 3 + lib/odp-util.c| 150 +- tests/odp.at

[ovs-dev] [PATCH V2 29/41] erspan: auto detect truncated packets.

2018-05-17 Thread Greg Rose
e erspan truncate bit. I tested the patch using bpf_skb_change_tail helper function to shrink the packet size and send to erspan tunnel. Reported-by: Xiaoyan Jin Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linu

[ovs-dev] [PATCH V2 28/41] openvswitch: fix vport packet length check.

2018-05-17 Thread Greg Rose
ecause it is negative value, causing the later ovs_vport_send to drop it due to over-mtu size. The patch fixes it by setting it to 0. Signed-off-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/vport.c

[ovs-dev] [PATCH V2 25/41] userspace: add gre sequence number support.

2018-05-17 Thread Greg Rose
From: William Tu The patch adds support for gre sequence number. Default is disable. When enable with 'options:seq=true', the outgoing gre packet will have its sequence number incremented by one. Signed-off-by: William Tu --- lib/netdev-native-tnl.c | 19 ++- lib/netdev-vport

[ovs-dev] [PATCH V2 24/41] netdev-native-tnl: refactor the tunnel push header.

2018-05-17 Thread Greg Rose
From: William Tu The patch adds additional 'struct netdev *' to the native tunnel's push_header() interface. This is used for later GRE sequence number support. Signed-off-by: William Tu --- lib/netdev-native-tnl.c | 6 -- lib/netdev-native-tnl.h | 6 -- lib/netdev-provider.h | 3 ++

[ovs-dev] [PATCH V2 23/41] datapath: add erspan version I and II support

2018-05-17 Thread Greg Rose
Pravin B Shelar Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/flow_netlink.c | 52 ++- datapath/linux/compat/include/linux/openvswitch.h | 1 + lib/odp-util.c| 2 + 3 fi

[ovs-dev] [PATCH V2 21/41] datapath: erspan: introduce erspan v2 for ip_gre

2018-05-17 Thread Greg Rose
compatability layer adjustments and portions of this commit were introduced earlier while pulling in ipv6 erspan. Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/ip_tunnels.h | 10 +++--- datapath/linux/compat/ip_gre.c | 44 ++ 2

[ovs-dev] [PATCH V2 22/41] compat: erspan: use bitfield instead of mask and offset

2018-05-17 Thread Greg Rose
this commit are included in a previous patch where it is called out. Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 9bc3277

[ovs-dev] [PATCH V2 20/41] datapath: Use correct tunnel receive for ip6gre

2018-05-17 Thread Greg Rose
During backports of ip6 gre I used ovs_ip_tunnel_rcv() for the ip6gre_rcv() function but that is wrong because it processes ipv4 tunnels. Use the correct backported ip6 tunnel receive in ip6 tunnel.c ip6_tnl_rcv(). Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 3 +-- 1 file

[ovs-dev] [PATCH V2 19/41] datapath: Add dellink op to ip6gre and ip6erspan tap ops

2018-05-17 Thread Greg Rose
Fix an oversight in the ip6gre_tap_ops and ip6erspan_tap_ops in which the .dellink field was not initialized leading to bugs when trying to remove and re-add those type of ports. Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[ovs-dev] [PATCH V2 17/41] compat: Fixups for some compile warnings and errors

2018-05-17 Thread Greg Rose
A lot of code has been pulled in. Fix it up to make sure it compiles correctly. Signed-off-by: Greg Rose --- datapath/linux/compat/gre.c | 23 datapath/linux/compat/include/net/gre.h | 47 - datapath/linux/compat/ip_gre.c

[ovs-dev] [PATCH V2 16/41] compat: Add #define for gre_handle_offloads

2018-05-17 Thread Greg Rose
Fixes compile errors on some 4.x kernels. Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index f849971..b1493e0 100644 --- a/datapath/linux/compat/ip_gre.c +++ b

[ovs-dev] [PATCH V2 15/41] compat: Move function to header

2018-05-17 Thread Greg Rose
tnl_flags_to_gre_flags is also needed in both ip_gre.c and gre.c on some kernels. Move it from ip_gre.c to the common header. Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/gre.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/datapath/linux/compat

[ovs-dev] [PATCH V2 14/41] ip_gre: remove the incorrect mtu limit for ipgre tap

2018-05-17 Thread Greg Rose
Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 028586c..f849971 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/l

[ovs-dev] [PATCH V2 13/41] ip_gre: erspan: reload pointer after pskb_may_pull

2018-05-17 Thread Greg Rose
tream commit. The ipv6 portion is pulled in with later patch in series. Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index c7912cf..028586c 1006

[ovs-dev] [PATCH V2 11/41] compat/erspan: refactor existing erspan code

2018-05-17 Thread Greg Rose
of the upstream commit. While doing backports it is pretty much impossible to fully reconstitute all upstream commits but we're doing our best. Other parts of this commit are introduced in the upcoming monster patch for ip6 gre support. Cc: William Tu Signed-off-by: Greg Rose ---

[ovs-dev] [PATCH V2 12/41] ip_gre: fix wrong return value of erspan_rcv

2018-05-17 Thread Greg Rose
. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan Acked-by: William Tu Signed-off-by: David S. Miller Cc: Haishuang Yan Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 2 +- 1 file

[ovs-dev] [PATCH V2 10/41] ip_gre: Refactor the erpsan tunnel code.

2018-05-17 Thread Greg Rose
use it. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/erspan.h | 51 +++ datapath/linux/compat/ip_gre.c | 55 +++--- 2 files changed, 56

[ovs-dev] [PATCH V2 09/41] ip_gre: erspan device should keep dst

2018-05-17 Thread Greg Rose
u couldn't be updated in tx path. The same fix is needed for erspan as well. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux

[ovs-dev] [PATCH V2 08/41] ip_gre: set tunnel hlen properly in erspan_tunnel_init

2018-05-17 Thread Greg Rose
g tunnel->hlen with: tunnel->tun_hlen + tunnel->encap_hlen + sizeof(struct erspanhdr) Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose

[ovs-dev] [PATCH V2 02/41] gre: introduce native tunnel support for ERSPAN

2018-05-17 Thread Greg Rose
infrastructure as well as implementing a variety of compatability layer changes for same support. Cc: William Tu Signed-off-by: Greg Rose --- acinclude.m4 | 49 +- datapath/linux/Modules.mk|3 +- datapath/linux/compat/gre.c

[ovs-dev] [PATCH V2 07/41] ip_gre: get key from session_id correctly in erspan_rcv

2018-05-17 Thread Greg Rose
ID_MASK' there and also remove the unnecessary variable session_id. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux/compat/ip_g

[ovs-dev] [PATCH V2 06/41] ip_gre: check packet length and mtu correctly in erspan tx

2018-05-17 Thread Greg Rose
Cc: Xin Long Cc: David Laight Reviewed-by: Xin Long Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/l

[ovs-dev] [PATCH V2 05/41] compat/gre: add collect_md mode

2018-05-17 Thread Greg Rose
#x27; mode. bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away. OVS can use it as well in the future. Signed-off-by: William Tu Signed-off-by: David S. Miller With some adjustments for compatibility layer. Cc: William Tu Signed-off-by: Greg Rose --- datapath/li

[ovs-dev] [PATCH V2 04/41] gre: refactor the gre_fb_xmit

2018-05-17 Thread Greg Rose
-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3bd6e92..e30e428 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux

[ovs-dev] [PATCH V2 03/41] gre: fix goto statement typo

2018-05-17 Thread Greg Rose
: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3001f3f..3bd6e92 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat

[ovs-dev] [PATCH V2 01/41] compat: Remove unsupported kernel compat code

2018-05-17 Thread Greg Rose
Anything less than 3.10 isn't supported since a couple of releases ago so remove the dead code. Signed-off-by: Greg Rose --- datapath/linux/compat/include/linux/etherdevice.h | 30 -- datapath/linux/compat/include/linux/if_vlan.h | 11 --- datapath/linux/compat/include/

[ovs-dev] [PATCH V2 00/41] Add ERSPAN support

2018-05-17 Thread Greg Rose
ave incorporated suggestions and comments from Ben. Ben, please make sure I didn't muck up the alignment patch you suggested. It did cause a bit of rebasing and a few conflicts but I think I did the right thing. Greg Rose (12): compat: Remove unsupported kernel compat code compat: Move fun

[ovs-dev] [PATCH 40/41] gre: Resolve gre receive issues

2018-05-17 Thread Greg Rose
depend on the built-in gre kernel module. Signed-off-by: Greg Rose --- datapath/linux/compat/gre.c | 113 +--- datapath/linux/compat/include/net/gre.h | 18 + datapath/linux/compat/ip_gre.c | 38 +-- datapath/vport.c

[ovs-dev] [PATCH 41/41] erspan: fix invalid erspan version.

2018-05-17 Thread Greg Rose
. Reported-by: Greg Rose Signed-off-by: William Tu --- datapath/linux/compat/ip_gre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 9240ab2..484a890 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath

[ovs-dev] [PATCH 38/41] tunnel: add support for erspan and ip6erspan type.

2018-05-17 Thread Greg Rose
From: William Tu This patch adds support for erspan and ip6erspan. Signed-off-by: William Tu --- lib/odp-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 29b5fb8..acc1586 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2885

[ovs-dev] [PATCH 39/41] rhel: Enable ERSPAN features for RHEL 7.x

2018-05-17 Thread Greg Rose
Enable ERSPAN on RHEL 7.x Signed-off-by: Greg Rose --- acinclude.m4| 15 ++- datapath/linux/compat/ip6_gre.c | 13 ++--- datapath/linux/compat/ip_gre.c | 12 ++-- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/acinclude.m4 b

[ovs-dev] [PATCH 37/41] erspan: set bso when truncated bit is set.

2018-05-17 Thread Greg Rose
From: William Tu Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not handled. BSO has 4 possible values: 00 --> Good frame with no error, or unknown integrity 11 --> Payload is a Bad Frame with CRC or Alignment Error 01 --> Payload is a Short Frame 10 --> Payload is an Over

[ovs-dev] [PATCH 36/41] erspan: auto detect truncated ipv6 packets.

2018-05-17 Thread Greg Rose
ed-off-by: David S. Miller Signed-off-by: William Tu Cc: Greg Rose --- datapath/linux/compat/ip6_gre.c | 6 ++ datapath/linux/compat/ip_gre.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c index c9bd80d..5

[ovs-dev] [PATCH 35/41] ip6erspan: make sure enough headroom at xmit.

2018-05-17 Thread Greg Rose
before pushing the erspan header to the skb. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux

[ovs-dev] [PATCH 34/41] ip6erspan: improve error handling for erspan version number.

2018-05-17 Thread Greg Rose
erspan_metadata uapi, current code skips pushing the erspan header but continue pushing the gre header, which is incorrect. The patch fixes it by returning error. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath

[ovs-dev] [PATCH 33/41] ip6gre: add erspan v2 to tunnel lookup

2018-05-17 Thread Greg Rose
found correctly. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c

[ovs-dev] [PATCH 32/41] datapath: Use correct tunnel receive for ip6gre

2018-05-17 Thread Greg Rose
During backports of ip6 gre I used ovs_ip_tunnel_rcv() for the ip6gre_rcv() function but that is wrong because it processes ipv4 tunnels. Use the correct backported ip6 tunnel receive in ip6 tunnel.c ip6_tnl_rcv(). Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 3 +-- 1 file

[ovs-dev] [PATCH 31/41] datapath: Add dellink op to ip6gre and ip6erspan tap ops

2018-05-17 Thread Greg Rose
Fix an oversight in the ip6gre_tap_ops and ip6erspan_tap_ops in which the .dellink field was not initialized leading to bugs when trying to remove and re-add those type of ports. Signed-off-by: Greg Rose --- datapath/linux/compat/ip6_gre.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[ovs-dev] [PATCH 30/41] erspan: Add flow-based erspan options

2018-05-17 Thread Greg Rose
From: William Tu The patch add supports for flow-based erspan options. The erspan_ver, erspan_idx, erspan_dir, and erspan_hwid can be set as "flow" so that its value is set by the openflow rule, instead of statically configured at port creation time. Signed-off-by: William Tu --- lib/match.c

[ovs-dev] [PATCH 24/41] userspace: add erspan tunnel support.

2018-05-17 Thread Greg Rose
From: William Tu ERSPAN is a tunneling protocol based on GRE tunnel. The patch add erspan tunnel support for ovs-vswitchd with userspace datapath. Configuring erspan tunnel is similar to gre tunnel, but with additional erspan's parameters. Matching a flow on erspan's metadata is also supported,

[ovs-dev] [PATCH 29/41] lib/dpif-netlink: Fix miscompare of gre ports

2018-05-17 Thread Greg Rose
cause when I added the ip6gre type I ran into a very difficult to detect bug. Signed-off-by: Greg Rose --- lib/dpif-netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index 607b497..a3c5381 100644 --- a/lib/dpif-netlink.c +++

[ovs-dev] [PATCH 28/41] ip6gre: Add ip6gre vport type

2018-05-17 Thread Greg Rose
Add handlers for OVS_VPORT_TYPE_IP6GRE Signed-off-by: Greg Rose --- lib/dpif-netlink-rtnl.c | 4 +++- lib/dpif-netlink.c | 7 +-- lib/netdev-native-tnl.c | 5 - lib/netdev-vport.c | 4 lib/odp-util.c | 9 +++-- lib/tnl-ports.c | 2 +- 6 files changed

[ovs-dev] [PATCH 25/41] erspan: add kernel datapath support

2018-05-17 Thread Greg Rose
From: William Tu pass check, check-kernel (4.16-rc4), check-system-userspace Signed-off-by: William Tu --- lib/dpif-netlink-rtnl.c | 20 +++--- lib/dpif-netlink.c| 3 + lib/odp-util.c| 150 +- tests/odp.at

[ovs-dev] [PATCH 27/41] erspan: auto detect truncated packets.

2018-05-17 Thread Greg Rose
e erspan truncate bit. I tested the patch using bpf_skb_change_tail helper function to shrink the packet size and send to erspan tunnel. Reported-by: Xiaoyan Jin Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linu

[ovs-dev] [PATCH 26/41] openvswitch: fix vport packet length check.

2018-05-17 Thread Greg Rose
ecause it is negative value, causing the later ovs_vport_send to drop it due to over-mtu size. The patch fixes it by setting it to 0. Signed-off-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/vport.c

[ovs-dev] [PATCH 23/41] userspace: add gre sequence number support.

2018-05-17 Thread Greg Rose
From: William Tu The patch adds support for gre sequence number. Default is disable. When enable with 'options:seq=true', the outgoing gre packet will have its sequence number incremented by one. Signed-off-by: William Tu --- lib/netdev-native-tnl.c | 19 ++- lib/netdev-vport

[ovs-dev] [PATCH 22/41] netdev-native-tnl: refactor the tunnel push header.

2018-05-17 Thread Greg Rose
From: William Tu The patch adds additional 'struct netdev *' to the native tunnel's push_header() interface. This is used for later GRE sequence number support. Signed-off-by: William Tu --- lib/netdev-native-tnl.c | 6 -- lib/netdev-native-tnl.h | 6 -- lib/netdev-provider.h | 3 ++

[ovs-dev] [PATCH 21/41] datapath: add erspan version I and II support

2018-05-17 Thread Greg Rose
Pravin B Shelar Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/flow_netlink.c | 52 ++- datapath/linux/compat/include/linux/openvswitch.h | 1 + lib/odp-util.c| 2 + 3 fi

[ovs-dev] [PATCH 20/41] compat: erspan: use bitfield instead of mask and offset

2018-05-17 Thread Greg Rose
this commit are included in a previous patch where it is called out. Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 9bc3277

[ovs-dev] [PATCH 17/41] compat: Fixups for some compile warnings and errors

2018-05-17 Thread Greg Rose
A lot of code has been pulled in. Fix it up to make sure it compiles correctly. Signed-off-by: Greg Rose --- datapath/linux/compat/gre.c | 23 datapath/linux/compat/include/net/gre.h | 47 - datapath/linux/compat/ip_gre.c

[ovs-dev] [PATCH 19/41] datapath: erspan: introduce erspan v2 for ip_gre

2018-05-17 Thread Greg Rose
compatability layer adjustments and portions of this commit were introduced earlier while pulling in ipv6 erspan. Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/ip_tunnels.h | 10 +++--- datapath/linux/compat/ip_gre.c | 44 ++ 2

[ovs-dev] [PATCH 16/41] compat: Add #define for gre_handle_offloads

2018-05-17 Thread Greg Rose
Fixes compile errors on some 4.x kernels. Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index f849971..b1493e0 100644 --- a/datapath/linux/compat/ip_gre.c +++ b

[ovs-dev] [PATCH 15/41] compat: Move function to header

2018-05-17 Thread Greg Rose
tnl_flags_to_gre_flags is also needed in both ip_gre.c and gre.c on some kernels. Move it from ip_gre.c to the common header. Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/gre.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/datapath/linux/compat

[ovs-dev] [PATCH 14/41] ip_gre: remove the incorrect mtu limit for ipgre tap

2018-05-17 Thread Greg Rose
Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 028586c..f849971 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/l

[ovs-dev] [PATCH 13/41] ip_gre: erspan: reload pointer after pskb_may_pull

2018-05-17 Thread Greg Rose
tream commit. The ipv6 portion is pulled in with later patch in series. Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index c7912cf..028586c 1006

[ovs-dev] [PATCH 10/41] ip_gre: Refactor the erpsan tunnel code.

2018-05-17 Thread Greg Rose
use it. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/erspan.h | 51 +++ datapath/linux/compat/ip_gre.c | 55 +++--- 2 files changed, 56

[ovs-dev] [PATCH 12/41] ip_gre: fix wrong return value of erspan_rcv

2018-05-17 Thread Greg Rose
. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan Acked-by: William Tu Signed-off-by: David S. Miller Cc: Haishuang Yan Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 2 +- 1 file

[ovs-dev] [PATCH 09/41] ip_gre: erspan device should keep dst

2018-05-17 Thread Greg Rose
u couldn't be updated in tx path. The same fix is needed for erspan as well. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux

[ovs-dev] [PATCH 11/41] compat/erspan: refactor existing erspan code

2018-05-17 Thread Greg Rose
of the upstream commit. While doing backports it is pretty much impossible to fully reconstitute all upstream commits but we're doing our best. Other parts of this commit are introduced in the upcoming monster patch for ip6 gre support. Cc: William Tu Signed-off-by: Greg Rose ---

[ovs-dev] [PATCH 02/41] gre: introduce native tunnel support for ERSPAN

2018-05-17 Thread Greg Rose
infrastructure as well as implementing a variety of compatability layer changes for same support. Cc: William Tu Signed-off-by: Greg Rose --- acinclude.m4 | 49 +- datapath/linux/Modules.mk|3 +- datapath/linux/compat/gre.c

[ovs-dev] [PATCH 08/41] ip_gre: set tunnel hlen properly in erspan_tunnel_init

2018-05-17 Thread Greg Rose
g tunnel->hlen with: tunnel->tun_hlen + tunnel->encap_hlen + sizeof(struct erspanhdr) Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose

[ovs-dev] [PATCH 07/41] ip_gre: get key from session_id correctly in erspan_rcv

2018-05-17 Thread Greg Rose
ID_MASK' there and also remove the unnecessary variable session_id. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux/compat/ip_g

[ovs-dev] [PATCH 06/41] ip_gre: check packet length and mtu correctly in erspan tx

2018-05-17 Thread Greg Rose
Cc: Xin Long Cc: David Laight Reviewed-by: Xin Long Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/l

[ovs-dev] [PATCH 05/41] compat/gre: add collect_md mode

2018-05-17 Thread Greg Rose
#x27; mode. bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away. OVS can use it as well in the future. Signed-off-by: William Tu Signed-off-by: David S. Miller With some adjustments for compatibility layer. Cc: William Tu Signed-off-by: Greg Rose --- datapath/li

[ovs-dev] [PATCH 04/41] gre: refactor the gre_fb_xmit

2018-05-17 Thread Greg Rose
-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3bd6e92..e30e428 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux

[ovs-dev] [PATCH 03/41] gre: fix goto statement typo

2018-05-17 Thread Greg Rose
: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3001f3f..3bd6e92 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat

[ovs-dev] [PATCH 01/41] compat: Remove unsupported kernel compat code

2018-05-17 Thread Greg Rose
Anything less than 3.10 isn't supported since a couple of releases ago so remove the dead code. Signed-off-by: Greg Rose --- datapath/linux/compat/include/linux/etherdevice.h | 30 -- datapath/linux/compat/include/linux/if_vlan.h | 11 --- datapath/linux/compat/include/

[ovs-dev] [PATCH 00/41] Add ERSPAN support

2018-05-17 Thread Greg Rose
ote: https://en.wikipedia.org/wiki/Release_early,_release_often For those who may be interested the entire series may be pulled from the erspan-combo-24 branch on my public github repository. https://github.com/gvrose8192/ovs-experimental/tree/erspan-combo-24 Greg Rose (11): compat: Remove unsuppor

[ovs-dev] [PATCH 11/11] compat/erspan: refactor existing erspan code

2018-04-25 Thread Greg Rose
of the upstream commit. While doing backports it is pretty much impossible to fully reconstitute all upstream commits but we're doing our best. Other parts of this commit are introduced in the upcoming monster patch for ip6 gre support. Cc: William Tu Signed-off-by: Greg Rose ---

[ovs-dev] [PATCH 10/11] ip_gre: Refactor the erpsan tunnel code.

2018-04-25 Thread Greg Rose
use it. Signed-off-by: William Tu Signed-off-by: David S. Miller Cc: William Tu Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/erspan.h | 51 +++ datapath/linux/compat/ip_gre.c | 55 +++--- 2 files changed, 56

[ovs-dev] [PATCH 09/11] ip_gre: erspan device should keep dst

2018-04-25 Thread Greg Rose
u couldn't be updated in tx path. The same fix is needed for erspan as well. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux

[ovs-dev] [PATCH 08/11] ip_gre: set tunnel hlen properly in erspan_tunnel_init

2018-04-25 Thread Greg Rose
g tunnel->hlen with: tunnel->tun_hlen + tunnel->encap_hlen + sizeof(struct erspanhdr) Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose

[ovs-dev] [PATCH 02/11] gre: introduce native tunnel support for ERSPAN

2018-04-25 Thread Greg Rose
infrastructure as well as implementing a variety of compatability layer changes for same support. Cc: William Tu Signed-off-by: Greg Rose --- acinclude.m4 | 49 +- datapath/linux/Modules.mk|3 +- datapath/linux/compat/gre.c

<    1   2   3   4   5   6   7   8   9   10   >