> -----Original Message----- > From: Ferruh Yigit <ferruh.yi...@amd.com> > Sent: Friday, February 17, 2023 9:00 PM > To: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru>; Jiawei(Jonny) > Wang <jiaw...@nvidia.com>; Slava Ovsiienko <viachesl...@nvidia.com>; Ori > Kam <or...@nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL) > <tho...@monjalon.net>; Aman Singh <aman.deep.si...@intel.com>; Yuying > Zhang <yuying.zh...@intel.com> > Cc: dev@dpdk.org; Raslan Darawsheh <rasl...@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.