netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Sridhar Samudrala <sri@us.ibm.com>
Cc: netdev@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	"Tantilov, Emil S" <emil.s.tantilov@intel.com>
Subject: Re: [PATCH/RFC] e1000: Check for hw type before enabling ipv6 TSO
Date: Mon, 26 Mar 2007 16:48:51 -0700	[thread overview]
Message-ID: <46085BE3.6040009@intel.com> (raw)
In-Reply-To: <1174951189.3347.15.camel@w-sridhar2.beaverton.ibm.com>

Sridhar Samudrala wrote:
> I think the check for hw type is missing in e1000_set_tso()
> before enabling ipv6 TSO.
> 
> e1000_probe() makes sure that NETIF_F_TSO6 is set only if
> hw.mac_type > e1000_82547_rev_2. But this is not done in
> e1000_set_tso() that gets called when trying to enable TSO
> using ethtool.
> 
> I noticed this problem when i tried to do an ipv6 netperf
> test with TSO enabled on 82541 based e1000 card.
> 
> The following patch adds this check to e1000_set_tso()


that looks indeed like an oversight. I'll make sure this is verified and will 
include this patch in my upstream submission to the kernel maintainer if it 
checks out,

thanks for posting!

Auke


> 
> Thanks
> Sridhar
> 
> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
> 
> diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
> --- a/drivers/net/e1000/e1000_ethtool.c
> +++ b/drivers/net/e1000/e1000_ethtool.c
> @@ -351,10 +351,12 @@ e1000_set_tso(struct net_device *netdev, uint32_t data)
>  	else
>  		netdev->features &= ~NETIF_F_TSO;
>  
> -	if (data)
> -		netdev->features |= NETIF_F_TSO6;
> -	else
> -		netdev->features &= ~NETIF_F_TSO6;
> +	if (adapter->hw.mac_type > e1000_82547_rev_2) {
> +		if (data)
> +			netdev->features |= NETIF_F_TSO6;
> +		else
> +			netdev->features &= ~NETIF_F_TSO6;
> +	}
>  
>  	DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled");
>  	adapter->tso_force = TRUE;
> 

      reply	other threads:[~2007-03-26 23:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 23:19 [PATCH/RFC] e1000: Check for hw type before enabling ipv6 TSO Sridhar Samudrala
2007-03-26 23:48 ` Kok, Auke [this message]

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=46085BE3.6040009@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sri@us.ibm.com \
    /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 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).