From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v7 01/11] ethdev: add API to query packet type filling info Date: Mon, 14 Mar 2016 10:44:30 +0100 Message-ID: <1827683.4pKzEQkioz@xps13> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Jianfeng Tan Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 5A62F2C6A for ; Mon, 14 Mar 2016 10:45:54 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id p65so93699033wmp.1 for ; Mon, 14 Mar 2016 02:45:54 -0700 (PDT) In-Reply-To: <1457551895-12077-2-git-send-email-jianfeng.tan@intel.com> 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" 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