From 546b38d6846526a8e2571004fd360ac70a7e5816 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 15 Dec 2016 09:43:23 +0100 Subject: Add BRIDGE(4) support to configuration --- rtemsbsd/include/machine/rtems-bsd-config.h | 17 ++++++++++++++--- rtemsbsd/include/machine/rtems-bsd-sysinit.h | 3 +++ testsuite/include/rtems/bsd/test/default-init.h | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/rtemsbsd/include/machine/rtems-bsd-config.h b/rtemsbsd/include/machine/rtems-bsd-config.h index ed2a97ee..02977318 100644 --- a/rtemsbsd/include/machine/rtems-bsd-config.h +++ b/rtemsbsd/include/machine/rtems-bsd-config.h @@ -98,14 +98,24 @@ extern "C" { #define RTEMS_BSD_CFGDECL_NET_PF_UNIX #endif /* RTEMS_BSD_CONFIG_NET_PF_UNIX */ +/* + * Bridging. + * https://www.freebsd.org/doc/handbook/network-bridging.html + */ +#if defined(RTEMS_BSD_CONFIG_NET_IF_BRIDGE) + #define RTEMS_BSD_CFGDECL_NET_IF_BRIDGE SYSINIT_NEED_NET_IF_BRIDGE +#else + #define RTEMS_BSD_CFGDECL_NET_IF_BRIDGE +#endif /* RTEMS_BSD_CONFIG_NET_IF_BRIDGE */ + /* * Link Aggregation and Failover. * https://www.freebsd.org/doc/handbook/network-aggregation.html */ #if defined(RTEMS_BSD_CONFIG_NET_IF_LAGG) - #define RTEMS_BSD_CFGDECL_IF_LAGG SYSINIT_NEED_NET_IF_LAGG + #define RTEMS_BSD_CFGDECL_NET_IF_LAGG SYSINIT_NEED_NET_IF_LAGG #else - #define RTEMS_BSD_CFGDECL_IF_LAGG + #define RTEMS_BSD_CFGDECL_NET_IF_LAGG #endif /* RTEMS_BSD_CONFIG_NET_IF_LAGG */ /* @@ -188,7 +198,8 @@ extern "C" { * Create the networking modules and interfaces. */ RTEMS_BSD_CFGDECL_NET_PF_UNIX; - RTEMS_BSD_CFGDECL_IF_LAGG; + RTEMS_BSD_CFGDECL_NET_IF_BRIDGE; + RTEMS_BSD_CFGDECL_NET_IF_LAGG; RTEMS_BSD_CFGDECL_NET_IF_VLAN; /* diff --git a/rtemsbsd/include/machine/rtems-bsd-sysinit.h b/rtemsbsd/include/machine/rtems-bsd-sysinit.h index 2c892da6..3817ad25 100644 --- a/rtemsbsd/include/machine/rtems-bsd-sysinit.h +++ b/rtemsbsd/include/machine/rtems-bsd-sysinit.h @@ -111,6 +111,9 @@ #define SYSINIT_NEED_NET_IF_DC \ SYSINIT_DRIVER_REFERENCE(dc, pci) +#define SYSINIT_NEED_NET_IF_BRIDGE \ + SYSINIT_MODULE_REFERENCE(if_bridge) + #define SYSINIT_NEED_NET_IF_LAGG \ SYSINIT_MODULE_REFERENCE(if_lagg) diff --git a/testsuite/include/rtems/bsd/test/default-init.h b/testsuite/include/rtems/bsd/test/default-init.h index 32ae1d14..caf6194e 100644 --- a/testsuite/include/rtems/bsd/test/default-init.h +++ b/testsuite/include/rtems/bsd/test/default-init.h @@ -77,6 +77,7 @@ rtems_task Init( * Configure LibBSD. */ #define RTEMS_BSD_CONFIG_NET_PF_UNIX +#define RTEMS_BSD_CONFIG_NET_IF_BRIDGE #define RTEMS_BSD_CONFIG_NET_IF_LAGG #define RTEMS_BSD_CONFIG_NET_IF_VLAN #define RTEMS_BSD_CONFIG_INIT -- cgit v1.2.3