From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v7 01/11] ethdev: add API to query packet type filling info Date: Mon, 14 Mar 2016 09:48:01 +0000 Message-ID: <20160314094800.GA24288@bricha3-MOBL3> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1457551895-12077-1-git-send-email-jianfeng.tan@intel.com> <1457551895-12077-2-git-send-email-jianfeng.tan@intel.com> <1827683.4pKzEQkioz@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jianfeng Tan , dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E62542C6A for ; Mon, 14 Mar 2016 10:48:04 +0100 (CET) Content-Disposition: inline In-Reply-To: <1827683.4pKzEQkioz@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Mar 14, 2016 at 10:44:30AM +0100, Thomas Monjalon wrote: > 2016-03-10 03:31, Jianfeng Tan: > > Add a new API rte_eth_dev_get_ptype_info to query whether/what packet > > type can be filled by given already started device or its pmd rx burst > > function has already been decided). > [...] > > /** > > + * Retrieve the packet type information of an Ethernet device. > > + * > > + * @note > > + * Better to invoke this API after the device is already started or rx burst > > + * function is decided, to obtain concise ptype information. > > + * @param port_id > > + * The port identifier of the Ethernet device. > > + * @param ptype_mask > > + * A hint of what kind of packet type which the caller is interested in. > > + * @param ptypes > > + * An array pointer to store adequent packet types, allocated by caller. > > + * @param num > > + * Size of the array pointed by param ptypes. > > + * @return > > + * - (>0) Number of ptypes supported. If it exceeds param num, exceeding > > + * packet types will not be filled in the given array. > > + * - (0 or -ENOTSUP) if PMD does not fill the specified ptype. > > + * - (-ENODEV) if *port_id* invalid. > > + */ > > +int rte_eth_dev_get_ptype_info(uint8_t port_id, uint32_t ptype_mask, > > + uint32_t *ptypes, int num); > > I think the word info is too vague. > What do you think of these names? > - rte_eth_dev_get_ptype_capa > - rte_eth_dev_get_supported_ptypes > +1 for supported_ptypes /Bruce