From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60061.outbound.protection.outlook.com [40.107.6.61]) by dpdk.org (Postfix) with ESMTP id 0690D1B470 for ; Mon, 22 Apr 2019 15:18:04 +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=xGf+QKsCLIQXmR4A0lj35Or/WSkZ5Y3PGpCruUOnB0s=; b=JT4BmzrP0HFULaSXJTZ6v5GiVbUqM5mBSjmikwFfRC9YwCZV2ZNG9Af4elz6lzXTeYM3e1LUPsgr6Okhr46F7/qUMYldx/fedXBzDm/Xtv/XSO4SZQryXy2ekE5zrR/hvMHeZ9Rg7vOiaqxaV9nvNufvomw0QBafQwB7iLU+MFk= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB4084.eurprd05.prod.outlook.com (52.133.33.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Mon, 22 Apr 2019 13:18:03 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::4192:b468:41e1:c323]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::4192:b468:41e1:c323%4]) with mapi id 15.20.1813.017; Mon, 22 Apr 2019 13:18:03 +0000 From: Shahaf Shuler To: Ori Kam , Yongseok Koh CC: "dev@dpdk.org" , Ori Kam Thread-Topic: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags Thread-Index: AQHU+QfLIz+pmp10hkqSg1DWAymUtqZIKNzA Date: Mon, 22 Apr 2019 13:18:03 +0000 Message-ID: References: <1555935668-81847-1-git-send-email-orika@mellanox.com> <1555936464-82332-1-git-send-email-orika@mellanox.com> In-Reply-To: <1555936464-82332-1-git-send-email-orika@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: 0d21a375-59c0-47ed-8685-08d6c724f349 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR0502MB4084; x-ms-traffictypediagnostic: AM0PR0502MB4084: x-microsoft-antispam-prvs: x-forefront-prvs: 00159D1518 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(346002)(376002)(39860400002)(366004)(189003)(199004)(476003)(478600001)(68736007)(6436002)(71200400001)(6116002)(71190400001)(76176011)(3846002)(11346002)(486006)(14454004)(6506007)(7736002)(110136005)(6246003)(54906003)(305945005)(316002)(26005)(4326008)(7696005)(186003)(102836004)(107886003)(33656002)(2906002)(14444005)(256004)(8676002)(446003)(97736004)(229853002)(99286004)(53936002)(25786009)(74316002)(9686003)(86362001)(5660300002)(6636002)(8936002)(81156014)(81166006)(76116006)(73956011)(55016002)(64756008)(66556008)(66476007)(66446008)(66066001)(66946007)(52536014); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB4084; 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: ivPaR8rogPfHDXcp4kRVslUhLE7BfEZgRIwuIq3slSeVQGPKq7m4SS+LsQY7fzFVj0f+sEPtqHCrykHz8uFYc3xJHLFAp/KbySML9s6MPYl0Sds0Hlpq92eGvIk8CPl47rItA6DnqkdpixE62dbcA7UDDKX9QPWD+9L0Kl/q73J+tASadqSrBesRweQkgASG+xZB1+n52yPbViRYcuNEE3ecfXsjdJ2pGvlBGDtdkXzNy0t49zvxdqnC2xfsVKHsNXybcxsF65RlZu/IuDuFATj15HspFZ5fx+rt4z/JSIwJT+aGMtzxBgJYsmCeg6PzLRPXe+711cPdasCH+zax5m+YTAX0Qj6F7/nbU5IjYmBcBF3PD/kdXEzEM3vq4EwjIZaoDTxYtZTrviL9x24RLtCzDmWqDmeUuFF1C4/6igE= 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: 0d21a375-59c0-47ed-8685-08d6c724f349 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2019 13:18:03.3125 (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: AM0PR0502MB4084 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags 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, 22 Apr 2019 13:18:05 -0000 Monday, April 22, 2019 3:34 PM, Ori Kam: > Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags >=20 > When creating the modify action using Direct Rules, we need to add flags = to > mark, if the action will be done on root table or on private table. >=20 > Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API") >=20 > Signed-off-by: Ori Kam > --- > v2: > * Change title of commit. > --- > drivers/net/mlx5/mlx5_flow.h | 1 + > drivers/net/mlx5/mlx5_flow_dv.c | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index c419e6b..b665420 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -255,6 +255,7 @@ struct mlx5_flow_dv_modify_hdr_resource { > uint32_t actions_num; /**< Number of modification actions. */ > struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM]; > /**< Modification actions. */ > + uint64_t flags; /**< Flags for RDMA API. */ Flags are for RDMA API or Direct rule API?=20 > }; >=20 > /* Jump action resource structure. */ > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c index 2f777ec..ffc6ab7 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -1830,10 +1830,12 @@ struct field_modify_info modify_tcp[] =3D { > ns =3D sh->tx_ns; > else > ns =3D sh->rx_ns; > + resource->flags =3D dev_flow->flow->group ? 0 : 1; Use flag macro rather then fixed value. Something like MLX5_DV_MODIFY_FLAGS= _INNER_TABLE ?=20 > /* Lookup a matching resource from cache. */ > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) { > if (resource->ft_type =3D=3D cache_resource->ft_type && > resource->actions_num =3D=3D cache_resource->actions_num > && > + resource->flags =3D=3D cache_resource->flags && > !memcmp((const void *)resource->actions, > (const void *)cache_resource->actions, > (resource->actions_num * > @@ -1856,7 +1858,7 @@ struct field_modify_info modify_tcp[] =3D { > cache_resource->verbs_action =3D > mlx5_glue->dv_create_flow_action_modify_header > (sh->ctx, cache_resource->ft_type, > - ns, 0, > + ns, cache_resource->flags, > cache_resource->actions_num * > sizeof(cache_resource->actions[0]), > (uint64_t *)cache_resource- > >actions); > -- > 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 CB8F2A05D3 for ; Mon, 22 Apr 2019 15:18:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8CA321B473; Mon, 22 Apr 2019 15:18:06 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60061.outbound.protection.outlook.com [40.107.6.61]) by dpdk.org (Postfix) with ESMTP id 0690D1B470 for ; Mon, 22 Apr 2019 15:18:04 +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=xGf+QKsCLIQXmR4A0lj35Or/WSkZ5Y3PGpCruUOnB0s=; b=JT4BmzrP0HFULaSXJTZ6v5GiVbUqM5mBSjmikwFfRC9YwCZV2ZNG9Af4elz6lzXTeYM3e1LUPsgr6Okhr46F7/qUMYldx/fedXBzDm/Xtv/XSO4SZQryXy2ekE5zrR/hvMHeZ9Rg7vOiaqxaV9nvNufvomw0QBafQwB7iLU+MFk= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB4084.eurprd05.prod.outlook.com (52.133.33.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Mon, 22 Apr 2019 13:18:03 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::4192:b468:41e1:c323]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::4192:b468:41e1:c323%4]) with mapi id 15.20.1813.017; Mon, 22 Apr 2019 13:18:03 +0000 From: Shahaf Shuler To: Ori Kam , Yongseok Koh CC: "dev@dpdk.org" , Ori Kam Thread-Topic: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags Thread-Index: AQHU+QfLIz+pmp10hkqSg1DWAymUtqZIKNzA Date: Mon, 22 Apr 2019 13:18:03 +0000 Message-ID: References: <1555935668-81847-1-git-send-email-orika@mellanox.com> <1555936464-82332-1-git-send-email-orika@mellanox.com> In-Reply-To: <1555936464-82332-1-git-send-email-orika@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: 0d21a375-59c0-47ed-8685-08d6c724f349 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR0502MB4084; x-ms-traffictypediagnostic: AM0PR0502MB4084: x-microsoft-antispam-prvs: x-forefront-prvs: 00159D1518 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(346002)(376002)(39860400002)(366004)(189003)(199004)(476003)(478600001)(68736007)(6436002)(71200400001)(6116002)(71190400001)(76176011)(3846002)(11346002)(486006)(14454004)(6506007)(7736002)(110136005)(6246003)(54906003)(305945005)(316002)(26005)(4326008)(7696005)(186003)(102836004)(107886003)(33656002)(2906002)(14444005)(256004)(8676002)(446003)(97736004)(229853002)(99286004)(53936002)(25786009)(74316002)(9686003)(86362001)(5660300002)(6636002)(8936002)(81156014)(81166006)(76116006)(73956011)(55016002)(64756008)(66556008)(66476007)(66446008)(66066001)(66946007)(52536014); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB4084; 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: ivPaR8rogPfHDXcp4kRVslUhLE7BfEZgRIwuIq3slSeVQGPKq7m4SS+LsQY7fzFVj0f+sEPtqHCrykHz8uFYc3xJHLFAp/KbySML9s6MPYl0Sds0Hlpq92eGvIk8CPl47rItA6DnqkdpixE62dbcA7UDDKX9QPWD+9L0Kl/q73J+tASadqSrBesRweQkgASG+xZB1+n52yPbViRYcuNEE3ecfXsjdJ2pGvlBGDtdkXzNy0t49zvxdqnC2xfsVKHsNXybcxsF65RlZu/IuDuFATj15HspFZ5fx+rt4z/JSIwJT+aGMtzxBgJYsmCeg6PzLRPXe+711cPdasCH+zax5m+YTAX0Qj6F7/nbU5IjYmBcBF3PD/kdXEzEM3vq4EwjIZaoDTxYtZTrviL9x24RLtCzDmWqDmeUuFF1C4/6igE= 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: 0d21a375-59c0-47ed-8685-08d6c724f349 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2019 13:18:03.3125 (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: AM0PR0502MB4084 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags 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: <20190422131803.5JQLtRr7ktM323eoKykZ18Gflm_XCigtY6NUUHr9NtU@z> Monday, April 22, 2019 3:34 PM, Ori Kam: > Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags >=20 > When creating the modify action using Direct Rules, we need to add flags = to > mark, if the action will be done on root table or on private table. >=20 > Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API") >=20 > Signed-off-by: Ori Kam > --- > v2: > * Change title of commit. > --- > drivers/net/mlx5/mlx5_flow.h | 1 + > drivers/net/mlx5/mlx5_flow_dv.c | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index c419e6b..b665420 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -255,6 +255,7 @@ struct mlx5_flow_dv_modify_hdr_resource { > uint32_t actions_num; /**< Number of modification actions. */ > struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM]; > /**< Modification actions. */ > + uint64_t flags; /**< Flags for RDMA API. */ Flags are for RDMA API or Direct rule API?=20 > }; >=20 > /* Jump action resource structure. */ > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c index 2f777ec..ffc6ab7 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -1830,10 +1830,12 @@ struct field_modify_info modify_tcp[] =3D { > ns =3D sh->tx_ns; > else > ns =3D sh->rx_ns; > + resource->flags =3D dev_flow->flow->group ? 0 : 1; Use flag macro rather then fixed value. Something like MLX5_DV_MODIFY_FLAGS= _INNER_TABLE ?=20 > /* Lookup a matching resource from cache. */ > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) { > if (resource->ft_type =3D=3D cache_resource->ft_type && > resource->actions_num =3D=3D cache_resource->actions_num > && > + resource->flags =3D=3D cache_resource->flags && > !memcmp((const void *)resource->actions, > (const void *)cache_resource->actions, > (resource->actions_num * > @@ -1856,7 +1858,7 @@ struct field_modify_info modify_tcp[] =3D { > cache_resource->verbs_action =3D > mlx5_glue->dv_create_flow_action_modify_header > (sh->ctx, cache_resource->ft_type, > - ns, 0, > + ns, cache_resource->flags, > cache_resource->actions_num * > sizeof(cache_resource->actions[0]), > (uint64_t *)cache_resource- > >actions); > -- > 1.8.3.1