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 B6B85A0C50; Wed, 21 Jul 2021 10:40:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CD824014E; Wed, 21 Jul 2021 10:40:19 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2083.outbound.protection.outlook.com [40.107.236.83]) by mails.dpdk.org (Postfix) with ESMTP id 0F9A940143 for ; Wed, 21 Jul 2021 10:40:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajRrn+xlFBmct+QTYa46qqHNx8v8M9nzZeTBLmvvl0sYclXFdZoS+Ijy9/J/bw79TTfyc/R1dIrY1Kyzp0/dWvIAEKfLdeWqmebcbZ1wA0cthGngwSEg+/hmZDozslCh0m41KmJrYREeJB/h76qtJTXLrnmXfvXzDg6TyYiUcLjfYxrffB7wpGj8hBICjdJPkr154A3ZiD5/gaXFm4ua9yk0L8kaXIZEtKUdouWJu1XktJegZEoSU/zCHQAd3imLzmYE83SYIMmM4WUwA6WbRPhUtQfCl1UzVqmw4JosuJIbwukvRHbS9KoEds7dwJCmDhPWD7HrnB9xV3ZkMA3Neg== 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=YKnPMZ7I2Tv4crDm6O+CnlwclIiNfJjTgse+Sy6nitg=; b=QIh7w/8Y7z5gJfY2PxdAPEE0nCBtDuqFcnUKWUVJxwCCpa/pDqMh3/AI13GFmEZZH2mEJnURmBRZaeBcxamBTJYwyjFAkE9u2cuTf88GgVWyLopI+Yhg5YNEdfvbZx35bqOktAZqvkSNDesCHxZWcLBcfOuWHGmY8l5nSEawCgXxpSo7Y5gvBqPax5I1f9KK1L5O3g9rTgmXLG//PTemaaoPleyIbSlowtvxeAR+4rJNYWZ3NlCuKS9Fr9iaT7vFeBRRbQNQnzmpfg7xpVlggn4riYf4RMUAcvIoSVu2mHvcYh6z3VU082TB07aDkI6tKGzt4Eqkrzb2kRRXlu/VVg== 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=YKnPMZ7I2Tv4crDm6O+CnlwclIiNfJjTgse+Sy6nitg=; b=FmSGb2UFtfGXT4xYOUVnnktyyz4nMOsvgpBX7Adxprkk8t1ycxZ1nDFtNzBZI5vt5IVZPSH5y8lsNItilyvzzDckkavpfatGMgpNoAkD6L3auhq+sR6TJzaPyUZkLK6XBC4Ob+ciHYAhivfl5AmHysLatBiktbDZlyHbF2pW7pureC6NlBL9IZSP8LwroEr6SasIfbVXuZQVduFsa1iFYw8CY1WWW7lQKfIPrQuqwCoAx2s3kts0YXA9RL6lHnOjeN61lZdqgHDEtRrUzUgCt5czYvCTayIIuwPhXfsTuYyyhqbjLUeaDgsS7CVsGJXPfkb/YlGBnKxFkC8zV/m6OA== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5200.namprd12.prod.outlook.com (2603:10b6:5:397::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.23; Wed, 21 Jul 2021 08:40:17 +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:40:17 +0000 From: Tal Shnaiderman To: Suanming Mou , Slava Ovsiienko , Matan Azrad , Odi Assli CC: Raslan Darawsheh , "dev@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix indexed pools allocate on Windows Thread-Index: AQHXfgtVKJrW9ZWI/E68agUYj99OyqtNG7eA Date: Wed, 21 Jul 2021 08:40:17 +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: 2703fe38-8633-47fa-759c-08d94c232a9c x-ms-traffictypediagnostic: DM4PR12MB5200: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:321; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: u85JbKCI0njxawk9uy20XbI5IgOMIVB4vp07dVW1XneDwJLj0gsbRqsnsQKVZDhdZExpho3333Ko3OM5kUG16h3lCqVJzJ9Z/ZP9tjRe3fYPl4PHm96VT/QYGK0Mxm9/husjSCYJ93sBur5SIICXydyMwtxDWpjqkQPVE6EMZcTI76R/MFUYKVFYlwPctt4Em8XCSTja4KA9+m6ZPXhhFdYJKYk1zcU2bzFSCeKPbEWbr2/0/a3TE0vsv4MdPsobyxNjzXrpBxIy2Dge3H8MJaQb1/deFCnkfD8XXWC27ys2c1UH1kg7+VXrhid55qqp3TaLM3bC1BsmHzBctPBJ3mGkZmyuXqqD9AwodF2DvwtPaEZu1RexQRjuZ9Bzytxn93ofuBoPLJhQckgtgD1y6Pihds4Wzc0S1/O+0n1molf3lbAQBlLQ4dmiXrJLMfm2M2wLdquO4cQRBgeD/BUeB0T6K5FsChKZy6QSHLezJQuUGOuR5WtDR87kMc+Yud2IgauInvBKPY79DF7xnCYvQ7HYxoniiqJZp7GebLtCDzR6zGN53r+4bSBVriTsYXKRxLnFowxVujMgZHM4R2SI/1ZGcdsGRtZ/YcGtyLKZBo8+QL4rGqDbSzdjtAoyWwCTOS6F2HFHoYQCBOhTnJXVl+BJTTf+wYiytSVsw7eRdcno0t9Mk1u3t5ku1V4etmVk/9jie2zLjCbKJ6OIZHO3m+M3vUZEjQxHKq9WkUI3rPI= 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)(376002)(136003)(396003)(366004)(346002)(39860400002)(54906003)(110136005)(122000001)(64756008)(6506007)(38100700002)(9686003)(2906002)(55016002)(7696005)(66946007)(86362001)(478600001)(5660300002)(76116006)(6636002)(33656002)(26005)(71200400001)(66446008)(66476007)(52536014)(8936002)(186003)(83380400001)(4326008)(66556008)(316002)(8676002)(38070700004)(309714004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?D9pSi75pkg5+eCibSAd3blF7DRvjP41wr+1ejYZrHlz3a7Q2dQCHygFDioDB?= =?us-ascii?Q?AtCrKJ/0C6bc6148um03INlcsLSQ7Wd/kumzUA05rLZaVry9jQJadvLvLI3t?= =?us-ascii?Q?YGgruyZpn/RCTa0P0rvuvX7ZEw4sDHP9v+lPH17BJQMJhR2tB4UZ+pMCPIhx?= =?us-ascii?Q?9CnkJVKso9mOjrfNMynulAdN6ByF/pWT+O2MwHrlvmRRTTo1JUzl5pvbSTHt?= =?us-ascii?Q?hR3gjsFBXV46TJ4VnfvswKexBtipZ9R/tZ/IuGpQi1J5OY77V0y1z+KyXy+f?= =?us-ascii?Q?0x9eu7c1xlyhSc52eppJ9wKVAZkQcD9puOtw6rN2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q?xUnTigs/GGPH1kUcl0hOHX/AKEjOBlaSY/LIOwNoZsgp0zxchOm8JOOlTR4r?= =?us-ascii?Q?8YjLlK9ZSYJPXgmmPI/JS3sHSCFI9/RDSkzpNBpVR/iPOiWiXIvlwFgPB15t?= =?us-ascii?Q?VBQ=3D?= 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: 2703fe38-8633-47fa-759c-08d94c232a9c X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2021 08:40:17.1212 (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: li87YQUn3oVibuwqiiURxFHKtcincyeAY4bSWF2MNEwr3hI+M3UuWS05P6UMxySp+JqX/Pgk9nJ8UrVlqIu2LA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5200 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" > Subject: [PATCH] net/mlx5: fix indexed pools allocate on Windows >=20 > 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 is= sue. >=20 > Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool") >=20 > Signed-off-by: Suanming Mou > --- > 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 Acked-by: Tal Shnaiderman