Subject: Re: [PATCH net-next] nfp: VF rate limit support

From: Jakub Kicinski <[email-masked]>
Date: Fri, 29 Apr 2022 11:03:47 -0700

On Fri, 29 Apr 2022 08:54:53 +0000 Bin Chen wrote:
> On Tue, 26 Apr 2022 7:53 AM, Jakub wrote:
> > On Fri, 22 Apr 2022 15:19:45 +0200 Simon Horman wrote:  
> > > +	if (max_tx_rate > 0 || min_tx_rate > 0) {
> > > +		if (max_tx_rate > 0 && max_tx_rate < min_tx_rate) {
> > > +			nfp_warn(app->cpp, "min-tx-rate exceeds max_tx_rate.\n");
> > > +			return -EINVAL;
> > > +		}  
> > 
> > This check should be moved to the core, I reckon.
> >  
> We agree with your suggestion, thanks. We plan to do this in two steps:
> 1.The firmware that currently support this feature will reject the nonzero min_tx_rate configuration, so the check here will not step in.  We will remove the check from driver site and upstream the patch. 
> 2.We will do more investigation jobs and add an appropriate check in the core.
> What do you think?

Sorry, I meant the second part of the condition only, basically
something like: