* [PATCH -next] myri10ge: clear NETIF_F_LRO bit directly
@ 2010-06-29 14:37 Stanislaw Gruszka
2010-06-29 15:44 ` Andrew Gallatin
0 siblings, 1 reply; 3+ messages in thread
From: Stanislaw Gruszka @ 2010-06-29 14:37 UTC (permalink / raw)
To: netdev; +Cc: Amerigo Wang, Andrew Gallatin, Brice Goglin
Do not use ethtool_op_set_flags() to clear one bit in ->features.
Inform user about disabling LRO.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/myri10ge/myri10ge.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index e0b47cc..2259168 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1725,17 +1725,15 @@ static u32 myri10ge_get_rx_csum(struct net_device *netdev)
static int myri10ge_set_rx_csum(struct net_device *netdev, u32 csum_enabled)
{
struct myri10ge_priv *mgp = netdev_priv(netdev);
- int err = 0;
if (csum_enabled)
mgp->csum_flag = MXGEFW_FLAGS_CKSUM;
else {
- u32 flags = ethtool_op_get_flags(netdev);
- err = ethtool_op_set_flags(netdev, (flags & ~ETH_FLAG_LRO));
mgp->csum_flag = 0;
-
+ netdev->features &= ~NETIF_F_LRO;
+ netdev_info(netdev, "RX checksumming set off, disabling LRO\n");
}
- return err;
+ return 0;
}
static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled)
--
1.5.5.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] myri10ge: clear NETIF_F_LRO bit directly
2010-06-29 14:37 [PATCH -next] myri10ge: clear NETIF_F_LRO bit directly Stanislaw Gruszka
@ 2010-06-29 15:44 ` Andrew Gallatin
2010-06-30 11:26 ` Stanislaw Gruszka
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Gallatin @ 2010-06-29 15:44 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: netdev, Amerigo Wang, Brice Goglin
Stanislaw Gruszka wrote:
> Do not use ethtool_op_set_flags() to clear one bit in ->features.
> Inform user about disabling LRO.
Thanks.. That simplifies things nicely. But was
direct manipulation of netdev->features ever discouraged,
or has my use of ethtool_op_{get,set}_flags() to manipulate
the features always been complete overkill?
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Andrew J. Gallatin <gallatin@myri.com>
Thanks,
Drew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] myri10ge: clear NETIF_F_LRO bit directly
2010-06-29 15:44 ` Andrew Gallatin
@ 2010-06-30 11:26 ` Stanislaw Gruszka
0 siblings, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2010-06-30 11:26 UTC (permalink / raw)
To: Andrew Gallatin; +Cc: netdev, Amerigo Wang, Brice Goglin
On Tue, 29 Jun 2010 11:44:14 -0400
Andrew Gallatin <gallatin@myri.com> wrote:
> Stanislaw Gruszka wrote:
> > Do not use ethtool_op_set_flags() to clear one bit in ->features.
> > Inform user about disabling LRO.
>
> Thanks.. That simplifies things nicely. But was
> direct manipulation of netdev->features ever discouraged,
> or has my use of ethtool_op_{get,set}_flags() to manipulate
> the features always been complete overkill?
It was a bit overkill. Manipulate netdev->features is fine,
many drivers do it.
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>
> Acked-by: Andrew J. Gallatin <gallatin@myri.com>
Thanks. FYI: Ben Hutchings posted other patch spread over
all drivers: http://patchwork.ozlabs.org/patch/57286/
we most likely will use it to put this myri10ge bits in.
Stanislaw
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-30 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-29 14:37 [PATCH -next] myri10ge: clear NETIF_F_LRO bit directly Stanislaw Gruszka
2010-06-29 15:44 ` Andrew Gallatin
2010-06-30 11:26 ` Stanislaw Gruszka
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).