From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C2A6FA04A3 for ; Mon, 4 Nov 2019 04:00:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 93B414C8E; Mon, 4 Nov 2019 04:00:26 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BC90A2C37; Mon, 4 Nov 2019 04:00:23 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 19:00:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,265,1569308400"; d="scan'208";a="205053059" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga006.jf.intel.com with ESMTP; 03 Nov 2019 19:00:21 -0800 Date: Mon, 4 Nov 2019 10:56:30 +0800 From: Ye Xiaolong To: Min JiaqiX Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20191104025630.GS11315@intel.com> References: <20191029125431.16862-1-jiaqix.min@intel.com> <20191030100400.3120-1-jiaqix.min@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191030100400.3120-1-jiaqix.min@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v4] net/ice: fix setting max frame size X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 10/30, Min JiaqiX wrote: >Max frame size is not set to HW, so packets above the MTU >do not get dropped by HW. The patch fixed the issue. > >Fixes: 50370662b727 ("net/ice: support device and queue ops") >Cc: stable@dpdk.org > >Signed-off-by: Min JiaqiX > >--- >v4: >* Removed Reviewed-by >* Checked and set defaut max frame size to HW in start ops. >v3: >* Changed Fixes line. >v2: >* Changed commit message. >--- > drivers/net/ice/ice_ethdev.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c >index d74675842..d8aa68f07 100644 >--- a/drivers/net/ice/ice_ethdev.c >+++ b/drivers/net/ice/ice_ethdev.c >@@ -2724,6 +2724,16 @@ ice_dev_start(struct rte_eth_dev *dev) > > pf->adapter_stopped = false; > >+ /* Set the max frame size to default value*/ >+ if (pf->dev_data->dev_conf.rxmode.max_rx_pkt_len == 0) { >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len = >+ RTE_ETHER_MAX_LEN; I think ICE_FRAME_SIZE_MAX is more suitable here. >+ } >+ >+ /* Set the max frame size to HW*/ >+ ice_aq_set_mac_cfg(hw, >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); What about max_frame_size = pf->dev_data->dev_conf.rxmode.max_rx_pkt_len ? pf->dev_data->dev_conf.rxmode.max_rx_pkt_len : ICE_FRAME_SIZE_MAX; /* Set the max frame size to HW*/ ice_aq_set_mac_cfg(hw, max_frame_size, NULL); Thanks, Xiaolong >+ > return 0; > > /* stop the started queues if failed to start all queues */ >-- >2.17.1 >