From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C1A48A0679 for ; Tue, 2 Apr 2019 06:50:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E60D42E81; Tue, 2 Apr 2019 06:49:59 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30049.outbound.protection.outlook.com [40.107.3.49]) by dpdk.org (Postfix) with ESMTP id 8745EA3 for ; Tue, 2 Apr 2019 06:49:58 +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:X-MS-Exchange-SenderADCheck; bh=WolGqJtMpUNuXxoBLZnbcRmjF5JsvLk9DkFZBPbIx38=; b=VcL+7T3zMAXD+/eta9GLgmWbqcugGLgqmZR6Ee5rL8FwyLwawJRxtm24IIcxWjNbpb8aTsD3M9yIDCdYqInCDupWro7McBKXR32pHcs6GHCST31tl7wvD8dZL8kvvOOsQAHcQZaq3Ik0ACU5VeBgILobFTN1QmsPQEGhWfXd/rw= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3747.eurprd05.prod.outlook.com (52.133.47.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.17; Tue, 2 Apr 2019 04:49:57 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::84f3:7e92:7a51:1003]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::84f3:7e92:7a51:1003%2]) with mapi id 15.20.1750.014; Tue, 2 Apr 2019 04:49:57 +0000 From: Shahaf Shuler To: Slava Ovsiienko , "dev@dpdk.org" CC: Ferruh Yigit , Thomas Monjalon Thread-Topic: [PATCH v4 09/13] net/mlx5: switch to the shared IB device context Thread-Index: AQHU5J9KcXXD6B4gtUy0CGSkcck586YoVU1g Date: Tue, 2 Apr 2019 04:49:57 +0000 Message-ID: References: <1553614522-12151-1-git-send-email-viacheslavo@mellanox.com> <1553692547-16695-1-git-send-email-viacheslavo@mellanox.com> <1553692547-16695-10-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1553692547-16695-10-git-send-email-viacheslavo@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: [31.154.10.105] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3fa8a4c0-c920-4288-674a-08d6b726a7e3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM0PR0502MB3747; x-ms-traffictypediagnostic: AM0PR0502MB3747: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0995196AA2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(396003)(39860400002)(366004)(376002)(199004)(189003)(99286004)(25786009)(106356001)(71200400001)(2501003)(71190400001)(105586002)(2906002)(6246003)(5660300002)(102836004)(55016002)(26005)(316002)(86362001)(54906003)(9686003)(256004)(110136005)(74316002)(305945005)(8676002)(81166006)(97736004)(7736002)(81156014)(478600001)(33656002)(53936002)(4326008)(186003)(476003)(486006)(7696005)(76176011)(68736007)(446003)(11346002)(229853002)(52536014)(6436002)(3846002)(14454004)(66066001)(6116002)(6506007)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3747; H:AM0PR0502MB3795.eurprd05.prod.outlook.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: E1mb/psfZeoegzz45LLOrWUSR7BtHVgXs68585bj3EQxQB7ktiR8SRq1AwFCX3IrlE0dXTcctkfVA4Bz+I++aIzEy/Ea7QKIy8pdoqFp53ZlLatKjE+m+ZHtMzC8o5JXWua46TNnEncFdUJEY+YD7/Vb3GLN5vhKVuFcCVmqXZtLKHDQtKfuSHsZiAGBUgQDFtE3N4ToJ8CRH+kEBotlxerOnhj48PZVNz0b0nNFh4LJ4fQHXQwDmkMTXkcbTnyuqU7U3kUctNGxTI6lXtLajHlx7If1OMvxQHr9bgDJyImBGnmiwo+PMVP/9FTMtdo+7I2DV88GkgQcWc91PdObWubulfEuZHEWck3cjHMPfhHdRubS+qGi3QtEKXNLHqXpJEI3o++5t1D1VE9oylPUZ67eFUoeN/nmlyemhb7kDf4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fa8a4c0-c920-4288-674a-08d6b726a7e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2019 04:49:57.1351 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3747 Subject: Re: [dpdk-dev] [PATCH v4 09/13] net/mlx5: switch to the shared IB device context 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190402044957.IYq8_XBFn1hmvLnWu4JrTTf_WXYHHnxCXt79xWZ246k@z> Slava,=20 Wednesday, March 27, 2019 3:16 PM, Viacheslav Ovsiienko: > Subject: [PATCH v4 09/13] net/mlx5: switch to the shared IB device contex= t >=20 > The code is updated to use the shared IB device context and device handle= s. > The IB device context is shared between reprentors created over the singl= e > multiport IB device. All Verbs and DevX objects will be created whithin t= his > shared context. >=20 > Signed-off-by: Viacheslav Ovsiienko > Acked-by: Shahaf Shuler > --- > drivers/net/mlx5/mlx5.c | 3 +-- > drivers/net/mlx5/mlx5.h | 1 - > drivers/net/mlx5/mlx5_ethdev.c | 13 +++++++------ > drivers/net/mlx5/mlx5_flow_dv.c | 8 ++++---- > drivers/net/mlx5/mlx5_flow_verbs.c | 6 ++++-- > drivers/net/mlx5/mlx5_rxq.c | 23 ++++++++++++----------- > drivers/net/mlx5/mlx5_socket.c | 4 ++-- > drivers/net/mlx5/mlx5_trigger.c | 2 +- > drivers/net/mlx5/mlx5_txq.c | 4 ++-- > 9 files changed, 33 insertions(+), 31 deletions(-) >=20 >=20 > a/drivers/net/mlx5/mlx5_flow_verbs.c > b/drivers/net/mlx5/mlx5_flow_verbs.c > index 6c4f52f..9548d12 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -56,10 +56,11 @@ > { > #if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42) > struct mlx5_priv *priv =3D dev->data->dev_private; > + struct ibv_context ctx =3D priv->sh->ctx; > struct ibv_counter_set_init_attr init =3D { > .counter_set_id =3D counter->id}; >=20 > - counter->cs =3D mlx5_glue->create_counter_set(priv->ctx, &init); > + counter->cs =3D mlx5_glue->create_counter_set(ctx, &init); > if (!counter->cs) { > rte_errno =3D ENOTSUP; > return -ENOTSUP; This code piece was causing compilation error w/ older rdma-core versions. It was replaced w/ the below during the merge.=20 > #if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42) > struct mlx5_priv *priv =3D dev->data->dev_private; > - struct ibv_context ctx =3D priv->sh->ctx; > + struct ibv_context *ctx =3D priv->sh->ctx; > struct ibv_counter_set_init_attr init =3D { > .counter_set_id =3D counter->id}; >