|
@@ -3591,6 +3591,10 @@ static netdev_features_t liquidio_fix_features(struct net_device *netdev,
|
|
(lio->dev_capability & NETIF_F_LRO))
|
|
(lio->dev_capability & NETIF_F_LRO))
|
|
request &= ~NETIF_F_LRO;
|
|
request &= ~NETIF_F_LRO;
|
|
|
|
|
|
|
|
+ if ((request & NETIF_F_HW_VLAN_CTAG_FILTER) &&
|
|
|
|
+ !(lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER))
|
|
|
|
+ request &= ~NETIF_F_HW_VLAN_CTAG_FILTER;
|
|
|
|
+
|
|
return request;
|
|
return request;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3603,14 +3607,14 @@ static int liquidio_set_features(struct net_device *netdev,
|
|
{
|
|
{
|
|
struct lio *lio = netdev_priv(netdev);
|
|
struct lio *lio = netdev_priv(netdev);
|
|
|
|
|
|
- if (!((netdev->features ^ features) & NETIF_F_LRO))
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
- if ((features & NETIF_F_LRO) && (lio->dev_capability & NETIF_F_LRO))
|
|
|
|
|
|
+ if ((features & NETIF_F_LRO) &&
|
|
|
|
+ (lio->dev_capability & NETIF_F_LRO) &&
|
|
|
|
+ !(netdev->features & NETIF_F_LRO))
|
|
liquidio_set_feature(netdev, OCTNET_CMD_LRO_ENABLE,
|
|
liquidio_set_feature(netdev, OCTNET_CMD_LRO_ENABLE,
|
|
OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
|
|
OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
|
|
else if (!(features & NETIF_F_LRO) &&
|
|
else if (!(features & NETIF_F_LRO) &&
|
|
- (lio->dev_capability & NETIF_F_LRO))
|
|
|
|
|
|
+ (lio->dev_capability & NETIF_F_LRO) &&
|
|
|
|
+ (netdev->features & NETIF_F_LRO))
|
|
liquidio_set_feature(netdev, OCTNET_CMD_LRO_DISABLE,
|
|
liquidio_set_feature(netdev, OCTNET_CMD_LRO_DISABLE,
|
|
OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
|
|
OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
|
|
|
|
|
|
@@ -3629,6 +3633,17 @@ static int liquidio_set_features(struct net_device *netdev,
|
|
liquidio_set_rxcsum_command(netdev, OCTNET_CMD_TNL_RX_CSUM_CTL,
|
|
liquidio_set_rxcsum_command(netdev, OCTNET_CMD_TNL_RX_CSUM_CTL,
|
|
OCTNET_CMD_RXCSUM_DISABLE);
|
|
OCTNET_CMD_RXCSUM_DISABLE);
|
|
|
|
|
|
|
|
+ if ((features & NETIF_F_HW_VLAN_CTAG_FILTER) &&
|
|
|
|
+ (lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER) &&
|
|
|
|
+ !(netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER))
|
|
|
|
+ liquidio_set_feature(netdev, OCTNET_CMD_VLAN_FILTER_CTL,
|
|
|
|
+ OCTNET_CMD_VLAN_FILTER_ENABLE);
|
|
|
|
+ else if (!(features & NETIF_F_HW_VLAN_CTAG_FILTER) &&
|
|
|
|
+ (lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER) &&
|
|
|
|
+ (netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER))
|
|
|
|
+ liquidio_set_feature(netdev, OCTNET_CMD_VLAN_FILTER_CTL,
|
|
|
|
+ OCTNET_CMD_VLAN_FILTER_DISABLE);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4199,7 +4214,8 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
|
|
liquidio_set_feature(netdev, OCTNET_CMD_LRO_ENABLE,
|
|
liquidio_set_feature(netdev, OCTNET_CMD_LRO_ENABLE,
|
|
OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
|
|
OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
|
|
|
|
|
|
- liquidio_set_feature(netdev, OCTNET_CMD_ENABLE_VLAN_FILTER, 0);
|
|
|
|
|
|
+ liquidio_set_feature(netdev, OCTNET_CMD_VLAN_FILTER_CTL,
|
|
|
|
+ OCTNET_CMD_VLAN_FILTER_ENABLE);
|
|
|
|
|
|
if ((debug != -1) && (debug & NETIF_MSG_HW))
|
|
if ((debug != -1) && (debug & NETIF_MSG_HW))
|
|
liquidio_set_feature(netdev,
|
|
liquidio_set_feature(netdev,
|