From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8419AA00C4; Mon, 11 Apr 2022 05:06:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29EF94068C; Mon, 11 Apr 2022 05:06:54 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D23304067B for ; Mon, 11 Apr 2022 05:06:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649646413; x=1681182413; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=s2O5U+MBbw8je6XYtVzi49mUHIDIWkRtAPW/2Kvsfn4=; b=iwUtQonKfgjWg9VvBCycjmbhx7C8vhKv5pSi5Xr6dtJYyqFwFwLXIF53 yA22Ic6saqVKswlwsq8dbDsY09oj55jq2dlsfUSaFK3K/HKUCxn/TZkn5 EmRV0wLbsQyFNV2I/KRd/O5a6dyXBhlZ/ORmqxfMptCl9C6gs7/1JCh45 Myu4lC7S58ZOBZy1ZOUjSBErhDTWJ0N3p/AlUWyuvIxqm4KDwSeweuHjK UQNsmx2LW+xRCZqQoa1Bd+cDjHImSoV1GX7MzDbtcVJmd/euWdFcvdTLx G4nmtFQFJ2n5WncYAkuaMt0L/cLzh+jg1M8oAspgJUnvEVZ8p4V5gZR65 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10313"; a="242609034" X-IronPort-AV: E=Sophos;i="5.90,250,1643702400"; d="scan'208";a="242609034" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2022 20:06:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,250,1643702400"; d="scan'208";a="550939401" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga007.jf.intel.com with ESMTP; 10 Apr 2022 20:06:50 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.2308.27; Sun, 10 Apr 2022 20:06:49 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 10 Apr 2022 20:06:48 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2308.27 via Frontend Transport; Sun, 10 Apr 2022 20:06:48 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) 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.2308.27; Sun, 10 Apr 2022 20:06:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EUqsl27n2Qzo3lXh5T5ddxejRmIykRlXlfI1nEB7sMM3Ga/n69fMGzL8/l01yKbEEWFDChjZBZaJFucgilkQ8CSXb4D2FofYBeIMyQd5k1OcgP1i0rPvdS67rccV0uOtHt/TzFdsqV5p257am3t+yDG6hd63NNCKRx2gV/scvgjIdajcoY3LxoFasjaF+O63z7EUffZqhSNnXJHcacJc7QzKgvvzWE4lygbWNIUQJOdJ2MbhsWqxtwkR1MGFHzpGbeFv2AbuG6aopSiJwtlnRwYfSRyyDs76PhvEBOQ+i+hZNLl3mfxn6StzZEUpMEj1b0wvEC7s+qV16Ul84Vmajw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Vn2wMwoKF2rK6bs3EGehFIaDekQFJz+TKe57tHp+Fng=; b=nUicxEWldo3YikAWdA6XyO3qPcAYWYSmRoEwXPTNi8E95z2L8v0Ke9KCYuA4sZ3Sh/A17s8W+f6Ubpdma9pBk8uSxLb3AhQSmT4Hir4HMOkjwrv6L2bLZCiz12wzcCCQIkAH+fFsdkfH4XfyhaxKHz3fm9dHARC5TgexPRAp4dUKMLy30QJfS6uWcnJir3+sMzHw7wS8qWp2Mm09LteNeLeRAjxUeqbENC7zcCi1xPMbkVrUksx0ypzisaNaYqQXAaxxKAnhIyirBiGwouC5xEa5UONYFTBx6JnqjN5Wezmtl7rc+8+LLyo0jYoLZ4yuiktRMA2i0PaUisfF35lt2g== 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 Received: from DM8PR11MB5701.namprd11.prod.outlook.com (2603:10b6:8:20::12) by MW3PR11MB4745.namprd11.prod.outlook.com (2603:10b6:303:5e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Mon, 11 Apr 2022 03:06:47 +0000 Received: from DM8PR11MB5701.namprd11.prod.outlook.com ([fe80::6df1:5d1a:9f0c:ea09]) by DM8PR11MB5701.namprd11.prod.outlook.com ([fe80::6df1:5d1a:9f0c:ea09%3]) with mapi id 15.20.5144.029; Mon, 11 Apr 2022 03:06:47 +0000 From: "Zhang, Ke1X" To: "Min Hu (Connor)" , "chas3@att.com" , "dev@dpdk.org" Subject: RE: [PATCH] net/bonding: fix rss key configuration when the key length is 52 Thread-Topic: [PATCH] net/bonding: fix rss key configuration when the key length is 52 Thread-Index: AQHYSmOpUCKlnYzHEk2piF59Ku6D7KzlTQQAgAS/7iA= Date: Mon, 11 Apr 2022 03:06:46 +0000 Message-ID: References: <20220407093642.44900-1-ke1x.zhang@intel.com> <66552a01-6f88-b0b2-a69f-24d0484ea36d@huawei.com> In-Reply-To: <66552a01-6f88-b0b2-a69f-24d0484ea36d@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f225f9b1-7ece-4314-0b8f-08da1b6850ad x-ms-traffictypediagnostic: MW3PR11MB4745:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sEocbyFjDDpcU4igetX0ylnUC4AkNg2IHBAAmcrzGfzhXt1B9pOvX6GbFh96n68D1CNpti88lueMlAXzRsWCxg17L4rJ8i1vyzdr1tPAzuY2aX3Ix0GfH5d+M/U99/wop+qFFyhOwUhr3ioPxH+7iSEFH7QwkA2DtfSS0x3stEu0C4Hv0Ce+LMEdkvYFduMXDvSVSIXQt+5KIkl/vF/BjWpQ6AAxWLrcwL5ib4uF24hTfiLnWVkcuGNSnHRHIOgojE+mB0wETp8FHTsVgLmrHL6FmGQLgPXcEizRcKY9SvZs7S/raxbkA4k6/RWzcgnD9DzKGDa7C8DVnAqnurJSqWLnUnXyO17w90SsCs+umbs8It8CXJLtEIRqB5Rf44aCsG4enEoZMqJB+iwUCBGtbmr6+o7uL4u0T76h1tZSm2508HlE8M5la0weVyhry5nOhfVox5CG2DNFuKr52VZOUIuWP5LD1IWS28zNdMQKl6lMoUtRCoP2Q2wmOeRr7R+FsgMBCdSp+J2bNVAdK10m+sobooAUWScjFD7GrPyFJuNeX2MPeFqoYtzEfdBynxVdZ/hwcP75pd46pbvVejMEhq+o9fEpPSoBBvWx0O1XspQE5LA8JU2qVghm9njdG4PKWR3zmYQ+MYrh9ihmd6vo3p79VqZnpc2kasQ3OJonUMwCS0tkk1kGk0uNtYzOmnOUWFMlLWvcxYI08jVP7dP/dg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5701.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(86362001)(110136005)(316002)(71200400001)(508600001)(76116006)(122000001)(38070700005)(33656002)(38100700002)(82960400001)(83380400001)(55016003)(6506007)(7696005)(53546011)(9686003)(2906002)(5660300002)(8936002)(186003)(26005)(64756008)(66446008)(66476007)(66556008)(66946007)(8676002)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?ZUh6aXo0WjJtTnJUeEhNc2tla3pydldxcC93Q09mOFhySEFTcVk5Yk9D?= =?iso-2022-jp?B?Q2dweXR0ZkxaMWxzWjVtOFJ6OEZrUmNERTZWUHdmOUtFMlpQbzdydWRJ?= =?iso-2022-jp?B?QnBDY2VwckNPVFZQWVpvSUNnTzJ6clltVVhoTi9QUVE3Z0l3NC9qdlRs?= =?iso-2022-jp?B?eHZzOWJPUWs2M2ZkNnl2TVJaTlhuVnVGVVdGM3lZVlR5YkJBcWVSTDU4?= =?iso-2022-jp?B?OUNITWd0Vkl3Ynp3ZlhyVUJZcVY0cUMxTUQ5TUt4ak1MejJlYTkyRVFj?= =?iso-2022-jp?B?UmV6eFp2K2ZIMHF6MHVEK0gyaXZpeHg5S3FKOS9OMmVSMVNqdGNWZGsy?= =?iso-2022-jp?B?aXFCR01MekNOOEhLNWxrN1NRMlEvaE9qc3pmWXoxNWQ3b2l0b0E1NGVn?= =?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DY2x1ZGJwWXAzRFByMy93ejh6cTJyU2dwa1JM?= =?iso-2022-jp?B?VHFLQkVXdlRUOGxVaXV4dTJoRkRvenkycG0vQlVIdzBhOEZyZ3BsdEkr?= =?iso-2022-jp?B?QnpzdjJnWkxnUGZBVGt0VjlrS0s4SW9QNzl2RXVORll6M25KUDJOb3Fi?= =?iso-2022-jp?B?R0d6Q0ZUS2dMWGJmcE1HR1lPL1JFY3VaMXlScHJ4a3JvSHV1cWI2YUpk?= =?iso-2022-jp?B?ek9TZHEvelpwdStMMld5cHRrdmxVMW02S0tnV2NucmorZzNYb0h3TDF2?= =?iso-2022-jp?B?RnUwNEVUZWVXRmgxbWliUGd2TnB1WVJvY3Q2UT09?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5701.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f225f9b1-7ece-4314-0b8f-08da1b6850ad X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2022 03:06:46.9319 (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: DFAvB3xQ6oxVT44AZbhy5gxfQUFCnbddjY4q2sp4e1+Zumrv+0lpote79mvLjPPTuczfQUKqw+IYzxbTpgd0Bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4745 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Min Hu (Connor) > Sent: Friday, April 8, 2022 10:33 AM > To: Zhang, Ke1X ; chas3@att.com; dev@dpdk.org > Subject: Re: [PATCH] net/bonding: fix rss key configuration when the key > length is 52 >=20 > Hi, >=20 > =1B$B:_=1B(B 2022/4/7 17:36, Ke Zhang =1B$B > when creating a bonding device, if the slave device's rss key length > > is 52, then bonding device will be same as slave, in function > > bond_ethdev_configure(), the default_rss_key length is 40, it is not > > matched, so it should calculate a new key for bonding device if the > > deault key could not be used. > wrong spelling. This is a coding waring as below: =20 _coding style issues_ =20 WARNING:TYPO_SPELLING: 'slave' may be misspelled - perhaps 'secondary'? #64: when creating a bonding device, if the slave device's rss key length WARNING:TYPO_SPELLING: 'slave' may be misspelled - perhaps 'secondary'? #65: is 52, then bonding device will be same as slave, in function total: 0 errors, 2 warnings, 0 checks, 19 lines checked the 'slave' is correct, for exsample, testpmd cmd: add bonding slave 0 2 > > > > Signed-off-by: Ke Zhang > > --- > > drivers/net/bonding/rte_eth_bond_pmd.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > > b/drivers/net/bonding/rte_eth_bond_pmd.c > > index b305b6a35b..4214b33f40 100644 > > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > > @@ -3617,13 +3617,13 @@ bond_ethdev_configure(struct rte_eth_dev > *dev) > > internals->rss_key_len); > > } else { > > if (internals->rss_key_len > sizeof(default_rss_key)) > { > > - RTE_BOND_LOG(ERR, > > - "There is no suitable default hash key"); > > - return -EINVAL; > > + /* If the rss_key_len is 52, it should calculate > the hash key */ > I think the comment should be more common, no need to emphysize '52'. > > + for (i =3D 0; i < internals->rss_key_len; i++) > > + internals->rss_key[i] =3D > (uint8_t)rte_rand(); > > + } else { > > + memcpy(internals->rss_key, default_rss_key, > > + internals->rss_key_len); > > } > > - > > - memcpy(internals->rss_key, default_rss_key, > > - internals->rss_key_len); > > } > > > > for (i =3D 0; i < RTE_DIM(internals->reta_conf); i++) { > >