From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00042.outbound.protection.outlook.com [40.107.0.42]) by dpdk.org (Postfix) with ESMTP id EB9AD160 for ; Mon, 7 May 2018 07:46:45 +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=zk6k2/3AmP1ca1UFQ49D1VaTvZA3HW99EVQS32CY7gU=; b=RCsSQ9LKOkZhR2Os2cg48KTCw0cMXwbD8bwu6/OIMGKrAZmLjBUMpcXSLmksjc+WbRh0bIok/G/R1VAqDw5/4NcdNQpKAwYM+HeKsaVYm2JRbuCDUE3FQgdi38Rzty50eRvzC3tckSryzLn5v7cCwUi1NQPnmnmDHCRJALVwVW8= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4489.eurprd05.prod.outlook.com (52.134.109.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.17; Mon, 7 May 2018 05:46:44 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f116:5be4:ba29:fed8]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f116:5be4:ba29:fed8%13]) with mapi id 15.20.0735.018; Mon, 7 May 2018 05:46:44 +0000 From: Shahaf Shuler To: Yongseok Koh , Adrien Mazarguil , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= CC: "dev@dpdk.org" , Yongseok Koh Thread-Topic: [dpdk-dev] [PATCH 2/3] net/mlx5: add a function to rdma-core glue Thread-Index: AQHT4mxQJfqnDbIImEapYnB7lEw/cqQjyHTQ Date: Mon, 7 May 2018 05:46:44 +0000 Message-ID: References: <20180502232054.7852-1-yskoh@mellanox.com> <20180502232054.7852-3-yskoh@mellanox.com> In-Reply-To: <20180502232054.7852-3-yskoh@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4489; 7:aBdzW/s0sygDGeHq6M8g/RPG8tXnK8Qh/TumNqLaL821cuL/ftIKEN+G4HfzIoTHgqAJhDrLcvE1gThQpeexNEpXCTzmkTedFuyN6/kCDmyJxoAx9C8KVVK2zj7e4jQW3xefj8YZ9mcs5zNZhLPtLdhaEL/xm8996DpUojlOgweGzP2Cw/mVl7oyZWhHFlIdB/Ez2mpVVokUHSHL3XPRFWcExE852H2+72EFFEOSBVBzxvA9k6QmedLyKA4mAl+t x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4489; x-ms-traffictypediagnostic: DB7PR05MB4489: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 0 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DB7PR05MB4489; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4489; x-forefront-prvs: 066517B35B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(39380400002)(346002)(366004)(189003)(199004)(3846002)(476003)(316002)(25786009)(102836004)(6506007)(97736004)(105586002)(110136005)(106356001)(68736007)(305945005)(7736002)(6116002)(14454004)(5250100002)(54906003)(99286004)(76176011)(7696005)(26005)(86362001)(446003)(11346002)(229853002)(486006)(66066001)(81156014)(5660300001)(2900100001)(6436002)(53936002)(3280700002)(3660700001)(4326008)(33656002)(478600001)(8936002)(107886003)(9686003)(6246003)(2906002)(8676002)(55016002)(81166006)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4489; H:DB7PR05MB4426.eurprd05.prod.outlook.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) x-microsoft-antispam-message-info: K0n9cn+l9u1Tt52TSAkfmfc8K3fbTM4Y7QuFWL5NCLwd7ixF+nUta4qTs2Xd4rmad0nPK0gO3bGxrdurr7M+7c2rZTQBpJ8EWUYqp2OB+9qsDsd/3lxnlMHfEsOmbAFJojMGiuA1qar1yKsRNNoYbDwVX5PbChezCaYGqP0FoFNaAUNC2NSnUUsdSos2QUXk spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: aee4f021-06d7-493e-9d34-08d5b3ddea6a X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: aee4f021-06d7-493e-9d34-08d5b3ddea6a X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2018 05:46:44.4168 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4489 Subject: Re: [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: Mon, 07 May 2018 05:46:46 -0000 Thursday, May 3, 2018 2:21 AM, Yongseok Koh: > Subject: [dpdk-dev] [PATCH 2/3] net/mlx5: add a function to rdma-core glu= e >=20 > mlx5dv_create_wq() is added for the Multi-Packet RQ (a.k.a Striding RQ). >=20 > Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler =20 > --- > drivers/net/mlx5/Makefile | 5 +++++ > drivers/net/mlx5/mlx5_glue.c | 16 ++++++++++++++++ > drivers/net/mlx5/mlx5_glue.h | 8 ++++++++ > 3 files changed, 29 insertions(+) >=20 > 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); } >=20 > +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 =3D &(const struct > mlx5_glue){ > .port_state_str =3D mlx5_glue_port_state_str, > .cq_ex_to_cq =3D mlx5_glue_cq_ex_to_cq, > .dv_create_cq =3D mlx5_glue_dv_create_cq, > + .dv_create_wq =3D mlx5_glue_dv_create_wq, > .dv_query_device =3D mlx5_glue_dv_query_device, > .dv_set_context_attr =3D mlx5_glue_dv_set_context_attr, > .dv_init_obj =3D 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 >=20 > +#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