From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60086.outbound.protection.outlook.com [40.107.6.86]) by dpdk.org (Postfix) with ESMTP id F1C251B12E for ; Wed, 3 Oct 2018 15:02: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=C04ZFEzIv22GZtuZwRnvPAtRt9t1gzDyzXJ8h5/LjA8=; b=mj26trYyBqQYyE0BceTa9TwUQayWsSl62Owa/4ggrgojPGbRElL7Jgi/JdKDXJ/P/9BAJ+WeWrFy4Oueta1IHyyx9659KEBz/f5ZYiLxgz9GtVzfSOLcfn9TDU6sc+TQht/GNbXbhYitIOm3g03Jc71bFnzbGoCWLM3er4OrQ/Q= Received: from VI1PR05MB4224.eurprd05.prod.outlook.com (52.133.12.13) by VI1PR05MB1293.eurprd05.prod.outlook.com (10.162.122.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.18; Wed, 3 Oct 2018 13:02:03 +0000 Received: from VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::f911:fe8:927d:400b]) by VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::f911:fe8:927d:400b%3]) with mapi id 15.20.1207.018; Wed, 3 Oct 2018 13:02:03 +0000 From: Dekel Peled To: Yongseok Koh CC: "dev@dpdk.org" , Shahaf Shuler , Ori Kam Thread-Topic: [PATCH] net/mlx5: allow flow rule with attribute egress Thread-Index: AQHUV9Y3nnywEO24Dk6IiJn6Z4VHLaUNAoqQgAAjFgCAAF0dEA== Date: Wed, 3 Oct 2018 13:02:03 +0000 Message-ID: References: <1538058330-34990-1-git-send-email-dekelp@mellanox.com> <20180929092415.GB95127@minint-98vp2qg> <20181003072804.GB21743@mtidpdk.mti.labs.mlnx> In-Reply-To: <20181003072804.GB21743@mtidpdk.mti.labs.mlnx> 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=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1293; 6:L8O9/LCcH0ytoG5S3Bq3mJbfGwGFB01nXnhi+9NswTfGNq4ah86QkA6q6WHrSRSMOT9CaGA8QkZdPHWeGUpeDBHcUIpbR9u0Oibe4RbhjBtox3xd5KULoj+CgJdOhWKuoKaIX/85W4Nk8TXCVGxf4Rbx0PnKG3eeFfUIpth75gltKL/VestysgqNZe/Es5BwbHHjTMq55KZbjzML5K6xCFhdyQdftfKubMkZ4YMOW67K81emx4P9xvcLDNRGWHwDcDH5U8HgHbBsmXRN2AVihIUppR0yTz8/94KoPQiRmvTen7pW5LETY7AZ+qv4RbazetsY9B5wN6dirEIg6WuEx/hBlNUGpjhKzEksclikHijgfZR0ueelezbhqaEljolIabZHg/6IkSvC992AgYsl9eTFZQiOVyMkhz0hY970EnDwrG9f+rYVywLd6YYKSpJ0CoES0qFQ4S/siwE3ufVseA==; 5:fimsO64BaOsUjplft606A460MCdVh0FtZLIhIt0e6w3fLP18Dgba83WqTS6On/lXb23hhVxbkn2rZpO5anu1xLepGOLMxNpzdWkEEFbrT2G/nhX+0Vi/IBvmuUnPWjZnVewq+boEZWV5W/5a1RYHg64HrfHwPY0pgcoCuTBc59Y=; 7:kZqJ6ldy/EF1v/bp9HPfu8X4ABkgXF3HUmAabbYbuGXJuvfyBv6yplTdFWoRb6ADQ7onV/9+Q9CfNjLaa2qfQJrza1SBkExhVZfr9QXCCp2gQsrKWmm/6SM0tC/0VVzTZgzuPMcMcrBKBK2HLqRueXIUxqxcA837pp35msVmXRD+u8xXo3Wp8VXWq0mO5Rp5ZDHyETIkKdUPIl4d1uZ5Xh0VSb6TjUXrtwd8KJT915MBS19Y0ot3/Ckuy5nuvA3j x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 9bf87824-ad19-4d8d-06ea-08d629306a69 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB1293; x-ms-traffictypediagnostic: VI1PR05MB1293: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(4982022)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051); SRVR:VI1PR05MB1293; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1293; x-forefront-prvs: 0814A2C7A3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(376002)(396003)(136003)(366004)(13464003)(189003)(199004)(229853002)(3846002)(71190400001)(99286004)(71200400001)(2900100001)(6116002)(256004)(55016002)(53546011)(74316002)(9686003)(6306002)(316002)(86362001)(25786009)(102836004)(6506007)(966005)(105586002)(14454004)(478600001)(106356001)(6436002)(5660300001)(14444005)(53936002)(5250100002)(6862004)(8676002)(68736007)(6636002)(33656002)(6246003)(2906002)(486006)(446003)(8936002)(107886003)(97736004)(4326008)(11346002)(81156014)(476003)(76176011)(305945005)(93886005)(7736002)(7696005)(81166006)(186003)(26005)(54906003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1293; H:VI1PR05MB4224.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-microsoft-antispam-message-info: xQrM+YgYd4uUX07w8AUZZskr1yw9p9N++8PZI63lDGhARw1cAUz8ybPJeIHhBru6IhSPjwCrVu69oeV07b7lW4SBrGz72MGUQGEYyL8OlXb5YeWbhvwg61FpiMT6dWIqgx5W2+M3SDtXRJum5QwoJTYgts3lXOXYAbYKQLE+Jvn0rNNqLsAUiPPxgrurQ9j/zxtFb12g4KXNmrqyvi3ICy0pyYbDsPpyzaKxUgKOtRR3+3yzawqL0RVO+/gYAVG5AQts+2+0pDPs9ZNY4nyeUrZmGq1MnoaMPECJz+2Gnira4MtOzcALXGJpd6/PZjuapjHld7fG1YwU+tjsWVy4bojjF+JOCaPUnedmcibAW30= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: 9bf87824-ad19-4d8d-06ea-08d629306a69 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2018 13:02:03.8534 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1293 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: allow flow rule with attribute egress 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: Wed, 03 Oct 2018 13:02:05 -0000 Thanks, PSB. > -----Original Message----- > From: Yongseok Koh > Sent: Wednesday, October 3, 2018 10:28 AM > To: Dekel Peled > Cc: dev@dpdk.org; Shahaf Shuler ; Ori Kam > > Subject: Re: [PATCH] net/mlx5: allow flow rule with attribute egress >=20 > On Tue, Oct 02, 2018 at 11:06:07PM -0700, Dekel Peled wrote: > > Thanks, PSB. > > > > > -----Original Message----- > > > From: Yongseok Koh > > > Sent: Saturday, September 29, 2018 12:24 PM > > > To: Dekel Peled > > > Cc: dev@dpdk.org; Shahaf Shuler ; Ori Kam > > > > > > Subject: Re: [PATCH] net/mlx5: allow flow rule with attribute egress > > > > > > On Thu, Sep 27, 2018 at 05:25:30PM +0300, Dekel Peled wrote: > > > > This patch complements [1], adding to MLX5 PMD the option to set > > > > flow rule for egress traffic. > > > > > > > > [1] "net/mlx5: support metadata as flow rule criteria" > > > > http://mails.dpdk.org/archives/dev/2018-September/113275.html > > > > > > > > Signed-off-by: Dekel Peled > > > > --- > > > > drivers/net/mlx5/mlx5_flow.c | 54 > > > ++++++++++++++++++++++++++++++++++++++ > > > > drivers/net/mlx5/mlx5_flow.h | 6 +++++ > > > > drivers/net/mlx5/mlx5_flow_dv.c | 24 ++++++++++------- > > > > drivers/net/mlx5/mlx5_flow_verbs.c | 7 ++++- > > > > 4 files changed, 80 insertions(+), 11 deletions(-) > > > > > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c > > > > b/drivers/net/mlx5/mlx5_flow.c index 9581691..79a06df 100644 > > > > --- a/drivers/net/mlx5/mlx5_flow.c > > > > +++ b/drivers/net/mlx5/mlx5_flow.c > > > > @@ -644,6 +644,8 @@ uint32_t mlx5_flow_adjust_priority(struct > > > rte_eth_dev *dev, int32_t priority, > > > > * > > > > * @param[in] action_flags > > > > * Bit-fields that holds the actions detected until now. > > > > + * @param[in] attr > > > > + * Attributes of flow that includes this action. > > > > * @param[out] error > > > > * Pointer to error structure. > > > > * > > > > @@ -652,6 +654,7 @@ uint32_t mlx5_flow_adjust_priority(struct > > > rte_eth_dev *dev, int32_t priority, > > > > */ > > > > int > > > > mlx5_flow_validate_action_flag(uint64_t action_flags, > > > > + const struct rte_flow_attr *attr, > > > > struct rte_flow_error *error) { > > > > > > > > @@ -668,6 +671,12 @@ uint32_t mlx5_flow_adjust_priority(struct > > > rte_eth_dev *dev, int32_t priority, > > > > RTE_FLOW_ERROR_TYPE_ACTION, > > > NULL, > > > > "can't have 2 flag" > > > > " actions in same flow"); > > > > + if (attr->egress) > > > > + return rte_flow_error_set(error, ENOTSUP, > > > > + > > > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > > > + NULL, > > > > > > These two lines could be one line. > > Can't do, It exceeds the 80 characters limit. >=20 > if (attr->egress) > return rte_flow_error_set(error, ENOTSUP, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL, > 0123456789012345678901234567890123456789012345678901234567890123456 > 7890123456789 > "flag action not supported for " > "egress"); >=20 > Exactly 80 :-) Done. >=20 > Thanks, > Yongseok