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 B3C1EA04A2; Tue, 5 Nov 2019 03:26:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38E072C23; Tue, 5 Nov 2019 03:26:45 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 850C72C16; Tue, 5 Nov 2019 03:26:43 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2019 18:26:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,269,1569308400"; d="scan'208";a="220591854" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by FMSMGA003.fm.intel.com with ESMTP; 04 Nov 2019 18:26:41 -0800 Date: Tue, 5 Nov 2019 10:22:47 +0800 From: Ye Xiaolong To: Min JiaqiX Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20191105022247.GA40305@intel.com> References: <20191030100400.3120-1-jiaqix.min@intel.com> <20191104153332.34150-1-jiaqix.min@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191104153332.34150-1-jiaqix.min@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v5] 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 11/04, 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 > >--- >v5: >* Set `ICE_FRAME_SIZE_MAX` to to default value. >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..741a067f9 100644 >--- a/drivers/net/ice/ice_ethdev.c >+++ b/drivers/net/ice/ice_ethdev.c >@@ -2657,6 +2657,7 @@ ice_dev_start(struct rte_eth_dev *dev) > struct ice_vsi *vsi = pf->main_vsi; > uint16_t nb_rxq = 0; > uint16_t nb_txq, i; >+ uint16_t max_frame_size; > int mask, ret; > > /* program Tx queues' context in hardware */ >@@ -2724,6 +2725,15 @@ ice_dev_start(struct rte_eth_dev *dev) > > pf->adapter_stopped = false; > >+ /* Set the max frame size to default value*/ >+ 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); >+ > 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.