[dpdk-dev] [PATCH v7 01/11] ethdev: add API to query packet type filling info

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Mar 14 10:44:30 CET 2016


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



More information about the dev mailing list