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 66A8AA05D3 for ; Mon, 22 Apr 2019 15:46:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04F5C1B462; Mon, 22 Apr 2019 15:46:32 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80053.outbound.protection.outlook.com [40.107.8.53]) by dpdk.org (Postfix) with ESMTP id BA22D1C0B for ; Mon, 22 Apr 2019 15:46:29 +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=YlAmwy4BtRj1jty+NF2eBEfhUIvq0crZnnZ+nU+HVco=; b=t59kktq3QrLBlf7zMTFEcJgO0gw2RtvNNRgMS1vgL4tEfWx/FMw2Eff1evS9/2lzCMtIrKSO3DxhC6FZeRrlPE+vRq3kNBYWhHzunnSUULT0PSc5J6oBQzp3LIHEkcvzD+Cc216b5pWHjJMnt9S6odtD4DcZKSETWlbBDv87cQE= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3506.eurprd05.prod.outlook.com (10.171.186.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Mon, 22 Apr 2019 13:46:27 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::a4d7:6c70:9829:2cc8]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::a4d7:6c70:9829:2cc8%6]) with mapi id 15.20.1813.017; Mon, 22 Apr 2019 13:46:27 +0000 From: Ori Kam To: Shahaf Shuler , Yongseok Koh CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags Thread-Index: AQHU+QfKyybjFQ8KwkuCiFc/aRWh/6ZIKZGAgAAHhOA= Date: Mon, 22 Apr 2019 13:46:27 +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: 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=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0c0aeb2e-cd21-4ef7-62dd-08d6c728eb1c 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:AM4PR05MB3506; x-ms-traffictypediagnostic: AM4PR05MB3506: x-microsoft-antispam-prvs: x-forefront-prvs: 00159D1518 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(136003)(39860400002)(376002)(13464003)(199004)(189003)(33656002)(66066001)(229853002)(25786009)(305945005)(7736002)(8676002)(8936002)(74316002)(86362001)(97736004)(6636002)(7696005)(81156014)(4326008)(102836004)(68736007)(478600001)(81166006)(14454004)(3846002)(52536014)(53546011)(6116002)(5660300002)(110136005)(316002)(9686003)(26005)(55016002)(6246003)(186003)(53936002)(99286004)(66946007)(66476007)(66446008)(11346002)(64756008)(66556008)(76176011)(76116006)(486006)(256004)(73956011)(14444005)(446003)(6506007)(2906002)(476003)(71200400001)(71190400001)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3506; H:AM4PR05MB3425.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: edV4+ucg1OXBDF6SKaResRpGl+wqkPT5Ke84aPXWWKEBrVVU7nBtO9LA0GLlm0fhPaLi1nqZ1rZCJ7/OjJylcDzPlC/zoIupgkb6tFJNfJNRP56s/l6dcT1ybUdVirTxKfXlopBkBtlrAy2aEYWkrEEeGlj4sHrNeDksfZ0+PPbvPV3rUklb3zW3GxXuBkemkKge2fcSHzo2rBYpXIDw7pM5ojNVWlSreONY/Ddn9s/9rdjTMUBhU8dOUkTs4qp2hP7nHsddZ7nUOChUNXvBBO5US3/asZAkRNLAJ34CEUSGcLZQl9TFwLcUTupRwEFwQ26KOvJJ2veLQYNWUpIbfE3IaREzNz5uQ2yaYDePAD9pxRrIxFMJeJ95dX/+JRWL+uj5WkLSvZiQtk9xzIn3kBgB57nv2LNuibgavfRoQqQ= 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: 0c0aeb2e-cd21-4ef7-62dd-08d6c728eb1c X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2019 13:46:27.5698 (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: AM4PR05MB3506 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: <20190422134627.ypO2LWfiLMXcG_LeF_XyXvYTL5kG5_BZ02pO7uFA8sc@z> Hi Shahaf, PSB Thanks, Ori > -----Original Message----- > From: Shahaf Shuler > Sent: Monday, April 22, 2019 4:18 PM > To: Ori Kam ; Yongseok Koh > Cc: dev@dpdk.org; Ori Kam > Subject: RE: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flag= s >=20 > Monday, April 22, 2019 3:34 PM, Ori Kam: > > Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix modification action flags > > > > When creating the modify action using Direct Rules, we need to add flag= s to > > mark, if the action will be done on root table or on private table. > > > > Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API") > > > > 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(-) > > > > 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. */ >=20 > Flags are for RDMA API or Direct rule API? >=20 Direct rules but they are located in RDMA, The encap structure as the same comment exactly. > > }; > > > > /* 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; >=20 > 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