[dpdk-dev] [PATCH 03/13] net/sfc: remove unused max entries from EvQ info
Andrew Rybchenko
arybchenko at solarflare.com
Fri Mar 31 12:22:13 CEST 2017
Fixes: 58294ee65afb ("net/sfc: support event queue")
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Andy Moreton <amoreton at solarflare.com>
---
drivers/net/sfc/sfc_ev.c | 6 ------
drivers/net/sfc/sfc_ev.h | 21 +--------------------
2 files changed, 1 insertion(+), 26 deletions(-)
diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index 46de7a5..7c8ec32 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -814,7 +814,6 @@ sfc_ev_qinit(struct sfc_adapter *sa, unsigned int sw_index,
evq_info = &sa->evq_info[sw_index];
SFC_ASSERT(rte_is_power_of_2(entries));
- SFC_ASSERT(entries <= evq_info->max_entries);
evq_info->entries = entries;
rc = ENOMEM;
@@ -871,14 +870,9 @@ static int
sfc_ev_qinit_info(struct sfc_adapter *sa, unsigned int sw_index)
{
struct sfc_evq_info *evq_info = &sa->evq_info[sw_index];
- unsigned int max_entries;
sfc_log_init(sa, "sw_index=%u", sw_index);
- max_entries = sfc_evq_max_entries(sa, sw_index);
- SFC_ASSERT(rte_is_power_of_2(max_entries));
-
- evq_info->max_entries = max_entries;
evq_info->flags = sa->evq_flags |
((sa->intr.lsc_intr && sw_index == sa->mgmt_evq_index) ?
EFX_EVQ_FLAGS_NOTIFY_INTERRUPT :
diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h
index f5e6415..8f43d73 100644
--- a/drivers/net/sfc/sfc_ev.h
+++ b/drivers/net/sfc/sfc_ev.h
@@ -84,11 +84,7 @@ struct sfc_evq {
};
struct sfc_evq_info {
- /* Maximum number of EVQ entries taken into account when buffer
- * table space is allocated.
- */
- unsigned int max_entries;
- /* Real number of EVQ entries, less or equal to max_entries */
+ /* Number of EVQ entries */
unsigned int entries;
/* Event queue creation flags */
uint32_t flags;
@@ -114,21 +110,6 @@ sfc_ev_qcount(struct sfc_adapter *sa)
}
static inline unsigned int
-sfc_evq_max_entries(struct sfc_adapter *sa, unsigned int sw_index)
-{
- unsigned int max_entries;
-
- if (sw_index == sa->mgmt_evq_index)
- max_entries = SFC_MGMT_EVQ_ENTRIES;
- else if (sw_index <= sa->eth_dev->data->nb_rx_queues)
- max_entries = EFX_RXQ_MAXNDESCS;
- else
- max_entries = efx_nic_cfg_get(sa->nic)->enc_txq_max_ndescs;
-
- return max_entries;
-}
-
-static inline unsigned int
sfc_evq_index_by_rxq_sw_index(__rte_unused struct sfc_adapter *sa,
unsigned int rxq_sw_index)
{
--
2.9.3
More information about the dev
mailing list