[dpdk-dev] [PATCH v4 1/4] ethdev: add the API for getting burst mode information

Wang, Haiyue haiyue.wang at intel.com
Thu Oct 31 12:16:17 CET 2019


> -----Original Message-----
> From: Jerin Jacob <jerinjacobk at gmail.com>
> Sent: Thursday, October 31, 2019 18:46
> To: Wang, Haiyue <haiyue.wang at intel.com>
> Cc: Yigit, Ferruh <ferruh.yigit at intel.com>; Thomas Monjalon <thomas at monjalon.net>; dpdk-dev
> <dev at dpdk.org>; Ye, Xiaolong <xiaolong.ye at intel.com>; Kinsella, Ray <ray.kinsella at intel.com>;
> Iremonger, Bernard <bernard.iremonger at intel.com>; Sun, Chenmin <chenmin.sun at intel.com>; Andrew
> Rybchenko <arybchenko at solarflare.com>; Slava Ovsiienko <viacheslavo at mellanox.com>; Stephen Hemminger
> <stephen at networkplumber.org>; David Marchand <david.marchand at redhat.com>; Jerin Jacob
> <jerinj at marvell.com>
> Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add the API for getting burst mode information
> 
> > > 'rte_eth_burst_mode_option_name()' can get "struct rte_eth_burst_mode" as
> > > parameter and convert the 'options' to string and combine into single string as
> > > a helper function to the applications.
> > >
> >
> > Change:
> > const char *
> > rte_eth_burst_mode_option_name(uint64_t option)
> >
> > to:
> > int
> > rte_eth_burst_mode_option_name(struct rte_eth_burst_mode *mode, char *str) ?
> 
> 
> Since we are not ready to _remove_ flags in public API and rc2 time is
> ticking, probably the following the change
> would be enough. IMO, This API can be used only for logging purpose, I
> don't want to spend too
> many cycles on this discussion. I am leaving the decision to ethdev
> maintainers to accommodate
> the specifics of adding a string-based alternate options scheme.
> 

Thanks, Jerin.

> 
> [master][dpdk.org] $ git diff
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index c36c1b631..2f9d2c0a7 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -1272,8 +1272,11 @@ enum rte_eth_burst_mode_option {
>   * Ethernet device RX/TX queue packet burst mode information structure.
>   * Used to retrieve information about packet burst mode setting.
>   */
> +#define RTE_ETH_BURST_MODE_ALT_OPT_SIZE 128
> +
>  struct rte_eth_burst_mode {
>         uint64_t options;
> +       char alternate_options[RTE_ETH_BURST_MODE_ALT_OPT_SIZE];
>  };

+1


More information about the dev mailing list