Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s2io: remove lro parameter

Remove "lro" parameter of s2io driver.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: jon.mason@exar.com
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Amerigo Wang and committed by
David S. Miller
f0c54ace def824c0

+9 -21
+9 -20
drivers/net/s2io.c
··· 38 38 * Tx descriptors that can be associated with each corresponding FIFO. 39 39 * intr_type: This defines the type of interrupt. The values can be 0(INTA), 40 40 * 2(MSI_X). Default value is '2(MSI_X)' 41 - * lro: Specifies whether to enable Large Receive Offload (LRO) or not. 42 - * Possible values '1' for enable '0' for disable. Default is '0' 43 41 * lro_max_pkts: This parameter defines maximum number of packets can be 44 42 * aggregated as a single large packet 45 43 * napi: This parameter used to enable/disable NAPI (polling Rx) ··· 494 496 /* Interrupt type. Values can be 0(INTA), 2(MSI_X) */ 495 497 S2IO_PARM_INT(intr_type, 2); 496 498 /* Large receive offload feature */ 497 - static unsigned int lro_enable = 1; 498 - module_param_named(lro, lro_enable, uint, 0); 499 499 500 500 /* Max pkts to be aggregated by LRO at one time. If not specified, 501 501 * aggregation happens until we hit max IP pkt size(64K) ··· 6729 6733 return -EINVAL; 6730 6734 6731 6735 if (data & ETH_FLAG_LRO) { 6732 - if (lro_enable) { 6733 - if (!(dev->features & NETIF_F_LRO)) { 6734 - dev->features |= NETIF_F_LRO; 6735 - changed = 1; 6736 - } 6737 - } else 6738 - rc = -EINVAL; 6736 + if (!(dev->features & NETIF_F_LRO)) { 6737 + dev->features |= NETIF_F_LRO; 6738 + changed = 1; 6739 + } 6739 6740 } else if (dev->features & NETIF_F_LRO) { 6740 6741 dev->features &= ~NETIF_F_LRO; 6741 6742 changed = 1; ··· 6741 6748 if (changed && netif_running(dev)) { 6742 6749 s2io_stop_all_tx_queue(sp); 6743 6750 s2io_card_down(sp); 6744 - sp->lro = !!(dev->features & NETIF_F_LRO); 6745 6751 rc = s2io_card_up(sp); 6746 6752 if (rc) 6747 6753 s2io_reset(sp); ··· 7297 7305 struct ring_info *ring = &mac_control->rings[i]; 7298 7306 7299 7307 ring->mtu = dev->mtu; 7300 - ring->lro = sp->lro; 7308 + ring->lro = !!(dev->features & NETIF_F_LRO); 7301 7309 ret = fill_rx_buffers(sp, ring, 1); 7302 7310 if (ret) { 7303 7311 DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", ··· 7331 7339 /* Setting its receive mode */ 7332 7340 s2io_set_multicast(dev); 7333 7341 7334 - if (sp->lro) { 7342 + if (dev->features & NETIF_F_LRO) { 7335 7343 /* Initialize max aggregatable pkts per session based on MTU */ 7336 7344 sp->lro_max_aggr_per_sess = ((1<<16) - 1) / dev->mtu; 7337 7345 /* Check if we can use (if specified) user provided value */ ··· 7901 7909 else 7902 7910 sp->device_type = XFRAME_I_DEVICE; 7903 7911 7904 - sp->lro = lro_enable; 7905 7912 7906 7913 /* Initialize some PCI/PCI-X fields of the NIC. */ 7907 7914 s2io_init_pci(sp); ··· 8036 8045 dev->netdev_ops = &s2io_netdev_ops; 8037 8046 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); 8038 8047 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 8039 - if (lro_enable) 8040 - dev->features |= NETIF_F_LRO; 8048 + dev->features |= NETIF_F_LRO; 8041 8049 dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; 8042 8050 if (sp->high_dma_flag == true) 8043 8051 dev->features |= NETIF_F_HIGHDMA; ··· 8271 8281 dev->name); 8272 8282 } 8273 8283 8274 - if (sp->lro) 8275 - DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n", 8276 - dev->name); 8284 + DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n", 8285 + dev->name); 8277 8286 if (ufo) 8278 8287 DBG_PRINT(ERR_DBG, 8279 8288 "%s: UDP Fragmentation Offload(UFO) enabled\n",
-1
drivers/net/s2io.h
··· 963 963 964 964 unsigned long clubbed_frms_cnt; 965 965 unsigned long sending_both; 966 - u8 lro; 967 966 u16 lro_max_aggr_per_sess; 968 967 volatile unsigned long state; 969 968 u64 general_int_mask;