Commit 0367f058 authored by Dmitry Bogdanov's avatar Dmitry Bogdanov Committed by David S. Miller

net: qede: Disable aRFS for NPAR and 100G

In some configurations ARFS cannot be used, so disable it if device
is not capable.

Fixes: e4917d46 ("qede: Add aRFS support")
Signed-off-by: default avatarManish Chopra <manishc@marvell.com>
Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
Signed-off-by: default avatarMichal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2d2fe843
...@@ -311,6 +311,9 @@ int qede_alloc_arfs(struct qede_dev *edev) ...@@ -311,6 +311,9 @@ int qede_alloc_arfs(struct qede_dev *edev)
{ {
int i; int i;
if (!edev->dev_info.common.b_arfs_capable)
return -EINVAL;
edev->arfs = vzalloc(sizeof(*edev->arfs)); edev->arfs = vzalloc(sizeof(*edev->arfs));
if (!edev->arfs) if (!edev->arfs)
return -ENOMEM; return -ENOMEM;
......
...@@ -804,7 +804,7 @@ static void qede_init_ndev(struct qede_dev *edev) ...@@ -804,7 +804,7 @@ static void qede_init_ndev(struct qede_dev *edev)
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_TC; NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_TC;
if (!IS_VF(edev) && edev->dev_info.common.num_hwfns == 1) if (edev->dev_info.common.b_arfs_capable)
hw_features |= NETIF_F_NTUPLE; hw_features |= NETIF_F_NTUPLE;
if (edev->dev_info.common.vxlan_enable || if (edev->dev_info.common.vxlan_enable ||
...@@ -2274,7 +2274,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode, ...@@ -2274,7 +2274,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode,
qede_vlan_mark_nonconfigured(edev); qede_vlan_mark_nonconfigured(edev);
edev->ops->fastpath_stop(edev->cdev); edev->ops->fastpath_stop(edev->cdev);
if (!IS_VF(edev) && edev->dev_info.common.num_hwfns == 1) { if (edev->dev_info.common.b_arfs_capable) {
qede_poll_for_freeing_arfs_filters(edev); qede_poll_for_freeing_arfs_filters(edev);
qede_free_arfs(edev); qede_free_arfs(edev);
} }
...@@ -2341,10 +2341,9 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode, ...@@ -2341,10 +2341,9 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode,
if (rc) if (rc)
goto err2; goto err2;
if (!IS_VF(edev) && edev->dev_info.common.num_hwfns == 1) { if (qede_alloc_arfs(edev)) {
rc = qede_alloc_arfs(edev); edev->ndev->features &= ~NETIF_F_NTUPLE;
if (rc) edev->dev_info.common.b_arfs_capable = false;
DP_NOTICE(edev, "aRFS memory allocation failed\n");
} }
qede_napi_add_enable(edev); qede_napi_add_enable(edev);
......
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