[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171020113440.GA102327@cran64.bj.intel.com>
Date:   Fri, 20 Oct 2017 19:34:40 +0800
From:   "Yang, Yi" <yi.y.yang@...el.com>
To:     Jiri Benc <jbenc@...hat.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "dev@...nvswitch.org" <dev@...nvswitch.org>,
        "e@...g.me" <e@...g.me>, "pshelar@....org" <pshelar@....org>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH net-next v12] openvswitch: enable NSH support
On Fri, Oct 20, 2017 at 04:05:35PM +0800, Jiri Benc wrote:
> On Fri, 20 Oct 2017 05:53:12 +0800, Yang, Yi wrote:
> > For push_nsh, my typical use scinario is push_nsh then set then output
> > to vxlangpe port.
> 
> Okay.
Then I just need to do the below change against v12.
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 1ab3c51..a3a663c 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -658,10 +658,8 @@ static int set_nsh(struct sk_buff *skb, struct
sw_flow_key *flow_key,
                return err;
        /* Make sure the NSH base header is there */
-       err = skb_ensure_writable(skb, skb_network_offset(skb) +
-                                      NSH_BASE_HDR_LEN);
-       if (unlikely(err))
-               return err;
+       if (!pskb_may_pull(skb, NSH_BASE_HDR_LEN))
+               return -ENOMEM;
        nh = nsh_hdr(skb);
        length = nsh_hdr_len(nh);
I'll send out v13 with this if you're ok.
> 
>  Jiri
Powered by blists - more mailing lists
 
