[PATCH v6 1/2] ethdev: add Tx queue mapping of aggregated ports
Jiawei(Jonny) Wang
jiaweiw at nvidia.com
Fri Feb 17 14:05:21 CET 2023
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at amd.com>
> Sent: Friday, February 17, 2023 9:00 PM
> To: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>; Jiawei(Jonny)
> Wang <jiaweiw at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>; Ori
> Kam <orika at nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas at monjalon.net>; Aman Singh <aman.deep.singh at intel.com>; Yuying
> Zhang <yuying.zhang at intel.com>
> Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>
> Subject: Re: [PATCH v6 1/2] ethdev: add Tx queue mapping of aggregated ports
>
> On 2/17/2023 12:56 PM, Andrew Rybchenko wrote:
> >> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
> >> index 6a550cfc83..b7fdc454a8 100644
> >> --- a/lib/ethdev/ethdev_driver.h
> >> +++ b/lib/ethdev/ethdev_driver.h
> >> @@ -1171,6 +1171,40 @@ typedef int (*eth_tx_descriptor_dump_t)(const
> >> struct rte_eth_dev *dev,
> >> uint16_t queue_id, uint16_t offset,
> >> uint16_t num, FILE *file);
> >> +/**
> >> + * @internal
> >> + * Get the number of aggregated ports.
> >> + *
> >> + * @param port_id
> >> + * The port identifier of the Ethernet device.
> >> + *
> >> + * @return
> >> + * Negative errno value on error, 0 or positive on success.
> >> + *
> >> + * @retval >=0
> >> + * The number of aggregated port if success.
> >> + * @retval -ENOTSUP
> >> + * Get aggregated ports API is not supported.
> >> + */
> >> +typedef int (*eth_count_aggr_ports_t)(uint16_t port_id);
> >
> > Why does use port_id as the first parameter whereas all other driver
> > callbacks use 'struct rte_eth_dev *'?
>
> Ahh, this is wrong, internal functions should use 'struct rte_eth_dev *', not
> port_id handler.
>
> Thanks Andrew for catching it.
Thanks Andrew and Ferruh, I will send the new version to fix it.
More information about the dev
mailing list