Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-20 Thread Yang, Yi
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/openvs

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-20 Thread Jiri Benc
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. Jiri

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-19 Thread Yang, Yi
On Thu, Oct 19, 2017 at 03:41:18PM +0200, Jiri Benc wrote: > On Thu, 19 Oct 2017 21:12:15 +0800, Yang, Yi wrote: > > flow_key in set_nsh is got from netlink message which is set by > > commit_nsh in user space, here is code. > > Isn't this the 'key' local variable that you're talking about, while

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-19 Thread Jiri Benc
On Thu, 19 Oct 2017 21:12:15 +0800, Yang, Yi wrote: > flow_key in set_nsh is got from netlink message which is set by > commit_nsh in user space, here is code. Isn't this the 'key' local variable that you're talking about, while I'm referring to the 'flow_key' parameter? Jiri

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-19 Thread Yang, Yi
On Thu, Oct 19, 2017 at 02:43:47PM +0200, Jiri Benc wrote: > On Thu, 19 Oct 2017 19:40:53 +0800, Yang, Yi wrote: > > Actually mdtype can't be set, only push_nsh can set mdtype, so set_nsh > > won't have mdtype flow key, we can't get it from flow_key in set_nsh, > > only ttl, flags and path_hdr can

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-19 Thread Jiri Benc
On Thu, 19 Oct 2017 19:40:53 +0800, Yang, Yi wrote: > Actually mdtype can't be set, only push_nsh can set mdtype, so set_nsh > won't have mdtype flow key, we can't get it from flow_key in set_nsh, > only ttl, flags and path_hdr can be set in set_nsh as you can see in code. > I understand your conce

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-19 Thread Yang, Yi
On Thu, Oct 19, 2017 at 05:19:55AM +0800, Jiri Benc wrote: > On Mon, 16 Oct 2017 21:53:29 +0800, Yi Yang wrote: > > +static int set_nsh(struct sk_buff *skb, struct sw_flow_key *flow_key, > > + const struct nlattr *a) > > +{ > > + struct nshhdr *nh; > > + size_t length; > > + int

Re: [PATCH net-next v12] openvswitch: enable NSH support

2017-10-18 Thread Jiri Benc
On Mon, 16 Oct 2017 21:53:29 +0800, Yi Yang wrote: > +static int set_nsh(struct sk_buff *skb, struct sw_flow_key *flow_key, > +const struct nlattr *a) > +{ > + struct nshhdr *nh; > + size_t length; > + int err; > + u8 flags; > + u8 ttl; > + int i; > + > +

[PATCH net-next v12] openvswitch: enable NSH support

2017-10-16 Thread Yi Yang
v11->v12 - Fix missing changes old comments pointed out - Fix new comments for v11 v10->v11 - Fix the left three disputable comments for v9 but not fixed in v10. v9->v10 - Change struct ovs_key_nsh to struct ovs_nsh_key_base base; __be32 context[NSH_MD1_CONTEXT_SIZE]; - Fix