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 9583DA0C50; Wed, 21 Jul 2021 10:44:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C5534014E; Wed, 21 Jul 2021 10:44:01 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2060.outbound.protection.outlook.com [40.107.236.60]) by mails.dpdk.org (Postfix) with ESMTP id D988540143 for ; Wed, 21 Jul 2021 10:43:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hz5Z9yEj/nAxuVjoaYf3qV9FN1oZ9wwLsqGk9GKi4Wb67XWRvzjBhJbQOjKZ9cJo54UZRjoXX+e4eXSkcCo0g0cRFoXs7lPjyWJt+V6ruSLh/6YOf2StIocnBtB73/MvRbT1WvrWQtCUACoGjMLk3RIlkz1OpMUgEXts277ZWewBbHSOSpc3J3ke5GVMp8YlQ5Gx3WqRllDCdu25TP3MftxgxCOp73gQWpwO3EkBfimTR9OgKN+eAuvCAfCYnWGXAvVVFVrsM495UPeNjFw+jw/yEk9Mcs8rPNr2vewUe2GuBqS1O8Mcd7kR65qF06G1V8LOe5wxgDfk9TN7/q5Wsg== 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=SfHM7mop85J9pAoSz0OTmnCqMmGWn4eBIcWtDboqd5E=; b=TtSP5Uvxo8aZ0gXEgC99ffcgG2UA5WAIKIfQ2sdTGHO+ay7IvRAXEj3nUz3SINdDEMYdyBKXaHOhItOvWoTXV/gFAfWpceHyp2Kij++FDvtvJMCS1sszk6TXJ9ufNUUuqmFfhaKT7va5KoTFz6Oxy4FrlKY5CONZBOIPwlHpyhD5TU53uaKCkEql6yOFFYzKpL96DXdQTsI22y2DbpALzb0ecEIQBy3rMLWNvaui0IHysOZrZR5X4DXv/i+rwnY/vXT/Ei+5Is94y5QGAR4qYag4nJQUFI4S+Xy8xTYlkijJztURX5iGXyoRNfxIYmhxmksQ2KOKon36xs3hFkodxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SfHM7mop85J9pAoSz0OTmnCqMmGWn4eBIcWtDboqd5E=; b=UmSd2oRspUrs6UKycyAL9/1qKFe+tlEwQ8l4K0y8DkSw3pbgfgTAlTQpsstxgMhmqT7Af67Xa/VNIEnzoAo5XmjzTcfxrvxGrlQyaSC8MRExvB9Ru440BD3hQWxbka2mQvTt8ehJYxSag2JHrPLR84++Mko+R3NMJOtCsYxyAIHpPeL+fe0EpIT+khH8X8gFjIqNktcLUUMJTK4aFOLMc4mhu1ojBxaxf10qER5ZBcnpngoI3Kz4KibXJfChfZ3un46GSUIbWPdoUexdL+UVwrBrGybbfUnixoCHAmebVFLNB5ELeLnUci610y7pIvT0p9w7farPt4kIdj2mIqUeVA== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5311.namprd12.prod.outlook.com (2603:10b6:5:39f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.32; Wed, 21 Jul 2021 08:43:57 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00%9]) with mapi id 15.20.4287.036; Wed, 21 Jul 2021 08:43:57 +0000 From: Matan Azrad To: Suanming Mou , Slava Ovsiienko CC: Raslan Darawsheh , "dev@dpdk.org" , Tal Shnaiderman Thread-Topic: [PATCH] net/mlx5: fix indexed pools allocate on Windows Thread-Index: AQHXfgtVKJrW9ZWI/E68agUYj99OyqtNGw0w Date: Wed, 21 Jul 2021 08:43:57 +0000 Message-ID: References: <20210721083448.14598-1-suanmingm@nvidia.com> In-Reply-To: <20210721083448.14598-1-suanmingm@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 539fdc8e-6349-48a9-bb5f-08d94c23ae11 x-ms-traffictypediagnostic: DM4PR12MB5311: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:214; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: K+HkuUUMkrsfZ0lnVu5EY1x///GQgXg0ZXGq6mrD01XI1guvBP/iDqkI7otAzyEyT+0y9M+D73R/j/dc7/Jp+3JA1ulEmkMGlUKRUVtAcbTgvu27BxoVf9v5mboY02gOgG0TlZavTh7zLGMyNJeHxTIjFMIYfU/7R64lPdKOIA9M+7Bm1yepGOmV9ID1UVk9BdwwxltIghHRIqVTwNAxij219X2xunW6dorBSO1ZqAIJuCqasvvOuMDL7GeHC+V6H4nayKAdf9BwhL8CmRZ4kYmXHThVaxX2i0fJlsBMRqOUgqzR3RaBnyOLyfGTUS/KG4Nh4i6M6DpnCWOZuU1kOa3wH0naUC9tIbHUxVRF6bK4PciHnQ+8xogvHy8/XoHEpi8bJ6vaYI1G69R8oZe7Ow3/qlzy5yUb6XQTKKwizhhctKFMp8zrSuMAXtpWeiJ76P418Y0jgReTBwC+LVmvQEnvNsgPnpoKR1iulv94BFqPkHOMwEmByrpmRHXKQISZgXY39A56hvuE6cvkuFN7yHf3exjShhX5DNYH/RsOx6EqpDNP9zjrfklNE7NMno6WHD4Jrl2jsoA10SJkD/en+54BkSStXSh+b030KJYDfw64P1xs9Ck5PUBazxPxg0o8Hh4RQUk4hz9Hu5XhKQWG52k5luw6jtpTlGTvRxkt6KBEiLgBnAyfP3UVk4pY3yfSjd7CpVmytEY2/c7xSEktbtfrVvV0k8P5rdbka7VxBvE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(6636002)(4326008)(66946007)(26005)(110136005)(2906002)(107886003)(8676002)(66476007)(122000001)(33656002)(83380400001)(55016002)(7696005)(38100700002)(71200400001)(54906003)(9686003)(5660300002)(52536014)(8936002)(6506007)(508600001)(86362001)(316002)(64756008)(66446008)(66556008)(76116006)(38070700004)(309714004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xZb3XI22QjyFmlthLZbrdudaKeSifSpOv1/1CaBX2UZgvRbqMw1gAEh2PskO?= =?us-ascii?Q?zWLBfn17R6ZgX+kpFyUIoSVXUHr8kI4TQyPv4Boz0k4MPsmvU13ek/sJrUob?= =?us-ascii?Q?SoZ7MK2j2mZVRYdwsfwq9fUXDSSnP4G+44a6D7c7akk29Tdnsd4hRIODGXPx?= =?us-ascii?Q?QqIKRP5pn14BKkSMddEgr6rNUX/jvzE2HeSQac1Fv4jCKkPGxX8zDdA+AAN1?= =?us-ascii?Q?MYjz3Xk64ROg3bcj1LFWFmT5VfJBwyee59ycgsIG6BKmE8TyFu91etSfqw+W?= =?us-ascii?Q?2QUsfmVAIHxm84IWul5n6MRCXpa1jdJmjaZmzxx3N0dkrKMf/5g0UMPKdv6/?= =?us-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mYF4Lbcq49ZYsvITppIsFJqHRpyB8a012?= =?us-ascii?Q?oXlP1Wp0QrPKcWm6bhBNK6/dff2/nw9NLq50iE84PRB4iEjQLboOErr0Ca+x?= =?us-ascii?Q?9XsF8ol6JnsGktgBM8sTeLtB?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 539fdc8e-6349-48a9-bb5f-08d94c23ae11 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2021 08:43:57.6594 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LCCzif7N3kJxLA8fSTc9Y0MAN2TRpy7mqxqOQE5j1oz7GqMt8rdAKkWWsBXZbUigywxfmae9rSV5sP0JtlBk7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5311 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix indexed pools allocate on Windows 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 Sender: "dev" Hi From: Suanming Mou: > Currently, the flow indexed pools are allocated per port, the allocation = was > missing in Windows code. >=20 > This commit fixes the the Windows flow indexed pools are not allocated Double "the" Instead, you can use: Allocate indexed pool for the Windows case too. > issue. >=20 > Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool") >=20 > Signed-off-by: Suanming Mou Better title: net/mlx5/windows: fix indexed pools allocation Besides, Acked-by: Matan Azrad > --- > drivers/net/mlx5/windows/mlx5_os.c | 47 > ++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) >=20 > diff --git a/drivers/net/mlx5/windows/mlx5_os.c > b/drivers/net/mlx5/windows/mlx5_os.c > index 5da362a9d5..a31fafc90d 100644 > --- a/drivers/net/mlx5/windows/mlx5_os.c > +++ b/drivers/net/mlx5/windows/mlx5_os.c > @@ -35,6 +35,44 @@ static const char *MZ_MLX5_PMD_SHARED_DATA =3D > "mlx5_pmd_shared_data"; > /* Spinlock for mlx5_shared_data allocation. */ static rte_spinlock_t > mlx5_shared_data_lock =3D RTE_SPINLOCK_INITIALIZER; >=20 > +/* rte flow indexed pool configuration. */ static struct > +mlx5_indexed_pool_config icfg[] =3D { > + { > + .size =3D sizeof(struct rte_flow), > + .trunk_size =3D 64, > + .need_lock =3D 1, > + .release_mem_en =3D 0, > + .malloc =3D mlx5_malloc, > + .free =3D mlx5_free, > + .per_core_cache =3D 0, > + .type =3D "ctl_flow_ipool", > + }, > + { > + .size =3D sizeof(struct rte_flow), > + .trunk_size =3D 64, > + .grow_trunk =3D 3, > + .grow_shift =3D 2, > + .need_lock =3D 1, > + .release_mem_en =3D 0, > + .malloc =3D mlx5_malloc, > + .free =3D mlx5_free, > + .per_core_cache =3D 1 << 14, > + .type =3D "rte_flow_ipool", > + }, > + { > + .size =3D sizeof(struct rte_flow), > + .trunk_size =3D 64, > + .grow_trunk =3D 3, > + .grow_shift =3D 2, > + .need_lock =3D 1, > + .release_mem_en =3D 0, > + .malloc =3D mlx5_malloc, > + .free =3D mlx5_free, > + .per_core_cache =3D 0, > + .type =3D "mcp_flow_ipool", > + }, > +}; > + > /** > * Initialize shared data between primary and secondary process. > * > @@ -317,6 +355,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, > char name[RTE_ETH_NAME_MAX_LEN]; > int own_domain_id =3D 0; > uint16_t port_id; > + int i; >=20 > /* Build device name. */ > strlcpy(name, dpdk_dev->name, sizeof(name)); @@ -584,6 +623,14 > @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, > mlx5_set_min_inline(spawn, config); > /* Store device configuration on private structure. */ > priv->config =3D *config; > + for (i =3D 0; i < MLX5_FLOW_TYPE_MAXI; i++) { > + icfg[i].release_mem_en =3D !!config->reclaim_mode; > + if (config->reclaim_mode) > + icfg[i].per_core_cache =3D 0; > + priv->flows[i] =3D mlx5_ipool_create(&icfg[i]); > + if (!priv->flows[i]) > + goto error; > + } > /* Create context for virtual machine VLAN workaround. */ > priv->vmwa_context =3D NULL; > if (config->dv_flow_en) { > -- > 2.25.1