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 340CEA034F; Wed, 13 May 2020 10:54:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B25731D405; Wed, 13 May 2020 10:54:40 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id DD4C61D177; Wed, 13 May 2020 10:54:38 +0200 (CEST) IronPort-SDR: Duf8SC0j2Iv1jKJ3dxZClrRIpl3mHDw5WdFsA1vE3rtD5DT2wfnv6D8/qgACn0SsPwNLgg4YqT WZtnDTHss4tg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 01:54:37 -0700 IronPort-SDR: c0lCLvWUJU5Ml5IXg0eSRdNTRpXScqbLiGyEKbkBpp92byJe7y95nXdU2vKdLJbB4z/k2KEvyv 1urm1E63tDpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,387,1583222400"; d="scan'208";a="409613918" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga004.jf.intel.com with ESMTP; 13 May 2020 01:54:37 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 01:54:37 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 13 May 2020 01:54:36 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 13 May 2020 01:54:36 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 01:54:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FAfYGAQWo98ziFdfd2k0lZNU0gVLeWNVFa6UYNbdHvcTSK+VxrcujnBVhemqn0+Hd5N5ASg7kMyqgb5BKQ+/jPne3Y8XenSGkjsF4oUL75f2AuBuJ4m/WM3YRw2SI60TI4EsFoSbSD9tiuGKTfh7YAvgMW8cirXkOrC7bcW4pMQhORve/nygXx/uhR67g/Xh1GsF9oGipR0LrIHDWrsDFjWXemAPV8XSTYwL3dlJFaHNjrlHX7Ziy3nTOsV7JjB0OYzIMll9Q8ruajUahZwzAUh0/n0BcSEWHlUNYJ8VfC30oDZAY10DuXxAclMXsok/f0KSAqYhFj1ecpbp6Ho+vQ== 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=RLoKjuVWuxRMPbMwivbtsM2Fag/p298d7UjZi0akzmU=; b=hbfUrTbQsid3Z7kM5njIhyIxBB4KyFO+YVpvAd9lfkXkwKoQlSjMX+aTVy75gefV97tfdhmNDekPDXYRwCk1SfilDbP9hkmLruYbCfmLJAGraOXJXddiw/Q1BWJZ4jomrueqAFaWubuZKE5944vfHfeZAuW5npMCTnUaAqvLDSzTNHW+FAq30SJY3zkfulrje+uKZo6hFUJFI5AVuvzIkOn3hj81BFueshTt8gA9Sl85ckQT0xm7mGnz01rfBo2/myJux3VqMh6KvwIlWJiStr66Ayv8GKe/wmnPGGAk5gQ1QbgtIyZNF/sLTsK/eGcjpG81W5kcoLbNW5S2GUcAmw== 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=RLoKjuVWuxRMPbMwivbtsM2Fag/p298d7UjZi0akzmU=; b=lX8W85zhci1ch8WWrTYyrMVCPI9F14tKsqRANWzV6I0wNTS+ETzpPyZq4iQk05Qy1y2TPLFgVMaC6CtyagDt4EQxkCwdQ9nRDoA88uBWcrDwPg42jVV4o9b843IQ2cNavwUkFgtbC/ogjrva3xja9hiI6b+dz8HztvLa7uOPwnA= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB3691.namprd11.prod.outlook.com (2603:10b6:5:146::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Wed, 13 May 2020 08:54:33 +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 08:54:33 +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 v4] app/testpmd: fix DCB set failure Thread-Index: AQHWKMuBpvzK6mZn9EuLD0UpYLYt2ailtBwg Date: Wed, 13 May 2020 08:54:33 +0000 Message-ID: References: <20200511102504.23936-1-ting.xu@intel.com> <20200513100745.13118-1-ting.xu@intel.com> In-Reply-To: <20200513100745.13118-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: cfde5dbf-c31b-44b7-4549-08d7f71b41db x-ms-traffictypediagnostic: DM6PR11MB3691: 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:415; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SQbMSCb4fCcPSqN/Z6aBmFi98e1449dYSShJDVm/Vw3vzxCUbDyNHiastnKhLavIsPRoaNqkK7KUr5qwk0CTO2OwJcD6IFZEVmJq0ooBuDKrNONKL1gMKQXN0M7MBiLtMF8RcOKybix/WaYxzzdgP4yXefxRbF6kLebPurs651uC+Xv8emBPlpTqO3WQB6t450gZT9tbveehFkQSxF7+p7kkuB8YzvLCXCmkuOFeTeql23C42yJgV1i4Z6Iq6FY/s3lO/jO/us2jBOEE34LSdbKZMIGaeNiWLgpHe7h4v1rNz3GRPTMCxcKh8dmSZB1LsqHzykUeF5/iwcYkYo4BuCIF9ObCfkiRxEOp1kiGdU45oKEyiRZnmXA1OgIla0T2JlasXrQ7uhox82pUlN3PoNaU4U6uLxRB82zBuxB4ilTgZlvsxbnUl1GMJsA6wJeO+4QCXs8DK45v8Uw75e79qhkiRyd8BC6MB+qKIj72KiGdsvcZCxqcxsGv4w+Ur/EjpucqLmLH9E7RHkRkHAORXQ== 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:(346002)(376002)(366004)(136003)(39860400002)(396003)(33430700001)(86362001)(66446008)(6506007)(53546011)(54906003)(26005)(186003)(110136005)(5660300002)(71200400001)(316002)(33656002)(7696005)(52536014)(66946007)(8936002)(9686003)(478600001)(55016002)(64756008)(4326008)(33440700001)(66476007)(66556008)(2906002)(8676002)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: djZHXlldB7d4fWxkdqCtR8OMcQohAJIwFL2liHY/OUSTwfn+trPc4A/V9Ml5cz7xgsY1qBaY6FQJ0+Ou939q5vJFs7zEJLcHueKlZVUNElTVyTPNXkBatWG/x7lDh8IPuSRKPeOBdlpBkBqiEAoNSYy/+w8m0H7F8gQjglHqHQi8h0GO6t1tdq1oR8Aw1l9ejMNhIaTi9A07Mh0fFnP+R89ZjQQ+yGG4wlHxNyAByB5syjnyNs9NTONU5+slCztrHcMsmIAV39HQZWIAl3rnLwPQlJqPcaMdybz9JKyLD+B8epm+Pxt2Nqx5D+auF7nT9bvorF1eD4C/sTWF30HllcSEcrc3IWhNqyAfjDq5gTCacnYkcz4/cdcvUFoc97j1d+sCfi4iUn52P2rfQrqMTqt21mfswdvUqXn8SrOBoz9m9GY+hgexBYOMApM2J6w9g1r3F1NPMeDgA3YKqt48npGA2MFkayTvMGodRCvL6uPdH+LSkArERWWtB22MTpYD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: cfde5dbf-c31b-44b7-4549-08d7f71b41db X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 08:54:33.6831 (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: QkHcep0dIT3YBSarUMhfkA1GWz2Lydkpu7gm68meMr12j2oZzF2mzol4Pzr4mGSk1FMucpS5huWxN7YVB1FSAxAjBlwL3UgwH9NBXTB6494= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3691 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4] app/testpmd: fix DCB set failure 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 Ting, > -----Original Message----- > From: dev On Behalf Of Ting Xu > Sent: Wednesday, May 13, 2020 11:08 AM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Yigit, Ferruh ; > arybchenko@solarflare.com; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v4] app/testpmd: fix DCB set failure The fix is no longer in testpmd, so the commit line should be "ethdev: fix = DCB set failure". =20 > When set DCB in testpmd, there is a segmentation fault. It is because the > local variable rss_conf in get_eth_dcb_conf() is not cleared, so that the > pointer member variable rss_key has a random address, which leads to an > error in the following processing. This patch initialized the local varia= ble > rss_conf to avoid this situation. The commit message should probably be revised. >=20 > Fixes: ac7c491c3fec ("app/testpmd: fix DCB config") Also the Fixes line may need to change. > Cc: stable@dpdk.org >=20 > Signed-off-by: Ting Xu >=20 > --- > 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 | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index 8e10a6fc3..1f6ca742a 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -3549,6 +3549,8 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id, > { > struct rte_eth_dev *dev; >=20 > + memset(rss_conf, 0, sizeof(*rss_conf)); The memset call should be moved to after the error checks to just before th= e function is called. > + > 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); > -- > 2.17.1 Regards, Bernard.