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 E51B3A00BE; Tue, 29 Oct 2019 06:10:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7375D1BED4; Tue, 29 Oct 2019 06:10:39 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1EB4F1BECD for ; Tue, 29 Oct 2019 06:10:36 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 22:10:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,242,1569308400"; d="scan'208";a="399670010" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga005.fm.intel.com with ESMTP; 28 Oct 2019 22:10:35 -0700 Date: Tue, 29 Oct 2019 13:07:05 +0800 From: Ye Xiaolong To: "Min, JiaqiX" Cc: "dev@dpdk.org" Message-ID: <20191029050705.GE12923@intel.com> References: <20191024190818.36524-1-jiaqix.min@intel.com> <20191028155453.37207-1-jiaqix.min@intel.com> <20191028084627.GA12923@intel.com> <88691F3C94B94D4584B3478B96DE5B740B06B869@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88691F3C94B94D4584B3478B96DE5B740B06B869@SHSMSX101.ccr.corp.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size 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 10/29, Min, JiaqiX wrote: >Hi Xiaolong, > >> -----Original Message----- >> From: Ye, Xiaolong >> Sent: Monday, October 28, 2019 4:46 PM >> To: Min, JiaqiX >> Cc: dev@dpdk.org; stable@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size >> >> On 10/28, 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: ae2bdd0219cb ("net/ice: support MTU setting") >> >> We should set max frame size to HW in the beginning when the driver was >> introduced, so the fix commit should be 50370662b727 ("net/ice: support >> device and queue ops") >Modify commit message in patch v3. >> >> Fix this while merging. >> >> >Cc: stable@dpdk.org >> > >> >Signed-off-by: Min JiaqiX >> >--- >> >v2: >> >* Changed commit message. >> >--- >> > drivers/net/ice/ice_ethdev.c | 4 ++++ >> > 1 file changed, 4 insertions(+) >> > >> >diff --git a/drivers/net/ice/ice_ethdev.c >> >b/drivers/net/ice/ice_ethdev.c index 022b58c01..403305cfb 100644 >> >--- a/drivers/net/ice/ice_ethdev.c >> >+++ b/drivers/net/ice/ice_ethdev.c >> >@@ -2506,6 +2506,10 @@ ice_dev_start(struct rte_eth_dev *dev) >> > >> > pf->adapter_stopped = false; >> > >> >+ /* Set the max frame size */ >> >+ ice_aq_set_mac_cfg(hw, >> >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); >> >+ >> >> Why set the max frame size to HW in start ops, not in init stage like in i40e? >> and what if max_rx_pkt_len hasn't been set? >> >max_rx_pkt_len need to be set to HW when set mtu , init stage won't be called when open port again. Agree, I think it makes sense to set max frame size to hw in start ops, but what if user doesn't set mtu, then the max_rx_pkt_len would be 0, do we need a default max frame value in this case? And since i40e doesn't update max frame size to HW in start ops, do you think it needs a fix? Thanks, Xiaolong > >Appendix: >Steps for using Example/ethtool to set mtu: >EthApp>stop 0 >EthApp>mtu 0 200 >EthApp>open 0 > >> >> Thanks, >> Xiaolong >> >> >> > return 0; >> > >> > /* stop the started queues if failed to start all queues */ >> >-- >> >2.17.1 >> > >> >> Reviewed-by: Xiaolong Ye >> >> Applied to dpdk-next-net-intel. Thanks.