netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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-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 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
* [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

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:55 [1/4] [IPV6]: Remove redundant length check on input Ananda Raju
2006-07-01  0:07 ` Michael Chan
  -- strict thread matches above, loose matches on Subject: below --
2006-07-01  0:08 Ananda Raju
2006-06-30 23:44 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
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).