From 31c2379bad4157ca0beb05c9d2b49395b68f373b Mon Sep 17 00:00:00 2001 From: Igor Romanov Date: Wed, 9 Jan 2019 11:12:07 +0000 Subject: [PATCH] net/sfc/base: fix Tx descriptor max number check Fix check of maximum descriptor number (compare with maximum Tx descriptor number instead of maximum EVQ events number). Fixes: f7dc06bf35f2 ("net/sfc/base: import 5xxx/6xxx family support") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/sfc/base/efx_tx.c b/drivers/net/sfc/base/efx_tx.c index bf1180a1ec..9fa9e2ed12 100644 --- a/drivers/net/sfc/base/efx_tx.c +++ b/drivers/net/sfc/base/efx_tx.c @@ -926,7 +926,8 @@ siena_tx_qcreate( EFX_STATIC_ASSERT(ISP2(EFX_TXQ_MINNDESCS)); if (!ISP2(ndescs) || - (ndescs < EFX_TXQ_MINNDESCS) || (ndescs > EFX_EVQ_MAXNEVS)) { + (ndescs < EFX_TXQ_MINNDESCS) || + (ndescs > encp->enc_txq_max_ndescs)) { rc = EINVAL; goto fail1; } -- 2.20.1