Commit 08348995 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

netronome: don't access real_num_rx_queues directly

The netdev->real_num_rx_queues setting is only available if CONFIG_SYSFS
is enabled, so we now get a build failure when that is turned off:

netronome/nfp/nfp_net_common.c: In function 'nfp_net_ring_swap_enable':
netronome/nfp/nfp_net_common.c:2489:18: error: 'struct net_device' has no member named 'real_num_rx_queues'; did you mean 'real_num_tx_queues'?

As far as I can tell, the check here is only used as an optimization that
we can skip in order to fix the compilation. If sysfs is disabled,
the following netif_set_real_num_rx_queues() has no effect.

Fixes: 164d1e9e ("nfp: add support for ethtool .set_channels")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 973334a1
...@@ -2486,7 +2486,6 @@ nfp_net_ring_swap_enable(struct nfp_net *nn, unsigned int *num_vecs, ...@@ -2486,7 +2486,6 @@ nfp_net_ring_swap_enable(struct nfp_net *nn, unsigned int *num_vecs,
for (r = 0; r < nn->max_r_vecs; r++) for (r = 0; r < nn->max_r_vecs; r++)
nfp_net_vector_assign_rings(nn, &nn->r_vecs[r], r); nfp_net_vector_assign_rings(nn, &nn->r_vecs[r], r);
if (nn->netdev->real_num_rx_queues != nn->num_rx_rings) {
if (!netif_is_rxfh_configured(nn->netdev)) if (!netif_is_rxfh_configured(nn->netdev))
nfp_net_rss_init_itbl(nn); nfp_net_rss_init_itbl(nn);
...@@ -2494,7 +2493,6 @@ nfp_net_ring_swap_enable(struct nfp_net *nn, unsigned int *num_vecs, ...@@ -2494,7 +2493,6 @@ nfp_net_ring_swap_enable(struct nfp_net *nn, unsigned int *num_vecs,
nn->num_rx_rings); nn->num_rx_rings);
if (err) if (err)
return err; return err;
}
if (nn->netdev->real_num_tx_queues != nn->num_stack_tx_rings) { if (nn->netdev->real_num_tx_queues != nn->num_stack_tx_rings) {
err = netif_set_real_num_tx_queues(nn->netdev, err = netif_set_real_num_tx_queues(nn->netdev,
......
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