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 5AFBAA05D3 for ; Thu, 23 May 2019 14:21:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FD2A1B945; Thu, 23 May 2019 14:21:20 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C56CC4C99 for ; Thu, 23 May 2019 14:21:18 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE3437E427; Thu, 23 May 2019 12:21:17 +0000 (UTC) Received: from [10.36.112.60] (ovpn-112-60.ams2.redhat.com [10.36.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE8DF67E64; Thu, 23 May 2019 12:21:16 +0000 (UTC) To: Ajit Khaparde , dev@dpdk.org Cc: ferruh.yigit@intel.com, Lance Richardson References: <20190521213953.25425-1-ajit.khaparde@broadcom.com> <20190521213953.25425-5-ajit.khaparde@broadcom.com> From: Maxime Coquelin Message-ID: <2f55e39b-ea24-0231-4c46-e294f126f011@redhat.com> Date: Thu, 23 May 2019 14:21:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190521213953.25425-5-ajit.khaparde@broadcom.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 23 May 2019 12:21:18 +0000 (UTC) Subject: Re: [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" On 5/21/19 11:39 PM, Ajit Khaparde wrote: > 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; > Isn't it fixing patch 2? If so, Fixes line is wrong, and it should be squashed directly into patch 2.