X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_ev.h;h=a4ababc2bc07b002ab8465c353c42a92d5d3fc3a;hb=6764c3bbdfa2397c745c9b665411f1cd2ed5f06a;hp=590cfb169464eba7e74591d328e99dfc95c419d5;hpb=689a56742a560cc1baff7255a57efcdfdb789f87;p=dpdk.git diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h index 590cfb1694..a4ababc2bc 100644 --- a/drivers/net/sfc/sfc_ev.h +++ b/drivers/net/sfc/sfc_ev.h @@ -110,6 +110,22 @@ sfc_counters_rxq_sw_index(const struct sfc_adapter_shared *sas) return sas->counters_rxq_allocated ? 0 : SFC_SW_INDEX_INVALID; } +static inline sfc_sw_index_t +sfc_repr_rxq_sw_index(const struct sfc_adapter_shared *sas, + unsigned int repr_queue_id) +{ + return sfc_counters_rxq_sw_index(sas) + sfc_repr_nb_rxq(sas) + + repr_queue_id; +} + +static inline sfc_sw_index_t +sfc_repr_txq_sw_index(const struct sfc_adapter_shared *sas, + unsigned int repr_queue_id) +{ + /* Reserved TxQ for representors is the first reserved TxQ */ + return sfc_repr_available(sas) ? repr_queue_id : SFC_SW_INDEX_INVALID; +} + /* * Functions below define event queue to transmit/receive queue and vice * versa mapping.