[PATCH 2/4] net/nfp: add interface to check representor
Chaoyong He
chaoyong.he at corigine.com
Sat Feb 17 02:31:01 CET 2024
> On 2/10/2024 10:42 AM, Chaoyong He wrote:
> > From: Long Wu <long.wu at corigine.com>
> >
> > Add a interface to check if a device is a representor.
> >
> > Signed-off-by: Long Wu <long.wu at corigine.com>
> > Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
> > Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
>
> <...>
>
> > @@ -156,6 +156,12 @@ static const uint32_t nfp_net_link_speed_nfp2rte[] = {
> > [NFP_NET_CFG_STS_LINK_RATE_100G] =
> RTE_ETH_SPEED_NUM_100G,
> > };
> >
> > +bool
> > +nfp_net_dev_is_repr(const struct rte_eth_dev *eth_dev) {
> > + return ((eth_dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) !=
> 0);
> > +}
> > +
> >
>
> There is similar need for other drivers too,
> can you please add this as API for drivers (ethdev_driver.h), update
> existing usage in other drivers, and use it in your driver?
Okay, will do in next version patch, thanks.
More information about the dev
mailing list