[PATCH v3 1/4] ethdev: introduce protocol header API

Wang, YuanX yuanx.wang at intel.com
Fri Sep 16 10:34:04 CEST 2022


Hi Andrew,

> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Sent: Monday, September 12, 2022 7:25 PM
> To: Wang, YuanX <yuanx.wang at intel.com>; dev at dpdk.org; Thomas
> Monjalon <thomas at monjalon.net>; Ferruh Yigit <ferruh.yigit at xilinx.com>;
> Ray Kinsella <mdr at ashroe.eu>
> Cc: Li, Xiaoyun <xiaoyun.li at intel.com>; Singh, Aman Deep
> <aman.deep.singh at intel.com>; Zhang, Yuying <yuying.zhang at intel.com>;
> Zhang, Qi Z <qi.z.zhang at intel.com>; Yang, Qiming <qiming.yang at intel.com>;
> jerinjacobk at gmail.com; viacheslavo at nvidia.com;
> stephen at networkplumber.org; Ding, Xuan <xuan.ding at intel.com>;
> hpothula at marvell.com; Tang, Yaqi <yaqi.tang at intel.com>; Wenxuan Wu
> <wenxuanx.wu at intel.com>
> Subject: Re: [PATCH v3 1/4] ethdev: introduce protocol header API
> 
> On 9/2/22 22:10, Yuan Wang wrote:
> > Add a new ethdev API to retrieve supported protocol headers of a PMD,
> > which helps to configure protocol header based buffer split.
> >
> > Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
> > Signed-off-by: Xuan Ding <xuan.ding at intel.com>
> > Signed-off-by: Wenxuan Wu <wenxuanx.wu at intel.com>
> 
> Nit below. Other than that:
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> 
> > diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
> > 1979dc0850..093c577add 100644
> > --- a/lib/ethdev/rte_ethdev.c
> > +++ b/lib/ethdev/rte_ethdev.c
> > @@ -5917,6 +5917,39 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE
> *file)
> >   	return eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev,
> file));
> >   }
> >
> > +int
> > +rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id,
> > +uint32_t *ptypes, int num) {
> > +	int i, j;
> > +	struct rte_eth_dev *dev;
> > +	const uint32_t *all_types;
> > +
> > +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
> > +	dev = &rte_eth_devices[port_id];
> > +
> > +	if (ptypes == NULL && num > 0) {
> > +		RTE_ETHDEV_LOG(ERR,
> > +			"Cannot get ethdev port %u supported header
> protocol types to NULL "
> > +			"when array size is non zero\n",
> 
> Do not split log message across many lines. Too long line is a less evil which is
> accepted by checkpatches.

Thanks, will update in v4.

Thanks,
Yuan

> 
> > +			port_id);
> > +		return -EINVAL;
> > +	}
> 
> [snip]


More information about the dev mailing list