On Thu, Nov 14, 2024 at 01:32:38PM +0100, Eelco Chaudron wrote:
> On 24 Oct 2024, at 17:46, Felix Huettner via dev wrote:
> 
> > Sometimes it is not easily possible to convert the interface index to a
> > name. Especially if we run in network namespaces.
> > To still be able to act on existing information we also return the
> > ifindex now.

Hi Eelco,

> 
> Why are we not changing the namespace and getting the interface name? Is this 
> too much of an overhead?

thanks for the feedback.
I changed the implementation in the next version.
That also makes the OVN side significantly more useable.

> 
> In addition, if the interface is not found, we set change->relevant = false, 
> how does this affect the overall implementation?

I would assume this is addressed with the change above.

Thanks a lot
Felix

> 
> //Eelco
> 
> >
> > Signed-off-by: Felix Huettner <[email protected]>
> > ---
> >  lib/route-table.c | 1 +
> >  lib/route-table.h | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/lib/route-table.c b/lib/route-table.c
> > index 80325f6f9..ce70382a4 100644
> > --- a/lib/route-table.c
> > +++ b/lib/route-table.c
> > @@ -228,6 +228,7 @@ route_table_add_nexthop(struct route_table_msg *change,
> >          }
> >      }
> >
> > +    nh->ifindex = ifindex;
> >      if (ifindex && !if_indextoname(ifindex, nh->ifname)) {
> >          int error = errno;
> >
> > diff --git a/lib/route-table.h b/lib/route-table.h
> > index f96dbebb3..bcc3205e8 100644
> > --- a/lib/route-table.h
> > +++ b/lib/route-table.h
> > @@ -30,6 +30,7 @@
> >
> >  struct route_data_nexthop {
> >      struct in6_addr rta_gw;
> > +    uint32_t ifindex;
> >      char ifname[IFNAMSIZ]; /* Interface name. */
> >  };
> >
> > --
> 
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to