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 BCD32A04B1; Wed, 30 Sep 2020 01:01:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FEC11D5C9; Wed, 30 Sep 2020 01:01:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CE5011D585 for ; Wed, 30 Sep 2020 01:01:50 +0200 (CEST) IronPort-SDR: jfE1S4xnSoPVrv8y7iUDlUUqP5XtiTCSmT7pcg8LH8oEEKgMp4l+TG9LKgUpNN9UrpS4hKR6DP iQVTAD2eAcBA== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="162371075" X-IronPort-AV: E=Sophos;i="5.77,320,1596524400"; d="scan'208";a="162371075" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 16:01:48 -0700 IronPort-SDR: 8VFwM7EHWew1GY4rBNxQs1DquZOIy4r65BmzsJb4Xx0EjEl6ZivMJuANR+zkzs9KdDLPba7KVr 6Efkb05FFSBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,320,1596524400"; d="scan'208";a="350443524" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by FMSMGA003.fm.intel.com with ESMTP; 29 Sep 2020 16:01:48 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Sep 2020 16:01:47 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Sep 2020 16:01:47 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 29 Sep 2020 16:01:47 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 29 Sep 2020 16:01:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JAZPS+3VGk0xKaIXA33hOlz0xYARkIloYjU+eVCWnJWHcuFbS3cUe/7PE+GcAioifVOJgm/TumTH62LPxdpU5UOSCm8rlqVuuRRhs8/SXOSdvshFZJ3AInnHyNIJBoxXL6ldVzMhhVQsebYAThZiulC1DBMJgQ1NSjQRUm1capHZT8Z83tXhKEVByhGpxW94KAqYKRveKwFJ9FxELSuroTrTsQvBvlzAOy5UA+xtUO4lYWJSPWFXnXp9E3FKyD9NeUDuPhBsCipXmAZrpaIMzuLR+oQdCHmR40QgAWgWX2MiGnuYslXAXbWZxYFyv5YyH1FYBHZahdkQ8yv5R0KfGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GOF7JzqBs43RJMK+u9nPLy8Pq5zzoorBNNYToOKId+A=; b=oWt9IZ/NuCB6H/LsFU7Pq2B6g7vHrog4w36cUTbI1wCbok4Xc62pnlyXYf9CBcBfiXpISPc+G3Z5jL34CWk7qCHv5qZygxW55IoNsw88WXiArADqi5iArdWbqbaL2q6Z106YsLKnKX5Z4/635L+Ic5BSsdbsq6JTQUorerlqe/b1CqQX2019+lr3wB8x2JxZAWenpWQ7jFgjVq+OihQH86/BR+NmhLwPX6LfjyT7UVsCwB9JaTpVyv9gy+Irap5QpO4rzDBd08Oo711Yc2arvw4JL8WjL+ZqXqkrXk2Y43alqlDhwT2ewlSWnsJYqycl2q1MZ2mD5KJNXOxKNN8zcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GOF7JzqBs43RJMK+u9nPLy8Pq5zzoorBNNYToOKId+A=; b=TZLJ3jMKcp59LUq1SUsHEiK4o+6PnGzULacroeFQHr+ebu0dUEhJaQ0HmBXyRmDxFRJifR86QsDTutbBQtpdERikP/AgooWVsR0796zM7jN/bCL85HY6plbwoBrCzSu9ZcxLiSopTvPRnwoek9SzSuxIcY3DiXsip9/DGKjeBoA= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2535.namprd11.prod.outlook.com (2603:10b6:a02:be::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.25; Tue, 29 Sep 2020 23:01:42 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b%3]) with mapi id 15.20.3412.026; Tue, 29 Sep 2020 23:01:42 +0000 From: "Ananyev, Konstantin" To: "Zhang, Qi Z" , "Yang, SteveX" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Guo, Jia" , "Yang, Qiming" , "Wu, Jingjing" , "Xing, Beilei" Thread-Topic: [PATCH v4 3/5] net/ice: fix max mtu size packets with vlan tag cannot be received by default Thread-Index: AQHWlWYCx8TVuiIL1UiMFWpiGeSnm6l/hUcAgAC4bGA= Date: Tue, 29 Sep 2020 23:01:42 +0000 Message-ID: References: <20200923040909.73418-1-stevex.yang@intel.com> <20200928065541.7520-1-stevex.yang@intel.com> <20200928065541.7520-4-stevex.yang@intel.com> <8459e979b76c43cdbd5a9fbd809f9b00@intel.com> In-Reply-To: <8459e979b76c43cdbd5a9fbd809f9b00@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: de14de7b-154d-4de4-055c-08d864cba1cf x-ms-traffictypediagnostic: BYAPR11MB2535: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WzZn7eryGsWLEfgL4SdgqcCyqwrtL4JW8KoSGT0zXoAIAqvpSmpsCD1qEVUzyGR3GLNtIdc5u1UgJuq1Cm67bAq0wo0izt+D4b9Z0HcKWbYahTgGnOZTZ/DHixNDeP+cryqQLgt4tIpPb4TXuSORDDD/rfBjBlWoGMxULqFMDGzftxsAnccipbiqkueKfs0zlzr5gVi8lpP5CGuiXNto1KDO/LbpgOhqCQwGbMnV1P2IGrRr4CH9ypVTGrGccSj1wN0cmDYYKUoneMm2ME9Lg8TB7JCCDqYEN+uKcbjB+BfLy+Rka1sO2/UmK69DZsZs39B+iD219tFFcEvOTKT7o61iXuqFWinkPIYGpVrXmNOwk5/Tf3kabRTYfxK72RkS x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(366004)(396003)(39860400002)(8676002)(71200400001)(76116006)(66476007)(66556008)(64756008)(53546011)(26005)(6506007)(316002)(7696005)(83380400001)(8936002)(478600001)(33656002)(107886003)(52536014)(66946007)(66446008)(54906003)(110136005)(4326008)(186003)(55016002)(5660300002)(86362001)(9686003)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: A9oYKm+fpFeqzd8PVBE5udK50kuabVA4sWacTYX7u9gL1AjGsTKPMlulqKWIaceuXS3uquc1XN0KfpnkRxCQabZP8gTd2dtjTAVro9CPu1XnosUuOc1Z0v1C0lTbBgA4KduTwXfOE6xvlMKDwtqRBYknHZ5UvDonEXV4C4Crhm3pZSBLnaZq5HVqSszIyYTU3VrFIBDBeHjSATjEk+TK+qg7h6KPxCxOJS5AnoIiFQZ1cDFmW8vsnIgIuzkeR/3wH/AcTYR9YSYUwd/tbwX4ry8Xko7zQbBcW6zDVfH14mmkK3Rde77c4/2ZS6aTLHapQ0Vj0pHtdTNpzBrT8h4eWMB/cDzFrMlibROWXz2oO3FWSvjzH4qugJikNaT/8CtjN0F/6uudnkeZAprf10XzErgEC/eaEM3zPxqsj44jypLTBmE2H/vCOP5ghSMrgZ7mrQne/o3kapA1ZvNNWPqw6HYkvtSDMYrbIvCiUkJOE4041Eb5s9bkfepEMiK5Q22cNlqKFGylpYDqYtJq8RC2kOjHOqfzTVEBlAwgbxWeHpm/KfkKSqXRe7dFN4XvKRJHKTykh0JAPRVTS6JCSCK9UfRzs7aVnNF9Y2eyGVEeytRqvHpcRE6lipaQSnnvS2Ca1XAplWi6gI1fvrBnjKmNUw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: de14de7b-154d-4de4-055c-08d864cba1cf X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2020 23:01:42.6794 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eV0buTnIPcgmYZ+nhzNHyuC+cGT6lXKZNTP7XbqelrX+oWpd6cQFNpwFxcu4rCmkqraGleFbtS9JyZWD9TdQYhwDjeZNMSfcisdmp4Q2N5I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2535 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 3/5] net/ice: fix max mtu size packets with vlan tag cannot be received by default 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" >=20 > > -----Original Message----- > > From: Yang, SteveX > > Sent: Monday, September 28, 2020 2:56 PM > > To: dev@dpdk.org > > Cc: Zhao1, Wei ; Guo, Jia ; Yan= g, > > Qiming ; Zhang, Qi Z ; Wu, > > Jingjing ; Xing, Beilei ; > > Ananyev, Konstantin ; Yang, SteveX > > > > Subject: [PATCH v4 3/5] net/ice: fix max mtu size packets with vlan tag= cannot > > be received by default > > > > testpmd will initialize default max packet length to 1518 which doesn't= include > > vlan tag size in ether overheader. Once, send the max mtu length packet= with > > vlan tag, the max packet length will exceed 1518 that will cause packet= s > > dropped directly from NIC hw side. > > > > ice can support dual vlan tags that need more 8 bytes for max packet si= ze, so, > > configures the correct max packet size in dev_config ops. > > > > Fixes: 50cc9d2a6e9d ("net/ice: fix max frame size") > > > > Signed-off-by: SteveX Yang > > --- > > drivers/net/ice/ice_ethdev.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.= c index > > cfd357b05..6b7098444 100644 > > --- a/drivers/net/ice/ice_ethdev.c > > +++ b/drivers/net/ice/ice_ethdev.c > > @@ -3146,6 +3146,7 @@ ice_dev_configure(struct rte_eth_dev *dev) > > struct ice_adapter *ad =3D > > ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > > +uint32_t frame_size =3D dev->data->mtu + ICE_ETH_OVERHEAD; > > int ret; > > > > /* Initialize to TRUE. If any of Rx queues doesn't meet the @@ -3157,6 > > +3158,16 @@ ice_dev_configure(struct rte_eth_dev *dev) > > if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) > > dev->data->dev_conf.rxmode.offloads |=3D > > DEV_RX_OFFLOAD_RSS_HASH; > > > > +/** > > + * Considering QinQ packet, max frame size should be equal or > > + * larger than total size of MTU and Ether overhead. > > + */ >=20 > > +if (frame_size > dev->data->dev_conf.rxmode.max_rx_pkt_len) { >=20 >=20 > Why we need this check? > Can we just call ice_mtu_set directly I think that without that check we can silently overwrite provided by user dev_conf.rxmode.max_rx_pkt_len value.=20 > And please remove above comment, since ether overhead is already consider= ed in ice_mtu_set. >=20 >=20 > > +ret =3D ice_mtu_set(dev, dev->data->mtu); > > +if (ret !=3D 0) > > +return ret; > > +} > > + > > ret =3D ice_init_rss(pf); > > if (ret) { > > PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); > > -- > > 2.17.1 >=20