All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Ramkrishna Vepa <Ramkrishna.Vepa@exar.com>
Cc: Michal Schmidt <mschmidt@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"herbert.xu@redhat.com" <herbert.xu@redhat.com>,
	"nhorman@redhat.com" <nhorman@redhat.com>,
	"sgruszka@redhat.com" <sgruszka@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [Patch 1/2] s2io: add dynamic LRO disable support
Date: Mon, 07 Jun 2010 17:01:13 +0800	[thread overview]
Message-ID: <4C0CB559.7020503@redhat.com> (raw)
In-Reply-To: <FCA91A92EE52B041906A0358FC28FCC38EF129DB8F@FRE1EXCH02.hq.exar.com>

On 06/05/10 16:53, Ramkrishna Vepa wrote:
>> +static int s2io_ethtool_set_flags(struct net_device *dev, u32 data)
>> +{
>> +	struct s2io_nic *sp = netdev_priv(dev);
>> +	int rc = 0;
>> +	int changed = 0;
>> +
>> +	if (data&  ETH_FLAG_LRO) {
>> +		if (lro_enable) {
>> +			if (!(dev->features&  NETIF_F_LRO)) {
>> +				dev->features |= NETIF_F_LRO;
>> +				changed = 1;
>> +			}
>> +		} else
>> +			rc = -EINVAL;
>> +	} else if (dev->features&  NETIF_F_LRO) {
>> +		dev->features&= ~NETIF_F_LRO;
>> +		changed = 1;
>> +	}
>> +
>> +	if (changed&&  netif_running(dev)) {
>> +		s2io_stop_all_tx_queue(sp);
>> +		s2io_card_down(sp);
>> +		sp->lro = dev->features&  NETIF_F_LRO;
>> +		rc = s2io_card_up(sp);
> In s2io_card_up, update ring->lro too as it is used in the fast path -
> 		struct ring_info *ring =&mac_control->rings[i];
>
>   		ring->mtu = dev->mtu;
> +		ring->lro = sp->lro;
>

Yeah, I missed this important part.


>> +		s2io_start_all_tx_queue(sp);
>
> The following line in init_shared_mem() is redundant and can be removed.
> -	ring->lro = lro_enable;
>

Okay.

I will send an updated version soon.

Thanks a lot!

      reply	other threads:[~2010-06-07  8:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03  3:38 [Patch 1/2] s2io: add dynamic LRO disable support Amerigo Wang
2010-06-03  3:39 ` [Patch 2/2] mlx4: " Amerigo Wang
2010-06-03 12:37   ` Ben Hutchings
2010-06-04  1:56     ` Cong Wang
2010-06-04 14:25       ` Ben Hutchings
2010-06-07  8:51         ` Cong Wang
2010-06-07 11:00           ` Stanislaw Gruszka
2010-06-07 13:15             ` Cong Wang
2010-06-09  9:23         ` Cong Wang
2010-06-09 10:49           ` Stanislaw Gruszka
2010-06-15  8:53             ` Cong Wang
2010-06-15  9:39               ` Stanislaw Gruszka
2010-06-17 10:54                 ` Cong Wang
2010-06-17 12:03                   ` Stanislaw Gruszka
2010-06-18  3:10                     ` Cong Wang
2010-06-03 13:38 ` [Patch 1/2] s2io: " Michal Schmidt
2010-06-05  8:53   ` Ramkrishna Vepa
2010-06-07  9:01     ` Cong Wang [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=4C0CB559.7020503@redhat.com \
    --to=amwang@redhat.com \
    --cc=Ramkrishna.Vepa@exar.com \
    --cc=davem@davemloft.net \
    --cc=herbert.xu@redhat.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sgruszka@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.