From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id D9E2CB6D for ; Mon, 28 Nov 2016 03:19:41 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 27 Nov 2016 18:19:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,561,1473145200"; d="scan'208";a="36220123" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 27 Nov 2016 18:19:40 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 27 Nov 2016 18:19:40 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 27 Nov 2016 18:19:40 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.96]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.142]) with mapi id 14.03.0248.002; Mon, 28 Nov 2016 10:19:39 +0800 From: "Wu, Jingjing" To: Michael Bieniek , "Zhang, Helin" CC: "dev@dpdk.org" Thread-Topic: [PATCH] i40e: fix oversize packet counter not incrementing for large packets Thread-Index: AQHSR0i9jS3GbnD/L0+mTD1Gyq9BCqDtqq+g Date: Mon, 28 Nov 2016 02:19:38 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F80E2BBEE4@SHSMSX103.ccr.corp.intel.com> References: <1480098063-29246-1-git-send-email-michaelbieniekdpdk@gmail.com> In-Reply-To: <1480098063-29246-1-git-send-email-michaelbieniekdpdk@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] i40e: fix oversize packet counter not incrementing for large packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 02:19:42 -0000 > -----Original Message----- > From: Michael Bieniek [mailto:michaelbieniekdpdk@gmail.com] > Sent: Saturday, November 26, 2016 2:21 AM > To: Zhang, Helin ; Wu, Jingjing > Cc: dev@dpdk.org; Michael Bieniek > Subject: [PATCH] i40e: fix oversize packet counter not incrementing for l= arge > packets >=20 > The XL710 requires that the Set MAC Config command be used to define the > maximum frame size in order for the Receive Oversize Count register > (GLPRT_ROC) to be incremented for packets received that are greater than = the > MTU. Without this change, the XL710 will drop the oversized packets witho= ut > incrementing the corresponding counter. >=20 > Signed-off-by: Michael Bieniek > --- > drivers/net/i40e/i40e_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 67778ba..c11c80b 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -9709,6 +9709,7 @@ static int > i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) { > struct i40e_pf *pf =3D I40E_DEV_PRIVATE_TO_PF(dev->data- > >dev_private); > + struct i40e_hw *hw =3D I40E_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > struct rte_eth_dev_data *dev_data =3D pf->dev_data; > uint32_t frame_size =3D mtu + ETHER_HDR_LEN > + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE; @@ - > 9732,6 +9733,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) > dev_data->dev_conf.rxmode.jumbo_frame =3D 0; >=20 > dev_data->dev_conf.rxmode.max_rx_pkt_len =3D frame_size; > + i40e_aq_set_mac_config(hw, frame_size, TRUE, 0, NULL); >=20 > return ret; > } If you look into the eth_i40e_dev_init, you will find the mac's maximum fra= me size Has been set to I40E_FRAME_SIZE_MAX (0x2600). Then the changing of maximum frame size is by the setting in queues. If change the frame size on mac, the maximum frame size will not only works= on PF but also VF.=20 Thanks Jingjing