From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0066.outbound.protection.outlook.com [104.47.1.66]) by dpdk.org (Postfix) with ESMTP id 4E7BD23C; Tue, 17 Jul 2018 07:16:00 +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=x8gM/lQB1fqNmW0+W/BXZusyCu0skzVACi3eWYwsGsU=; b=uSQ8Ugah12+qf9kULb8wAmwYm2+ySMUInwESjnDkQqWdRoUAA8c0hdj7j7aNXKy0YYgyPWiWPgm59ReFF+kEZsjDkMbPl4PpSr7N0ncQ2jKl8n3ExeAL2uR3mOHSVBIE43rwB4SICdTXMawNBpzFYIzC6cgcK5ZfzGY6tYp5Nzg= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB1554.eurprd05.prod.outlook.com (10.164.80.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.17; Tue, 17 Jul 2018 05:15:47 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::6d55:c970:605a:4106]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::6d55:c970:605a:4106%3]) with mapi id 15.20.0952.021; Tue, 17 Jul 2018 05:15:47 +0000 From: Ori Kam To: "Xu, Rosen" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "stable@dpdk.org" , "Gilmore, Walter E" Thread-Topic: [dpdk-dev] [PATCH] examples/flow_filtering: add rte_fdir_conf initialization Thread-Index: AQHUGYWFrol0AnxAPk+9mPXqGNnztqSLC2AAgAADX4CAAAOEEIAADCwAgAfHmyA= Date: Tue, 17 Jul 2018 05:15:47 +0000 Message-ID: References: <1531361387-116027-1-git-send-email-rosen.xu@intel.com> <0E78D399C70DA940A335608C6ED296D73A13DA82@SHSMSX104.ccr.corp.intel.com> <0E78D399C70DA940A335608C6ED296D73A13FDB8@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <0E78D399C70DA940A335608C6ED296D73A13FDB8@SHSMSX104.ccr.corp.intel.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=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB1554; 7:yksDSVw361s2ruRToZPyl2Bd7iL6e/Ua7Qi1ikaM/nDoViVS2hTPC2mRSye8NbekFD9dW27ARvtohiyFsyPY+lOwihMpQdOOjZzzhRAExSX9gMCPzhQjD2YiXnnF47e342pNePo9RCeNKMaBz/w/qew3Dl0pdSuK3RMlkzyrV6aP8bGEz+NC0XcqD6WVOKjVRoCwf7teNm/a2bYd6lKvnFFVHz47TaOVXp82JzBEwVSdvuJXiZRVJFEPFencgFuQ x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 4ecb319a-a8c9-4069-3bdd-08d5eba45b11 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB1554; x-ms-traffictypediagnostic: AM4PR05MB1554: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699)(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM4PR05MB1554; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB1554; x-forefront-prvs: 073631BD3D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(366004)(346002)(136003)(189003)(199004)(13464003)(8936002)(486006)(81166006)(53546011)(26005)(2906002)(6246003)(81156014)(6506007)(256004)(106356001)(6436002)(105586002)(97736004)(25786009)(68736007)(102836004)(110136005)(316002)(55016002)(99286004)(186003)(54906003)(229853002)(305945005)(7696005)(74316002)(76176011)(7736002)(6116002)(9686003)(53936002)(66066001)(11346002)(2501003)(446003)(86362001)(3846002)(5660300001)(33656002)(476003)(93886005)(2900100001)(14454004)(5250100002)(478600001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB1554; H:AM4PR05MB3425.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: i7ex2Dyo0h2PuplPduiKUCGdQZV86jXzF11VZ95+BY1uSd94UC1ewbd8ZIr5dWMvA9olY1AAtTZbhjkdfa9uyJTDxAN4OuaFfWhpbNs5qm3FjObnIlYLYdHZWD7G+3+/11JrkfuR78DOHMvgX5NUCxyfg31qDU03ngWr1rFB3VLlqJnAGRmCHM/xx0bCvUwkJG/wvaaVmUdVWdATDYzDwt1BuIyDZ4DuStQ60OnphOlo5LjyazJvPysMY10r755TBhIH8/q41PoIuc6QBq1XQNXIXHn5vwsRYWIVSmahW3mUqlrG7ED3iYqylA8L9P/wJJHOt9uGo5+ZVnrK35C+9bd4NF3x7uPcqVevW9BXWN8= 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: 4ecb319a-a8c9-4069-3bdd-08d5eba45b11 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2018 05:15:47.7031 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB1554 Subject: Re: [dpdk-dev] [PATCH] examples/flow_filtering: add rte_fdir_conf initialization 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: Tue, 17 Jul 2018 05:16:01 -0000 Sorry for the late response, > -----Original Message----- > From: Xu, Rosen [mailto:rosen.xu@intel.com] > Sent: Thursday, July 12, 2018 9:23 AM > To: Ori Kam ; dev@dpdk.org > Cc: Yigit, Ferruh ; stable@dpdk.org; Gilmore, Wal= ter > E > Subject: RE: [dpdk-dev] [PATCH] examples/flow_filtering: add rte_fdir_con= f > initialization >=20 > Hi Ori, >=20 > Pls see my reply. >=20 > Hi Walter and Ferruh, >=20 > I need your voice :) >=20 > > -----Original Message----- > > From: Ori Kam [mailto:orika@mellanox.com] > > Sent: Thursday, July 12, 2018 13:58 > > To: Xu, Rosen ; dev@dpdk.org > > Cc: Yigit, Ferruh ; stable@dpdk.org > > Subject: RE: [dpdk-dev] [PATCH] examples/flow_filtering: add > rte_fdir_conf > > initialization > > > > Hi, > > > > PSB > > > > > -----Original Message----- > > > From: Xu, Rosen [mailto:rosen.xu@intel.com] > > > Sent: Thursday, July 12, 2018 8:27 AM > > > To: Ori Kam ; dev@dpdk.org > > > Cc: Yigit, Ferruh ; stable@dpdk.org > > > Subject: RE: [dpdk-dev] [PATCH] examples/flow_filtering: add > > > rte_fdir_conf initialization > > > > > > Hi Ori, > > > > > > examples/flow_filtering sample app fails on i40e [1] because i40e > > > requires explicit FDIR configuration. > > > > > > But rte_flow in and hardware independent ways of describing > > > flow-action, it shouldn't require specific config options for specifi= c > > hardware. > > > > > > > I don't understand why using rte flow require the use of fdir. > > it doesn't make sense to me, that new API will need old one. >=20 > It's a good question, I also have this question about Mellanox NIC Driver > mlx5_flow.c. > In this file many flow functions call fdir. :) The only functions that are calling fdir are fdir function, and you can see that inside of the create function we convert the fdir=20 Into rte flow. >=20 > > > Is there any chance driver select the FDIR config automatically based > > > on rte_flow rule, unless explicitly a FDIR config set by user? > > > > I don't know how the i40e driver is implemented but I know that Mellano= x > > convert the other way around, if fdir is given it is converted to rte_f= low. >=20 > Firstly, rte_fdir_conf is part of rte_eth_conf definition. > struct rte_eth_conf { > ...... > struct rte_fdir_conf fdir_conf; /**< FDIR configuration. */ > ...... > }; > Secondly, default value of rte_eth_conf.fdir_conf.mode is > RTE_FDIR_MODE_NONE, which means Disable FDIR support. > Thirdly, flow_filtering should align with test-pmd, in test-pmd all fdir_= conf is > initialized. >=20 This sounds to me correct we don't want to enable fdir. Why should the example app for rte flow use fdir? And align to=20 testpmd which support everything in in all modes? > > > > > > > > [1] > > > Flow can't be created 1 message: Check the mode in fdir_conf. > > > EAL: Error - exiting with code: 1 > > > > > > > -----Original Message----- > > > > From: Ori Kam [mailto:orika@mellanox.com] > > > > Sent: Thursday, July 12, 2018 13:17 > > > > To: Xu, Rosen ; dev@dpdk.org > > > > Cc: Yigit, Ferruh ; stable@dpdk.org; Ori Ka= m > > > > > > > > Subject: RE: [dpdk-dev] [PATCH] examples/flow_filtering: add > > > rte_fdir_conf > > > > initialization > > > > > > > > Hi Rosen, > > > > > > > > Why do the fdir_conf must be initialized? > > > > > > > > What is the issue you are seeing? > > > > > > > > Best, > > > > Ori > > > > > > > > > -----Original Message----- > > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rosen Xu > > > > > Sent: Thursday, July 12, 2018 5:10 AM > > > > > To: dev@dpdk.org > > > > > Cc: rosen.xu@intel.com; ferruh.yigit@intel.com; Ori Kam > > > > > ; stable@dpdk.org > > > > > Subject: [dpdk-dev] [PATCH] examples/flow_filtering: add > rte_fdir_conf > > > > > initialization > > > > > > > > > > Rte_fdir_conf of rte_eth_conf should be initialized before port > > > > > initialization. > > > > > > > > > > Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of > > flow > > > > > API") > > > > > Cc: stable@dpdk.org > > > > > > > > > > Signed-off-by: Rosen Xu > > > > > --- > > > > > examples/flow_filtering/main.c | 6 ++++++ > > > > > 1 file changed, 6 insertions(+) > > > > > > > > > > diff --git a/examples/flow_filtering/main.c > > > > > b/examples/flow_filtering/main.c index f595034..aa03e23 100644 > > > > > --- a/examples/flow_filtering/main.c > > > > > +++ b/examples/flow_filtering/main.c > > > > > @@ -132,6 +132,12 @@ > > > > > DEV_TX_OFFLOAD_SCTP_CKSUM | > > > > > DEV_TX_OFFLOAD_TCP_TSO, > > > > > }, > > > > > + .fdir_conf =3D { > > > > > + .mode =3D RTE_FDIR_MODE_PERFECT, > > > > > + .pballoc =3D RTE_FDIR_PBALLOC_64K, > > > > > + .status =3D RTE_FDIR_REPORT_STATUS, > > > > > + .drop_queue =3D 127, > > > > > + }, > > > > > }; > > > > > struct rte_eth_txconf txq_conf; > > > > > struct rte_eth_rxconf rxq_conf; > > > > > -- > > > > > 1.8.3.1 Best, Ori