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 33043A0093; Tue, 19 May 2020 16:15:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1547E1C222; Tue, 19 May 2020 16:15:25 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 533661BEC6 for ; Tue, 19 May 2020 16:15:23 +0200 (CEST) IronPort-SDR: 3VApPBTeTpEZqJTMKkcFNnOwWwJpHIouEKJIIE9giSbLM1ZlmVdhX0f6SWP5dU4X8JoH3DhNij 4vq3TNpz9NnQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 07:15:22 -0700 IronPort-SDR: ARQ6VS5qH35eogxZO0Ha5Ug6glno7geac+P4nyYEbBMOf4FqIb8wqPibrmMFe/JP1YJKDD/ez4 h2W6kZBcDwbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="411646997" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga004.jf.intel.com with ESMTP; 19 May 2020 07:15:22 -0700 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 07:15:22 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX115.amr.corp.intel.com (10.22.240.11) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 07:15:21 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 07:15:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dG1MqsAMsGpzGvxQlaMqYlFUleZdLbej0QliVXfzDaFUipJtXo6xMse2e2vNrOQfiPTk54nD6FlQr3X6u2TdP79cmjghgzwwweRgFyP+xppzT/r8NdABhKUxVZE5eBQfZbq1dzhDA3PztmQm4cbH3/5Jy5ahh2Vu0se2/4snI+N2d3mCWwd4LUp3YdRfkgl7CnCPKJ6yN59VQ7ykj8i31N08WsFfaAkEvPmK55UIDN269+s5MtQfNOfJQ+7PNGxk1dHd8Nu3nrucdDIR+Y5obwAIsIbgsIDvLRjF6BJySdBmIigxczmhhOM9d2B4tVrQDYZboT8aFTQzttErZ09Lfw== 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=VhMtjY1b45Rd7xIQHzvuNLkMEuQ4Xg4VZsQUNbHHOTo=; b=CL+eYW9SFKTe2aTzwL0MeYxAzPom1oaEkesGipzetlHjymgNtwdDW7UYfqpqkJJabrrmnh9kD8bcnTKwivIBMPIgYgAZORUpuvzJRLqw/jOhJfvIf/eXFV92FUNzjAgiifv5eZe4mrobIYiz8dCLoB2zCjWpaz5UTpwI2Mtp5thejsqhBagk0ldD9fHCmF6y3X5N5E1X7qLBZCQFTvJO8rnrVLvyErDjl8MhOOArCBBoE48qBOZEO33ggah5fCGC1I4rJBQ1J0rbVJFHfrdFV+dYWZxWa8y/XvJyYuhT1AoqaLYldUhVL7LM4RcpjMyXFhnmiZTrRxYKMoKH9bs5lw== 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=VhMtjY1b45Rd7xIQHzvuNLkMEuQ4Xg4VZsQUNbHHOTo=; b=HBsEkxMJDRWYb5uTpPLX5WZXuhbfqLWIrBzjBau4LsTlzFzgQEKoo8KMeUOZll9oIkkLo7WFpzXs3OId4pr3huOrf9HlPCJiR+dsJnYWCqnI1qPFWcUg2XzpERYPqW0c0h0KH/ZbLPnJkF78jI+1TOc9KEAnBBsLmxW3TID+DiY= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB3865.namprd11.prod.outlook.com (2603:10b6:5:19d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.27; Tue, 19 May 2020 14:15:20 +0000 Received: from DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::594c:1a2c:c256:4130]) by DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::594c:1a2c:c256:4130%7]) with mapi id 15.20.3000.034; Tue, 19 May 2020 14:15:20 +0000 From: "Iremonger, Bernard" To: Shy Shyman , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Xing, Beilei" , "xavier.huwei@huawei.com" Thread-Topic: [PATCH] app/testpmd: fix error detection in MTU command Thread-Index: AQHWLPavk/ep22cXt06XRf9vSkfv4qivczMw Date: Tue, 19 May 2020 14:15:20 +0000 Message-ID: References: <20200518092704.188832-1-shys@mellanox.com> In-Reply-To: <20200518092704.188832-1-shys@mellanox.com> Accept-Language: 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.2.0.6 authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.191] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cefdf7a9-4b7a-42c4-3b75-08d7fbff107f x-ms-traffictypediagnostic: DM6PR11MB3865: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 040866B734 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3tu2aJomZQw+slDfK6tTvY8LZgpVuE4mfD16tJ8ykAMPkgDpOI0vR5M6Y3/myJ72pQTwoNTT6aP2YL0D/CtkKcIm7U3MuaZ58540yCXATYAjVkrNMV9RKGQLCSqPYGiRFQHR8NZfXJkbjXWQejyCpxLViylN1XJyhLwYT1TKpxBPLnh31wzYYLnOcjQrpGjHz4DR5uuyvlQVgtYuaQPjZ+4gwcjvhGZnpAEOzF4AWGL5cRtx5KJQpn8mHtWQUzenskSjFNnP7Q6fzo7luW36o/dNrUlcdJ4BAX3T2ewAnsfP6a/KHi8mGfzdz8On5QXKZUzKWUBRYg1jblkjwYqznHg2BzVBGdrpGVbLlYmwfdUAOaEr3v5LBUdC3kGubOmlazWo5QQgHVapREhJJaKr5qNjgwTQ5gVuEqiy/UCCzYTIanASef/wgXiBgNZ+7mR+ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2537.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(376002)(39860400002)(346002)(366004)(66556008)(66446008)(54906003)(66946007)(86362001)(316002)(4326008)(5660300002)(478600001)(8676002)(9686003)(55016002)(76116006)(52536014)(66476007)(8936002)(2906002)(26005)(64756008)(186003)(6506007)(53546011)(71200400001)(110136005)(33656002)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: vwbSXNVI4pZmJ65rX34jMHsQQdkzvs6ZH1Db8W1cpbZA76TR3CBLLHjMvUUfP3CCuB8rKIWA8tNOVSagU1stplui/MAHgY6M38+wyFUJ598QISJmAVD+ccSeFu4w6j46F17vVmTWfr1Q6rIr4fm9NVOn6oXXvIPzZ8/8kdZsyXtneQgPuNVISmIcV6s/cgwzSbxMDPfaRg9pIugjoKaiV7NwWyt37SvyOYFWUvfSVoGS7zlSbLBvhiv35O/A1tw6nYZFJmGHcCj+5bGcsaqpmWd0tjqPr/t1QiNueWkoV2LCHqp1eQe6fXsHIPOtEkwZT34PtEhT/Y7Yk5j6ic3RPrBNVKXNLkKXj2t7Ag5HwzyTaeLDM5xhuf0hl0aBgopPiWmcYiNbWyVw3iri18GFFjwLQykoui8OjLbN/1Gz//RCNrCMC1lV2vi3L/ZnfOK58zAaPvXL+Nr2ytztOGOdGfKkxllOxgETAwEltwFRd4VSVTsRRtdGNP2zAS4eiJSF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: cefdf7a9-4b7a-42c4-3b75-08d7fbff107f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2020 14:15:20.7181 (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: 5RitNz4OAo86OGL9O0/lW+pbkcDxmP+/aeBMGPTgDz6qVnOXsRX3fM4S7UDiBtFdMAvzt61upqvod67FFG575z9GlPAJvAdlN6veaMNLEVM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3865 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix error detection in MTU command 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" Hi Shy > -----Original Message----- > From: Shy Shyman > Sent: Monday, May 18, 2020 10:27 AM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Xing, Beilei > ; Iremonger, Bernard > ; xavier.huwei@huawei.com > Subject: [PATCH] app/testpmd: fix error detection in MTU command >=20 > MTU is used in testpmd to set the maximum payload size for packets. > According to testpmd, the setting influnce RX only. > In rte_ethdev there's no relation between MTU setting and JUMBO offload > or rx_max_pkt_len. >=20 > The previous fix in patch referenced below was meant to update the > correlated variables of max_pkt_len and JUMBO offload, but by doing so it > assumes that MTU setting can only exist when JUMBO offload supported in > the device. For example fail-safe device does supports set MTU and doesn'= t Typo: supports should be support > support JUMBO offload, and in this case, though set MTU succeed an error > mesage still printed since the JUMBO packet offload is disabled. Typo: mesage should be message > The fix separates the two conditions to make sure the error triggers =20 > A warning message is provided in this special case to alert the user. >=20 > Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU") > Cc: xavier.huwei@huawei.com Should the patch be backported to 20.02 ?(ie add Cc: stable@dpdk.org) >=20 > Signed-off-by: Shy Shyman > --- > app/test-pmd/config.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > 5381207cc..73b53c50b 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -1277,8 +1277,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu) > return; > } > diag =3D rte_eth_dev_set_mtu(port_id, mtu); > - if (diag =3D=3D 0 && > - dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) { > + if (diag) > + printf("Set MTU failed. diag=3D%d\n", diag); > + else if (dev_info.rx_offload_capa & > DEV_RX_OFFLOAD_JUMBO_FRAME) { > /* > * Ether overhead in driver is equal to the difference of > * max_rx_pktlen and max_mtu in rte_eth_dev_info when > the @@ -1293,10 +1294,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu) > } else > rte_port->dev_conf.rxmode.offloads &=3D >=20 > ~DEV_RX_OFFLOAD_JUMBO_FRAME; > - > - return; > - } > - printf("Set MTU failed. diag=3D%d\n", diag); > + } else > + printf("WARNING: MTU was set while jumbo frame offload > is" > + " not supported by the device\n"); > } >=20 > /* Generic flow management functions. */ > -- > 2.21.0 Otherwise=20 Acked-by: Bernard Iremonger