* [RFC PATCH] ipv6: Make IP6CB(skb)->nhoff 16-bit.
@ 2010-07-16 5:30 David Miller
2010-07-20 5:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2010-07-16 5:30 UTC (permalink / raw)
To: netdev
Even with jumbograms I cannot see any way in which we would need
to records a larger than 65535 valued next-header offset.
The maximum extension header length is (256 << 3) == 2048.
There are only a handful of extension headers specified which
we'd even accept (say 5 or 6), therefore the largest next-header
offset we'd ever have to contend with is something less than
say 16k.
Therefore make it a u16 instead of a u32.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
Can anyone find any holes in this? I want to do this so we
can legitimately rip ndisc_nodetype out of struct sk_buff
and stick it into the IP6CB where it belongs. Currently
there isn't enough space, but with this change there will
be.
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 940e215..ab9e9e8 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -246,7 +246,7 @@ struct inet6_skb_parm {
__u16 srcrt;
__u16 dst1;
__u16 lastopt;
- __u32 nhoff;
+ __u16 nhoff;
__u16 flags;
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
__u16 dsthao;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] ipv6: Make IP6CB(skb)->nhoff 16-bit.
2010-07-16 5:30 [RFC PATCH] ipv6: Make IP6CB(skb)->nhoff 16-bit David Miller
@ 2010-07-20 5:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-07-20 5:01 UTC (permalink / raw)
To: netdev
From: David Miller <davem@davemloft.net>
Date: Thu, 15 Jul 2010 22:30:11 -0700 (PDT)
>
> Even with jumbograms I cannot see any way in which we would need
> to records a larger than 65535 valued next-header offset.
>
> The maximum extension header length is (256 << 3) == 2048.
> There are only a handful of extension headers specified which
> we'd even accept (say 5 or 6), therefore the largest next-header
> offset we'd ever have to contend with is something less than
> say 16k.
>
> Therefore make it a u16 instead of a u32.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> Can anyone find any holes in this? I want to do this so we
> can legitimately rip ndisc_nodetype out of struct sk_buff
> and stick it into the IP6CB where it belongs. Currently
> there isn't enough space, but with this change there will
> be.
No holes claimed by anyone, so... applied :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-20 5:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 5:30 [RFC PATCH] ipv6: Make IP6CB(skb)->nhoff 16-bit David Miller
2010-07-20 5:01 ` David Miller
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).