Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-09 Thread Yang, Yi Y
Original Message- From: Ben Pfaff [mailto:b...@ovn.org] Sent: Thursday, August 10, 2017 4:54 AM To: Yang, Yi Y Cc: Jan Scheurich ; d...@openvswitch.org; net...@vger.kernel.org; Jiri Benc ; da...@davemloft.net; Zoltán Balogh Subject: Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-09 Thread Ben Pfaff
: Thursday, August 10, 2017 2:09 AM > To: Yang, Yi Y > Cc: Jan Scheurich ; d...@openvswitch.org; > net...@vger.kernel.org; Jiri Benc ; da...@davemloft.net; > Zoltán Balogh > Subject: Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support > > On Wed, Aug 09, 2017 at 09:

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-09 Thread Yang, Yi Y
...@openvswitch.org; net...@vger.kernel.org; Jiri Benc ; da...@davemloft.net; Zoltán Balogh Subject: Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support On Wed, Aug 09, 2017 at 09:41:51AM +, Yang, Yi Y wrote: > Hi, Jan > > I have worked out a patch, will send it quickly for Ben. In

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-09 Thread Ben Pfaff
On Wed, Aug 09, 2017 at 09:41:51AM +, Yang, Yi Y wrote: > Hi, Jan > > I have worked out a patch, will send it quickly for Ben. In addition, I also > will send out a patch to change encap_nsh &decap_nsh to push_nsh and pop_nsh. > Per comments from all the people, we all agreed to do so :-) >

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-09 Thread Yang, Yi Y
- encap_nsh->mdlen; +if (pad_len > 0) { + memset(encap_nsh->metadata + encap_nsh->mdlen, 0, pad_len); +} +nl_msg_put_unspec(odp_actions, OVS_ACTION_ATTR_ENCAP_NSH, encap_nsh, size); +free(encap_nsh); } static void -Original Message- From

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-09 Thread Jan Scheurich
et > Subject: Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support > > To be clear, the OVS implementation is a placeholder. It will get > replaced by whatever netdev implements, and that's OK. I didn't focus > on making it perfect because I knew that. Instead, I

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-08 Thread Ben Pfaff
To be clear, the OVS implementation is a placeholder. It will get replaced by whatever netdev implements, and that's OK. I didn't focus on making it perfect because I knew that. Instead, I just made sure it was good enough for an internal OVS implementation that doesn't fix any ABI or API. OVS

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-08 Thread Yang, Yi Y
Hi, Jiri Thank you for your comments. __be32 c[4] is the name Ben Pfaff suggested, the original name is c1, c2, c3, c4, they are context data, so c seems ok, too :-) OVS has merged it and has the same name, maybe the better way is adding comment /* Context data */ after it. For MD type 2, str

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-08 Thread Jiri Benc
On Tue, 8 Aug 2017 12:59:40 +0800, Yi Yang wrote: > +struct ovs_key_nsh { > + __u8 flags; > + __u8 mdtype; > + __u8 np; > + __u8 pad; > + __be32 path_hdr; > + __be32 c[4]; "c" is a very poor name. Please rename it to something that expresses what this field contains. Also