[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACzMAJL06gK4c5yHxaAA6TSZ6FwcKyoR1ziDAURWiVkhNDQoQg@mail.gmail.com>
Date: Tue, 10 Mar 2015 11:53:18 -0700
From: Andy Zhou <azhou@...ira.com>
To: Simon Horman <simon.horman@...ronome.com>
Cc: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [patch net-next 3/4] net: refactor IPv4 and IPv6 fragmentation APIs
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@...ronome.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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists