From: "Yang, Yi" <yi.y.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Jiri Benc <jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org"
<dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"e@erig.me" <e@erig.me>
Subject: Re: [PATCH net-next v4] openvswitch: enable NSH support
Date: Mon, 21 Aug 2017 16:39:01 +0800 [thread overview]
Message-ID: <20170821083900.GA74649@cran64.bj.intel.com> (raw)
In-Reply-To: <20170821101925.3f9b36a1@griffin>
On Mon, Aug 21, 2017 at 10:19:24AM +0200, Jiri Benc wrote:
> On Mon, 21 Aug 2017 14:11:10 +0800, Yang, Yi wrote:
> > In OVS code, it has been removed because of Microsoft compiler issue.
>
> We absolutely, completely and utterly do not care in the kernel. Please
> never make such arguments and never make the code look worse because of
> a compiler for other operating systems.
Anyway, we need to keep the code in userspace consistent with the one in
kernel as possible as, otherwise it will be a burden for developer, I
know userspace has different coding standard from kernel, this will make
developer painful if we have two sets of code although they have same
functionality.
>
> > > I was wondering about this during the reviews of the previous versions.
> > > Now I've given this more thought but I still don't see it - why is the
> > > inner_protocol set here?
> >
> > I saw push_mpls has it, so also set it.
>
> MPLS supports GSO and needs this for segmentation. I don't see anything
> GSO related in this patch.
>
> How do you plan to address GSO, anyway?
No plan to do that, I'm not an expert on this, we can remove it if
you're very sure it is necessary.
>
> > > > + err = check_header(skb, length);
> > > > + if (unlikely(err))
> > > > + return err;
> > > > +
> > > > + key->nsh.flags = nsh_get_flags(nsh);
> > >
> > > Again, need to reload nsh.
> >
> > I used skb->len in v5, so we can't avoid such issue.
>
> And how do you ensure that the skb has enough headroom, then? That is
> wrong. All I said is that you have to reload the pointers to the header
> which is what you have to do.
Ok, got it, will add it.
>
> > > Wouldn't it be nicer if the fields of struct ovs_nsh_key_base and of
> > > struct nsh_hdr had the same names?
> >
> > Such change also will impact on OVS code, so I prefer not to change
> > them.
>
> We do not care.
>
> The order in which you send patches to different projects is your
> choice. The only standard by which we measure and evaluate kernel
> patches is the technical suitability of the patches. Whether or not
> some other projects have dependencies on some kind of previous versions
> of out of tree kernel patches have zero relevance here.
>
> If you designed other code to depend on your notion on how a kernel API
> will look like before getting the actual patches accepted to the
> kernel, that's your problem and you'll have to deal with that.
>
> > For struct nsh_hdr, we need more self-descriptive fields, but for struct
> > ovs_nsh_key_base, because we need to use keys in OVS OpenFlow, so np is
> > obviously better than next_proto, we also try our best to make sure the
> > old NSH implementation has same match fields as the new one does.
>
> Not relevant.
Ok, I can follow your standard :-)
To make sure we make agreement, please confirm if this one is ok?
struct nsh_hdr {
ovs_be16 ver_flags_ttl_len;
uint8_t mdtype;
uint8_t np;
ovs_16aligned_be32 path_hdr;
union {
struct nsh_md1_ctx md1;
struct nsh_md2_tlv md2;
};
};
Or it will be better if you can provide your preferred version here.
>
> Jiri
next prev parent reply other threads:[~2017-08-21 8:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 7:24 [PATCH net-next v4] openvswitch: enable NSH support Yi Yang
2017-08-18 13:26 ` Jiri Benc
2017-08-18 13:31 ` Jiri Benc
2017-08-21 6:31 ` Yang, Yi
2017-08-21 6:11 ` Yang, Yi
[not found] ` <20170821061109.GA72656-re2EX8HDrk21gSHoDXDV2kEOCMrvLtNR@public.gmane.org>
2017-08-21 8:19 ` Jiri Benc
2017-08-21 8:39 ` Yang, Yi [this message]
2017-08-21 9:04 ` Jan Scheurich
[not found] ` <CFF8EF42F1132E4CBE2BF0AB6C21C58D727494F3-hqolJogE5njKJFWPz4pdheaU1rCVNFv4@public.gmane.org>
2017-08-21 9:31 ` Jan Scheurich
2017-08-21 9:35 ` Jiri Benc
2017-08-21 9:42 ` Jan Scheurich
2017-08-21 9:51 ` Jiri Benc
2017-08-21 10:10 ` Jan Scheurich
[not found] ` <CFF8EF42F1132E4CBE2BF0AB6C21C58D7274A5C7-hqolJogE5njKJFWPz4pdheaU1rCVNFv4@public.gmane.org>
2017-08-21 11:50 ` Jiri Benc
2017-08-22 8:32 ` Jan Scheurich
[not found] ` <CFF8EF42F1132E4CBE2BF0AB6C21C58D7274C9FB-hqolJogE5njKJFWPz4pdheaU1rCVNFv4@public.gmane.org>
2017-08-22 17:35 ` Ben Pfaff
2017-08-23 15:27 ` David Laight
[not found] ` <20170821083900.GA74649-re2EX8HDrk21gSHoDXDV2kEOCMrvLtNR@public.gmane.org>
2017-08-21 9:18 ` Jiri Benc
2017-08-21 9:15 ` Yang, Yi
2017-08-21 9:47 ` Jiri Benc
2017-08-21 11:11 ` Yang, Yi
2017-08-22 9:38 ` Yang, Yi
2017-08-23 7:26 ` Jiri Benc
2017-08-18 19:09 ` Eric Garver
2017-08-21 6:21 ` Yang, Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170821083900.GA74649@cran64.bj.intel.com \
--to=yi.y.yang-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
--cc=e@erig.me \
--cc=jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).