From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahaf Shuler Subject: Re: [PATCH v4 09/13] net/mlx5: switch to the shared IB device context 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Ferruh Yigit , Thomas Monjalon To: Slava Ovsiienko , "dev@dpdk.org" Return-path: 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) In-Reply-To: <1553692547-16695-10-git-send-email-viacheslavo@mellanox.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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}; >