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 A59CAA04BA; Tue, 22 Sep 2020 12:47:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 826DE1DBC0; Tue, 22 Sep 2020 12:47:16 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id DC1DB1DBBC for ; Tue, 22 Sep 2020 12:47:13 +0200 (CEST) IronPort-SDR: eexLbbHASdW8WhJPgDtOyPPtEdO3jHyHMkSN8CeFLHXYed8jQCz0F2Z9Ow+Fma5tid3C2L2hIt BLQktjn0xjLg== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="157957677" X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="157957677" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 03:47:11 -0700 IronPort-SDR: Iqp/LlkWo3HAhtA8MskAL8aCHK26tuHTrv9OGE84vwAbvDEEdwWMIINKJrA4GuOJUoeFirWXrl ph9oM8EFiqdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="511155501" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga005.fm.intel.com with ESMTP; 22 Sep 2020 03:47:11 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 22 Sep 2020 03:47:10 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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, 22 Sep 2020 03:47:10 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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, 22 Sep 2020 03:47:10 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 22 Sep 2020 03:47:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q88J8A4ny/FwWWuQgEB4NNbsYDEG9b8AubXQR/GMeQsuQVW4CQKBgazF8LrFg/Y3V4jf5wzhSX0kmehoYFWnElMm3Et/y2R+frdcL9BpE+Rvl42B1x0pfA7HtqZV0Q+w2vgQWnWseS1EKFxSJSBzg2eqLrRvCwgnnbN2EQUBcR8/V4qUDoWV8vKow4sbBk8XkpIe3RYLMArFURaGe2aAV5aao3zW9Ak6fB8YMWvXJ7Cyyh6kGrzJLShmgUcCrT2Ij605L9wJIPZpjSV/DYgBIZirKGxC/UNVDIbJWxG361aJX+ayQphQVX6Wt/u0/pw9dJop3w/DnP37FSXu0nGiHA== 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=uWANYmvJaVy9hYE9tw2Yve/co+MeyqtLjq1XFN5EOZk=; b=ZXKbuSb0Rp9pQ66BX0WkvsHxoZAquJfRzTG0fNydxUG+Z5ddlLQ+rUg+pXBeqBoWCvluAC9zODFdiSVkEICYpRk4Ogx7LF3KhmySrTT2chCAsm9ufQUhjBJlxDDhjKvTDt+/lacrsosRYJySEupzgq1nNjpjESNUUWlfz5Ogl4lq5J3iv+Sy6QfUdChbD1CJkt1Qityrq4EhJmMx0PVHIUfVY8Vf4LEG9/MgazEpVIqO5Fl1P/jP1GdakO1d4LFvXbyu89iMstXXlHSrV3yQVo5yPSB/FJR+QE4qhdClB6Bw7/f3ew5ZVzDnKnkrLDJ0Xrhe5xP0YEMnLJbQ3G6ErA== 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=uWANYmvJaVy9hYE9tw2Yve/co+MeyqtLjq1XFN5EOZk=; b=HW40wcBUo49DOJri4r8ouLKQ+2ZdCnZOZpA1uDrTdrDeUYQUypEVpNycFYty/yOyu+6lXxuiTm9mydZruEpnMzxb6N7fgICPR2WI5JEEVApFmGGEF329/u/PV/BatVpNdciF4CnxBiajawLJWn8sMwFnn2g+Gp/T3tnSxMkjtgw= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2533.namprd11.prod.outlook.com (2603:10b6:a02:c8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Tue, 22 Sep 2020 10:47:03 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f43b:a137:dab8:8b0b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f43b:a137:dab8:8b0b%6]) with mapi id 15.20.3391.027; Tue, 22 Sep 2020 10:47:03 +0000 From: "Ananyev, Konstantin" To: "Yang, SteveX" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Guo, Jia" , "Yang, Qiming" , "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" Thread-Topic: [PATCH v2 4/5] net/i40e: fix max mtu size packets with vlan tag cannot be received by default Thread-Index: AQHWkIHAkv67KpnEyEKfp7z5xW+n8Kl0eggA Date: Tue, 22 Sep 2020 10:47:03 +0000 Message-ID: References: <20200916055212.25019-1-stevex.yang@intel.com> <20200922012338.11277-1-stevex.yang@intel.com> <20200922012338.11277-5-stevex.yang@intel.com> In-Reply-To: <20200922012338.11277-5-stevex.yang@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: fa0a756f-2cc5-430c-ad2a-08d85ee4d7c1 x-ms-traffictypediagnostic: BYAPR11MB2533: 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:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9sGMja3xNeCsWODBrf6E4oHffbrMTJ1dYwdro1z6/87aSCaTeT+IYCItfnVbuTwDMNfFrtyesUCW9upaIEF6YsvCRjiH0kJM0g37NIeCdkgjtNFVBgX9MgezCzeMQXUj6QK7PvyhTYOv7JqYdimzZWMtNF65OfCg0lJWqG9XDOayZ3T/1+Y9dYdS9q+OWaPpmBfJl1ZI7OTe4q1cW0koc+bKWly2gY22ptQSxe2SYfzye13L3yq/SmLnZVzxJeI5WiKLimykVbsfljJpZ9QUzD9gpalWdUTIjj41ywpAzg7dVghmBdnMdfN0mV4YFYlQGqpgq+xRuDJT2uVPjkbq8A== 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)(396003)(366004)(346002)(376002)(39860400002)(136003)(5660300002)(83380400001)(478600001)(4326008)(110136005)(26005)(8936002)(316002)(54906003)(107886003)(33656002)(71200400001)(66946007)(186003)(66556008)(64756008)(66446008)(9686003)(52536014)(7696005)(86362001)(6506007)(53546011)(8676002)(2906002)(55016002)(66476007)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 0UOqCZQ4UjABqkMfxIMhRAlmUlyhdqOsIw36o6FSt6f80ERfASAz61DxgbwvmMLFnsZG4ApnVJ8q3wbPfQwQ20FUL5h7r3XOmw/ioMDdP5TuyAcQUuva325Y/WyLDpUS1omGeniO9J74fAndEvRs5HiS7geqHWW+qqkw8l6mdMdVfmmbn+ieT9PeKR9fCymwJSJN7aaj0bEz0M7cDg5Blnm0AUGynbYRzUMdKWGPV5gqJeLHQ3eVrIHHNAB5hJ72cQi2sKXuHtyN9NXrv1C8v3Da7ZsyAtoAxhnS5nSbW+koq77pqgOfcv3L4S/2ttQZuwvK1UVjN/i37kbdMvyD+LgFEQ8JBk6Qc3KYk8BJY+cJ197mjZ8JoDCDvRhfzv8+vw7QeaF1ojrUve3vpmHI/T7Oqc+gU4uZ2vJaVugyzifrS5Fd4DWrTr6bI86r+bqv5lhK11juDSFvWB4eMinAIScqeui13iyf/U9XHYXH08FWKUc/JA3r2pYEgYZJSxoDYUVSrgKesDe+N5LRTD6M7wnzzteYw6TM/0YhMvyjOTSOk3T8t3iNlfGASiRdLtIja+QvSKDEershQyajmEoucpBUuqBj82aFd6seH8EgM3DvulXul6AXkklxTLzfROdBBJ1MjxAlXznMJ0U3rdf4vg== 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: fa0a756f-2cc5-430c-ad2a-08d85ee4d7c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 10:47:03.6484 (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: 4B0juS4y/yhBGtobDQe2sV8CSG7H2mYkNO/SDOxgfe4y/LaJ9zECPgaJaEDZmwv2xKR2afaCt9VNAsOMSv0qYh3I01qE4WRGcIc7Uro/pow= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2533 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 4/5] net/i40e: 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" > -----Original Message----- > From: Yang, SteveX > Sent: Tuesday, September 22, 2020 2:24 AM > To: dev@dpdk.org > Cc: Zhao1, Wei ; Guo, Jia ; Yang,= Qiming ; Zhang, Qi Z > ; Wu, Jingjing ; Xing, Beile= i ; Ananyev, Konstantin > ; Yang, SteveX > Subject: [PATCH v2 4/5] net/i40e: fix max mtu size packets with vlan tag = cannot be received by default >=20 > 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 packets dropped directly from NIC hw side. But for i40e/i40evf, > they should support dual vlan tags that need more 8 bytes for max packet > size, so, configure the correct max packet size in dev_config ops. >=20 > Fixes: ff8282f4bbcd ("net/i40e: consider QinQ when setting MTU") >=20 > Signed-off-by: SteveX Yang > --- > drivers/net/i40e/i40e_ethdev.c | 5 +++++ > drivers/net/i40e/i40e_ethdev_vf.c | 11 +++++++++++ > 2 files changed, 16 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 563f21d9d..023c86d66 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -1930,6 +1930,11 @@ i40e_dev_configure(struct rte_eth_dev *dev) > ad->tx_simple_allowed =3D true; > ad->tx_vec_allowed =3D true; >=20 > + /* Considering QinQ packet, max frame size should be MTU and > + * corresponding ether overhead. > + */ > + i40e_dev_mtu_set(dev, dev->data->mtu); > + > 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; >=20 > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_et= hdev_vf.c > index 8531cf6b1..b268b3d00 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -1669,6 +1669,7 @@ i40evf_dev_configure(struct rte_eth_dev *dev) > I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > uint16_t num_queue_pairs =3D RTE_MAX(dev->data->nb_rx_queues, > dev->data->nb_tx_queues); > + struct rte_eth_rxmode *rxmode =3D &dev->data->dev_conf.rxmode; >=20 > /* Initialize to TRUE. If any of Rx queues doesn't meet the bulk > * allocation or vector Rx preconditions we will reset it. > @@ -1681,6 +1682,16 @@ i40evf_dev_configure(struct rte_eth_dev *dev) > dev->data->dev_conf.intr_conf.lsc =3D > !!(dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC); >=20 > + > + /* Considering QinQ packet, max frame size should be MTU and > + * corresponding ether overhead. > + */ > + if (dev->data->mtu =3D=3D RTE_ETHER_MTU && > + rxmode->max_rx_pkt_len =3D=3D RTE_ETHER_MAX_LEN) { > + rxmode->max_rx_pkt_len =3D RTE_ETHER_MTU + I40E_ETH_OVERHEAD; > + rxmode->offloads |=3D DEV_RX_OFFLOAD_JUMBO_FRAME; > + } Wonder why vf code-path is different here? Can't we also do mtu_set() here? > + > if (num_queue_pairs > vf->vsi_res->num_queue_pairs) { > struct i40e_hw *hw; > int ret; > -- > 2.17.1