From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0089.outbound.protection.outlook.com [104.47.1.89]) by dpdk.org (Postfix) with ESMTP id 83BE01B3C0 for ; Mon, 2 Apr 2018 20:50:34 +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=h6zEM/fL6jmttkWmSlONFBp5mIMzwAU71oXAFu393lY=; b=aMzzqd7cO5lDkZo/TA8rhOnYpWqDeaDBemXQC/efsNcR8PwY4Td96BUDpxESkkCh1ItSTkOvBxfQBRAY7O38AgiWmj72jqtNkgN2eq7G03BmaFon4YitbhdOZzz0Vk2V0abYfta6eVmQ/xMgpgudXVZhg1XIirpV4iFhzM7ULYA= Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.10; Mon, 2 Apr 2018 18:50:32 +0000 From: Yongseok Koh To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, olivier.matz@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Mon, 2 Apr 2018 11:50:05 -0700 Message-Id: <20180402185008.13073-4-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180402185008.13073-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180402185008.13073-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: DM3PR12CA0064.namprd12.prod.outlook.com (2603:10b6:0:56::32) To AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 25474be4-47dc-4307-5a33-08d598ca9d9a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 3:ZS3trP0jpojUtYzx1oUnSr6V1GK2nYjlWj6JbURZChDvZOPMnigt6S0ZiqHiJn71I7QhDouKd0m8U7oEok9j+vSd9NnqmqhfgQy494pf7Coh8wgMnyHi0qn+VqpuMJTTeF/R0EmnMUAOmNYgQa0j/1WOj0pDhRRx0RClRvPJB5qAH3wB0DR/u4ePGFJDGCooJg/RivNwv7Wa6uQyjXmtHXGjUYWmEFo5z1G1w5OyJbyl2w/MEUSyJXyZp95T4/p0; 25:YgpDP8Sv30PCQRSxo6cqAQvTRiAl1k0lQUXqzgejzwP4iubJj7fG90ayvc8iYSTrZn+3f0c3cvcd+SJauZh3BEh7869l6DtLlyOe8cQ/qF+SDxvt7WNalhpJuBlk+8FJXjvNJod3Gi/+PtbrWcp/ZgjdSHxrerbQhuqhdPrug2cVonXhpXbn6sUcee9p+DyyEZp+jL0h/HKUWu3sVGmQQsZRCEsnUEgtGNeEf2PiwaAaGTvq1kwBcLQLOGzHda50A/sXyCagkITmGcKcRBsRzqxoTLZEgPY35NKiFjtWrFSITeIFmmWXskZRdKtC2/t+kqShkYvr6G4EAAjB0Jco9Q==; 31:1+fizlq93JvxTDRzbxWzjgKaK4m9/Hj242RkvaO54oyqB1QSVcDO6tlOhszk6PAt0gkUCapyvkEO8GIsnAEm/AJsvy6Lu0vEwYOolv02GXGP0PuxdF/yHhknNIpIEJcySR66qv/rB7lxulmLBQJ/2ReR7WUl4REWIjzvd4lSqCjbzm0DH/PBAL5j69AXTbBg2Y+lpAjnYg5qA7JrEP8K60inMJjT7IB2uD7m7k3dmhM= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2036: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 20:z5RGmZtfOM1FSTaeKXHn13iq0+TFlFjiXC6KfkOyFH7gIC3IZrOkictf8S3A1xdx7axyPJnnnTbH4Foz1c/KcQUq++NpWil93awMh74EyXBoTudB5+GpH8BPavO3J5EBAFBUY0sareHxmsNFUD2hrlBoamFH/7ILww4KeUA1rPVUEQUK/SfO2avbDgPnwbifdMuOrP/JQ2X8opXM3fMe7ZXbd5KuxVIIDoYmkRYXGeqjVgPfuOmTR2ix5ZsFKTltKujO3QHAat93bJyOcKAXX0GuzVdD8nIRNz+8HSb3Uex7knx4ciEq5Vb8kJ2IALC4od0o+Eo372+GqTtjfVOm2maZWtrBkKFsT3fHx5nhWVchI4XhwiE21XebbmDGR3+tZolsSfXtryxN7CdJVfUXnMNV/AhpJ0+qiZUkZ3UEU4+nd/0+4YfF8AzTfwszUm0LFkGTRshkp18UsfGJx/j3MiPcSndZLUOG1woGBU6Xk5RsDQsdblbybyPdVNtdEUxn; 4:RjzTl4+SPH5r3bMObOxwvNSi4GBC8qOd/1YSmAeQl371X8+ehqWzr6vZviw6KYAm2rfIVVeTYnOeIkqEG2LbScxWCRu+HN6YyEYZYnyhmyrmz+GMVL4utmxa/yw6JAMi286p0JLdu05myp9AQWtLZH8ImXBm/ZgiDaqAoOJuxeWO1JxLmp92QhxMRtGbiaKAyuHG5aM732zP7U4DSIECSzu4EjU9/+uYZVvochcbL64weau2FnTuNlCX2Vyfc++/zExuUrSlSnyPyC6vnV0rxQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:AM5PR0501MB2036; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2036; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(25786009)(106356001)(7696005)(81166006)(956004)(5660300001)(76176011)(16526019)(26005)(8936002)(186003)(51416003)(478600001)(47776003)(69596002)(66066001)(50466002)(105586002)(476003)(316002)(486005)(446003)(6346003)(21086003)(81156014)(52116002)(8676002)(16586007)(86362001)(2616005)(50226002)(68736007)(386003)(59450400001)(11346002)(486005)(107886003)(3846002)(1076002)(2906002)(6116002)(55016002)(36756003)(7736002)(53936002)(4326008)(48376002)(97736004)(305945005)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2036; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2036; 23:yDV84W/b1zQ1PadQXPGNhZOeNgqAAbECQiKvmqB?= =?us-ascii?Q?Q4nX9JorVX5GPwCJXBmWG5L2jMq/WOGS2CUBAuZMDRM5dbqpFMmCQGNBFJ2m?= =?us-ascii?Q?CTzOMl14GkK0XNpR3uocA86O++wlVwDuoDvxnv3jYsFSfqMkUF+FLGv+HZXZ?= =?us-ascii?Q?MYsNComZVKwRLWcN25W/MAt9fJAF42F4FneRdSZYbSVGUZo5EjJv0t0xizuF?= =?us-ascii?Q?wGSUCUS77imPFyADIe0Zy0EunFPVoN+iK+kIRk6INX5aYRFgNQNr/rwi0os7?= =?us-ascii?Q?mmSAczJqn1qBTikqKlu6OQu+9mzPXINCcLqDkvmSQJ1UZshp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O6RF9yW2A5snE1j7GuggXUbTRvJPQPpoU4IthG+KPhJJdpipGOip3Mf1wJcvV/gyFKhHYpBcjbdRHh+5Aki1FOBCQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 7:ZFuJPGqce0dHwIiGeq6nbnqZ6c0C77F6QgJfdZez5KaGAIUZH8rz27Uomb/0i12FoW25fulWlpINgx4IBuMjRqWpU4SKgEk71yUlw6ewrjlXlpv+LuPWhrJVpaUOckzsFVVVzKmH7ZOL2hbyppR1L32nblgAnnka2ym74VDYam+6sJfbWY1YTUB9C0WwEkbMIlefG7PMIGVBW5R9EIpQZTekvVUco96VgoWkqudCdADTZd83hXnGQaFuCTGw2BKN X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2018 18:50:32.3005 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 25474be4-47dc-4307-5a33-08d598ca9d9a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2036 Subject: [dpdk-dev] [PATCH v2 3/6] 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: Mon, 02 Apr 2018 18:50:35 -0000 mlx5dv_create_wq() is added for the Multi-Packet RQ (a.k.a Striding RQ). Signed-off-by: Yongseok Koh --- drivers/net/mlx5/Makefile | 7 ++++++- drivers/net/mlx5/mlx5_glue.c | 16 ++++++++++++++++ drivers/net/mlx5/mlx5_glue.h | 8 ++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 201f6f06a..e51debec8 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -35,7 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_mlx5.a LIB_GLUE = $(LIB_GLUE_BASE).$(LIB_GLUE_VERSION) LIB_GLUE_BASE = librte_pmd_mlx5_glue.so -LIB_GLUE_VERSION = 18.02.0 +LIB_GLUE_VERSION = 18.05.0 # Sources. SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5.c @@ -125,6 +125,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 be684d378..3551dcac2 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) @@ -353,6 +368,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 b5efee3b6..2789201bc 100644 --- a/drivers/net/mlx5/mlx5_glue.h +++ b/drivers/net/mlx5/mlx5_glue.h @@ -31,6 +31,10 @@ struct ibv_counter_set_init_attr; struct ibv_query_counter_set_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; @@ -100,6 +104,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