nfp: move nfp_net_vecs_init()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 6 Jun 2017 00:01:45 +0000 (17:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Jun 2017 16:51:38 +0000 (12:51 -0400)
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: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index 2341988..f8dba79 100644 (file)
@@ -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);
 }
 
-/**
- * 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)
  * @nn:                NFP Network structure
@@ -1772,6 +1745,33 @@ static int nfp_net_poll(struct napi_struct *napi, int budget)
 /* 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
  * @tx_ring:   TX ring to free