From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0069.outbound.protection.outlook.com [104.47.2.69]) by dpdk.org (Postfix) with ESMTP id 02F572BE2 for ; Thu, 3 May 2018 01:21:15 +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=cJr+3SGY0dRhOdVYtF7amqiNto9qWj8GevY24PyWbGo=; b=LHq/OrJ5TyLJGlre2grlmLpev0pR8yRUBzsN3FKi+AAPMwfzjUR17t+nqgUv9gMPYdFYclK2UkAmw2ZeBxNHlD9fw5ZzlCrZ3ykKpOygAbE0MgCVZ0IrNNxdjacFrTGYfwH8YQtJ78s6mfMQk9vw4u2i6xyzpKboz6Wcauhc4kk= Received: from mellanox.com (209.116.155.178) by DB6PR0501MB2040.eurprd05.prod.outlook.com (2603:10a6:4:6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.20; Wed, 2 May 2018 23:21:11 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Wed, 2 May 2018 16:20:53 -0700 Message-Id: <20180502232054.7852-3-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180502232054.7852-1-yskoh@mellanox.com> References: <20180502232054.7852-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: MWHPR15CA0059.namprd15.prod.outlook.com (2603:10b6:301:4c::21) To DB6PR0501MB2040.eurprd05.prod.outlook.com (2603:10a6:4:6::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2040; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 3:+gq8XDKaTdDU7pElUNphrVjD26/u4+pHm7RLkDMhcaH/EAAXDZHaKg3yMDsJ2k9wTs3HUK/L1hWcCa2Px/EDq/Ot+knw6mKJA99o+1KkJW9dCHiHfh/xilafAx8oYnERZQsF+av5wKz3rMd78WrQ5Jpfl8kK3J/DZQeSOH2lyAh0s7Ub3C8TQAxNnySwkiT6k+VgqY54I/VlbuhI0H9+pxEFPwEjvxmgbTH2NuoxjOkYPF9N8LFm+s5ANCSQL38J; 25:VR4mdSdRpCViFW2LtpA27OzOupu91AIXNGy8HIBNvOfQJh0l39xlayKgSKgVGmiunFKw29rPl2pevsWlAaVdW4j2p+IQIQdbNSgoT91HXWoDymQNYwI8aKFXS44tFeXUgJgLWV7bBm7RKpKUjMC9iBxT4NMfx/nux7fBk2sYtpEPgZw6rvPmPMksAe7piIbTanusq2bpSb+OIrGIU/yzf3+V5PEUp35IhQp5wTJHbRA80Hn56tqikqg3u6smvfwstjH/QU3z7fe+atjcAVTeN8s4NqU/xtt7sXF/YNj26lMOGBTRbXqEJIIYC8DzD5SiqYt13Q8q9v/SR9O6jImn/g==; 31:yV7B0jiFOhStz8KygtS6w/BFFFXcLxPsgVDq++4BaPxrvm6tIVZJ0VR0+zr2MGjh3CeU3/17xRnNO+hrl69W+WDn/riNf/0idEBL0YREWob9Y8o8hoPXuVhaz6urAjvza4CfSt/RtFgjXGrseFXpDIK/YXdFc/8oL7ghMR/LBXAhAXSLHrLddIwPZ+GUMrE47UsudSvmevRTN7aEo8MLeIESDQ+7zJmOIYFqKgdYxNw= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2040: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 20:8B4D90JLxzwSDIrzJh6ymKlShPx8C4YT9fmFTErFdZhgS4j/eG0iSUdOP58WJRoHYnlLG92fYixp5iXGTYSwczUQCtpVBgXda/2w7mXpI0edcNhQUfAjFKjphs0DLg/bgf/t55tCUGRcl9xjGlS1QAos2cUs5z9Kh/jMTpf964YxdYKEc0uUCdfolEZd1tthdmJcs8Bec+UZZTsf5J95DYjVcDtkZdEBSwrbKlq66NcXwL7Yem+49sXPOb5E0LYk2shyIUS9MuxFirkWk4+gMKdbWGTnOjK6ieiCW+7OrxLQaYTzdBpjun+AhGiqOOuynDYuv3a+/qknUN245CM7dUf8hPJVsd2WwmMhh0DQbhmB9KzomyVl2Up48dtgu5B376crVK1ruVg6L/YyuTzXHMuGgzZy/v63yV/ibIvDhnXjDPZIzHcxzr1iTSzwdupXaK6eFpWjfieMh7pMgvau+FFWOERJ/bd3RnjcMonLbcuCI0o7v4S22ikGzM0MunQR; 4:QG6htgUHA/LchWnFu4/JQ5i4zLCmtsG8iZhD8J6lRAjPcDP+zizUMczBcF+5pHns3Yu9TzN3/b9SovEFwPEZLq1emIeSVI3XH8yxM5c0rLerUaJj9ThrYYE/hLEQPmSLC0Osd7lDYDt9BJzpYR6aSGzz+nvPyjYhcr/IfHjc72tSHgQ7L6BOl7LtzS7YXGkjzjiqDdJZI7dKdzlhlwpX8dbOhzoz9Htm0djRoPv82p2hCQQMfP1DSzyuobTEAHd6WtiIsJr+cYduduciomfSIQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB6PR0501MB2040; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2040; X-Forefront-PRVS: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(39380400002)(396003)(346002)(376002)(199004)(189003)(6666003)(48376002)(8936002)(305945005)(5660300001)(36756003)(47776003)(53936002)(7736002)(50466002)(478600001)(66066001)(105586002)(107886003)(50226002)(106356001)(21086003)(3846002)(55016002)(486006)(25786009)(76176011)(8676002)(69596002)(476003)(81166006)(4326008)(2906002)(2616005)(81156014)(956004)(52116002)(7696005)(86362001)(68736007)(11346002)(6116002)(186003)(97736004)(386003)(1076002)(446003)(316002)(6346003)(51416003)(26005)(16526019)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2040; 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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2040; 23:+UwKfoRfeuArD39EXc0pu/kKwxLOq+pf5gu+9dp?= =?us-ascii?Q?Zz3iAwXPk+4aej4eAy9akSjaCKES8exOLNDWrmG3JGTO0Q4C22a89TKHiwVs?= =?us-ascii?Q?ZwlcQTF3qlxOsZTXlh8C4JjDK4OtF4VC8aJhOhIURiRtDMJ+SJn8DGGVN4LW?= =?us-ascii?Q?Nf6tOj1lpF+uJmo5y3P/2YB1TfodSXiBIWKP5K8TfL0p1LAPRrgbCN7B2XC0?= =?us-ascii?Q?CeDNsBso6jyhn3QtVTNq0ikIjPCLGkJ5zlnfi4PykBMATNcnHjFudAIaJA+/?= =?us-ascii?Q?eQAYTdrXAcHKF97Np/YHZwj5rYKJ5H/m4cTWgVIdCZhmmH253d+DXqZBBWlN?= =?us-ascii?Q?BQ92dSiB44D4f1Z8VtnsDzSA6Ooh0KzTwNK7x2DwWBfyh3anGsf3G0Air7/s?= =?us-ascii?Q?eCqI3LUWUv5t9HHvl+a9Jta8Z9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BSUBCWXZHBNOOMAgleS3G46N50stuqhWKWMsD2qrZQWvcDgn+1z8ma2fJdlpfI4a8G7HD7nXWQBPjeW1pHPc4PVK8wgdlobhwqWYJzLf7msYVmdLSrStIQ5ELeJ5vzWEM2HwFjB4MxPRK0fktYKSyQc5L/VpOFUqNP7TyROq X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 6:omStWX8cKiGdaPyloY5rEFXuV5PrasAcClSY1w3flptjY2L0UNOLY9V2kF7z1WjD/ILES/DccRFna6cZpeEemVYAMO00TNAVDeeX7da3HqswteGxsTdcrq3VbfNa+SwORBUYq9OHJvp/xGJ6e6mgt9oQUu0T66NqA0o2WdRUqoUfh0hY6d5gdTajgI7x3sTS/TgNZo5omc66BpxikSyu2lWxX7jgLLKePVpwgVpWH/wya0HpapwW0mkTdd2sQilnvBf7yvGuGYZdfKxgTmR8PLUbQ0OZi+WUTp9Qg+dsVL/EgaIZChkQSz6k5egNQTT300krrNJpW4SXDKhtbxw21Tkhndw7SM/UlsL0uDF47b+ckn/AglvlpgkZYBYLX/Jnrrp+H2zZeqVLFfkrV36ietJASbocENa0iTTlk6Vh2qPalBELK6a2ptVSBUz/aEifPUredw/GaSffiFsszVgOzw==; 5:t2CRTGEv0tX7Cxg3D17ngXXcT0oo9xJz/GbmFcxNEqtx+xezEmXfB41egK0FsMacbQJuP0Oa6jtmTsWs27s9DtvML84EDmkSPMXnl3tbJe3PDy1EgOs00snTpP3S5pilpNBURIRZ4kI9Pwm1QOLUfs0+3Tm5TzvijOWoEG/JbiA=; 24:qYLCzjvNoK/lfPMObAbPHHxXilt7/UxPHXDZSg1goDgDgyYwzLrlO9cN+tur/ZeqghJojzpSsh7Q9e8hReMLbNnkyTkPKPl0716qPMyyIjI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 7:4S0M+FI9uUO22fEkJNUIdmJWC/rXg76azcgIa4ZxnolAhRQHfHWTrvp+9SMfyCC6itf85Xq9HRyzWKsBo9A7zutAhbek0DjmKh/vSLrB2DNMsOG4jyiSjhzXNjcKuLzFvjfvQ1HS64KptOHOtmTMQCdgROqNH/LsrhVd9a6ftIDVku1vKwJGPxfDHa+OdFAi7JCfqn7PB8PBmiMF5ymj+kzrMptDNO+AQau93wHdTDk23CDhr5nJuiAgzn/QT0jw X-MS-Office365-Filtering-Correlation-Id: e181741f-b978-4231-e2f1-08d5b08364df X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2018 23:21:11.2860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e181741f-b978-4231-e2f1-08d5b08364df X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2040 Subject: [dpdk-dev] [PATCH 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, 02 May 2018 23:21:16 -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 | 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