From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2EE1BA2E1B for ; Wed, 4 Sep 2019 16:10:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EFCA91EE1B; Wed, 4 Sep 2019 16:10:41 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40062.outbound.protection.outlook.com [40.107.4.62]) by dpdk.org (Postfix) with ESMTP id DB5291EE0E; Wed, 4 Sep 2019 16:10:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I5YyC/PH6bcsU2NyOQBcko5NXy2qUKaZpGVwZkMcm/kXzdsfLiKOLs/W9OGMly4a00qwZ9f3chchyuLjeR0c3vbYQaflH5LIAbG370oyc7FJ9Qdj+5ocKewTl9/bYWHlVsoH0PCO8gpLkvp8n7tTLI9OZZi5EIR2Z4rVlzzaF+uf5SOc7ocWbnFQ/f4/F3Vd1anfNdWO3+zhzd1Dca2BXv+y60yQTDktybu2ViXhAihCufLyxpOLMIOSjFvElF5+cAjCE1b5C0QsKoXsNmo4kCsSpdbbc357g5ymvDr/keCinNntHNg13F/xBSgxJkAkLC7DvbTcWH5drpfdxruwRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RCwaNCBXcTz0vH2XhGBy4pk3DIpuDmVj6hN2a5cvRkc=; b=CHehT24OgyEXTanetoInCJenqkAxIfXrQM8eUi2xqe12X26ICqHDK8vPIlThbXR2DIJ5tyrFkBspalAPSiiDrWtobqber9Uz53LWzEL25+qmntxpbtG4zkHnG9c+Cl+BZObn/oRWVKVI7NZvTzwCytHzatK/N8vFc9L44MnoiTE2j8iGdk9zMD8JSvI8JXA0LYwwB/f+xwHGALgjuo8lL7xOQiQVKukhhXyTKQwJYmGm31nyqkUx97UnmsYre0m6PFWfzWzrXr84ulzR1I00lp1qL+Rd1Mygh2Nh9YXOu6kRfJxsK0iM6ZWCGb/GaqGgUA5tq2Bd4dMSlP1D/VzR+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RCwaNCBXcTz0vH2XhGBy4pk3DIpuDmVj6hN2a5cvRkc=; b=eC2BmkSzzBTYhAxpMaNHQKUIAiGQ4e+knxLI/2PqJNjbBSzCZl+0BzyPaiZrAKBgqKBpFjIfjdA6BoRdHbzMedc5di1AyOURyQTnyv1cgWVLbhNbr1372X0PO43rUPmi9wQLWGLryhnruK3XUMlRWNOmzbYrTeLVeNL+2ekf374= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3313.eurprd05.prod.outlook.com (10.171.189.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.20; Wed, 4 Sep 2019 14:10:34 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::da9:65ba:1323:a39b]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::da9:65ba:1323:a39b%7]) with mapi id 15.20.2220.022; Wed, 4 Sep 2019 14:10:34 +0000 From: Slava Ovsiienko To: Dekel Peled , Raslan Darawsheh CC: Ori Kam , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix validation of jump action Thread-Index: AQHVU0u6gGTuk9qsWUyx3apPerQwa6cbrkng Date: Wed, 4 Sep 2019 14:10:34 +0000 Message-ID: References: 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=viacheslavo@mellanox.com; x-originating-ip: [95.67.35.250] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 87534dca-db63-4ea3-09bc-08d73141a75b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM4PR05MB3313; x-ms-traffictypediagnostic: AM4PR05MB3313:|AM4PR05MB3313: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0150F3F97D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(366004)(136003)(39860400002)(396003)(346002)(199004)(189003)(13464003)(33656002)(486006)(52536014)(478600001)(7696005)(4326008)(476003)(446003)(11346002)(186003)(450100002)(25786009)(53546011)(6506007)(26005)(102836004)(76176011)(66446008)(66476007)(66556008)(256004)(76116006)(14444005)(6246003)(64756008)(66946007)(14454004)(71190400001)(71200400001)(3846002)(316002)(9686003)(6636002)(66066001)(8936002)(55016002)(6436002)(99286004)(53936002)(5660300002)(6116002)(2906002)(81166006)(81156014)(86362001)(8676002)(110136005)(74316002)(305945005)(229853002)(54906003)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3313; H:AM4PR05MB3265.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: z/4v4cTQeNQWCpZo5wg9PisRS6RiskihbNcYAl3Wpyflz41XO/FDgqy9LoYyRiRyAl6IXkaIS0/XNfpsVvTWPukk9so12xqFEYoXwMYoXjmiQZ4y2gIycNXfx6ZmYsdZlIN5kfmYysCb7oXWaplg6ySr8K4ZOyfm2OuQicWWQ/51BkGAuDFO3hzWhjs8TYGSYkbnrrS6c99RtHth3koqiPA8VArk5CZpE1ZlkcH+9uGws2zjtykLi3EDfPEYCbaqEnV2Op3RUSUfoI1vqM6ikp+Wfs070wIxHqbLJbVXrh1ksoM3djS78Xi1HJk1QxtCu7UIpzjB/x6f8sMjgWiBKthT4Hni4gv7QHS3KnjaMSa61yPd+6svi3eVl455u+ygpjGnzZ7INZhluOCWff9WYSrAUIFHpP0Mctm2jRhFv/4= 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: 87534dca-db63-4ea3-09bc-08d73141a75b X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2019 14:10:34.5661 (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-CrossTenant-userprincipalname: 8qNitlCSBeaUrYL7Sc1r7C7+Lnw+kaShUyGzX27dcFO9+ooFSdiD1Xe9yu5fCTTSOA6iomDiZAxuLgRSutmfrog2C6frvKb6GMb4uSVAyKo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3313 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix validation of jump action 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" > -----Original Message----- > From: Dekel Peled > Sent: Thursday, August 15, 2019 12:27 > To: Yongseok Koh ; Slava Ovsiienko > ; Shahaf Shuler > Cc: Ori Kam ; dev@dpdk.org; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix validation of jump action >=20 > This patch updates the validation function of jump action. > It adds check of conflicting fate actions in flow rule. > It also removes check of action->type which is not needed. >=20 > Fixes: 684b9a1b1f5c ("net/mlx5: support jump action") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dekel Peled Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow_dv.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c index 21faa98..374dbae 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -1951,7 +1951,9 @@ struct field_modify_info modify_tcp[] =3D { > * Validate jump action. > * > * @param[in] action > - * Pointer to the modify action. > + * Pointer to the jump action. > + * @param[in] action_flags > + * Holds the actions detected until now. > * @param[in] group > * The group of the current flow. > * @param[out] error > @@ -1962,10 +1964,17 @@ struct field_modify_info modify_tcp[] =3D { > */ > static int > flow_dv_validate_action_jump(const struct rte_flow_action *action, > + uint64_t action_flags, > uint32_t group, > struct rte_flow_error *error) > { > - if (action->type !=3D RTE_FLOW_ACTION_TYPE_JUMP && !action- > >conf) > + if (action_flags & (MLX5_FLOW_FATE_ACTIONS | > + MLX5_FLOW_FATE_ESWITCH_ACTIONS)) > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > + "can't have 2 fate actions in" > + " same flow"); > + if (!action->conf) > return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > NULL, "action configuration not > set"); @@ -3220,6 +3229,7 @@ struct field_modify_info modify_tcp[] =3D { > break; > case RTE_FLOW_ACTION_TYPE_JUMP: > ret =3D flow_dv_validate_action_jump(actions, > + action_flags, > attr->group, error); > if (ret) > return ret; > -- > 1.8.3.1