From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Tom Herbert <therbert@google.com>,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] net: Use IPv6 flow label in flow_dissector
Date: Mon, 28 Apr 2014 00:55:54 +0400 [thread overview]
Message-ID: <535D6EDA.2050903@cogentembedded.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1404261553060.15726@tomh.mtv.corp.google.com>
Hello.
On 04/27/2014 03:00 AM, Tom Herbert wrote:
> This implements the receive side to support RFC6438 which is to
> use the flow label as an ECMP hash. If an IPv6 flow label is set
> in a packet we can use this as input for computing an l4-hash.
> There should be no need to parse any transport headers in this
> case.
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
> net/core/flow_dissector.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 107ed12..1c37d7b 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
[...]
> @@ -89,6 +91,20 @@ ipv6:
> flow->src = (__force __be32)ipv6_addr_hash(&iph->saddr);
> flow->dst = (__force __be32)ipv6_addr_hash(&iph->daddr);
> nhoff += sizeof(struct ipv6hdr);
> +
> + if ((flow_label = ip6_flowlabel(iph))) {
This wouldn't pass scripts/checkpatch.pl -- assignments shouldn't be
enclosed into the *if* statement's parens.
> + /*
> + * Awesome, IPv6 packet has a flow label so we can
> + * use that to represent the ports without any
> + * further dissection.
> + */
Multi-line comments in the networking code should look this way:
/* bla
* bla
*/
This is also an issue that scripts/checkpatch.pl would complain about...
WBR, Sergei
prev parent reply other threads:[~2014-04-27 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 23:00 [PATCH 1/2] net: Use IPv6 flow label in flow_dissector Tom Herbert
2014-04-27 20:55 ` Sergei Shtylyov [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=535D6EDA.2050903@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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).