net: replace ipfragok with skb->local_df
Subsystems (3)
David Miller
maintainerYour netdev entry on the CC: list was literally:
" <[email protected]>,
which caused your patch to not make it netdev and therefore it also didn't make it into patchwork.
Please resubmit your patches (both of them) with the CC:
list fixed up.
Thank you.
Herbert Xu wrote, at 04/15/2010 11:19 PM:
Quoted 22 lines · Shan Wei
Quoted 5 lines
As Herbert Xu said: we should be able to simply replace ipfragok with
skb->local_df. commitf88037(sctp: Drop ipfargok in sctp_xmit function)has droped ipfragok and setlocal_dfvalue properly.The patch kills the ipfragok parameter of .queue_xmit().
Both patches look good to me.
Review packet_routed: · line 376
Quoted 9 lines
(quoted diff) +1
-1@@ -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.
Quoted 8 lines
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 speakinglocal_dfshouldn't be set at all by the caller ofip_queue_xmit, we should simply remove the && ... bit and haveif (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.
Signature · 3 lines
Best Regards ----- Shan Wei
Quoted 2 lines
Cheers,
�
�