From: Michal Schmidt <mschmidt@redhat.com>
To: netdev@vger.kernel.org
Cc: Amerigo Wang <amwang@redhat.com>,
herbert.xu@redhat.com, nhorman@redhat.com, sgruszka@redhat.com,
davem@davemloft.net, Ramkrishna Vepa <Ramkrishna.Vepa@exar.com>
Subject: Re: [Patch 1/2] s2io: add dynamic LRO disable support
Date: Thu, 3 Jun 2010 15:38:11 +0200 [thread overview]
Message-ID: <20100603153811.7b14a1a8@leela> (raw)
In-Reply-To: <20100603034303.5305.55552.sendpatchset@localhost.localdomain>
[adding Ram Vepa to CC]
On Wed, 2 Jun 2010 23:38:59 -0400 Amerigo Wang wrote:
>
> This patch adds dynamic LRO diable support for s2io net driver.
>
> I don't have s2io card, so only did compiling test. Anyone who wants
> to test this is more than welcome.
>
> This is based on Neil's initial work.
>
> Signed-off-by: WANG Cong <amwang@redhat.com>
> Signed-off-by: Neil Horman <nhorman@redhat.com>
> Acked-by: Neil Horman <nhorman@redhat.com>
> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
>
>
> ---
> diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
> index 668327c..9db5df7 100644
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -6684,6 +6684,35 @@ static int s2io_ethtool_op_set_tso(struct
> net_device *dev, u32 data)
> return 0;
> }
> +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);
> + s2io_start_all_tx_queue(sp);
> + }
> +
> + return rc;
> +}
>
> static const struct ethtool_ops netdev_ethtool_ops = {
> .get_settings = s2io_ethtool_gset,
> @@ -6701,6 +6730,8 @@ static const struct ethtool_ops
> netdev_ethtool_ops = { .get_rx_csum = s2io_ethtool_get_rx_csum,
> .set_rx_csum = s2io_ethtool_set_rx_csum,
> .set_tx_csum = s2io_ethtool_op_set_tx_csum,
> + .set_flags = s2io_ethtool_set_flags,
> + .get_flags = ethtool_op_get_flags,
> .set_sg = ethtool_op_set_sg,
> .get_tso = s2io_ethtool_op_get_tso,
> .set_tso = s2io_ethtool_op_set_tso,
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-06-03 13:38 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 ` Michal Schmidt [this message]
2010-06-05 8:53 ` [Patch 1/2] s2io: " Ramkrishna Vepa
2010-06-07 9:01 ` Cong Wang
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=20100603153811.7b14a1a8@leela \
--to=mschmidt@redhat.com \
--cc=Ramkrishna.Vepa@exar.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=herbert.xu@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 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).