summaryrefslogtreecommitdiff
path: root/drivers/net/sfc/sfc_rx.c
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchenko@solarflare.com>2018-01-09 20:24:54 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit3c335b7f5e4edeb3ad19d996e4651f7bb5882a7e (patch)
tree8b18f271d6cc99d20951f79e759a999a20e8bae4 /drivers/net/sfc/sfc_rx.c
parenteaab5d96c4692fcc601b89654ac1270eead82822 (diff)
downloaddpdk-3c335b7f5e4edeb3ad19d996e4651f7bb5882a7e.zip
dpdk-3c335b7f5e4edeb3ad19d996e4651f7bb5882a7e.tar.gz
dpdk-3c335b7f5e4edeb3ad19d996e4651f7bb5882a7e.tar.xz
net/sfc: support more options for a number of Rx descriptors
The number of Rx descriptors is not used as HW Rx ring size any more. It simply defines maximum fill level. Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/sfc_rx.c')
-rw-r--r--drivers/net/sfc/sfc_rx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 387f855..b355ea3 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -933,6 +933,10 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
&rxq_max_fill_level);
if (rc != 0)
goto fail_size_up_rings;
+ SFC_ASSERT(rxq_entries >= EFX_RXQ_MINNDESCS);
+ SFC_ASSERT(rxq_entries <= EFX_RXQ_MAXNDESCS);
+ SFC_ASSERT(rxq_entries >= nb_rx_desc);
+ SFC_ASSERT(rxq_max_fill_level <= nb_rx_desc);
rc = sfc_rx_qcheck_conf(sa, rxq_max_fill_level, rx_conf);
if (rc != 0)