netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Daniel Borkmann <dborkman@redhat.com>,
	netdev@vger.kernel.org, davem@davemloft.net, andy@greyhouse.net,
	fubar@us.ibm.com, vfalico@redhat.com
Subject: Re: [PATCH]
Date: Thu, 26 Sep 2013 17:40:03 +0200	[thread overview]
Message-ID: <52445553.1030308@redhat.com> (raw)
In-Reply-To: <1380209227.3165.176.camel@edumazet-glaptop>

On 09/26/2013 05:27 PM, Eric Dumazet wrote:
> On Thu, 2013-09-26 at 16:09 +0200, Nikolay Aleksandrov wrote:
>> Factor out the code that extracts the ports from skb_flow_dissect and
>> add a new function skb_flow_get_ports which can be re-used.
>>
>> Suggested-by: Veaceslav Falico <vfalico@redhat.com>
>> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>> ---
>> v2: new patch
>> v3: fix a bug in skb_flow_dissect where thoff didn't have poff added by
>>     modifying thoff directly in skb_flow_get_ports as it's done anyway.
>>     Also add the necessary export symbol for skb_flow_get_ports.
>> This seems like a good idea because there're other users that can re-use
>> it later as well.
> 
> Wait a minute.... existing code seems buggy.
> 
> Daniel, any objection if I submit this fix ?
> 
> (commit 8ed781668dd49b608f)
> 
1 question, I might be missing something but proto_ports_offset() gets the SPI
with that 4 byte offset as is written in the comments, in every other case
proto_ports_offset() is 0, so why would we want the SPI in the ->ports field ?
And even then isn't it supposed to be 16 bits (2 bytes) and not 4, since we need
to pass over "next header" (8 bits) and length (8 bits) ?

Thanks,
 Nik

  reply	other threads:[~2013-09-26 15:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 14:09 [PATCH net-next v3 0/3] bonding: modify the current and add new hash functions Nikolay Aleksandrov
2013-09-26 14:09 ` [PATCH net-next v3 1/3] flow_dissector: factor out the ports extraction in skb_flow_get_ports Nikolay Aleksandrov
2013-09-26 14:36   ` Veaceslav Falico
2013-09-26 15:27   ` [PATCH] Eric Dumazet
2013-09-26 15:40     ` Nikolay Aleksandrov [this message]
2013-09-26 15:44       ` [PATCH] Nikolay Aleksandrov
2013-09-26 15:53       ` [PATCH] Eric Dumazet
2013-09-26 15:44     ` [PATCH] net: flow_dissector: fix thoff for IPPROTO_AH Eric Dumazet
2013-09-26 15:48       ` Nikolay Aleksandrov
2013-09-26 16:05         ` Eric Dumazet
2013-09-26 16:03           ` Nikolay Aleksandrov
2013-09-26 16:03       ` Daniel Borkmann
2013-09-30 19:34       ` David Miller
2013-09-26 14:09 ` [PATCH net-next v3 2/3] bonding: modify the old and add new xmit hash policies Nikolay Aleksandrov
2013-09-26 14:34   ` Veaceslav Falico
2013-09-26 16:02   ` Eric Dumazet
2013-09-26 14:09 ` [PATCH net-next v3 3/3] bonding: document the new xmit policy modes and update the changed ones Nikolay Aleksandrov
  -- strict thread matches above, loose matches on Subject: below --
2003-12-27 13:50 [PATCH] Bart De Schuymer
2003-11-13  0:39 [PATCH] Stephen Hemminger
2003-07-08 22:16 [PATCH] Stephen Hemminger

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=52445553.1030308@redhat.com \
    --to=nikolay@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@redhat.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).