On Fri, Jan 3, 2025 at 5:56 PM Eelco Chaudron <[email protected]> wrote:
>
> On 18 Dec 2024, at 20:12, Frode Nordahl wrote:
>
> > The use of the variable name rtmsg for the global netlink notifier
> > callback buffer is confusing.
> >
> > It coincides both with the kernel uapi struct rtmsg and as an
> > abbreviation of the route-table module struct route_table_msg.
> >
> > One could be lead to believe that this buffer is used as storage
> > for all handling of route messages for the module, which is not
> > the case.
> >
> > Signed-off-by: Frode Nordahl <[email protected]>
>
> One comment below on the naming.
>
> Cheers,
>
> Eelco
>
> > ---
> >  lib/route-table.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/route-table.c b/lib/route-table.c
> > index be05a9ab5..4e8f35199 100644
> > --- a/lib/route-table.c
> > +++ b/lib/route-table.c
> > @@ -79,7 +79,7 @@ static struct vlog_rate_limit rl = 
> > VLOG_RATE_LIMIT_INIT(5, 20);
> >  static uint64_t rt_change_seq;
> >
> >  static struct nln *nln = NULL;
> > -static struct route_table_msg rtmsg;
> > +static struct route_table_msg nln_change;
>
> I guess it should still incorporate that it's a route message change. Maybe 
> nln_rtmsg_change or just rtmsg_change.

Done.

--
Frode Nordahl

> >  static struct nln_notifier *route_notifier = NULL;
> >  static struct nln_notifier *route6_notifier = NULL;
> >  static struct nln_notifier *name_notifier = NULL;
> > @@ -113,7 +113,7 @@ route_table_init(void)
> >      ovs_assert(!route6_notifier);
> >
> >      ovs_router_init();
> > -    nln = nln_create(NETLINK_ROUTE, route_table_parse, &rtmsg);
> > +    nln = nln_create(NETLINK_ROUTE, route_table_parse, &nln_change);
> >
> >      route_notifier =
> >          nln_notifier_create(nln, RTNLGRP_IPV4_ROUTE,
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to