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 1313CA00BE for ; Wed, 30 Oct 2019 11:09:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C94F31BFE2; Wed, 30 Oct 2019 11:09:15 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 822051BF9F; Wed, 30 Oct 2019 11:09:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 03:09:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="212053611" Received: from intel.sh.intel.com ([10.239.255.32]) by orsmga002.jf.intel.com with ESMTP; 30 Oct 2019 03:09:09 -0700 From: Min JiaqiX To: dev@dpdk.org Cc: Min JiaqiX , stable@dpdk.org Date: Wed, 30 Oct 2019 10:04:00 +0000 Message-Id: <20191030100400.3120-1-jiaqix.min@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191029125431.16862-1-jiaqix.min@intel.com> References: <20191029125431.16862-1-jiaqix.min@intel.com> Subject: [dpdk-stable] [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" 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; + } + + /* Set the max frame size to HW*/ + ice_aq_set_mac_cfg(hw, + pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); + return 0; /* stop the started queues if failed to start all queues */ -- 2.17.1