Wed, Oct 02, 2019 at 10:40:56AM CEST, [email protected] wrote:
>From: Ido Schimmel <[email protected]>
>
>With the new notifications mlxsw does not need to handle identical
>routes itself, as this is taken care of by the core IPv4 code.
>
>Instead, mlxsw only needs to take care of inserting and removing routes
>from the device.
>
>Convert mlxsw to use the new IPv4 route notifications and simplify the
>code.
>
[...]
>@@ -6246,9 +6147,10 @@ static int mlxsw_sp_router_fib_event(struct
>notifier_block *nb,
> err = mlxsw_sp_router_fib_rule_event(event, info,
> router->mlxsw_sp);
> return notifier_from_errno(err);
>- case FIB_EVENT_ENTRY_ADD:
>+ case FIB_EVENT_ENTRY_ADD: /* fall through */
> case FIB_EVENT_ENTRY_REPLACE: /* fall through */
> case FIB_EVENT_ENTRY_APPEND: /* fall through */
Why don't you skip the three above with just return of NOTIFY_DONE?
>+ case FIB_EVENT_ENTRY_REPLACE_TMP:
> if (router->aborted) {
> NL_SET_ERR_MSG_MOD(info->extack, "FIB offload was
> aborted. Not configuring route");
> return notifier_from_errno(-EINVAL);
>--
>2.21.0
>