netxen: ethtool statistics and control for LRO
Add ethtool -K knob to control LRO in firmware. LRO path is completely separated from GRO, LRO packets are still fed with netif_receive_skb(). Also fix ethtool statistics to include LRO packets. Also use correct message type while configuring interrupt coalescing. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8fea0f0db8
commit
1bb482f8a4
@@ -892,6 +892,9 @@ netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev)
|
||||
if (NX_IS_REVISION_P3(adapter->ahw.revision_id))
|
||||
netxen_config_intr_coalesce(adapter);
|
||||
|
||||
if (adapter->capabilities & NX_FW_CAPABILITY_HW_LRO)
|
||||
netxen_config_hw_lro(adapter, NETXEN_NIC_LRO_ENABLED);
|
||||
|
||||
netxen_napi_enable(adapter);
|
||||
|
||||
if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION)
|
||||
@@ -1077,6 +1080,9 @@ netxen_setup_netdev(struct netxen_adapter *adapter,
|
||||
if (adapter->capabilities & NX_FW_CAPABILITY_FVLANTX)
|
||||
netdev->features |= (NETIF_F_HW_VLAN_TX);
|
||||
|
||||
if (adapter->capabilities & NX_FW_CAPABILITY_HW_LRO)
|
||||
netdev->features |= NETIF_F_LRO;
|
||||
|
||||
netdev->irq = adapter->msix_entries[0].vector;
|
||||
|
||||
err = netxen_napi_add(adapter, netdev);
|
||||
@@ -1812,7 +1818,7 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
|
||||
|
||||
memset(stats, 0, sizeof(*stats));
|
||||
|
||||
stats->rx_packets = adapter->stats.no_rcv;
|
||||
stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
|
||||
stats->tx_packets = adapter->stats.xmitfinished;
|
||||
stats->rx_bytes = adapter->stats.rxbytes;
|
||||
stats->tx_bytes = adapter->stats.txbytes;
|
||||
|
Reference in New Issue
Block a user