lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Oct 2019 18:10:35 +0300
From:   Ido Schimmel <idosch@...sch.org>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, dsahern@...il.com,
        jiri@...lanox.com, jakub.kicinski@...ronome.com,
        saeedm@...lanox.com, mlxsw@...lanox.com,
        Ido Schimmel <idosch@...lanox.com>
Subject: Re: [RFC PATCH net-next 08/15] mlxsw: spectrum_router: Start using
 new IPv4 route notifications

On Wed, Oct 02, 2019 at 08:01:44PM +0200, Jiri Pirko wrote:
> Wed, Oct 02, 2019 at 07:52:30PM CEST, jiri@...nulli.us wrote:
> >Wed, Oct 02, 2019 at 10:40:56AM CEST, idosch@...sch.org wrote:
> >>From: Ido Schimmel <idosch@...lanox.com>
> >>
> >>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?
> 
> if (info->family == AF_INET)
> 	return NOTIFY_DONE;

It's not really needed given ADD and APPEND are not sent for AF_INET
after this patchset. But I did find out that I forgot to remove them
from mlxsw_sp_router_fib4_event(), so I'll do that in v1.

Thanks!

> 
> >
> >
> >>+	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
> >>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ