[EXT] Re: [PATCH] eventdev: fix max link profiles info

Jerin Jacob Kollanukkaran jerinj at marvell.com
Tue Oct 3 19:03:28 CEST 2023



> -----Original Message-----
> From: Bruce Richardson <bruce.richardson at intel.com>
> Sent: Tuesday, October 3, 2023 10:19 PM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula at marvell.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; Abdullah Sevincer
> <abdullah.sevincer at intel.com>; Hemant Agrawal
> <hemant.agrawal at nxp.com>; Sachin Saxena <sachin.saxena at nxp.com>;
> Mattias Rönnblom <mattias.ronnblom at ericsson.com>; Liang Ma
> <liangma at liangbit.com>; Peter Mccarthy <peter.mccarthy at intel.com>; Harry
> van Haaren <harry.van.haaren at intel.com>; dev at dpdk.org
> Subject: [EXT] Re: [PATCH] eventdev: fix max link profiles info
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Tue, Oct 03, 2023 at 08:55:35PM +0530, pbhagavatula at marvell.com
> wrote:
> > From: Pavan Nikhilesh <pbhagavatula at marvell.com>
> >
> > Since most of the drivers overwrite the info structure passed from the
> > common layer it is not possible to set defaults in
> > ``rte_event_dev_info_get`` API.
> > Initialize default max_profiles_per_port in the driver layer.
> >
> > Fixes: 162aa4e1b479 ("eventdev: introduce link profiles")
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
> > ---
> > Please squash to 162aa4e1b479
> >
> Just wondering, is another valid approach to check the return value from the
> driver callback and set max_profiles to 1 if it's set to zero by the driver? That
> would save modifying all drivers and probably still fix any issues. [I'm assuming
> that max_profiles == 0 is invalid, and that every device by default should report
> "1" as supported]

I can think of three options

1)Change max_profile to max_profiles_minus_one as name
2)In generic info_get, fix up max_profile as one if max_profile is zero after PMD callback +  https://patches.dpdk.org/project/dpdk/patch/20231003150829.8257-1-pbhagavatula@marvell.com/
3) Or Keep as this patch.

Looks like (1) and (2) not very clean. I think, we can keep as (3) if you don't have strong opinion.



> 
> /Bruce


More information about the dev mailing list