From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9C247C2FE for ; Wed, 22 Apr 2015 10:26:29 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 22 Apr 2015 01:26:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,622,1422950400"; d="scan'208";a="484078104" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by FMSMGA003.fm.intel.com with ESMTP; 22 Apr 2015 01:26:27 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 22 Apr 2015 16:26:26 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.162]) by SHSMSX101.ccr.corp.intel.com ([10.239.4.153]) with mapi id 14.03.0224.002; Wed, 22 Apr 2015 16:26:25 +0800 From: "Wu, Jingjing" To: Thomas Monjalon Thread-Topic: [RFC PATCH] ethdev: remove old flow director API Thread-Index: AQHQe3QUkFul58B6FEebzLiBBP1XNp1V8+hA//+EaoCAAzfLgA== Date: Wed, 22 Apr 2015 08:26:25 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8C0A293@SHSMSX104.ccr.corp.intel.com> References: <1429539103-15885-1-git-send-email-thomas.monjalon@6wind.com> <9BB6961774997848B5B42BEC655768F8BFFDF1@SHSMSX104.ccr.corp.intel.com> <1828887.OHa7Y3J5bx@xps13> In-Reply-To: <1828887.OHa7Y3J5bx@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 08:26:30 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, April 20, 2015 11:00 PM > To: Wu, Jingjing > Cc: dev@dpdk.org > Subject: Re: [RFC PATCH] ethdev: remove old flow director API >=20 > 2015-04-20 14:32, Wu, Jingjing: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > It's time to remove this old API. > > > It seems some work is still needed to rely only on eth_ctrl API. > > > At least ixgbe, i40e and testpmd must be fixed. > > > Jingjing, do you think it's possible to remove all these structures > > > from rte_ethdev.h? > > > > > [Wu, Jingjing] Yes, I agree. > > But few comments list below. > > Beside the following change, some commands also need to be removed in t= estpmd. For the > ixgbe, code to the old APIs are already fixed. >=20 > > > --- a/lib/librte_ether/rte_ethdev.h > > > +++ b/lib/librte_ether/rte_ethdev.h > > > @@ -672,42 +672,6 @@ struct rte_eth_pfc_conf { > > > }; > > > > > > /** > > > - * Memory space that can be configured to store Flow Director filte= rs > > > - * in the board memory. > > > - */ > > > -enum rte_fdir_pballoc_type { > > > - RTE_FDIR_PBALLOC_64K =3D 0, /**< 64k. */ > > > - RTE_FDIR_PBALLOC_128K, /**< 128k. */ > > > - RTE_FDIR_PBALLOC_256K, /**< 256k. */ > > > -}; >=20 > This is hardware-related. Why should it be part of the API? >=20 > > > - > > > -/** > > > - * Select report mode of FDIR hash information in RX descriptors. > > > - */ > > > -enum rte_fdir_status_mode { > > > - RTE_FDIR_NO_REPORT_STATUS =3D 0, /**< Never report FDIR hash. */ > > > - RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkt= s. */ > > > - RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */ > > > -}; > > > - > > > -/** > > > - * A structure used to configure the Flow Director (FDIR) feature > > > - * of an Ethernet port. > > > - * > > > - * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored. > > > - */ > > > -struct rte_fdir_conf { > > > - enum rte_fdir_mode mode; /**< Flow Director mode. */ > > > - enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */ > > > - enum rte_fdir_status_mode status; /**< How to report FDIR hash. */ > > > - /** RX queue of packets matching a "drop" filter in perfect mode. *= / > > > - uint8_t drop_queue; > > > - struct rte_eth_fdir_masks mask; > > > - struct rte_eth_fdir_flex_conf flex_conf; > > > - /**< Flex payload configuration. */ > > > -}; > > > - > > [Wu, Jingjing] This structures and above types are useful about global = configuration. They > can't be removed. >=20 > Why? I thought eth_ctrl API would be enough. > It seems strange to have a part of the flow director API in rte_eth_ctrl.= h and > another part in rte_ethdev.h. Other filters have no impact on rte_ethdev.= h. rte_fdir_conf in rte_eth_conf is used when rte_eth_dev_configure to set ini= tialization parameters which cann't be changed at running time. For example, if we disable the flow director, we can set the mode in it to = RTR_FDIR_DISABLE, then the resource will not be allocated for flow director= . The way is the same as rss_conf in rte_eth_conf. While the filter_ctrl can = provide interface to configure parameters or add/delete rules at device run= ning time.