From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id EEC80A04C5;
	Fri,  4 Sep 2020 09:46:12 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id AC86E1C0C2;
	Fri,  4 Sep 2020 09:46:07 +0200 (CEST)
Received: from mga18.intel.com (mga18.intel.com [134.134.136.126])
 by dpdk.org (Postfix) with ESMTP id D21F21C0BD
 for <dev@dpdk.org>; Fri,  4 Sep 2020 09:46:05 +0200 (CEST)
IronPort-SDR: eNFh+7b5J2F9CYxEiuKXqM3Z2kbX2uk2a6Wm2ScBGXctczsxLHGf2FUDGLnI5HFLlB324HtWty
 YwuFrnbCnQLw==
X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="145407663"
X-IronPort-AV: E=Sophos;i="5.76,388,1592895600"; d="scan'208";a="145407663"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 04 Sep 2020 00:46:05 -0700
IronPort-SDR: P9G0TDHq2Sprj5QQkG02Kw8PCyNJdOlgP/y8j6Rzmx0rFWvlFaMmpL56AH7u5irwzC5TMM1Cjp
 +p1yc2IwbLKQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.76,388,1592895600"; d="scan'208";a="315769952"
Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136])
 by orsmga002.jf.intel.com with ESMTP; 04 Sep 2020 00:46:03 -0700
From: SteveX Yang <stevex.yang@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com,
 SteveX Yang <stevex.yang@intel.com>
Date: Fri,  4 Sep 2020 07:29:02 +0000
Message-Id: <20200904072907.10648-2-stevex.yang@intel.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20200904072907.10648-1-stevex.yang@intel.com>
References: <20200827011410.18401-1-stevex.yang@intel.com>
 <20200904072907.10648-1-stevex.yang@intel.com>
Subject: [dpdk-dev] [PATCH v3 1/6] net/iavf: fix scattered Rx enabling
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

No need to add additional vlan tag size for max packet size,
the queue's Rx Max Frame Size (rxq->max_pkt_len) already
includes the vlan header size in iavf.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: SteveX Yang <stevex.yang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c3aa4cd72..f9dd5710c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -253,7 +253,7 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
 
 	rxq->max_pkt_len = max_pkt_len;
 	if ((dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER) ||
-	    (rxq->max_pkt_len + 2 * IAVF_VLAN_TAG_SIZE) > buf_size) {
+	    rxq->max_pkt_len > buf_size) {
 		dev_data->scattered_rx = 1;
 	}
 	IAVF_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
-- 
2.17.1