From: Igor Romanov Date: Wed, 9 Jan 2019 11:12:07 +0000 (+0000) Subject: net/sfc/base: fix Tx descriptor max number check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=31c2379bad4157ca0beb05c9d2b49395b68f373b;p=dpdk.git 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 --- 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; }