From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 195A51B411; Wed, 9 Jan 2019 12:12:18 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 0F5A8280086; Wed, 9 Jan 2019 11:12:17 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 9 Jan 2019 03:12:14 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 9 Jan 2019 03:12:13 -0800 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x09BCCs2007309; Wed, 9 Jan 2019 11:12:12 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 8310A1616EF; Wed, 9 Jan 2019 11:12:12 +0000 (GMT) From: Andrew Rybchenko To: CC: Igor Romanov , Date: Wed, 9 Jan 2019 11:12:07 +0000 Message-ID: <1547032327-17508-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24348.003 X-TM-AS-Result: No-1.487200-4.000000-10 X-TMASE-MatchedRID: AuCKiGuH5B5rtoObOqfJT0hwlOfYeSqxpfVcx39Kq+4AhmnHHeGnvbNg xlr0XT/3IV4u8YKdeKtpXb8sy/poSZCoy9iDotiwngIgpj8eDcAZ1CdBJOsoY9mzcdRxL+xwKra uXd3MZDWqS10whZkcb1T0XKvt/b/FLhxlpKEf3+44MkhvhkQ8K72hpfRwo2FFz1p89LAGNhlp8R rDGcfv0FALfPvMBfV1ypjHEi5S1aN+kQx07/uSvzigZBQJvBjlD6DuZ3COjrnoW0NkKZgEncpMv D+U2DDy X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.487200-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24348.003 X-MDID: 1547032337-ZNbFGv8xoCls Subject: [dpdk-dev] [PATCH] net/sfc/base: fix Tx descriptor max number check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 11:12:18 -0000 From: Igor Romanov 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 bf1180a1e..9fa9e2ed1 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.17.1