From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140059.outbound.protection.outlook.com [40.107.14.59]) by dpdk.org (Postfix) with ESMTP id 36E031B4DB for ; Thu, 21 Mar 2019 13:15:06 +0100 (CET) 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=tk/Ot5I67DdqLHHGXu+mV7/TZaRQPiWvMzoeReMTHCo=; b=TzDgUDewR3a8tCvnXBNGujz0DGEKlQ4W84g2N+YSJIe+s5lqz3lwXX5rotGL1Ojuf5IDT2UI/LdP1tvfVTaJOANPFBh+643fLWoJmgPvtl8q6Cns4NtXWXwgIMINmQNfkGp84xshIkAGeyLsaBy3tXbtmIeDhf+4aDoXCzKdWPM= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3827.eurprd05.prod.outlook.com (52.133.47.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.15; Thu, 21 Mar 2019 12:15:05 +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.1730.013; Thu, 21 Mar 2019 12:15:05 +0000 From: Shahaf Shuler To: Slava Ovsiienko , "dev@dpdk.org" Thread-Topic: [PATCH 11/14] net/mlx5: provide IB port for the object being created Thread-Index: AQHU373KzZpHwK9vxk6v1TTZmWRJxaYV9+zg Date: Thu, 21 Mar 2019 12:15:05 +0000 Message-ID: References: <1551376985-11096-1-git-send-email-viacheslavo@mellanox.com> <1553155888-27498-1-git-send-email-viacheslavo@mellanox.com> <1553155888-27498-12-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1553155888-27498-12-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: 05804644-7119-43ef-55d2-08d6adf6da1c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3827; x-ms-traffictypediagnostic: AM0PR0502MB3827: x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(39860400002)(136003)(376002)(189003)(199004)(81166006)(97736004)(33656002)(68736007)(74316002)(25786009)(7736002)(305945005)(110136005)(316002)(14454004)(2906002)(446003)(2501003)(52536014)(11346002)(476003)(71190400001)(256004)(86362001)(486006)(99286004)(186003)(5660300002)(66066001)(26005)(7696005)(53936002)(76176011)(102836004)(55016002)(9686003)(6436002)(71200400001)(229853002)(3846002)(8676002)(8936002)(81156014)(478600001)(6246003)(106356001)(6506007)(6116002)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3827; H:AM0PR0502MB3795.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1cXIzIYcq74f7xzgO0BRRYOhXlaND51KiwQuInP8ZtxcCQtlKgaUlLFFL64pQVtsxX6UAI46SOzz1f2ULaf9O7luGRVVz9+U9c1HaE4+PVcNoYAE1R7XeeoVQW919tOO//MDhfaTcFmNjR1+CXYSOdpygl7I9MM+51zJES+WWv5fg/nms9Zt+1eP04TB+/0RGv3gQCvjTrmx5PInfSljR5UMgNHwhZaV498SaCz11awSDlMEHpxPyNHWpN5tYaeNvgN8OO89p8i64Z3NOTbPxaLc4iKOPadO5FjgG0oYZaE9IUP+NQViI078am4FUx0sAc2ZTrLd48/ng34xt5cYtcxZxcuv95oYKf75KG+nIMiu+uL598dE5SuNtfNwxUkUlGh4UBBLk6792xCHSlAysZzzKzsDKMlDA7FjbEYsVmg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05804644-7119-43ef-55d2-08d6adf6da1c X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 12:15:05.1543 (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: AM0PR0502MB3827 Subject: Re: [dpdk-dev] [PATCH 11/14] net/mlx5: provide IB port for the object being created 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: Thu, 21 Mar 2019 12:15:06 -0000 Thursday, March 21, 2019 10:11 AM, Viacheslav Ovsiienko: > Subject: [PATCH 11/14] net/mlx5: provide IB port for the object being > created >=20 > The code is updated to provide IB port index for the Verbs objects being > created - QP and Verbs Flows. >=20 > Signed-off-by: Viacheslav Ovsiienko Acked-by: Shahaf Shuler > --- > drivers/net/mlx5/mlx5_flow.c | 2 ++ > drivers/net/mlx5/mlx5_flow_verbs.c | 1 + > drivers/net/mlx5/mlx5_txq.c | 4 ++-- > 3 files changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 010d61a..40d6818 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -315,6 +315,7 @@ struct mlx5_flow_tunnel_info { int > mlx5_flow_discover_priorities(struct rte_eth_dev *dev) { > + struct mlx5_priv *priv =3D dev->data->dev_private; > struct { > struct ibv_flow_attr attr; > struct ibv_flow_spec_eth eth; > @@ -322,6 +323,7 @@ struct mlx5_flow_tunnel_info { > } flow_attr =3D { > .attr =3D { > .num_of_specs =3D 2, > + .port =3D (uint8_t)priv->ibv_port, > }, > .eth =3D { > .type =3D IBV_FLOW_SPEC_ETH, > diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c > b/drivers/net/mlx5/mlx5_flow_verbs.c > index 9548d12..b69af6c 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -1550,6 +1550,7 @@ > dev_flow->layers =3D item_flags; > dev_flow->verbs.attr->priority =3D > mlx5_flow_adjust_priority(dev, priority, subpriority); > + dev_flow->verbs.attr->port =3D (uint8_t)priv->ibv_port; > return 0; > } >=20 > diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c > index 25305b6..5062f5c 100644 > --- a/drivers/net/mlx5/mlx5_txq.c > +++ b/drivers/net/mlx5/mlx5_txq.c > @@ -445,8 +445,8 @@ struct mlx5_txq_ibv * > attr.mod =3D (struct ibv_qp_attr){ > /* Move the QP to this state. */ > .qp_state =3D IBV_QPS_INIT, > - /* Primary port number. */ > - .port_num =3D 1, > + /* IB device port number. */ > + .port_num =3D (uint8_t)priv->ibv_port, > }; > ret =3D mlx5_glue->modify_qp(tmpl.qp, &attr.mod, > (IBV_QP_STATE | IBV_QP_PORT)); > -- > 1.8.3.1 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 9001BA00E6 for ; Thu, 21 Mar 2019 13:15:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 105711B4FE; Thu, 21 Mar 2019 13:15:08 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140059.outbound.protection.outlook.com [40.107.14.59]) by dpdk.org (Postfix) with ESMTP id 36E031B4DB for ; Thu, 21 Mar 2019 13:15:06 +0100 (CET) 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=tk/Ot5I67DdqLHHGXu+mV7/TZaRQPiWvMzoeReMTHCo=; b=TzDgUDewR3a8tCvnXBNGujz0DGEKlQ4W84g2N+YSJIe+s5lqz3lwXX5rotGL1Ojuf5IDT2UI/LdP1tvfVTaJOANPFBh+643fLWoJmgPvtl8q6Cns4NtXWXwgIMINmQNfkGp84xshIkAGeyLsaBy3tXbtmIeDhf+4aDoXCzKdWPM= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3827.eurprd05.prod.outlook.com (52.133.47.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.15; Thu, 21 Mar 2019 12:15:05 +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.1730.013; Thu, 21 Mar 2019 12:15:05 +0000 From: Shahaf Shuler To: Slava Ovsiienko , "dev@dpdk.org" Thread-Topic: [PATCH 11/14] net/mlx5: provide IB port for the object being created Thread-Index: AQHU373KzZpHwK9vxk6v1TTZmWRJxaYV9+zg Date: Thu, 21 Mar 2019 12:15:05 +0000 Message-ID: References: <1551376985-11096-1-git-send-email-viacheslavo@mellanox.com> <1553155888-27498-1-git-send-email-viacheslavo@mellanox.com> <1553155888-27498-12-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1553155888-27498-12-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: 05804644-7119-43ef-55d2-08d6adf6da1c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3827; x-ms-traffictypediagnostic: AM0PR0502MB3827: x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(39860400002)(136003)(376002)(189003)(199004)(81166006)(97736004)(33656002)(68736007)(74316002)(25786009)(7736002)(305945005)(110136005)(316002)(14454004)(2906002)(446003)(2501003)(52536014)(11346002)(476003)(71190400001)(256004)(86362001)(486006)(99286004)(186003)(5660300002)(66066001)(26005)(7696005)(53936002)(76176011)(102836004)(55016002)(9686003)(6436002)(71200400001)(229853002)(3846002)(8676002)(8936002)(81156014)(478600001)(6246003)(106356001)(6506007)(6116002)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3827; H:AM0PR0502MB3795.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1cXIzIYcq74f7xzgO0BRRYOhXlaND51KiwQuInP8ZtxcCQtlKgaUlLFFL64pQVtsxX6UAI46SOzz1f2ULaf9O7luGRVVz9+U9c1HaE4+PVcNoYAE1R7XeeoVQW919tOO//MDhfaTcFmNjR1+CXYSOdpygl7I9MM+51zJES+WWv5fg/nms9Zt+1eP04TB+/0RGv3gQCvjTrmx5PInfSljR5UMgNHwhZaV498SaCz11awSDlMEHpxPyNHWpN5tYaeNvgN8OO89p8i64Z3NOTbPxaLc4iKOPadO5FjgG0oYZaE9IUP+NQViI078am4FUx0sAc2ZTrLd48/ng34xt5cYtcxZxcuv95oYKf75KG+nIMiu+uL598dE5SuNtfNwxUkUlGh4UBBLk6792xCHSlAysZzzKzsDKMlDA7FjbEYsVmg= 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: 05804644-7119-43ef-55d2-08d6adf6da1c X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 12:15:05.1543 (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: AM0PR0502MB3827 Subject: Re: [dpdk-dev] [PATCH 11/14] net/mlx5: provide IB port for the object being created 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: <20190321121505.Xhl4NssITSov_zxdwCjaEpMNsqqcUupP7vOKHtcj8rg@z> Thursday, March 21, 2019 10:11 AM, Viacheslav Ovsiienko: > Subject: [PATCH 11/14] net/mlx5: provide IB port for the object being > created >=20 > The code is updated to provide IB port index for the Verbs objects being > created - QP and Verbs Flows. >=20 > Signed-off-by: Viacheslav Ovsiienko Acked-by: Shahaf Shuler > --- > drivers/net/mlx5/mlx5_flow.c | 2 ++ > drivers/net/mlx5/mlx5_flow_verbs.c | 1 + > drivers/net/mlx5/mlx5_txq.c | 4 ++-- > 3 files changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 010d61a..40d6818 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -315,6 +315,7 @@ struct mlx5_flow_tunnel_info { int > mlx5_flow_discover_priorities(struct rte_eth_dev *dev) { > + struct mlx5_priv *priv =3D dev->data->dev_private; > struct { > struct ibv_flow_attr attr; > struct ibv_flow_spec_eth eth; > @@ -322,6 +323,7 @@ struct mlx5_flow_tunnel_info { > } flow_attr =3D { > .attr =3D { > .num_of_specs =3D 2, > + .port =3D (uint8_t)priv->ibv_port, > }, > .eth =3D { > .type =3D IBV_FLOW_SPEC_ETH, > diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c > b/drivers/net/mlx5/mlx5_flow_verbs.c > index 9548d12..b69af6c 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -1550,6 +1550,7 @@ > dev_flow->layers =3D item_flags; > dev_flow->verbs.attr->priority =3D > mlx5_flow_adjust_priority(dev, priority, subpriority); > + dev_flow->verbs.attr->port =3D (uint8_t)priv->ibv_port; > return 0; > } >=20 > diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c > index 25305b6..5062f5c 100644 > --- a/drivers/net/mlx5/mlx5_txq.c > +++ b/drivers/net/mlx5/mlx5_txq.c > @@ -445,8 +445,8 @@ struct mlx5_txq_ibv * > attr.mod =3D (struct ibv_qp_attr){ > /* Move the QP to this state. */ > .qp_state =3D IBV_QPS_INIT, > - /* Primary port number. */ > - .port_num =3D 1, > + /* IB device port number. */ > + .port_num =3D (uint8_t)priv->ibv_port, > }; > ret =3D mlx5_glue->modify_qp(tmpl.qp, &attr.mod, > (IBV_QP_STATE | IBV_QP_PORT)); > -- > 1.8.3.1