Commit 3903249
mlxsw: spectrum_router: Do not query MAX_RIFS on each iteration
MLXSW_CORE_RES_GET involves a call to spectrum_core, a separate module.
Instead of making the call on every iteration, cache it up front, and use
the value.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 5afef67 commit 3903249
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7699 | 7699 | | |
7700 | 7700 | | |
7701 | 7701 | | |
| 7702 | + | |
7702 | 7703 | | |
7703 | 7704 | | |
7704 | | - | |
| 7705 | + | |
7705 | 7706 | | |
7706 | 7707 | | |
7707 | 7708 | | |
| |||
10041 | 10042 | | |
10042 | 10043 | | |
10043 | 10044 | | |
| 10045 | + | |
10044 | 10046 | | |
10045 | 10047 | | |
10046 | 10048 | | |
10047 | 10049 | | |
10048 | | - | |
| 10050 | + | |
10049 | 10051 | | |
10050 | 10052 | | |
10051 | 10053 | | |
| |||
0 commit comments