netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: shli@kernel.org
Cc: xiyou.wangcong@gmail.com, netdev@vger.kernel.org,
	Kernel-team@fb.com, shli@fb.com, eric.dumazet@gmail.com,
	flo@fourcot.fr
Subject: Re: [PATCH net V3 2/2] net: fix tcp reset packet flowlabel for ipv6
Date: Mon, 31 Jul 2017 14:24:28 -0700 (PDT)	[thread overview]
Message-ID: <20170731.142428.1731591151245966846.davem@davemloft.net> (raw)
In-Reply-To: <20170731193027.rbetx7b4jym452mr@kernel.org>

From: Shaohua Li <shli@kernel.org>
Date: Mon, 31 Jul 2017 12:30:27 -0700

> On Mon, Jul 31, 2017 at 11:10:38AM -0700, Cong Wang wrote:
>> On Mon, Jul 31, 2017 at 10:08 AM, Shaohua Li <shli@kernel.org> wrote:
>> > +/* Like ip6_make_flowlabel, but already has hash */
>> > +static inline __be32 ip6_make_flowlabel_from_hash(struct net *net,
>> > +                                                 bool autolabel, u32 hash)
>> > +{
>> > +       __be32 flowlabel;
>> > +
>> > +       if (net->ipv6.sysctl.auto_flowlabels == IP6_AUTO_FLOW_LABEL_OFF ||
>> > +           (!autolabel &&
>> > +            net->ipv6.sysctl.auto_flowlabels != IP6_AUTO_FLOW_LABEL_FORCED))
>> > +               return 0;
>> > +
>> > +       flowlabel = (__force __be32)hash & IPV6_FLOWLABEL_MASK;
>> > +
>> > +       if (net->ipv6.sysctl.flowlabel_state_ranges)
>> > +               flowlabel |= IPV6_FLOWLABEL_STATELESS_FLAG;
>> > +
>> > +       return flowlabel;
>> > +}
>> 
>> I still don't see why you have to duplicate the code,
>> for me you can just refactor ip6_make_flowlabel()
>> and pass the hash as a parameter and pass
>> 'flowlabel' as 0, and no run-time overhead.
> 
> Still need extra check. Ok, I updated the patch.

This is not how you post a new version of a patch.

It is especially not the way to post a new version of a patch which is
part of a series.

You always must make a clean, fresh, patch posting.  Not as a reply to
a discussion email.

And when the patch is part of a series, you must repost the entire
series along with the "[PATCH ... 0/N] " header posting.

      reply	other threads:[~2017-07-31 21:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 17:08 [PATCH net V3 1/2] net: remove unnecessary rotation Shaohua Li
2017-07-31 17:08 ` [PATCH net V3 2/2] net: fix tcp reset packet flowlabel for ipv6 Shaohua Li
2017-07-31 18:10   ` Cong Wang
2017-07-31 19:30     ` Shaohua Li
2017-07-31 21:24       ` David Miller [this message]

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=20170731.142428.1731591151245966846.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Kernel-team@fb.com \
    --cc=eric.dumazet@gmail.com \
    --cc=flo@fourcot.fr \
    --cc=netdev@vger.kernel.org \
    --cc=shli@fb.com \
    --cc=shli@kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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).