Messages in this thread | | | Subject | Re: [PATCH net-next v2 2/3] net: dsa: check out-of-range ageing time value | From | Florian Fainelli <> | Date | Wed, 15 Mar 2017 13:04:04 -0700 |
| |
On 03/15/2017 12:53 PM, Vivien Didelot wrote: > If a DSA switch driver cannot program an ageing time value due to it > being out-of-range, switchdev will raise a stack trace before failing. > > To fix this, add ageing_time_min and ageing_time_max members to the > dsa_switch in order for the switch drivers to optionally specify their > supported ageing time limits. > > The DSA core will now check for provided ageing time limits and return > -ERANGE from the switchdev prepare phase if the value is out-of-range. > > Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
You could simplify the two changes (and remove the check for ds->ageing_time_{min,max} by setting ds->ageing_time_min to ~0 by default. Absolutely not critical and the code is clear as-is. -- Florian
| |