On Tue, Oct 03, 2023 at 05:03:28PM +0000, Jerin Jacob Kollanukkaran wrote: > > > > -----Original Message----- > > From: Bruce Richardson <[email protected]> > > Sent: Tuesday, October 3, 2023 10:19 PM > > To: Pavan Nikhilesh Bhagavatula <[email protected]> > > Cc: Jerin Jacob Kollanukkaran <[email protected]>; Abdullah Sevincer > > <[email protected]>; Hemant Agrawal > > <[email protected]>; Sachin Saxena <[email protected]>; > > Mattias Rönnblom <[email protected]>; Liang Ma > > <[email protected]>; Peter Mccarthy <[email protected]>; Harry > > van Haaren <[email protected]>; [email protected] > > Subject: [EXT] Re: [PATCH] eventdev: fix max link profiles info > > > > External Email > > > > ---------------------------------------------------------------------- > > On Tue, Oct 03, 2023 at 08:55:35PM +0530, [email protected] > > wrote: > > > From: Pavan Nikhilesh <[email protected]> > > > > > > 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 <[email protected]> > > > --- > > > 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
Or call it "additional_profiles"? > 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/[email protected]/ > 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. > No, no strong opinions. /Bruce

