From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 953557F14 for ; Wed, 29 Oct 2014 03:04:12 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 28 Oct 2014 19:11:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,807,1406617200"; d="scan'208";a="627327571" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by orsmga002.jf.intel.com with ESMTP; 28 Oct 2014 19:13:00 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 10:10:50 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.202]) with mapi id 14.03.0195.001; Wed, 29 Oct 2014 10:10:49 +0800 From: "Wu, Jingjing" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v4 11/21] ethdev: define structures for getting flow director information Thread-Index: AQHP7ZPY18ffdW3h50eCZwv1Qx7H45xFCVkAgAFP0JA= Date: Wed, 29 Oct 2014 02:10:49 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8B24F58@SHSMSX104.ccr.corp.intel.com> References: <1411711418-12881-1-git-send-email-jingjing.wu@intel.com> <1413939687-11177-1-git-send-email-jingjing.wu@intel.com> <1413939687-11177-12-git-send-email-jingjing.wu@intel.com> <2263852.MKHN7tgybq@xps13> In-Reply-To: <2263852.MKHN7tgybq@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] [PATCH v4 11/21] ethdev: define structures for getting flow director information 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, 29 Oct 2014 02:04:14 -0000 Hi, Thomas Thanks for your comments. Jingjing > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, October 28, 2014 9:45 PM > To: Wu, Jingjing > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 11/21] ethdev: define structures for > getting flow director information >=20 > 2014-10-22 09:01, Jingjing Wu: > > +/** > > + * A structure used to report the status of the flow director filters = in use. > > + */ > > +struct rte_eth_fdir { > > + /** Number of filters with collision indication. */ > > + uint16_t collision; > > + /** Number of free (non programmed) filters. */ > > + uint16_t free; > > + /** The Lookup hash value of the added filter that updated the value > > + of the MAXLEN field */ > > + uint16_t maxhash; > > + /** Longest linked list of filters in the table. */ > > + uint8_t maxlen; > > + /** Number of added filters. */ > > + uint64_t add; > > + /** Number of removed filters. */ > > + uint64_t remove; > > + /** Number of failed added filters (no more space in device). */ > > + uint64_t f_add; > > + /** Number of failed removed filters. */ > > + uint64_t f_remove; > > +}; >=20 > rte_eth_fdir is a name which doesn't say what it really is. > This structure looks like a collection of statistics. > Why not rte_eth_fdir_stats? >=20 This structure is used in old flow director API. I moved it from rte_ethdev= .h to rte_eth_ctrl.h and reuse it. As we discussed before, I think the old = and new APIs will co-exist for one version. I also thought the name is not = good enough, but I didn't change it because I want to keep the compatibilit= y with the API used for ixgbe. I think we can rename it when we are ready to remove the old flow director = APIs.=20 > > +struct rte_eth_fdir_ext { > > + uint16_t guarant_spc; /**< guaranteed spaces.*/ > > + uint16_t guarant_cnt; /**< Number of filters in guaranteed spaces. > */ > > + uint16_t best_spc; /**< best effort spaces.*/ > > + uint16_t best_cnt; /**< Number of filters in best effort spaces. = */ > > +}; >=20 > I don't understand why this "extended" structure is not merged in the fir= st > one. > Adding new fields don't break old API. >=20 Just as you say the name of rte_eth_fdir is not suitable, but I didn't want= to change=20 It. What I want to use for operation RTE_ETH_FILTER_INFO is structure=20 rte_eth_fdir_info. And then I define a new rte_eth_fdir_ext to get the info rte_eth_fdir doesn't contain. Of course we also can merger all the elements to the struct rte_eth_fdir_in= fo=20 Like below without reusing the old struct rte_eth_fdir, what do you think?= =20 struct rte_eth_fdir_info { int mode;=20 uint16_t collision; uint16_t free; uint16_t maxhash; uint8_t maxlen; uint64_t add; uint64_t remove; uint64_t f_add; uint64_t f_remove; uint16_t guarant_spc; uint16_t guarant_cnt; uint16_t best_spc; uint16_t best_cnt; }; > > +/** > > + * A structure used to get the status information of flow director fil= ter. > > + * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_INFO > operation. > > + */ >=20 > OK content of this comment is good. > But the second sentence has no start. > Please try to have an uppercase letter at the beginning of your sentences= , > and a subject followed by a verb. > (side note: this is also true for commit logs) >=20 OK, will change. > > +struct rte_eth_fdir_info { > > + int mode; /**< if 0 disbale, if 1 enable*/ >=20 > Typo: disbale >=20 OK, will change. > -- > Thomas