aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjun Vynipadath <arjun@chelsio.com>2019-02-28 04:36:54 -0500
committerDavid S. Miller <davem@davemloft.net>2019-02-28 13:25:09 -0500
commit012475e3c59cbe488779e86565807a73ff115f4b (patch)
treea95074d3e0ff5db1448008faa6de773e8c5491d6
parent2ecba2d1e45b24620a7c3df9531895cf68d5dec6 (diff)
cxgb4/cxgb4vf: Fix up netdev->hw_features
GRO is done by cxgb4/cxgb4vf. Hence set NETIF_F_GRO flag for both cxgb4/cxgb4vf. Cleaned up VLAN netdev features in cxgb4vf. Also fixed NETIF_F_HIGHDMA being set unconditionally for vlan netdev features. Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c4
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c15
2 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index bcbac247a73d..200b16034544 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -5303,7 +5303,7 @@ static void free_some_resources(struct adapter *adapter)
5303 5303
5304#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) 5304#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
5305#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \ 5305#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \
5306 NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA) 5306 NETIF_F_GRO | NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
5307#define SEGMENT_SIZE 128 5307#define SEGMENT_SIZE 128
5308 5308
5309static int t4_get_chip_type(struct adapter *adap, int ver) 5309static int t4_get_chip_type(struct adapter *adap, int ver)
@@ -5710,7 +5710,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
5710 5710
5711 netdev->hw_features = NETIF_F_SG | TSO_FLAGS | 5711 netdev->hw_features = NETIF_F_SG | TSO_FLAGS |
5712 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | 5712 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
5713 NETIF_F_RXCSUM | NETIF_F_RXHASH | 5713 NETIF_F_RXCSUM | NETIF_F_RXHASH | NETIF_F_GRO |
5714 NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | 5714 NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
5715 NETIF_F_HW_TC; 5715 NETIF_F_HW_TC;
5716 5716
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 3300b69a42b3..bcd38ea674ae 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -1932,6 +1932,8 @@ static void cxgb4vf_get_wol(struct net_device *dev,
1932 * TCP Segmentation Offload flags which we support. 1932 * TCP Segmentation Offload flags which we support.
1933 */ 1933 */
1934#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) 1934#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
1935#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \
1936 NETIF_F_GRO | NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
1935 1937
1936static const struct ethtool_ops cxgb4vf_ethtool_ops = { 1938static const struct ethtool_ops cxgb4vf_ethtool_ops = {
1937 .get_link_ksettings = cxgb4vf_get_link_ksettings, 1939 .get_link_ksettings = cxgb4vf_get_link_ksettings,
@@ -3141,16 +3143,13 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
3141 netif_carrier_off(netdev); 3143 netif_carrier_off(netdev);
3142 netdev->irq = pdev->irq; 3144 netdev->irq = pdev->irq;
3143 3145
3144 netdev->hw_features = NETIF_F_SG | TSO_FLAGS | 3146 netdev->hw_features = NETIF_F_SG | TSO_FLAGS | NETIF_F_GRO |
3145 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | 3147 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |
3146 NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_RXCSUM; 3148 NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
3147 netdev->vlan_features = NETIF_F_SG | TSO_FLAGS | 3149 netdev->features = netdev->hw_features;
3148 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
3149 NETIF_F_HIGHDMA;
3150 netdev->features = netdev->hw_features |
3151 NETIF_F_HW_VLAN_CTAG_TX;
3152 if (pci_using_dac) 3150 if (pci_using_dac)
3153 netdev->features |= NETIF_F_HIGHDMA; 3151 netdev->features |= NETIF_F_HIGHDMA;
3152 netdev->vlan_features = netdev->features & VLAN_FEAT;
3154 3153
3155 netdev->priv_flags |= IFF_UNICAST_FLT; 3154 netdev->priv_flags |= IFF_UNICAST_FLT;
3156 netdev->min_mtu = 81; 3155 netdev->min_mtu = 81;