Hi Andrew, > -----Original Message----- > From: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru> > Sent: Monday, September 12, 2022 7:25 PM > To: Wang, YuanX <yuanx.w...@intel.com>; dev@dpdk.org; Thomas > Monjalon <tho...@monjalon.net>; Ferruh Yigit <ferruh.yi...@xilinx.com>; > Ray Kinsella <m...@ashroe.eu> > Cc: Li, Xiaoyun <xiaoyun...@intel.com>; Singh, Aman Deep > <aman.deep.si...@intel.com>; Zhang, Yuying <yuying.zh...@intel.com>; > Zhang, Qi Z <qi.z.zh...@intel.com>; Yang, Qiming <qiming.y...@intel.com>; > jerinjac...@gmail.com; viachesl...@nvidia.com; > step...@networkplumber.org; Ding, Xuan <xuan.d...@intel.com>; > hpoth...@marvell.com; Tang, Yaqi <yaqi.t...@intel.com>; Wenxuan Wu > <wenxuanx...@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.w...@intel.com> > > Signed-off-by: Xuan Ding <xuan.d...@intel.com> > > Signed-off-by: Wenxuan Wu <wenxuanx...@intel.com> > > Nit below. Other than that: > Reviewed-by: Andrew Rybchenko <andrew.rybche...@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]