[dpdk-dev] [PATCH v2 4/5] net/ark: generalize meta data between FPGA and PMD

Ferruh Yigit ferruh.yigit at intel.com
Fri Mar 5 16:31:33 CET 2021


On 3/4/2021 8:33 PM, Ed Czeck wrote:
> In this commit we generalize the movement of user-specified
> meta data between mbufs and FPGA AXIS tuser fields using
> user-defined hook functions.
> 
> - Previous use of PMD dynfields are removed
> - Hook function added to ark_user_ext
> - Add hook function calls in rx and tx paths
> - Rename all extension function with rte_pmd_ark prefix

Can you please move this rename on its own patch, it is causing too much noise 
for this patch.

> - Move extension prototype to rte_pmd_ark.h
> - Update documentation with an extension example
>

+1

> Signed-off-by: Ed Czeck <ed.czeck at atomicrules.com>

<...>

> +/**
> + * Extension prototype, optional implementation.
> + * Called during rte_eth_rx_burst() for each packet. This extension
> + * function allows the transfer of meta data from the user's FPGA to
> + * mbuf fields.
> + *
> + * @param mbuf
> + *   The newly received mbuf
> + * @param meta
> + *   The meta data from the user, up to 20 bytes.
> + * @param user_data
> + *   user argument from dev_init() call.
> + */
> +void rte_pmd_ark_rx_user_meta_hook(struct rte_mbuf *mbuf,
> +				   const uint32_t *meta,
> +				   void *user_data);
>   

<...>

> +/**
> + * Extension prototype, optional implementation.
> + * Called during rte_eth_tx_burst() for each packet. This extension
> + * function allows the transfer of data from the mbuf to the user's
> + * FPGA.  Up to 20 bytes (5 32-bit words) are transferable
> + *
> + * @param mbuf
> + *   The mbuf about to be transmitted.
> + * @param meta
> + *   The meta data to be populate by this call.
> + * @param meta_cnt
> + *   The count in 32-bit words of the meta data populated, 0 to 5.
> + * @param user_data
> + *   user argument from dev_init() call.
> + */
> +void rte_pmd_ark_tx_user_meta_hook(const struct rte_mbuf *mbuf,
> +				   uint32_t *meta,
> +				   uint8_t *meta_cnt,
> +				   void *user_data);
>   

Why not define 'meta' as "void *" eventually it won't be used as "uint32_t *" 
and will be caseted, isn't it?
Same for both APIs.


More information about the dev mailing list