From: Shan Wei <shanwei@cn.fujitsu.com>
To: dccp@vger.kernel.org
Subject: Re: [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df
Date: Fri, 16 Apr 2010 02:26:09 +0000 [thread overview]
Message-ID: <4BC7CAC1.4000803@cn.fujitsu.com> (raw)
Herbert Xu wrote, at 04/15/2010 11:19 PM:
> On Thu, Apr 15, 2010 at 09:04:49PM +0800, Shan Wei wrote:
>> As Herbert Xu said: we should be able to simply replace ipfragok
>> with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
>> has droped ipfragok and set local_df value properly.
>>
>> The patch kills the ipfragok parameter of .queue_xmit().
>
> Both patches look good to me.
>
>> @@ -370,7 +370,7 @@ packet_routed:
>> skb_reset_network_header(skb);
>> iph = ip_hdr(skb);
>> *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff));
>> - if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok)
>> + if (ip_dont_fragment(sk, &rt->u.dst) && !skb->local_df)
>> iph->frag_off = htons(IP_DF);
>> else
>> iph->frag_off = 0;
>
> This hunk looked suspecious at first. However, it is OK because
> ever calls this with ipfragok = 1, or local_df = 1.
>
> The first is obvious from this patch itself, the second not quite
> so obvious.
>
> As nobody calls it with local_df = 1 anyway, and strictly speaking
> local_df shouldn't be set at all by the caller of ip_queue_xmit, we
> should simply remove the && ... bit and have
>
> if (ip_dont_fragment(sk, &rt->u.dst))
Now, PPPoX/PPPoL2TP driver still use ip_queue_xmit to send packets with ipfragok = 1.
So, now we can't remove the && ... bit.
--
Best Regards
-----
Shan Wei
>
> Cheers,
WARNING: multiple messages have this Message-ID (diff)
From: Shan Wei <shanwei@cn.fujitsu.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: David Miller <davem@davemloft.net>,
yinghai.lu@oracle.com, kuznet@ms2.inr.ac.ru, pekkas@netcore.fi,
jmorris@namei.org,
"yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki"
<yoshfuji@linux-ipv6.org>, Patrick McHardy <kaber@trash.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
dccp@vger.kernel.org, linux-sctp@vger.kernel.org,
kleptog@svana.org, jchapman@katalix.com, mostrows@speakeasy.net,
acme@xconectiva.com.br
Subject: Re: [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df
Date: Fri, 16 Apr 2010 02:26:09 +0000 [thread overview]
Message-ID: <4BC7CAC1.4000803@cn.fujitsu.com> (raw)
In-Reply-To: <20100415151926.GA4813@gondor.apana.org.au>
Herbert Xu wrote, at 04/15/2010 11:19 PM:
> On Thu, Apr 15, 2010 at 09:04:49PM +0800, Shan Wei wrote:
>> As Herbert Xu said: we should be able to simply replace ipfragok
>> with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
>> has droped ipfragok and set local_df value properly.
>>
>> The patch kills the ipfragok parameter of .queue_xmit().
>
> Both patches look good to me.
>
>> @@ -370,7 +370,7 @@ packet_routed:
>> skb_reset_network_header(skb);
>> iph = ip_hdr(skb);
>> *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff));
>> - if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok)
>> + if (ip_dont_fragment(sk, &rt->u.dst) && !skb->local_df)
>> iph->frag_off = htons(IP_DF);
>> else
>> iph->frag_off = 0;
>
> This hunk looked suspecious at first. However, it is OK because
> ever calls this with ipfragok = 1, or local_df = 1.
>
> The first is obvious from this patch itself, the second not quite
> so obvious.
>
> As nobody calls it with local_df = 1 anyway, and strictly speaking
> local_df shouldn't be set at all by the caller of ip_queue_xmit, we
> should simply remove the && ... bit and have
>
> if (ip_dont_fragment(sk, &rt->u.dst))
Now, PPPoX/PPPoL2TP driver still use ip_queue_xmit to send packets with ipfragok = 1.
So, now we can't remove the && ... bit.
--
Best Regards
-----
Shan Wei
>
> Cheers,
WARNING: multiple messages have this Message-ID (diff)
From: Shan Wei <shanwei@cn.fujitsu.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: David Miller <davem@davemloft.net>,
yinghai.lu@oracle.com, kuznet@ms2.inr.ac.ru, pekkas@netcore.fi,
jmorris@namei.org,
"yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki"
<yoshfuji@linux-ipv6.org>, Patrick McHardy <kaber@trash.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
dccp@vger.kernel.org, linux-sctp@vger.kernel.org,
kleptog@svana.org, jchapman@katalix.com, mostrows@speakeasy.net,
acme@xconectiva.com.br
Subject: Re: [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df
Date: Fri, 16 Apr 2010 10:26:09 +0800 [thread overview]
Message-ID: <4BC7CAC1.4000803@cn.fujitsu.com> (raw)
In-Reply-To: <20100415151926.GA4813@gondor.apana.org.au>
Herbert Xu wrote, at 04/15/2010 11:19 PM:
> On Thu, Apr 15, 2010 at 09:04:49PM +0800, Shan Wei wrote:
>> As Herbert Xu said: we should be able to simply replace ipfragok
>> with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
>> has droped ipfragok and set local_df value properly.
>>
>> The patch kills the ipfragok parameter of .queue_xmit().
>
> Both patches look good to me.
>
>> @@ -370,7 +370,7 @@ packet_routed:
>> skb_reset_network_header(skb);
>> iph = ip_hdr(skb);
>> *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff));
>> - if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok)
>> + if (ip_dont_fragment(sk, &rt->u.dst) && !skb->local_df)
>> iph->frag_off = htons(IP_DF);
>> else
>> iph->frag_off = 0;
>
> This hunk looked suspecious at first. However, it is OK because
> ever calls this with ipfragok == 1, or local_df == 1.
>
> The first is obvious from this patch itself, the second not quite
> so obvious.
>
> As nobody calls it with local_df == 1 anyway, and strictly speaking
> local_df shouldn't be set at all by the caller of ip_queue_xmit, we
> should simply remove the && ... bit and have
>
> if (ip_dont_fragment(sk, &rt->u.dst))
Now, PPPoX/PPPoL2TP driver still use ip_queue_xmit to send packets with ipfragok == 1.
So, now we can't remove the && ... bit.
--
Best Regards
-----
Shan Wei
>
> Cheers,
next reply other threads:[~2010-04-16 2:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 2:26 Shan Wei [this message]
2010-04-16 2:26 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df Shan Wei
2010-04-16 2:26 ` Shan Wei
2010-04-16 6:43 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with Herbert Xu
2010-04-16 6:43 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df Herbert Xu
2010-04-16 6:43 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with Herbert Xu
2010-04-16 6:49 ` Herbert Xu
2010-04-16 6:49 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df Herbert Xu
2010-04-16 6:49 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with Herbert Xu
[not found] <4BC70EF1.6080400@cn.fujitsu.com>
2010-04-15 22:33 ` [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df David Miller
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=4BC7CAC1.4000803@cn.fujitsu.com \
--to=shanwei@cn.fujitsu.com \
--cc=dccp@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.