diff mbox series

[ovs-dev,V3,33/40] ip6gre: add erspan v2 to tunnel lookup

Message ID 1526690988-29912-34-git-send-email-gvrose8192@gmail.com
State Accepted
Headers show
Series Add ERSPAN support | expand

Commit Message

Gregory Rose May 19, 2018, 12:49 a.m. UTC
From: William Tu <u9012063@gmail.com>

Upstream commit:
    commit 3b04caab81649a9e8d5375b919b6653d791951df
    Author: William Tu <u9012063@gmail.com>
    Date:   Fri Mar 9 07:34:40 2018 -0800

    ip6gre: add erspan v2 to tunnel lookup

    The patch adds the erspan v2 proto in ip6gre_tunnel_lookup
    so the erspan v2 tunnel can be found correctly.

    Signed-off-by: William Tu <u9012063@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Cc: William Tu <u9012063@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/linux/compat/ip6_gre.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

William Tu May 22, 2018, 1:03 a.m. UTC | #1
On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8192@gmail.com> wrote:
> From: William Tu <u9012063@gmail.com>
>
> Upstream commit:
>     commit 3b04caab81649a9e8d5375b919b6653d791951df
>     Author: William Tu <u9012063@gmail.com>
>     Date:   Fri Mar 9 07:34:40 2018 -0800
>
>     ip6gre: add erspan v2 to tunnel lookup
>
>     The patch adds the erspan v2 proto in ip6gre_tunnel_lookup
>     so the erspan v2 tunnel can be found correctly.
>
>     Signed-off-by: William Tu <u9012063@gmail.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Cc: William Tu <u9012063@gmail.com>
> Signed-off-by: Greg Rose <gvrose8192@gmail.com>
> ---

LGTM.
Acked-by: William Tu <u9012063@gmail.com>
diff mbox series

Patch

diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c
index e0246d1..2f5fe49 100644
--- a/datapath/linux/compat/ip6_gre.c
+++ b/datapath/linux/compat/ip6_gre.c
@@ -138,7 +138,8 @@  static struct ip6_tnl *ip6gre_tunnel_lookup(struct net_device *dev,
 	struct ip6_tnl *t, *cand = NULL;
 	struct ip6gre_net *ign = net_generic(net, ip6gre_net_id);
 	int dev_type = (gre_proto == htons(ETH_P_TEB) ||
-			gre_proto == htons(ETH_P_ERSPAN)) ?
+			gre_proto == htons(ETH_P_ERSPAN) ||
+			gre_proto == htons(ETH_P_ERSPAN2)) ?
 		       ARPHRD_ETHER : ARPHRD_IP6GRE;
 	int score, cand_score = 4;