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 C736EA00C5; Sun, 3 Jul 2022 09:56:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65FAC40E50; Sun, 3 Jul 2022 09:56:34 +0200 (CEST) Received: from na01-obe.outbound.protection.outlook.com (mail-cusazon11020017.outbound.protection.outlook.com [52.101.61.17]) by mails.dpdk.org (Postfix) with ESMTP id 1720440685 for ; Sun, 3 Jul 2022 09:56:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wv+mPsphLMXVQpg8w8hsB7S/qmvW+o3e2/OjtOkfbQhdLNxvzB6C5POA2DNrnIk5UU+cWErZ1JixGJu5JFYRgrnY2A+F7949rsVTV+k0Mx8AaE/GHR6r4yxrI37/pDfE7N8MHxmSVfpCSkWJTgWqKZ4zo5VXRzmewZ0DsQ02k7remVT3gkZwN1C2F6+HyHrhZHQ2ncUOsJwiXl+L4y0cIdgbNZvRrXzSPeJspjFjmL/8IJ+2Yw0azUmhm9xwIC5NrpC8/frA9U+lGwiZGajyRRznh1Jv256hexTTvFldXCm0HSTlsDVSQfTnI6Evc5LPlP6Cz3vfnhEm3c+J4DxyRA== 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=EtwyFtnQ/Crzh0lXp75H06YMjLc6sD/EX7NAveL2+po=; b=jJ8rl2q0Uj5aGtCgr2A69YgojrtOf8xuLLtVpY11H8vQwnfin4lW2an7HhlMIcEyEeXdftFZpEK0JLgTJxLkwmyVrQv+NboN+7lr15OAyKdzJQHGQTnhe0W+3xA+4npkESF70pUtxSnf+32g8R0GLoyH7IFOLcMZPPk4VBHL98rYZSBx4wz33CDWJnGZJg07VyD1fXemwFNPFL4OEEGYf9nlA6bxHDSe0gpISOsWY9AA2joQYMafb82VGYOL54GtVd2v7H4GBhOu3bnWmaq/DCrlFf8cOJZQzXASQcwZxhfLhDABSRqsSpd6vRV85GwfdS2aU9rULCmGk8Svvb0Zyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EtwyFtnQ/Crzh0lXp75H06YMjLc6sD/EX7NAveL2+po=; b=SFJb27KhVL0qGktSMQqZiwjBQ0qd4zWdeZhB4crGB86+6cQ58kJmqfFNCW44XWfUjQ/uhYh4NMdk/Q/srJdiJGgnbK0F7A3lHskrsnMhuITM8dKU1cEe4FWrSLY7+l/u/OnXvZgPSJNbg+wXC3oF8gHIXerdTuxjaIiIhMqCtkU= Received: from PH7PR21MB3263.namprd21.prod.outlook.com (2603:10b6:510:1db::16) by PH7PR21MB3167.namprd21.prod.outlook.com (2603:10b6:510:1d7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.6; Sun, 3 Jul 2022 07:56:18 +0000 Received: from PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::11a4:ce07:c6d8:c172]) by PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::11a4:ce07:c6d8:c172%7]) with mapi id 15.20.5373.010; Sun, 3 Jul 2022 07:56:18 +0000 From: Long Li To: Stephen Hemminger , "longli@linuxonhyperv.com" CC: Ferruh Yigit , "dev@dpdk.org" , Ajay Sharma , Stephen Hemminger Subject: RE: [PATCH 01/17] net/mana: add basic driver, build environment and doc Thread-Topic: [PATCH 01/17] net/mana: add basic driver, build environment and doc Thread-Index: AQHYjSlgWjh8SeINWEaYsI8REt0hy61pujUAgAKNmSA= Date: Sun, 3 Jul 2022 07:56:18 +0000 Message-ID: References: <1656666167-26035-1-git-send-email-longli@linuxonhyperv.com> <1656666167-26035-2-git-send-email-longli@linuxonhyperv.com> <20220701094736.7d7589b5@hermes.local> In-Reply-To: <20220701094736.7d7589b5@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=124a7b2c-c6b7-47f7-957a-8dbd2161a17a; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-07-03T07:46:55Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ad5cc6ab-1d86-4271-b4b1-08da5cc98316 x-ms-traffictypediagnostic: PH7PR21MB3167:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FEFx6TKbOxXRrdcVyOe+kUfOgVlMLbF02yt5I1TLdbP/JK2L55DPx6b6YByssCNvNQcX8eYiJhOPt/PYO3mkqpYg6EuzDfXFPdGN5MOukXimncIiR/N9oSMmAyeizdH1N6Q87UQ+K5yNuYTCi6xiyDO9KYt9S0JK9CbxZz9Fm+USQqNsx7ouTaR6mvZk9F+uL2OhypY/rBaixr+CMovrPVM9jB7KPp2hDLai+I7UBNYdmOGOQCRkxNdIIqbkBsIHT9K+ZrwT9anIkHxhxar9njByqbTV6A7wR4d+ZJ1k7Vtoi5JbMP2JpWpKeih3OuBqXgNGpLoXcf9R1r73ImXH92fp8EexdKurHGIeQtoqYGRfI+qWxG3K/GjSFzjsckrehNs0r32fKTewI4xvIQVjkkPjhN2kKwKQgq1BEx6qj1bGQ60QItdnNCSwxdIOil6J18ftjXWV9+Mb9T5znSZUAdogw8cL21JXpmMvBCHQBaPK5grUX3JgHRNAt/R9TuAqz1DVkj/krCDEWDqdbH1PH85zyKu79AGwYnHx+A5mcqGF01zYyOOMHJjeVNwyZW/nkrI2A5IXIlSyUnQ+cza42Y4+q8KLtkuBBTvUhmOsB/ncdHcGWb67gbLh65OI4chU2GE4pFMEkLIgNW7YGXInOXtG0mbOkl/5pTbZcJCdpAz3jEblrKI5egPST0brD5WsyQNoK4CYhHbT8GIGCKNVol85odvgQ/NP4oVzUYv1D9tmKHsqT0ZoRwHh3SQaGHWeemEOe1JAU8Hq77zhGKpKzQhDt12Wj5/bVtTFLZAdTqDT4N1uQpsBU7m2M5G54qHGSzUi49lLWcVpQcRytIaGp0zKhwDWLsBZpJAC87NDwYOcCgwVmIWRitZ7ppZYbVZf x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR21MB3263.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(396003)(39860400002)(346002)(366004)(451199009)(4326008)(66476007)(76116006)(66946007)(66556008)(8676002)(66446008)(8990500004)(33656002)(26005)(64756008)(9686003)(8936002)(2906002)(83380400001)(55016003)(38070700005)(5660300002)(71200400001)(107886003)(4744005)(41300700001)(122000001)(86362001)(52536014)(6506007)(82950400001)(10290500003)(186003)(38100700002)(110136005)(54906003)(7696005)(316002)(478600001)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Yuu/1QzquJ4fPoyrfMS+xHT/GcZy4GBn6fH1eTe5HBx+rBzua5WRpQV7aqcz?= =?us-ascii?Q?RsZF+rJIsAyTyCY4C3eac48EBpuffkT6uOYxgMgKlor6LO7ia/IQ7mtmWSUR?= =?us-ascii?Q?kZsCbjaFqWy0RDl6E3/+eriuXwRQBZZ1TiEjILM6FSEtnPdgbLE1EAeoFO37?= =?us-ascii?Q?OCqImmPHD0At/punb+aw5zuvqf/AlfryE/xhShFHVCDAXwAeynFeFwsCqf9E?= =?us-ascii?Q?RLiouklp4EfVvJEkW2o1mRZBV2xF2e+/rlsoXExGS+rVO/dtC0CdGtQRuiht?= =?us-ascii?Q?LM9zpaCHPAThPctB4BjdVEyxTOpgOzRu0y44all8C/xD7S1KiiTkky+gyVgr?= =?us-ascii?Q?uyDmtF/M5RCn4tBEJBdJFG6MBT2IUqb7qtrsNHkV5ORkQ6eWnYjqLR5yYGi4?= =?us-ascii?Q?UBiYLXiRL/rkvIcfS16c5gzbN1Mt+lsAsCYi3A1NTgXo2CUAuYUpl3Iat/f5?= =?us-ascii?Q?/ljP5OxKJCTJQzdsU24gz+bmMspKTcIRpu9FogLxq0b39SJsoXFf4ycEVae5?= =?us-ascii?Q?sPlCDWKlPCLzKbW0vYn7ODVq8RoJSu2ZtDQ+BUL30d2ZtkI02D7c9i7Z38Xs?= =?us-ascii?Q?5B8CqJgXbMO2z5e87v0JW2nXRI9N4X7bI7vMTJyZ+uvc71kb33KRBbrkA9/q?= =?us-ascii?Q?Y44XZigwMdkARQJv7juYDWe1caSOPE8jj3P91/1OUsgFyu2mKIHp3ZjetLTP?= =?us-ascii?Q?6uPk7BVgHkuXbp7T1XxgDoxaPcigNjm/vLtX5OP9EV5aIeZXOMiQTdti5hUO?= =?us-ascii?Q?0YZ8jQl30J5adQvusLShYsJZIQd8+EK1MN0jpklPQhTfvRt6ZMnYH9Ngk02M?= =?us-ascii?Q?Nr9Bu9nuJrNN1LbUbUf6baS1+cwp+mJK2d8J1CXGA3e1yhr0UTQ+nXWCNWAv?= =?us-ascii?Q?6bzg4BiBfmt4zTd0WL5Ui4sPkmD8V1YPfBcy+dcOuFiQiSOSZF0KmEwBtcmM?= =?us-ascii?Q?m4UAe8/9emQN+1UGRFvkQlxt01oC7BHGnYawiv/1XtWYLrj/KYerlrNgNlnA?= =?us-ascii?Q?EqKv3f/UReCwvbJZRbxCNpY0JOAyPTDZZRwFet1dlUSUUVZ6vGk0pJahqxZ8?= =?us-ascii?Q?4SVgK8rY34l9xBgCiJpvv5Kdhu2dQuOrCWF/rD38FHCGD1tNzwmjfNJdvUeO?= =?us-ascii?Q?BW2a7I2zqUgWrzgbRIUiqgTR4VWhmW6OsEEvcJ3gzV30lksmOnIAlkKt5ZXa?= =?us-ascii?Q?csAkDg/qiHagZ7Qjug11gi/uedWnf46iquW2xhcdOuucmz2fkNbmEXvSl0LC?= =?us-ascii?Q?VKXMbe5ZJDWS6pDCSs3Z89d1t+HTqvgzQEW2xnwV/Ta89GT0P5TWrgXIQer/?= =?us-ascii?Q?RqkaMWegFWvYBJGig6bmxCddl9LTPpgIw9aW8O0Rn+YBPR4LINAbzB3oEMCW?= =?us-ascii?Q?duBaE5+Df7hdEv3vvJDzoxywhMCN5IikkR6jfQUmlU25hEnogPsczt/CkE7F?= =?us-ascii?Q?YxfzZfvjEPpAJFYtnsiSgtjMqkR3H8zJNeO51FlRMK05hyyUiWjH2zaPKzgy?= =?us-ascii?Q?oyEQjPuc6mM7ACOx7By6Z8B9h+hQFCeYd3xULdYn7MnhFlPQra7jLJKlueVp?= =?us-ascii?Q?Pofceqr932pNvwwHsFzHUWMioDbnJbaek+4NiOhN?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR21MB3263.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad5cc6ab-1d86-4271-b4b1-08da5cc98316 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2022 07:56:18.3363 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PTpImhRkp1jrbfiObV9G0j0dtoBcDmzeo3cyCLngUZwkocdg+0yzX+Ag0ZwdX3ytTmwiEoC1cCN+DrShRUYWMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR21MB3167 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 > Subject: Re: [PATCH 01/17] net/mana: add basic driver, build environment = and > doc >=20 > On Fri, 1 Jul 2022 02:02:31 -0700 > longli@linuxonhyperv.com wrote: >=20 > > + uint64_t max_mr_size; > > + rte_rwlock_t mr_list_lock; > > +}; >=20 > Reader/Writer locks are slower for the usual uncontended case. > Unless you have a reader holding onto the lock for a long time, better to= use > spin lock. >=20 > This is Linux wisdom (thank you paulmck), Windows seems to love reader/wr= iter > locks. This lock is used mostly uncontended for readers and allow them concurrentl= y to access the list. It's rare that a writer might want to access it. But changing it to spinlock will prevent multiple readers from accessing th= e list at the same time. In this use case, is it beneficial to use spinlock= s?