From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7E5D51B476; Thu, 12 Jul 2018 08:22:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 23:22:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,341,1526367600"; d="scan'208";a="71690325" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 11 Jul 2018 23:22:46 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 11 Jul 2018 23:22:45 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 11 Jul 2018 23:22:45 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.100]) with mapi id 14.03.0319.002; Thu, 12 Jul 2018 14:22:43 +0800 From: "Xu, Rosen" To: Ori Kam , "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: AQHUGZ+tQxtXwC0mrU+ZE/7J7YYBkKSLDmZA//+C3gCAAIiigA== Date: Thu, 12 Jul 2018 06:22:42 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D73A13FDB8@SHSMSX104.ccr.corp.intel.com> References: <1531361387-116027-1-git-send-email-rosen.xu@intel.com> <0E78D399C70DA940A335608C6ED296D73A13DA82@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDBmYjA2MzUtMWE5NC00ZWQyLThkZmMtM2FmNTNkZDNjMmQ2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiazJKUGwwWk5NZ1ZGY3gzSnBMTFREcnZraWhcL1dUcmpRZlVIUGg5RTNHWWF4aWtvMldcL3liSjQrY2FqeHlJY3laIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Thu, 12 Jul 2018 06:22:49 -0000 Hi Ori, Pls see my reply. Hi Walter and Ferruh, I need your voice :) > -----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_con= f > initialization >=20 > Hi, >=20 > PSB >=20 > > -----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 specific > hardware. > > >=20 > 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. It's a good question, I also have this question about Mellanox NIC Driver m= lx5_flow.c. In this file many flow functions call fdir. :) > > Is there any chance driver select the FDIR config automatically based > > on rte_flow rule, unless explicitly a FDIR config set by user? >=20 > I don't know how the i40e driver is implemented but I know that Mellanox > convert the other way around, if fdir is given it is converted to rte_flo= w. 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_NON= E, which means Disable FDIR support. Thirdly, flow_filtering should align with test-pmd, in test-pmd all fdir_co= nf is initialized. =20 >=20 > > > > [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 Kam > > > > > > 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_c= onf > > > > 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