net: qede: Disable aRFS for NPAR and 100G
[ Upstream commit 0367f05885b9f21d062447bd2ba1302ba3cc7392 ] In some configurations ARFS cannot be used, so disable it if device is not capable. Fixes: e4917d46a653 ("qede: Add aRFS support") Signed-off-by: Manish Chopra <manishc@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
82dfe9c32d
commit
7e74a6d6f9
@ -336,6 +336,9 @@ int qede_alloc_arfs(struct qede_dev *edev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!edev->dev_info.common.b_arfs_capable)
|
||||
return -EINVAL;
|
||||
|
||||
edev->arfs = vzalloc(sizeof(*edev->arfs));
|
||||
if (!edev->arfs)
|
||||
return -ENOMEM;
|
||||
|
@ -770,7 +770,7 @@ static void qede_init_ndev(struct qede_dev *edev)
|
||||
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
||||
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;
|
||||
|
||||
if (edev->dev_info.common.vxlan_enable ||
|
||||
@ -2211,7 +2211,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode,
|
||||
qede_vlan_mark_nonconfigured(edev);
|
||||
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_free_arfs(edev);
|
||||
}
|
||||
@ -2278,10 +2278,9 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode,
|
||||
if (rc)
|
||||
goto err2;
|
||||
|
||||
if (!IS_VF(edev) && edev->dev_info.common.num_hwfns == 1) {
|
||||
rc = qede_alloc_arfs(edev);
|
||||
if (rc)
|
||||
DP_NOTICE(edev, "aRFS memory allocation failed\n");
|
||||
if (qede_alloc_arfs(edev)) {
|
||||
edev->ndev->features &= ~NETIF_F_NTUPLE;
|
||||
edev->dev_info.common.b_arfs_capable = false;
|
||||
}
|
||||
|
||||
qede_napi_add_enable(edev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user