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 DA341A0C50; Wed, 21 Jul 2021 10:42:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B377B4014E; Wed, 21 Jul 2021 10:42:10 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by mails.dpdk.org (Postfix) with ESMTP id 5143C40143 for ; Wed, 21 Jul 2021 10:42:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mar5p3FID8eAW9vdGyIWLdwdnOMk3+Mnd6ndWYIfMLpkPZUx+d751P7ha5+lLVgeY6Bvg0Qnw3+N+Q/PJTwXJoybzgyV29j2MxzEEX2IqfWfmEBJ20jZUFlVlj7y6VQivp0j0M5rfkSyMr1u+YfzkUQlN1JBR/MkVs36nu3Yo1jY/Mj+Dn4oL/m5vwakHQlQ4sAub+rDYUcFKfpJ14g0kNbstUsvKezrFkPxmhrz4FOkvmxZV0MXi3+ecZdHg981Pox1HCXRTJ31M7HURyENMFzupyqhEVm6HzbNCMVTyrpP3VYHRWBbZDr3bQkmGXW/yG7WQ7GJ9x1Ub6KkB0BvKA== 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=qUqB6aEy5KAYUCmjO3axIDpElQYFEO+QlsizApfJbSw=; b=SVHYVqipJ9UbzXyrxpLsrA/4pNcSi0mkfjzKRJlZCnFRAIeeFv92EvJjObiK2UPsBQdSPCrGLNF/rKUJuV0G8ykI/9n2Ud82+yDHbXn3a53VZJnccyEn4kaaEoclbZz0mF95k39q4/paVr/+QcX6UiTHx1SIX+lok6lB6NBc9GntZ4xLW+2w7BeLMvYpLYPXB6j+ACndmlcHbkgj7frHYNV5xqDsdrWQ16iOE+1wkEURfUXEsG80mIZZKZrJ3UQX/iHEiNPDd7ZPpc9kHXDoLdh4A7GDwcd99+2PQcdlyjY5JW8SUchJAnvIXl+mW3lBihUjULYtj9MLHEKDgCU0IA== 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=qUqB6aEy5KAYUCmjO3axIDpElQYFEO+QlsizApfJbSw=; b=JYo6LLo4pWIB9GgHWAb9Nk9obnaZHtNiycdgLMJVAi0F35heaGB83QaWjkF8be2sY4TI1A332xwBpbKDywWG2LOaO/7kwBHR+PNriKpl+L24w8zqp7Vj6GWtOk7RnwumYgrXnA8hXL3t0kQIM5Z3v4HKM1PpjzAH80p5+1s1uyZ15VXGjMy1z9XHMeZDMNpPau1BwsfNjh4eQQc82EmnDPwjHOVJskud4YB1+ePKYnHxxPMROaBjH+/+LeyoB3EixE6vbLmhVKpd95yXfuAq+UExevgFo1Uv0dpcCwNsy7DBx0RAUqkf/bJnCgnuYldF4aHLnPzi/L+hcHxA3i9biw== Received: from PH0PR12MB5449.namprd12.prod.outlook.com (2603:10b6:510:e7::24) by PH0PR12MB5451.namprd12.prod.outlook.com (2603:10b6:510:ee::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Wed, 21 Jul 2021 08:42:08 +0000 Received: from PH0PR12MB5449.namprd12.prod.outlook.com ([fe80::61f1:1b57:e39d:766e]) by PH0PR12MB5449.namprd12.prod.outlook.com ([fe80::61f1:1b57:e39d:766e%3]) with mapi id 15.20.4331.034; Wed, 21 Jul 2021 08:42:08 +0000 From: Odi Assli To: Tal Shnaiderman , Suanming Mou , Slava Ovsiienko , Matan Azrad CC: Raslan Darawsheh , "dev@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix indexed pools allocate on Windows Thread-Index: AQHXfgwIS3gtG8OZNUCb7Mh9PPJHWatNHF+w Date: Wed, 21 Jul 2021 08:42:08 +0000 Message-ID: References: <20210721083448.14598-1-suanmingm@nvidia.com> In-Reply-To: Accept-Language: en-GB, 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: a837994e-926f-422f-de4b-08d94c236cc5 x-ms-traffictypediagnostic: PH0PR12MB5451: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:158; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9xtMygkU4xrBtibvhbnbwVicJ3G72y5x6XUBmtnfjgN8L26ocbY2KYnCOBBzc9Xdug4MzSvGD8N8q/F27BsgjE9AxA4UdV+Z9ZOnzrkNt7uJUiyz/BMPqv9G1FM+RdvGZDdvUrt8xUjtwET6lFEDWHiFekrp107kROY22jN6/ykJftihcKrNffgE8NbOKzymuHcNuQpGoxGmF2Qp9SqwdBEsUXOOgRvgHzJWhEYoWZfXOMycdcJ6H8kkabnPUAl7mm5nt4LnKL+X4EBhBTGL5H2KmytAPXsk+j9FnYOwPkzJOIlh5YusaKzGhtziDIXad55NIMjufi0eA9X5yCwHMBXSbpKhIhYzzuuEslbwmgq+WuIMFBsV/nLbO10WG689vBq9bds/nXdtgqSs75TFOFvUzYJqzYLPpo6toegKezWy9713uHTAQ10NF2kYn+yxEhRQcxBhMTO2GYmpFBz9/ihz12Qfjum342vSvVGvXE3jA2zDpzAu2FloR8gh8ir5ZeATnLqUTJjwX3tOt51teTHzUlu5A7iWpYCv5qMq1cUG6wcHkBro2Zcnv1H6qbsMPxB28LWwwH8vkyeQPZTaUmM4paOUVMAFAefNwEX9UFJr3cNxn1yaMgCInVOmhVLXEW88g/WBTS+ayTafq7Yn/22rTe08JFQs8PJQjd3XeXgon3VTT3seS7I18/GKmYtFKn6CNyjm0HD8KP1ZR4ktxSP3I7snmiGZsO+c1c9eWdM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR12MB5449.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(366004)(136003)(346002)(396003)(54906003)(5660300002)(7696005)(33656002)(8936002)(52536014)(110136005)(122000001)(4326008)(478600001)(316002)(6636002)(64756008)(66556008)(66476007)(2906002)(66446008)(8676002)(9686003)(186003)(83380400001)(76116006)(26005)(71200400001)(55016002)(86362001)(66946007)(6506007)(38100700002)(53546011)(38070700004)(309714004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mwTYJ8L6TS2ImeX/L1kHvLoCG4lGE79oTH1XYv4pbZcXysOAJ1oiq25vWE+x?= =?us-ascii?Q?bdJMPHoja8SEcrlNb8tgseAl//2uEB9/PNeL3ruDgJaohfOJtDIGbiOTmwza?= =?us-ascii?Q?3w0uwE4PdNGToXmAtGZjYPjRzApjPmAVlD6Sfm6oOSKukBLqbWfu+qQhThrw?= =?us-ascii?Q?JQthU8gOJKAeDIJhKPfSlXH5SojQNra3s1B/+iYbkAz3NmtYxrF68QaJ5pvC?= =?us-ascii?Q?BydNUfkqpTwWoiDYnQMyRf8lhdUmFh9e/exW862yvIsJFLjXGgXYHvOBi4MF?= =?us-ascii?Q?aYGEm5Xjb4jdzH//+HmT8lcUkHIPpzqNHvgOhOMPYnfkXon1VwT44ktkK7aa?= =?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dIwHLAIXRkL?= =?us-ascii?Q?p4iQNKPWCytWqhxJqkE4HlP2GAp5G+cL5rcieQ/9UhNIQn1xBUdJsegpUNnh?= =?us-ascii?Q?WbhmTrL7zTUWw8jdeoGlCqNw?= 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: PH0PR12MB5449.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a837994e-926f-422f-de4b-08d94c236cc5 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2021 08:42:08.0735 (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: 6Jyx4biVYy6Az9cIbqcVUpreDP3d8an4bwH0SHYpBnkNjrdKSp6JZbgIOyZdnPa9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5451 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" > -----Original Message----- > From: Tal Shnaiderman > Sent: Wednesday, July 21, 2021 11:40 AM > To: Suanming Mou ; Slava Ovsiienko > ; Matan Azrad ; Odi Assli > > Cc: Raslan Darawsheh ; dev@dpdk.org > Subject: RE: [PATCH] net/mlx5: fix indexed pools allocate on Windows >=20 > > Subject: [PATCH] net/mlx5: fix indexed pools allocate on Windows > > > > Currently, the flow indexed pools are allocated per port, the > > allocation was missing in Windows code. > > > > This commit fixes the the Windows flow indexed pools are not allocated > issue. > > > > Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool") > > > > Signed-off-by: Suanming Mou > > --- > > drivers/net/mlx5/windows/mlx5_os.c | 47 > > ++++++++++++++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > > > 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; > > > > +/* 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; > > > > /* 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 >=20 > Acked-by: Tal Shnaiderman Tested-by: Odi Assli