netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch 1/2] s2io: remove lro parameter
@ 2010-08-18  7:51 Amerigo Wang
  2010-08-18  7:51 ` [Patch 2/2] mlx4: remove num_lro parameter Amerigo Wang
  2010-08-18 15:36 ` [Patch 1/2] s2io: remove lro parameter Jon Mason
  0 siblings, 2 replies; 7+ messages in thread
From: Amerigo Wang @ 2010-08-18  7:51 UTC (permalink / raw)
  To: netdev; +Cc: bhutchings, Ramkrishna.Vepa, sgruszka, Amerigo Wang, davem


As suggested by David, this parameter can die, we can use ethtool
to turn LRO on/off. Compile tests only.

Signed-off-by: WANG Cong <amwang@redhat.com>

---
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 18bc5b7..b981fa9 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -496,8 +496,6 @@ S2IO_PARM_INT(rxsync_frequency, 3);
 /* Interrupt type. Values can be 0(INTA), 2(MSI_X) */
 S2IO_PARM_INT(intr_type, 2);
 /* Large receive offload feature */
-static unsigned int lro_enable = 1;
-module_param_named(lro, lro_enable, uint, 0);
 
 /* Max pkts to be aggregated by LRO at one time. If not specified,
  * aggregation happens until we hit max IP pkt size(64K)
@@ -6735,13 +6733,10 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data)
 		return -EINVAL;
 
 	if (data & ETH_FLAG_LRO) {
-		if (lro_enable) {
-			if (!(dev->features & NETIF_F_LRO)) {
-				dev->features |= NETIF_F_LRO;
-				changed = 1;
-			}
-		} else
-			rc = -EINVAL;
+		if (!(dev->features & NETIF_F_LRO)) {
+			dev->features |= NETIF_F_LRO;
+			changed = 1;
+		}
 	} else if (dev->features & NETIF_F_LRO) {
 		dev->features &= ~NETIF_F_LRO;
 		changed = 1;
@@ -7911,7 +7906,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
 	else
 		sp->device_type = XFRAME_I_DEVICE;
 
-	sp->lro = lro_enable;
+	sp->lro = 1;
 
 	/* Initialize some PCI/PCI-X fields of the NIC. */
 	s2io_init_pci(sp);
@@ -8047,8 +8042,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
 	dev->netdev_ops = &s2io_netdev_ops;
 	SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
 	dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
-	if (lro_enable)
-		dev->features |= NETIF_F_LRO;
+	dev->features |= NETIF_F_LRO;
 	dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
 	if (sp->high_dma_flag == true)
 		dev->features |= NETIF_F_HIGHDMA;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-23 15:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18  7:51 [Patch 1/2] s2io: remove lro parameter Amerigo Wang
2010-08-18  7:51 ` [Patch 2/2] mlx4: remove num_lro parameter Amerigo Wang
2010-08-23  4:45   ` David Miller
2010-08-18 15:36 ` [Patch 1/2] s2io: remove lro parameter Jon Mason
2010-08-20  8:54   ` Cong Wang
2010-08-23  8:42     ` Cong Wang
2010-08-23 15:41       ` Jon Mason

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).