> -----Original Message-----
> From: Bruce Richardson <bruce.richard...@intel.com>
> Sent: Tuesday, October 3, 2023 10:19 PM
> To: Pavan Nikhilesh Bhagavatula <pbhagavat...@marvell.com>
> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Abdullah Sevincer
> <abdullah.sevin...@intel.com>; Hemant Agrawal
> <hemant.agra...@nxp.com>; Sachin Saxena <sachin.sax...@nxp.com>;
> Mattias Rönnblom <mattias.ronnb...@ericsson.com>; Liang Ma
> <lian...@liangbit.com>; Peter Mccarthy <peter.mccar...@intel.com>; Harry
> van Haaren <harry.van.haa...@intel.com>; dev@dpdk.org
> Subject: [EXT] Re: [PATCH] eventdev: fix max link profiles info
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Tue, Oct 03, 2023 at 08:55:35PM +0530, pbhagavat...@marvell.com
> wrote:
> > From: Pavan Nikhilesh <pbhagavat...@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 <pbhagavat...@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-pbhagavat...@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

Reply via email to