* [1/4] [IPV6]: Remove redundant length check on input
@ 2006-06-30 5:42 Herbert Xu
2006-06-30 6:03 ` YOSHIFUJI Hideaki / 吉藤英明
2006-06-30 21:19 ` David Miller
0 siblings, 2 replies; 12+ messages in thread
From: Herbert Xu @ 2006-06-30 5:42 UTC (permalink / raw)
To: David S. Miller, Ananda Raju, netdev
Hi Dave:
I've added GSO for TCPv6 and updated Ananda's patch. Please note that
the following patches have only been compile-tested.
[IPV6]: Remove redundant length check on input
We don't need to check skb->len when we're just about to call
pskb_may_pull since that checks it for us.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -84,14 +84,9 @@ int ipv6_rcv(struct sk_buff *skb, struct
*/
IP6CB(skb)->iif = skb->dst ? ((struct rt6_info *)skb->dst)->rt6i_idev->dev->ifindex : dev->ifindex;
- if (skb->len < sizeof(struct ipv6hdr))
+ if (unlikely(!pskb_may_pull(skb, sizeof(*hdr))))
goto err;
- if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) {
- IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
- goto drop;
- }
-
hdr = skb->nh.ipv6h;
if (hdr->version != 6)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [1/4] [IPV6]: Remove redundant length check on input
2006-06-30 5:42 Herbert Xu
@ 2006-06-30 6:03 ` YOSHIFUJI Hideaki / 吉藤英明
2006-06-30 21:19 ` David Miller
1 sibling, 0 replies; 12+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2006-06-30 6:03 UTC (permalink / raw)
To: herbert, davem; +Cc: Ananda.Raju, netdev, yoshfuji
In article <20060630054209.GA28558@gondor.apana.org.au> (at Fri, 30 Jun 2006 15:42:09 +1000), Herbert Xu <herbert@gondor.apana.org.au> says:
> [IPV6]: Remove redundant length check on input
>
> We don't need to check skb->len when we're just about to call
> pskb_may_pull since that checks it for us.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
--
YOSHIFUJI Hideaki @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [1/4] [IPV6]: Remove redundant length check on input
2006-06-30 5:42 Herbert Xu
2006-06-30 6:03 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2006-06-30 21:19 ` David Miller
1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2006-06-30 21:19 UTC (permalink / raw)
To: herbert; +Cc: Ananda.Raju, netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 30 Jun 2006 15:42:09 +1000
> I've added GSO for TCPv6 and updated Ananda's patch. Please note that
> the following patches have only been compile-tested.
I applied this and pushed it to Linus, let's cross our fingers :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [1/4] [IPV6]: Remove redundant length check on input
@ 2006-06-30 23:44 Ananda Raju
2006-06-30 23:52 ` Michael Chan
2006-07-01 3:39 ` Herbert Xu
0 siblings, 2 replies; 12+ messages in thread
From: Ananda Raju @ 2006-06-30 23:44 UTC (permalink / raw)
To: David Miller, herbert; +Cc: netdev
Hi,
I tested the patch, and TSO over ipv6 is working fine. But TSO disable
not working for IPv6.
I tried the from tree /pub/scm/linux/kernel/git/davem/net-2.6
Ananda
-----Original Message-----
From: David Miller [mailto:davem@davemloft.net]
Sent: Friday, June 30, 2006 2:20 PM
To: herbert@gondor.apana.org.au
Cc: Ananda Raju; netdev@vger.kernel.org
Subject: Re: [1/4] [IPV6]: Remove redundant length check on input
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 30 Jun 2006 15:42:09 +1000
> I've added GSO for TCPv6 and updated Ananda's patch. Please note that
> the following patches have only been compile-tested.
I applied this and pushed it to Linus, let's cross our fingers :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [1/4] [IPV6]: Remove redundant length check on input
2006-06-30 23:44 [1/4] [IPV6]: Remove redundant length check on input Ananda Raju
@ 2006-06-30 23:52 ` Michael Chan
2006-07-01 3:39 ` Herbert Xu
1 sibling, 0 replies; 12+ messages in thread
From: Michael Chan @ 2006-06-30 23:52 UTC (permalink / raw)
To: Ananda Raju; +Cc: David Miller, herbert, netdev
On Fri, 2006-06-30 at 19:44 -0400, Ananda Raju wrote:
> Hi,
>
> I tested the patch, and TSO over ipv6 is working fine. But TSO disable
> not working for IPv6.
>
You need to clear NETIF_F_TSO6 in dev->features to disable ipv6 TSO.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [1/4] [IPV6]: Remove redundant length check on input
@ 2006-06-30 23:55 Ananda Raju
2006-07-01 0:07 ` Michael Chan
0 siblings, 1 reply; 12+ messages in thread
From: Ananda Raju @ 2006-06-30 23:55 UTC (permalink / raw)
To: Michael Chan; +Cc: David Miller, herbert, netdev
True, I am referring to "ethtool -K ethX tso off"
ethtool_op_set_tso() won't clear NETIF_F_TSO6 for ethtool -K ethX tso
off
Ananda
-----Original Message-----
From: Michael Chan [mailto:mchan@broadcom.com]
Sent: Friday, June 30, 2006 4:53 PM
To: Ananda Raju
Cc: David Miller; herbert@gondor.apana.org.au; netdev@vger.kernel.org
Subject: RE: [1/4] [IPV6]: Remove redundant length check on input
On Fri, 2006-06-30 at 19:44 -0400, Ananda Raju wrote:
> Hi,
>
> I tested the patch, and TSO over ipv6 is working fine. But TSO disable
> not working for IPv6.
>
You need to clear NETIF_F_TSO6 in dev->features to disable ipv6 TSO.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [1/4] [IPV6]: Remove redundant length check on input
2006-06-30 23:55 Ananda Raju
@ 2006-07-01 0:07 ` Michael Chan
0 siblings, 0 replies; 12+ messages in thread
From: Michael Chan @ 2006-07-01 0:07 UTC (permalink / raw)
To: Ananda Raju; +Cc: David Miller, herbert, netdev
On Fri, 2006-06-30 at 19:55 -0400, Ananda Raju wrote:
> True, I am referring to "ethtool -K ethX tso off"
> ethtool_op_set_tso() won't clear NETIF_F_TSO6 for ethtool -K ethX tso
> off
>
Instead of using ethtool_op_set_tso() in your ethtool_ops structure, you
can use a private function to set or clear any new bits such as
NETIF_F_TSO6 or NETIF_F_TSO_ECN.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [1/4] [IPV6]: Remove redundant length check on input
@ 2006-07-01 0:08 Ananda Raju
0 siblings, 0 replies; 12+ messages in thread
From: Ananda Raju @ 2006-07-01 0:08 UTC (permalink / raw)
To: Michael Chan; +Cc: David Miller, herbert, netdev
Sure, we will do that.
-----Original Message-----
From: Michael Chan [mailto:mchan@broadcom.com]
Sent: Friday, June 30, 2006 5:08 PM
To: Ananda Raju
Cc: David Miller; herbert@gondor.apana.org.au; netdev@vger.kernel.org
Subject: RE: [1/4] [IPV6]: Remove redundant length check on input
On Fri, 2006-06-30 at 19:55 -0400, Ananda Raju wrote:
> True, I am referring to "ethtool -K ethX tso off"
> ethtool_op_set_tso() won't clear NETIF_F_TSO6 for ethtool -K ethX tso
> off
>
Instead of using ethtool_op_set_tso() in your ethtool_ops structure, you
can use a private function to set or clear any new bits such as
NETIF_F_TSO6 or NETIF_F_TSO_ECN.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [1/4] [IPV6]: Remove redundant length check on input
2006-06-30 23:44 [1/4] [IPV6]: Remove redundant length check on input Ananda Raju
2006-06-30 23:52 ` Michael Chan
@ 2006-07-01 3:39 ` Herbert Xu
2006-07-04 2:44 ` David Miller
1 sibling, 1 reply; 12+ messages in thread
From: Herbert Xu @ 2006-07-01 3:39 UTC (permalink / raw)
To: Ananda Raju; +Cc: David Miller, netdev
On Fri, Jun 30, 2006 at 07:44:49PM -0400, Ananda Raju wrote:
>
> I tested the patch, and TSO over ipv6 is working fine. But TSO disable
> not working for IPv6.
>
> I tried the from tree /pub/scm/linux/kernel/git/davem/net-2.6
I think we need some new ethtool helper functions that sets/clears both
TSO/TSO6.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [1/4] [IPV6]: Remove redundant length check on input
2006-07-01 3:39 ` Herbert Xu
@ 2006-07-04 2:44 ` David Miller
2006-07-04 2:45 ` Herbert Xu
0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2006-07-04 2:44 UTC (permalink / raw)
To: herbert; +Cc: Ananda.Raju, netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 1 Jul 2006 13:39:39 +1000
> On Fri, Jun 30, 2006 at 07:44:49PM -0400, Ananda Raju wrote:
> >
> > I tested the patch, and TSO over ipv6 is working fine. But TSO disable
> > not working for IPv6.
> >
> > I tried the from tree /pub/scm/linux/kernel/git/davem/net-2.6
>
> I think we need some new ethtool helper functions that sets/clears both
> TSO/TSO6.
Do you really want to semantically seperate TSO and TSO6?
I would think that real users who want to disable TSO, wish
to do so unilaterally.
I think we should only add the TSO6 specific knob if we find
through experience that it often comes up that someone wants
to just disable ipv6 vs. ipv4 TSO.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [1/4] [IPV6]: Remove redundant length check on input
2006-07-04 2:44 ` David Miller
@ 2006-07-04 2:45 ` Herbert Xu
2006-07-04 4:04 ` Herbert Xu
0 siblings, 1 reply; 12+ messages in thread
From: Herbert Xu @ 2006-07-04 2:45 UTC (permalink / raw)
To: David Miller; +Cc: Ananda.Raju, netdev
On Mon, Jul 03, 2006 at 07:44:06PM -0700, David Miller wrote:
>
> > I think we need some new ethtool helper functions that sets/clears both
> > TSO/TSO6.
>
> Do you really want to semantically seperate TSO and TSO6?
>
> I would think that real users who want to disable TSO, wish
> to do so unilaterally.
That's what I meant. I meant ethtool helper functions that
clear and set both TSO/TSO6 flags at the same time.
Alternatively, we can add a new features bit which gives the inherent
features of a device. That can then be used to derive the actual
features in use. That way we won't need to invent a new ethtool
helper function for this.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [1/4] [IPV6]: Remove redundant length check on input
2006-07-04 2:45 ` Herbert Xu
@ 2006-07-04 4:04 ` Herbert Xu
0 siblings, 0 replies; 12+ messages in thread
From: Herbert Xu @ 2006-07-04 4:04 UTC (permalink / raw)
To: David Miller; +Cc: Ananda.Raju, netdev
On Tue, Jul 04, 2006 at 12:45:27PM +1000, herbert wrote:
>
> That's what I meant. I meant ethtool helper functions that
> clear and set both TSO/TSO6 flags at the same time.
I think I was a bit ambiguous here. To expand on my argument, what
I'm saying is that we can't just change the existing ethtool helper
functions to set TSO6 since that'd break NICs which do not support
TSO6.
Instead of adding an ad-hoc ethtool function in the neterion driver,
we should either add a new ethtool function which sets both TSO/TSO6,
or do the following.
> Alternatively, we can add a new features bit which gives the inherent
> features of a device. That can then be used to derive the actual
> features in use. That way we won't need to invent a new ethtool
> helper function for this.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-07-04 4:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 23:44 [1/4] [IPV6]: Remove redundant length check on input Ananda Raju
2006-06-30 23:52 ` Michael Chan
2006-07-01 3:39 ` Herbert Xu
2006-07-04 2:44 ` David Miller
2006-07-04 2:45 ` Herbert Xu
2006-07-04 4:04 ` Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2006-07-01 0:08 Ananda Raju
2006-06-30 23:55 Ananda Raju
2006-07-01 0:07 ` Michael Chan
2006-06-30 5:42 Herbert Xu
2006-06-30 6:03 ` YOSHIFUJI Hideaki / 吉藤英明
2006-06-30 21:19 ` 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).