From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3B02BA05D3 for ; Tue, 21 May 2019 23:40:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 252D65A6E; Tue, 21 May 2019 23:40:10 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id CA0DE4C96 for ; Tue, 21 May 2019 23:39:57 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 1196E30C0D6; Tue, 21 May 2019 14:39:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 1196E30C0D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1558474796; bh=5E4B35jPm7rm3GZ0pCbe+SMF1tbVDM5JNUrJfH1tf9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9GFsJKJAPlMLmvMhgTSMH761BUZCrI/A2MmfyTGW8U6APX1GFPivCI9853IRiKBu f/VeVFjS4EFfuTktDFwGqM2k1dq29l4Kt92ezrdk+CR9IWSuH9vDFE15cjKmtafZXy l339+pMP4sQlwWWefb8pOmC6AGyctg92l8iTaOzE= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id B2D5CAC07C5; Tue, 21 May 2019 14:39:55 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Lance Richardson Date: Tue, 21 May 2019 14:39:46 -0700 Message-Id: <20190521213953.25425-5-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190521213953.25425-1-ajit.khaparde@broadcom.com> References: <20190521213953.25425-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 04/11] net/bnxt: fix double counting VLAN tags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Lance Richardson When determining whether scattered receive mode is needed, the size of a QinQ header is being added to rxmode.max_rx_pkt_len before comparing to the receive buffer size, however max_rx_pkt_len already accounts for the QinQ header size. Fix by simply comparing rxmode.max_rx_pkt_len against the buffer size. Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Signed-off-by: Lance Richardson Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 064a153ec..52a6b94e0 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -638,8 +638,7 @@ static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev) buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) - RTE_PKTMBUF_HEADROOM); - if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len + - VLAN_TAG_SIZE * BNXT_NUM_VLANS > buf_size) + if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len > buf_size) return 1; } return 0; -- 2.20.1 (Apple Git-117)