Commit cd083ce1 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: move nfp_net_vecs_init()

Move nfp_net_vecs_init() after all datapath functions.  We will need
to init poll() callbacks from this function soon.

No functional changes.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4621199d
...@@ -503,33 +503,6 @@ nfp_net_rx_ring_init(struct nfp_net_rx_ring *rx_ring, ...@@ -503,33 +503,6 @@ nfp_net_rx_ring_init(struct nfp_net_rx_ring *rx_ring,
rx_ring->qcp_fl = nn->rx_bar + NFP_QCP_QUEUE_OFF(rx_ring->fl_qcidx); rx_ring->qcp_fl = nn->rx_bar + NFP_QCP_QUEUE_OFF(rx_ring->fl_qcidx);
} }
/**
* nfp_net_vecs_init() - Assign IRQs and setup rvecs.
* @nn: NFP Network structure
*/
static void nfp_net_vecs_init(struct nfp_net *nn)
{
struct nfp_net_r_vector *r_vec;
int r;
nn->lsc_handler = nfp_net_irq_lsc;
nn->exn_handler = nfp_net_irq_exn;
for (r = 0; r < nn->max_r_vecs; r++) {
struct msix_entry *entry;
entry = &nn->irq_entries[NFP_NET_NON_Q_VECTORS + r];
r_vec = &nn->r_vecs[r];
r_vec->nfp_net = nn;
r_vec->handler = nfp_net_irq_rxtx;
r_vec->irq_entry = entry->entry;
r_vec->irq_vector = entry->vector;
cpumask_set_cpu(r, &r_vec->affinity_mask);
}
}
/** /**
* nfp_net_aux_irq_request() - Request an auxiliary interrupt (LSC or EXN) * nfp_net_aux_irq_request() - Request an auxiliary interrupt (LSC or EXN)
* @nn: NFP Network structure * @nn: NFP Network structure
...@@ -1772,6 +1745,33 @@ static int nfp_net_poll(struct napi_struct *napi, int budget) ...@@ -1772,6 +1745,33 @@ static int nfp_net_poll(struct napi_struct *napi, int budget)
/* Setup and Configuration /* Setup and Configuration
*/ */
/**
* nfp_net_vecs_init() - Assign IRQs and setup rvecs.
* @nn: NFP Network structure
*/
static void nfp_net_vecs_init(struct nfp_net *nn)
{
struct nfp_net_r_vector *r_vec;
int r;
nn->lsc_handler = nfp_net_irq_lsc;
nn->exn_handler = nfp_net_irq_exn;
for (r = 0; r < nn->max_r_vecs; r++) {
struct msix_entry *entry;
entry = &nn->irq_entries[NFP_NET_NON_Q_VECTORS + r];
r_vec = &nn->r_vecs[r];
r_vec->nfp_net = nn;
r_vec->handler = nfp_net_irq_rxtx;
r_vec->irq_entry = entry->entry;
r_vec->irq_vector = entry->vector;
cpumask_set_cpu(r, &r_vec->affinity_mask);
}
}
/** /**
* nfp_net_tx_ring_free() - Free resources allocated to a TX ring * nfp_net_tx_ring_free() - Free resources allocated to a TX ring
* @tx_ring: TX ring to free * @tx_ring: TX ring to free
......
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