[ovs-dev] [PATCH 21/22] implement get_next_hop for NetBSD

YAMAMOTO Takashi yamamoto at valinux.co.jp
Wed Apr 24 23:26:25 UTC 2013


hi,

>> +static int
>> +netdev_bsd_get_next_hop(const struct in_addr *host, struct in_addr *next_hop,
>> +                        char **netdev_name)
>> +{
>> +#if defined(__NetBSD__)
> 
> Acked-by: Ed Maste <emaste at freebsd.org>
> 
> This is close to being usable on FreeBSD as well, with the exception
> that we don't have the RT_ADVANCE macro.  I'm happy to have this patch
> go in and then look at refactoring it to work on FreeBSD later on.

sure.  i don't expect much diverge on this ancient api. :-)

i think RT_ADVANCE for FreeBSD would be something like the following.
#define	RT_ADVANCE(x, n)	(x += SA_SIZE(x))

> 
> It seems like there should be an opportunity to share code between
> this function and route-table-bsd.c's route_table_get_name() too,
> although it's probably easier to do so after getting
> netdev_bsd_get_next_hop() working on FreeBSD first.

yes.
api-wise, they should share the same rtm_seq space.

YAMAMOTO Takashi

> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list