netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Zhou <azhou@nicira.com>
To: Simon Horman <simon.horman@netronome.com>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [patch net-next 3/4] net: refactor IPv4 and IPv6 fragmentation APIs
Date: Tue, 10 Mar 2015 11:53:18 -0700	[thread overview]
Message-ID: <CACzMAJL06gK4c5yHxaAA6TSZ6FwcKyoR1ziDAURWiVkhNDQoQg@mail.gmail.com> (raw)
In-Reply-To: <20150309092557.GB13498@vergenet.net>

Simon and Eric, Thanks for the review.

Eric, I will fix the style issues raised. Thanks for pointing them out.

Simon, I reworked the API to remove the cast in the call back.  I will
post a V2 soon. Please take a look
and let me know if it addresses your concerns.

On Mon, Mar 9, 2015 at 2:25 AM, Simon Horman <simon.horman@netronome.com> wrote:
> On Mon, Mar 09, 2015 at 01:01:37AM -0700, Andy Zhou wrote:
>> Both ip_fragment() and ip6_fragment() APIs assume skb has an
>> attached netdev device, from which the MTU size can be derived.
>> However, skbs incoming from OVS vports do not have an attached
>> netdev device.
>>
>> This patch splits the original function into two parts: The core
>> fragmentation logic is now provided by
>> ip_fragment_mtu()/ip6_fragment_mut().
>>
>> The original APIs are kept as is. Their implementation now calls
>> the new APIs. Any information derived from the attached netdev
>> device is first derived in the original APIs and passed into the
>> new APIs.
>>
>> In addition, The call back output function into the new APIs now
>> accepts two arguments: a skb and an application specific pointer,
>> which specifies additional information not directly associated
>> with skb, such as OVS flow, to the output function.
>
> I suggest handling that portion of the change separately.
> It doesn't seem nearly as well defined as the rest of the change.
> And cast below seems somewhat undesirable to me.
>
> [snip]
>
>> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
>> index a7aea20..b85fd34 100644
>> --- a/net/ipv4/ip_output.c
>> +++ b/net/ipv4/ip_output.c
>
>> +     return ip_fragment_mtu(skb, mtu, ll_rs, NULL, dev,
>> +                     (int (*)(struct sk_buff *, void *output_arg))output);
>> +}
>>  EXPORT_SYMBOL(ip_fragment);

  reply	other threads:[~2015-03-10 18:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09  8:01 [patch net-next 0/4] Refactor IP defragmentation and fragmenation APIs for OVS conntrack support Andy Zhou
2015-03-09  8:01 ` [patch net-next 1/4] net: add 'const' to __ipv6_select_ident()'s input address parameter Andy Zhou
2015-03-09  8:01 ` [patch net-next 2/4] net: add ipv6_select_ident_by_addr() API Andy Zhou
2015-03-09 15:03   ` Eric Dumazet
2015-03-09  8:01 ` [patch net-next 3/4] net: refactor IPv4 and IPv6 fragmentation APIs Andy Zhou
2015-03-09  9:25   ` Simon Horman
2015-03-10 18:53     ` Andy Zhou [this message]
2015-03-09 15:05   ` Eric Dumazet
2015-03-09 15:07   ` Eric Dumazet
2015-03-09  8:01 ` [patch net-next 4/4] net: refactor IPv4 and IPv6 defragmentation APIs Andy Zhou
2015-03-09  9:15   ` Simon Horman
2015-03-10 18:54     ` Andy Zhou

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=CACzMAJL06gK4c5yHxaAA6TSZ6FwcKyoR1ziDAURWiVkhNDQoQg@mail.gmail.com \
    --to=azhou@nicira.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=simon.horman@netronome.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).