From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0084.outbound.protection.outlook.com [104.47.2.84]) by dpdk.org (Postfix) with ESMTP id 4B478200 for ; Wed, 3 Oct 2018 09:28:20 +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=l1iGNJsDYTY5yX8FuCplBImhAd8LugmU42enR9+Ie/c=; b=oCdAGzX7OuV0hZ6RwXE2t2rzn1tN38SpTaW+qi/XlMnI9GRYl27ocjHwzAqNE/cLoFVAu0kuwQ9ATSRn10awrwNmNeFYGCsAGCO4mAFrQ/vlzAUDXMISyeTcZ8+NtBbtnL36lOA0UQ4y4uZ/vn5LYNBoh49906hpzo1C1trrz+k= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Wed, 3 Oct 2018 07:28:17 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045%2]) with mapi id 15.20.1185.024; Wed, 3 Oct 2018 07:28:17 +0000 From: Yongseok Koh To: Dekel Peled CC: "dev@dpdk.org" , Shahaf Shuler , Ori Kam Thread-Topic: [PATCH] net/mlx5: allow flow rule with attribute egress Thread-Index: AQHUVm4267zlLzBSLUiKLz3GcDnD5KUGiiuAgAaHUYCAABbngA== Date: Wed, 3 Oct 2018 07:28:16 +0000 Message-ID: <20181003072804.GB21743@mtidpdk.mti.labs.mlnx> References: <1538058330-34990-1-git-send-email-dekelp@mellanox.com> <20180929092415.GB95127@minint-98vp2qg> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BL0PR02CA0085.namprd02.prod.outlook.com (2603:10b6:208:51::26) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB3980; 6:dxosUXJ5TUF466ygbeFdniXN6UwUgyiNIA300/3p9EMHqloEo7JOw1MGkrnoPVoRLsV6Y9Tyxa8o1s817t7d9CL/yqqy4pK/B6oBYl13CWh7F5v4B8Nws8UkahyaJDAWMN9Vm53ctx/0YDk5jZ6zV3UAwhcnhGAlnm7K8md6OWZHJxDbCLa9PSID5fL8bkr3FZmv5LVLErzyZWBo1YzFsdlvbyMSptSFPonnzKwyIfTDxqXJM8nRAGEjgBxjfOpWltsskZ9Ki/bRwk7znufJpc8lM2ylBOQ2JXGXvlBAM+BwaKyfIOFC4yzmVYV74sWqv4Pflu/uPIqwyZa0OkNskzcb4FU4VLIS7JzoRbdFVwxWNvuThBsQ68R7Y97TBuE+Ia5XhDVpJGfhoasL0BARLeSpDYErcSBEIgXrOPceqDOu83wcCCTnwCI0Md3SXo1QM+wrFWKNqWvZLIifa6P6tA==; 5:dagjXrwqNXiNwmX6KGJTwPbGHyihhbTd9EPkl/ZK0SFDGwV2VcMzu9wBEGbaX+75EFOj+SRbg6ilysOvXXm0Y8msc/xFwnTzg5WZJSyE5bea2RqV6zF/hqLzWNwUYsGm96T9QSEjIW2tWSXBflrzjU0hICjaapZ7g/b/cn1EeFM=; 7:JSEkc10wZm8vO8lWJjMpM20/phEmu+0dSUQDs4oyA04kZucR9G5LmN0/8fEsjpZWvxIskUBLpM5vrHbmdLY3vqD8hWHQ4jQiR7nRJbrl8Qmyy7CMrxtgW2HXfvGiOz4NPba0Ho8lYqCoOrmdf5QON0/z4mnt8AtUJuxld763Ooviosy7aI1W8807csBtSWLK7LhoNAFs0+g/3DTNzrQ3trtrPjAkL3Tnxsml1pGqbnP+2+Ab7kIaiw5OWJcGgP4Z x-ms-office365-filtering-correlation-id: 91f9ecc0-00dc-4c9c-fa64-08d62901c912 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:DB3PR0502MB3980; x-ms-traffictypediagnostic: DB3PR0502MB3980: 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)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991048); SRVR:DB3PR0502MB3980; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3980; x-forefront-prvs: 0814A2C7A3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(136003)(39860400002)(396003)(346002)(366004)(199004)(189003)(13464003)(5660300001)(6486002)(25786009)(97736004)(1076002)(229853002)(3846002)(6512007)(316002)(9686003)(7736002)(6436002)(305945005)(6306002)(26005)(54906003)(8676002)(76176011)(86362001)(386003)(486006)(33896004)(8936002)(446003)(99286004)(186003)(11346002)(476003)(14444005)(52116002)(53546011)(81156014)(81166006)(2900100001)(4326008)(106356001)(6116002)(66066001)(478600001)(68736007)(6246003)(53936002)(6506007)(256004)(107886003)(6862004)(14454004)(71200400001)(71190400001)(33656002)(966005)(102836004)(5250100002)(6636002)(105586002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3980; H:DB3PR0502MB3980.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-microsoft-antispam-message-info: rdV3CUM5QcfTzWRwVBNF7GxADEIsYjJH6zcs8k1QT9rHtO+1SW93hIyVsps0t3eR3N4JDUPETo8DljDlbKru2f5YW5Ytft/faXZ7ypqj+e3rlxprS5F2mL8pghpXp+3sJJkm1VaOuuKvME83aEJEdS7vPc294BTGLbhTzseUcSz9qxqHeJ6v2DIw2iJNSJC/39T88lxUNlssB2puAgG0FvRAOWWewG0nJr6AiW1iHn/UZjHazP0+4G7HgEi7fI7ww5D4eZc7PWfhXYJTjyCrwZEVYXyXDGFi5kpieYLqu85sM7mwEA0pj/CUDhmz0NpLjOMcjAWEzKjI8BYrDBh8pHvvj7+p+rSFoABgwX32nSo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91f9ecc0-00dc-4c9c-fa64-08d62901c912 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2018 07:28:16.9687 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3980 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 07:28:20 -0000 On Tue, Oct 02, 2018 at 11:06:07PM -0700, Dekel Peled wrote: > Thanks, PSB. >=20 > > -----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 > >=20 > > 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, > >=20 > > These two lines could be one line. > Can't do, It exceeds the 80 characters limit. if (attr->egress) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL, 012345678901234567890123456789012345678901234567890123456789012345678901234= 56789 "flag action not supported for " "egress"); Exactly 80 :-) Thanks, Yongseok