[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dpdk-dev
Subject:    Re: [dpdk-dev] [EXT] Re: [PATCH 3/3] l3fwd-power: add interrupt-only mode
From:       Harman Kalra <hkalra () marvell ! com>
Date:       2020-05-30 10:14:30
Message-ID: 20200530100228.GA24648 () outlook ! office365 ! com
[Download RAW message or body]

On Fri, May 29, 2020 at 03:19:45PM +0100, Burakov, Anatoly wrote:
> External Email
> 
> ----------------------------------------------------------------------
> On 29-May-20 2:19 PM, Harman Kalra wrote:
> 
> > >   	if (ret < 0)
> > >   		rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n");
> > > -	if (app_mode != APP_MODE_TELEMETRY && init_power_library())
> > > +	if (app_mode == APP_MODE_DEFAULT)
> > > +		app_mode = APP_MODE_LEGACY;
> > > +
> > > +	/* only legacy and empty poll mode rely on power library */
> > > +	if ((app_mode == APP_MODE_LEGACY || app_mode == APP_MODE_EMPTY_POLL) &&
> > > +			init_power_library())
> > >   		rte_exit(EXIT_FAILURE, "init_power_library failed\n");
> > Hi,
> > 
> > Rather than just exiting from here can we have a else condition to
> > automatically enter into the "interrupt only" mode.
> > Please correct me if I am missing something.
> 
> Hi,
> 
> Thanks for your review. I don't think silently proceeding is a good idea. If
> the user wants interrupt-only mode, they should request it. Silently falling
> back to interrupt-only mode will create an illusion of successful
> initialization and set the wrong expectation for how the application will
> behave.
> 

Hi,

Thanks for the explanation which even I also believe is logically perfect.

But since l3fwd-power is an old application and has many users around
which are currently using this app in interrupt only mode without giving
an extra argument. But suddenly they will start getting failure messages with
the new patchset.

My only intent with else condition was backward compatibility.
Or may be we can have more descriptive failure message, something like
"init_power_library failed, check manual for other modes".

Thanks
Harman


> -- 
> Thanks,
> Anatoly
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic