提交 0668b60b 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

nfp: loosen relation between rings and IRQs vectors

Upcoming XDP support will break the assumption that one can iterate
over IRQ vectors to get to all the rings easily.  Use nn->.x_ring
arrays directly.
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a10b563d
...@@ -1920,9 +1920,9 @@ static void nfp_net_clear_config_and_disable(struct nfp_net *nn) ...@@ -1920,9 +1920,9 @@ static void nfp_net_clear_config_and_disable(struct nfp_net *nn)
nn_err(nn, "Could not disable device: %d\n", err); nn_err(nn, "Could not disable device: %d\n", err);
for (r = 0; r < nn->num_rx_rings; r++) for (r = 0; r < nn->num_rx_rings; r++)
nfp_net_rx_ring_reset(nn->r_vecs[r].rx_ring); nfp_net_rx_ring_reset(&nn->rx_rings[r]);
for (r = 0; r < nn->num_tx_rings; r++) for (r = 0; r < nn->num_tx_rings; r++)
nfp_net_tx_ring_reset(nn, nn->r_vecs[r].tx_ring); nfp_net_tx_ring_reset(nn, &nn->tx_rings[r]);
for (r = 0; r < nn->num_r_vecs; r++) for (r = 0; r < nn->num_r_vecs; r++)
nfp_net_vec_clear_ring_data(nn, r); nfp_net_vec_clear_ring_data(nn, r);
...@@ -2000,7 +2000,7 @@ static int __nfp_net_set_config_and_enable(struct nfp_net *nn) ...@@ -2000,7 +2000,7 @@ static int __nfp_net_set_config_and_enable(struct nfp_net *nn)
nn->ctrl = new_ctrl; nn->ctrl = new_ctrl;
for (r = 0; r < nn->num_rx_rings; r++) for (r = 0; r < nn->num_rx_rings; r++)
nfp_net_rx_ring_fill_freelist(nn->r_vecs[r].rx_ring); nfp_net_rx_ring_fill_freelist(&nn->rx_rings[r]);
/* Since reconfiguration requests while NFP is down are ignored we /* Since reconfiguration requests while NFP is down are ignored we
* have to wipe the entire VXLAN configuration and reinitialize it. * have to wipe the entire VXLAN configuration and reinitialize it.
...@@ -2173,11 +2173,11 @@ static void nfp_net_close_free_all(struct nfp_net *nn) ...@@ -2173,11 +2173,11 @@ static void nfp_net_close_free_all(struct nfp_net *nn)
unsigned int r; unsigned int r;
for (r = 0; r < nn->num_rx_rings; r++) { for (r = 0; r < nn->num_rx_rings; r++) {
nfp_net_rx_ring_bufs_free(nn, nn->r_vecs[r].rx_ring); nfp_net_rx_ring_bufs_free(nn, &nn->rx_rings[r]);
nfp_net_rx_ring_free(nn->r_vecs[r].rx_ring); nfp_net_rx_ring_free(&nn->rx_rings[r]);
} }
for (r = 0; r < nn->num_tx_rings; r++) for (r = 0; r < nn->num_tx_rings; r++)
nfp_net_tx_ring_free(nn->r_vecs[r].tx_ring); nfp_net_tx_ring_free(&nn->tx_rings[r]);
for (r = 0; r < nn->num_r_vecs; r++) for (r = 0; r < nn->num_r_vecs; r++)
nfp_net_cleanup_vector(nn, &nn->r_vecs[r]); nfp_net_cleanup_vector(nn, &nn->r_vecs[r]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册