Hi Andrew,

> -----Original Message-----
> From: Andrew Rybchenko <[email protected]>
> Sent: Monday, September 12, 2022 7:25 PM
> To: Wang, YuanX <[email protected]>; [email protected]; Thomas
> Monjalon <[email protected]>; Ferruh Yigit <[email protected]>;
> Ray Kinsella <[email protected]>
> Cc: Li, Xiaoyun <[email protected]>; Singh, Aman Deep
> <[email protected]>; Zhang, Yuying <[email protected]>;
> Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>;
> [email protected]; [email protected];
> [email protected]; Ding, Xuan <[email protected]>;
> [email protected]; Tang, Yaqi <[email protected]>; Wenxuan Wu
> <[email protected]>
> 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 <[email protected]>
> > Signed-off-by: Xuan Ding <[email protected]>
> > Signed-off-by: Wenxuan Wu <[email protected]>
> 
> Nit below. Other than that:
> Reviewed-by: Andrew Rybchenko <[email protected]>
> 
> > 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]

Reply via email to