[rtems-libbsd commit] Add BRIDGE(4) support to configuration
Sebastian Huber
sebh at rtems.org
Thu Dec 15 08:53:27 UTC 2016
Module: rtems-libbsd
Branch: master
Commit: 546b38d6846526a8e2571004fd360ac70a7e5816
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=546b38d6846526a8e2571004fd360ac70a7e5816
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Dec 15 09:43:23 2016 +0100
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 ed2a97e..0297731 100644
--- a/rtemsbsd/include/machine/rtems-bsd-config.h
+++ b/rtemsbsd/include/machine/rtems-bsd-config.h
@@ -99,13 +99,23 @@ extern "C" {
#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 2c892da..3817ad2 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 32ae1d1..caf6194 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
More information about the vc
mailing list