Commit f0c54ace authored by Amerigo Wang's avatar Amerigo Wang Committed by David S. Miller

s2io: remove lro parameter

Remove "lro" parameter of s2io driver.
Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
Cc: jon.mason@exar.com
Acked-by: default avatarJon Mason <jon.mason@exar.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent def824c0
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
* Tx descriptors that can be associated with each corresponding FIFO. * Tx descriptors that can be associated with each corresponding FIFO.
* intr_type: This defines the type of interrupt. The values can be 0(INTA), * intr_type: This defines the type of interrupt. The values can be 0(INTA),
* 2(MSI_X). Default value is '2(MSI_X)' * 2(MSI_X). Default value is '2(MSI_X)'
* lro: Specifies whether to enable Large Receive Offload (LRO) or not.
* Possible values '1' for enable '0' for disable. Default is '0'
* lro_max_pkts: This parameter defines maximum number of packets can be * lro_max_pkts: This parameter defines maximum number of packets can be
* aggregated as a single large packet * aggregated as a single large packet
* napi: This parameter used to enable/disable NAPI (polling Rx) * napi: This parameter used to enable/disable NAPI (polling Rx)
...@@ -496,8 +494,6 @@ S2IO_PARM_INT(rxsync_frequency, 3); ...@@ -496,8 +494,6 @@ S2IO_PARM_INT(rxsync_frequency, 3);
/* Interrupt type. Values can be 0(INTA), 2(MSI_X) */ /* Interrupt type. Values can be 0(INTA), 2(MSI_X) */
S2IO_PARM_INT(intr_type, 2); S2IO_PARM_INT(intr_type, 2);
/* Large receive offload feature */ /* 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, /* Max pkts to be aggregated by LRO at one time. If not specified,
* aggregation happens until we hit max IP pkt size(64K) * aggregation happens until we hit max IP pkt size(64K)
...@@ -6733,13 +6729,10 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data) ...@@ -6733,13 +6729,10 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data)
return -EINVAL; return -EINVAL;
if (data & ETH_FLAG_LRO) { if (data & ETH_FLAG_LRO) {
if (lro_enable) { if (!(dev->features & NETIF_F_LRO)) {
if (!(dev->features & NETIF_F_LRO)) { dev->features |= NETIF_F_LRO;
dev->features |= NETIF_F_LRO; changed = 1;
changed = 1; }
}
} else
rc = -EINVAL;
} else if (dev->features & NETIF_F_LRO) { } else if (dev->features & NETIF_F_LRO) {
dev->features &= ~NETIF_F_LRO; dev->features &= ~NETIF_F_LRO;
changed = 1; changed = 1;
...@@ -6748,7 +6741,6 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data) ...@@ -6748,7 +6741,6 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data)
if (changed && netif_running(dev)) { if (changed && netif_running(dev)) {
s2io_stop_all_tx_queue(sp); s2io_stop_all_tx_queue(sp);
s2io_card_down(sp); s2io_card_down(sp);
sp->lro = !!(dev->features & NETIF_F_LRO);
rc = s2io_card_up(sp); rc = s2io_card_up(sp);
if (rc) if (rc)
s2io_reset(sp); s2io_reset(sp);
...@@ -7305,7 +7297,7 @@ static int s2io_card_up(struct s2io_nic *sp) ...@@ -7305,7 +7297,7 @@ static int s2io_card_up(struct s2io_nic *sp)
struct ring_info *ring = &mac_control->rings[i]; struct ring_info *ring = &mac_control->rings[i];
ring->mtu = dev->mtu; ring->mtu = dev->mtu;
ring->lro = sp->lro; ring->lro = !!(dev->features & NETIF_F_LRO);
ret = fill_rx_buffers(sp, ring, 1); ret = fill_rx_buffers(sp, ring, 1);
if (ret) { if (ret) {
DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n",
...@@ -7339,7 +7331,7 @@ static int s2io_card_up(struct s2io_nic *sp) ...@@ -7339,7 +7331,7 @@ static int s2io_card_up(struct s2io_nic *sp)
/* Setting its receive mode */ /* Setting its receive mode */
s2io_set_multicast(dev); s2io_set_multicast(dev);
if (sp->lro) { if (dev->features & NETIF_F_LRO) {
/* Initialize max aggregatable pkts per session based on MTU */ /* Initialize max aggregatable pkts per session based on MTU */
sp->lro_max_aggr_per_sess = ((1<<16) - 1) / dev->mtu; sp->lro_max_aggr_per_sess = ((1<<16) - 1) / dev->mtu;
/* Check if we can use (if specified) user provided value */ /* Check if we can use (if specified) user provided value */
...@@ -7909,7 +7901,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ...@@ -7909,7 +7901,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
else else
sp->device_type = XFRAME_I_DEVICE; sp->device_type = XFRAME_I_DEVICE;
sp->lro = lro_enable;
/* Initialize some PCI/PCI-X fields of the NIC. */ /* Initialize some PCI/PCI-X fields of the NIC. */
s2io_init_pci(sp); s2io_init_pci(sp);
...@@ -8045,8 +8036,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ...@@ -8045,8 +8036,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
dev->netdev_ops = &s2io_netdev_ops; dev->netdev_ops = &s2io_netdev_ops;
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 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; dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
if (sp->high_dma_flag == true) if (sp->high_dma_flag == true)
dev->features |= NETIF_F_HIGHDMA; dev->features |= NETIF_F_HIGHDMA;
...@@ -8281,9 +8271,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ...@@ -8281,9 +8271,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
dev->name); dev->name);
} }
if (sp->lro) DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n",
DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n", dev->name);
dev->name);
if (ufo) if (ufo)
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"%s: UDP Fragmentation Offload(UFO) enabled\n", "%s: UDP Fragmentation Offload(UFO) enabled\n",
......
...@@ -963,7 +963,6 @@ struct s2io_nic { ...@@ -963,7 +963,6 @@ struct s2io_nic {
unsigned long clubbed_frms_cnt; unsigned long clubbed_frms_cnt;
unsigned long sending_both; unsigned long sending_both;
u8 lro;
u16 lro_max_aggr_per_sess; u16 lro_max_aggr_per_sess;
volatile unsigned long state; volatile unsigned long state;
u64 general_int_mask; u64 general_int_mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment