From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0069.outbound.protection.outlook.com [104.47.1.69]) by dpdk.org (Postfix) with ESMTP id 274F31B1DD for ; Wed, 9 May 2018 13:14:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=m6xH4whWvUvkpoRZ53nU/+CPbIvm4K1UvqwY2NavfbU=; b=ARCTpFhzKaq9BG6pxjF6UMJg9H+xpU2yPNn0OXP/4izWlIN4wf7opzXVNdgKaz636TXkmOD1I6znIp9F/UqYklynpG79DrrUT08E2jNI71vTjgnGsQt3ljgWgi1UZDdzZBf8kPJvLMhgtjnUjB6am7Vq1WJg3DAq4YBvTtF3yDA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by HE1PR0501MB2043.eurprd05.prod.outlook.com (2603:10a6:3:35::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.18; Wed, 9 May 2018 11:14:09 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Wed, 9 May 2018 04:13:49 -0700 Message-Id: <20180509111350.20240-3-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180509111350.20240-1-yskoh@mellanox.com> References: <20180502232054.7852-1-yskoh@mellanox.com> <20180509111350.20240-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BYAPR07CA0022.namprd07.prod.outlook.com (2603:10b6:a02:bc::35) To HE1PR0501MB2043.eurprd05.prod.outlook.com (2603:10a6:3:35::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2043; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 3:rwa8yZp/y6kfoUsyBnBV5y04Dwi+sByrZM1izXTVNk+yze5zpix7NpO7DOzqZaPKZQ5oglVMIoZPex3JpqJu5dKN8Spqmh6GggdPsbgN86YUNM8pdv0B/9JxqcVXWjHKDOWKJa8i1gcHX0Z7AVuASoWdyJBk6+R4Shns5L8D8yZr6W38WCrHcZAEmoVFLRX2x7KwSKZE0WIliVJyR6XdjeEQm6pcukOxEdR18GcY1VzlT3y7KwguQhiUqAIFRL3i; 25:Mn2XqbAFVjTsxtCHczqJmsOpxHUt/IR/MX9Gxu5r1BRyED3zojsG/+7AqciJFj1wzPshMDJSkymkGu0nB0q422nI76C3sLbrpQkBTdbkGDt8o2cNif+TmpIF+yqR0CWFMSyxEWsc9kzT/XZai7Mwe7Nzm76pCprs53Ny0zt6HsCMsqCon/r/y6gdVvyn3hz/RE6/DX+6eekAIlOA+y7Vfp8uEgQWZyMOZ/g/ZUDdhN3Js0fsHTsLmgsj9lk0ZB8ZkLYL5//8QNQ4Z6vWbZA6u5pJLYMgE/JLGpdGdimhCkJY511S7s8ZM1AHBbBO6tVK/Zv4vzv7c5tG8hk9EhfnMg==; 31:IvC4JGcNv/kIfmvOYzN3FWg/PM+k2oCCapaSnZTrzeUVnvX6AzqhscQHgjzFehSUtomWOQMhicMbFrlubVNA2+Ei2TfKK5I9/G37mdU8AuX2+cDaRLi3N3aLbVM16FK5CkfWNFmv6APoB2vm3KfrhVelTqCuAkDhcX9m6rbn3udlQM2UMKEU6NEq8RsThF1mRG7nyhDBb/CEj7fQmR58uaTOH2w8YcMHHyrLuxAErqU= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2043: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 20:TPM69ZB2KZwUwx2lM1UNnEs9dmAQbUHxbO5lEHEm+BShHlAW2zcIn/aXDQKVG2U8XpWiPHFk5hbSLeUp6BGret5yIdha0fgRMvVk7cvcLP4/Yko25ZN/k1qc+d/yR5LyiG8hDfo+QrQxYUHBJOCHRGaVeVgG6dUV4BrAEHB33ovjf7vQJtvsEEP8TXjySyQP4N8VxTfyEvx46Ri1QCmbOg6b4AyDhfobUUsQXt8xPj7H7TKKw8OZu7QnJRvwepAWwnlSbTGp8SqfrGihiJQv5hmQsXp8HXxs3t14NBBxhB1nrqJM4vwUfQ4zZmd15pk5agcBoznhnOFNvTgEMcWsnNyWlrb499GzrhAfi3DuUUH1OfHKAsx3QAai89vANs2Hq2OVd7ln/g20vg0AEkT5njqWSEZevt49+SckJ48nTzkbDqbCxnV5lTAN+3zOZNGWiMvLlhYhgjj3Qnu+fqhCHA4wc7mcW7dfOb2Sqr/qGW/71MP8byEI8QcjDxCGCeiR; 4:0TEKw405iGANcZHJBB4Wy2uIB2RkIZAIQ9Ny+PRQd7ZpNCamx5aqSzPjjpt3cj5/pWyAwQLFrSqYqLpnpu1wpgTVpDkswOqsMpdHjdqbUcurrxbANrEXFaIoQonUDoMBZRTCxsGKi2f2A0Y0rlPUdktTho4LRtDCjn7svpa9khBTMkAZk8OHWxTh2e5aQy04u5U6jMl8g2Ol3NlamUHMrHL3yMySVRVVwkudEVnZ5d2/Z+XBXL0NuZa420ZyWdzHuftNqkL65Sxo67MFuHM9Kg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0501MB2043; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2043; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(39860400002)(376002)(396003)(346002)(199004)(189003)(8676002)(5660300001)(48376002)(26005)(107886003)(1076002)(3846002)(97736004)(2906002)(478600001)(81156014)(68736007)(4326008)(55016002)(305945005)(16586007)(7736002)(53936002)(6116002)(50466002)(69596002)(66066001)(956004)(8936002)(106356001)(76176011)(105586002)(476003)(11346002)(16526019)(50226002)(47776003)(386003)(316002)(52116002)(81166006)(51416003)(2616005)(7696005)(25786009)(21086003)(446003)(186003)(486006)(6666003)(86362001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2043; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2043; 23:zqbCDbQK2WEGN+S8f5lAAjwJRlOvOGTPvaC5eIX?= =?us-ascii?Q?H+7e2ZWQoNGu0FLwW6b9gciuo8Ow2/y12Z3MrNT+MYquXvFSUMwnEWaUM7No?= =?us-ascii?Q?Rl4MTP4YxBN5swhS3bkDjZ72jCnIm59IkzYP00uYpuXkW/88+1mE8EzrulFZ?= =?us-ascii?Q?jFVt0t7cDJZWqTCVhXwcJW9T8prMwEXBbhQ+22FZjZSSPcOGkC7XFTbEN5/y?= =?us-ascii?Q?xQDOdV1qhrysNXcyCtRM/3FpN+try8b/qpKA/jOTLEOFtOKk9kpYrd3SbpB8?= =?us-ascii?Q?M8zKewg3hVdct59jyiSKw8LoUQb+12lHh8p2c82ZdLlfig+x3TEh3TzDU0TV?= =?us-ascii?Q?zVfNJrqLoHElXYujmE/fWPCT94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Q?=3D=3D?= X-Microsoft-Antispam-Message-Info: dk2fMkEJO0H4dA6/I3MTnhUE80xj4+sGyQyb3I/fqYeQC8qy2O54hmvKdJ689d763hv3RX/3qz7W1apdSweqS4XTJvGKapBYrOO/nExBcQL7jrrR4vG+dO3ckR/tOyI831onzlvjAPKGcQisuW+RfWT2vtOWdlnpM4Z9w0sZkaFuJb/oldiasp+aigdNpWif X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 6:kxJZHfLT2ANttTeciQEhwY7hUEPDE0tHpE4eMXcuhn1oGIbUuyPVFivplxrkSSMwYn5m6r+BzA7d0SNwN4zB7SeTssNG144BzTH0RCNHLtvgRAaygMk8CcCAaoW2JtniAbZiNUu8yLwzpQLj7GdRBBYi8GnHGIiFPAMe7JIKpxOJd69XGc2pIct7MC/Lj/ShT26zfOI2zwvp+e53JdYK5WyXY8vI+LB36xJjIMybveV3lTEVRoVtx9Ar1r52idu3UE6f6bYsYkVtSKrUUAdQMbJXWxxwhoQHLvI8kZkawWGzM7FK6s7B7ETmw9wb9PV0NfLsw+mTL8Ao6S/CLNV59EFEMaZ/Epli8VKNdKEo4vNCBT4rT4UY2sCHcQDel8RO5Rf7h1w6bgNiaiaLd9qe5N67QcZgJU3IDlFCksm85L06y2gWC5QLO8061AvAKJOgldoTWnrYEmeD0oii5F4f5A==; 5:r6L2XWpODnZ8URxXrc1c+YhEO8edPlUR5Rd5vbP8/4AVrJWC/HfBZgdffvwMKYQ6Ny7NUeg7cA9pjQXzjzAPROmscFIMdYYcKmxM6kBcoONn8rl5cleBB9C0ZOj9mGqpb9azwOxdmbo+ljOwZWuS+FK8MBGd5RoVbtxmrLxV09s=; 24:mTO3cYNigMbnfv3G1gewUW88XajwdP09XUPaE7m9Owp2mPbeYJYKLwysDnqUldYjONrQ8dQJL2rY48HWUu3LMrM7UxSfC6vpNSbHJXy91g0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 7:L0YC7PzkINYIzLcREhAh/nqWipXbbbKUXtftLTgVmxflFzlH0VK30u21KwsrVPJ8WmRqy5WsnsxJzKMFFUfHYzX4QJvj0wxN14uH/4mqRXevBZwIX0hifT6ncATUOAP6mQngLrtLwIdoS736042pQh1JjXktMjuFK23j+k5QmQum6OymPH44M6fGLVDDnKTM1/YRWn2XvV8OJlzOy/pyZGD+j625m5pLTz8p8YjwekHcaMRS0qFElY1iNQBLsYb4 X-MS-Office365-Filtering-Correlation-Id: f4de8ba7-ec17-45d0-3f8c-08d5b59dfd11 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 11:14:09.2270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4de8ba7-ec17-45d0-3f8c-08d5b59dfd11 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2043 Subject: [dpdk-dev] [PATCH v2 2/3] net/mlx5: add a function to rdma-core glue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 11:14:12 -0000 mlx5dv_create_wq() is added for the Multi-Packet RQ (a.k.a Striding RQ). Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler --- drivers/net/mlx5/Makefile | 5 +++++ drivers/net/mlx5/mlx5_glue.c | 16 ++++++++++++++++ drivers/net/mlx5/mlx5_glue.h | 8 ++++++++ 3 files changed, 29 insertions(+) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 13f079334..8d64d4cdf 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -98,6 +98,11 @@ mlx5_autoconf.h.new: FORCE mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh $Q $(RM) -f -- '$@' $Q sh -- '$<' '$@' \ + HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT \ + infiniband/mlx5dv.h \ + enum MLX5DV_CONTEXT_MASK_STRIDING_RQ \ + $(AUTOCONF_OUTPUT) + $Q sh -- '$<' '$@' \ HAVE_IBV_DEVICE_TUNNEL_SUPPORT \ infiniband/mlx5dv.h \ enum MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS \ diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c index cd2716352..c7965e51f 100644 --- a/drivers/net/mlx5/mlx5_glue.c +++ b/drivers/net/mlx5/mlx5_glue.c @@ -293,6 +293,21 @@ mlx5_glue_dv_create_cq(struct ibv_context *context, return mlx5dv_create_cq(context, cq_attr, mlx5_cq_attr); } +static struct ibv_wq * +mlx5_glue_dv_create_wq(struct ibv_context *context, + struct ibv_wq_init_attr *wq_attr, + struct mlx5dv_wq_init_attr *mlx5_wq_attr) +{ +#ifndef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT + (void)context; + (void)wq_attr; + (void)mlx5_wq_attr; + return NULL; +#else + return mlx5dv_create_wq(context, wq_attr, mlx5_wq_attr); +#endif +} + static int mlx5_glue_dv_query_device(struct ibv_context *ctx, struct mlx5dv_context *attrs_out) @@ -368,6 +383,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){ .port_state_str = mlx5_glue_port_state_str, .cq_ex_to_cq = mlx5_glue_cq_ex_to_cq, .dv_create_cq = mlx5_glue_dv_create_cq, + .dv_create_wq = mlx5_glue_dv_create_wq, .dv_query_device = mlx5_glue_dv_query_device, .dv_set_context_attr = mlx5_glue_dv_set_context_attr, .dv_init_obj = mlx5_glue_dv_init_obj, diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h index 9f36af81a..e584d3679 100644 --- a/drivers/net/mlx5/mlx5_glue.h +++ b/drivers/net/mlx5/mlx5_glue.h @@ -35,6 +35,10 @@ struct ibv_query_counter_set_attr; struct mlx5dv_qp_init_attr; #endif +#ifndef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT +struct mlx5dv_wq_init_attr; +#endif + /* LIB_GLUE_VERSION must be updated every time this structure is modified. */ struct mlx5_glue { const char *version; @@ -104,6 +108,10 @@ struct mlx5_glue { (struct ibv_context *context, struct ibv_cq_init_attr_ex *cq_attr, struct mlx5dv_cq_init_attr *mlx5_cq_attr); + struct ibv_wq *(*dv_create_wq) + (struct ibv_context *context, + struct ibv_wq_init_attr *wq_attr, + struct mlx5dv_wq_init_attr *mlx5_wq_attr); int (*dv_query_device)(struct ibv_context *ctx_in, struct mlx5dv_context *attrs_out); int (*dv_set_context_attr)(struct ibv_context *ibv_ctx, -- 2.11.0