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: f7dc06bf35 ("net/sfc/base: import 5xxx/6xxx family support")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Igor Romanov 2019-01-09 11:12:07 +00:00 committed by Ferruh Yigit
parent 649885c08e
commit 31c2379bad

View File

@ -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;
}