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 CC577A04A2 for ; Wed, 13 May 2020 17:54:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABBA71D661; Wed, 13 May 2020 17:54:33 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DE8B51D655; Wed, 13 May 2020 17:54:29 +0200 (CEST) IronPort-SDR: bn5yuIW7SA4FCubCYHRix8+D4KPSHyCHut35ySuGELbMYPOQPVygcEED/sv+cMAfR162OrAw+a JeZOkmjIDkMg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 08:54:28 -0700 IronPort-SDR: SRw2mG+MsQRjWCXVQUSMKz65ToeklYNMe81tmJUJhSOSOTVPR1vk2VOvBYyedNaNhVtvfAHV0W NCKZ7FeIlytA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,388,1583222400"; d="scan'208";a="409732449" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga004.jf.intel.com with ESMTP; 13 May 2020 08:54:28 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 08:54:27 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX116.amr.corp.intel.com (10.22.240.14) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 08:54:27 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 08:54:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N8rMLjwS1N6aG5g9JIfRx50tHMqxMYiaKkTH8fXRIxto3FhRIo/dynZXckkCzrBbarlOlcYcOleZ9rMjwyPh0zuqu00drqy1kUXbErWEa2bNGqzGzKqQGdZgPR6PM0acHN/AJvlVrB8vCQiwfkl2424AYbMz762SSJlYU0qh/z70Uv7EokZylgRa6VpJZz4txq6jBrDU2VHR2uFgCrh/C0wK5asBxuxgOVtFBd81VRqb1rPyvtGQn7EY8mZxtVC8SV+10EkaKJ/2onp9p5Q1jF78uPoD8j24HEyeNzrxxhREfUlSXHbH43EFdre5sm554O7599ahGsZyRV51KffuZQ== 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=5oiQ4OwYzFnUjFIW942YdwvxMJzzAS+0VjK6krhrv8Y=; b=Ep0+iN0z/yks52lI9R0iEWLqCtWcBxhHAwHBCOz5tA3ptErpUKt1QaQ/1rZIPS+8RrFchJ9MAg/2cJSnOzCtTijv3ZWTvb2TIoK35rIaifjOnsF6cGG1+Rk/boTKpj9uTzGghcl/HqOVjh7p16ckJqy3aafVWS74r0LOFS0socPNPokfILZEEh7O++H8zD/t7oc3oLZ3XcDsCdVcyiidRn5TWYmL8AyyB1jeGxfjYWBzdO3ANqR7F72pjDn/SjyOgx/fQ/p2/uWy1MIOuoPJxrIzJSxTHDjG2RY5j8zopRg4ANd0qnq2lpOZC2JBGWI8OIjk9J1tWpo+pb2TqiWPhw== 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=5oiQ4OwYzFnUjFIW942YdwvxMJzzAS+0VjK6krhrv8Y=; b=wDkp6NBzxEgJip9y+MtLu9xdUbKH+wmJbu05QxvkVY7Aq7NElCYJThbtYiYn3rBprReSz8dddxzBC3iaR/GcMPgk+cMYBzRO7kejPZ/ef+T2tYLxSDOhvGMtaW9rmUCzbDnhjmF0BMJaVdz6hjsUBBbULGatRqrKf1BamiMS/cA= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB3113.namprd11.prod.outlook.com (2603:10b6:5:69::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Wed, 13 May 2020 15:54:26 +0000 Received: from DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa]) by DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa%6]) with mapi id 15.20.2979.033; Wed, 13 May 2020 15:54:26 +0000 From: "Iremonger, Bernard" To: "Xu, Ting" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Yigit, Ferruh" , "arybchenko@solarflare.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5] ethdev: fix DCB set failure Thread-Index: AQHWKQeHRnoYwZazkEGAm7RtcmgCzKimKsBg Date: Wed, 13 May 2020 15:54:26 +0000 Message-ID: References: <20200511102504.23936-1-ting.xu@intel.com> <20200513171627.80657-1-ting.xu@intel.com> In-Reply-To: <20200513171627.80657-1-ting.xu@intel.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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.165] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b9f99935-b266-49a4-8c90-08d7f755ea01 x-ms-traffictypediagnostic: DM6PR11MB3113: 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:1122; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Tm2Gn5gQkOtiFWiHcib4LTw7ZGsgMa56chTfXY/djV8MuPHMERvriXgmVjf7anisqh8+t+p57bSHxvWI9F6P0svGFVo49aWdCXmFtOvrQQS7l+qEiivo7nJtshtX4ZsHyqjioW3CBt59MWZyzEUQ92ThWZ8ZLD5UFgue9OzTn890clUB16//VX5dzYqN1Rb6BeG0eA1DbU2iuktEbYLtGQfXJwp5FdngWz9TuhME059J6m6vKZGfAZdJ6aoLSNfwRTdzRQCSlbpNUda+BzKZCJ7H9qzfNGSvu4kcJ6PQdaJQxJC/Pgy1q87x6kxLnQHD5hNPuVusaeHb+MWJiTlVo+kT2VB1JzjQkaRjRo9ZdFCwS2RH9S0Mqmy/++2iroP9RY4LJY3RIDVbMrZbVTSk55+mzX8/8AcdWVtzMuOkinm4U9/yT5WYClDT61u1A5nJsclWHWuLjfxYFDDCchqdsePTm75gSbXAAxwuknv1DIB/97xGQFnssQJyBCBT5yx2uK91VjA93ottBeo+zgVSFg== 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:(39860400002)(366004)(376002)(396003)(136003)(346002)(33430700001)(9686003)(55016002)(33440700001)(86362001)(5660300002)(4326008)(71200400001)(478600001)(33656002)(8676002)(7696005)(110136005)(76116006)(2906002)(66476007)(53546011)(66446008)(52536014)(8936002)(54906003)(64756008)(316002)(26005)(6506007)(66556008)(66946007)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: /MBAzFnYXRVyZgJ3qHi02u84wmGLdwC+uYLDuoTbR6lc4+wx4HryQcpvr8sK/xx4h9Yq+ld87JsI5AkiZICWGTcvNI+iYHpXpbYEJna/R92gOMywfkMKPsLY7ARlPSKVWPiO2sJUjscHwR5DaLe1Ct5hiA+WQfVik3QsyaWM+7+DAW6e2KvW43fGruoB+PIcspZbqTJklCI8hjMSwKY1k+WIbMD3iCPBJtu5J913l6ltZ9CWmoKW2Hvjq9qAVZLg/UMsG4EViqMhPza9xadNKVx6SUML97h5fzYPNQSj6SC96Y3MxPo5SpiSFBs2wINDCgBI3SrHIUoyrA9R8Ur8xUfqTHVpGae3dnO5Ne2rHCLQxpGfNX2YEX06hz58nfJwP0LSTkFo1jRguMY7esAjhjAoocs21g3aVLLFNy68SeCckMAvR8aDKLeZX0xVKu9TCbW31mL2wVj83u0/5CxXnpu/Lith7hBi83FMXOH4vzTW0kBSUByR2nd3u059Y68v Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b9f99935-b266-49a4-8c90-08d7f755ea01 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 15:54:26.5655 (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: 8Tx11gFoZpwhkdiLTZykce/CvZRf+hvOsUKxqRkd83m+YztU8gDCUzpAVPk9Wg81D0LXScakrz9cLa3ViZQd97lVG8wAWIeC6D1mZ+CDX64= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3113 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v5] ethdev: fix DCB set failure 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" > -----Original Message----- > From: dev On Behalf Of Ting Xu > Sent: Wednesday, May 13, 2020 6:16 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Yigit, Ferruh ; > arybchenko@solarflare.com; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v5] ethdev: fix DCB set failure >=20 > When rte_eth_dev_rss_hash_conf_get() is called, if the variable rss_conf = is > not initialized, the pointer member variable rss_key may have a random > address, which leads to an error in the following processing. This patch > initialized the variable rss_conf to avoid this situation. >=20 > Fixes: 16321de09396 ("ethdev: allow to get RSS hash functions and key") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ting Xu >=20 > --- > v4->v5: modify commit log > V3->v4: fix build failure > v2->v3: move memset to rte_eth_dev_rss_hash_conf_get from testpmd > v1->v2: modify commit log, move memset to else leg > --- > lib/librte_ethdev/rte_ethdev.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index 8e10a6fc3..b20c6bb2d 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -3552,6 +3552,7 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id, > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; > RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_conf_get, > -ENOTSUP); > + memset(rss_conf, 0, sizeof(*rss_conf)); > return eth_err(port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, > rss_conf)); > } > -- > 2.17.1 The commit line should probably be reworded to describe the revised fix. Otherwise Reviewed-by: Bernard Iremonger