[rtems-libbsd commit] Add DEFAULT_NETWORK_PAGE_MBUFS_SIZE to allow per BSP allocation domain sizes.

Chris Johns chrisj at rtems.org
Mon Jun 27 03:48:07 UTC 2016


Module:    rtems-libbsd
Branch:    master
Commit:    c6713d1b5134ddffb83ea21e5ed55587a46df5f6
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=c6713d1b5134ddffb83ea21e5ed55587a46df5f6

Author:    Chris Johns <chrisj at rtems.org>
Date:      Mon Jun 27 13:15:11 2016 +1000

Add DEFAULT_NETWORK_PAGE_MBUFS_SIZE to allow per BSP allocation domain sizes.

---

 testsuite/include/rtems/bsd/test/default-init.h         | 5 +++++
 testsuite/include/rtems/bsd/test/default-network-init.h | 6 ++++++
 testsuite/include/rtems/bsd/test/network-config.h.in    | 4 ++++
 3 files changed, 15 insertions(+)

diff --git a/testsuite/include/rtems/bsd/test/default-init.h b/testsuite/include/rtems/bsd/test/default-init.h
index 2f73442..9ddfd34 100644
--- a/testsuite/include/rtems/bsd/test/default-init.h
+++ b/testsuite/include/rtems/bsd/test/default-init.h
@@ -53,6 +53,11 @@ rtems_task Init(
   early_initialization();
 #endif
 
+#ifdef DEFAULT_NETWORK_PAGE_MBUFS_SIZE
+  rtems_bsd_allocator_domain_page_mbuf_size =
+    DEFAULT_NETWORK_PAGE_MBUFS_SIZE;
+#endif
+
   /* Let other tasks run to complete background work */
   default_set_self_prio( RTEMS_MAXIMUM_PRIORITY - 1 );
 
diff --git a/testsuite/include/rtems/bsd/test/default-network-init.h b/testsuite/include/rtems/bsd/test/default-network-init.h
index 1d69fd1..b627b1c 100644
--- a/testsuite/include/rtems/bsd/test/default-network-init.h
+++ b/testsuite/include/rtems/bsd/test/default-network-init.h
@@ -263,6 +263,11 @@ Init(rtems_task_argument arg)
 	assert(sc == RTEMS_SUCCESSFUL);
 #endif
 
+#ifdef DEFAULT_NETWORK_PAGE_MBUFS_SIZE
+	rtems_bsd_allocator_domain_page_mbuf_size =
+	  DEFAULT_NETWORK_PAGE_MBUFS_SIZE;
+#endif
+
 	rtems_bsd_initialize();
 
 #ifndef DEFAULT_NETWORK_NO_INTERFACE_0
@@ -367,6 +372,7 @@ SYSINIT_NEED_NET_IF_VLAN;
 #define CONFIGURE_SHELL_COMMAND_MV
 #define CONFIGURE_SHELL_COMMAND_RM
 #define CONFIGURE_SHELL_COMMAND_MALLOC_INFO
+#define CONFIGURE_SHELL_COMMAND_SHUTDOWN
 
 #include <rtems/shellconfig.h>
 
diff --git a/testsuite/include/rtems/bsd/test/network-config.h.in b/testsuite/include/rtems/bsd/test/network-config.h.in
index c652e74..eca4241 100644
--- a/testsuite/include/rtems/bsd/test/network-config.h.in
+++ b/testsuite/include/rtems/bsd/test/network-config.h.in
@@ -46,6 +46,10 @@
   #define NET_CFG_INTERFACE_0 "lo0"
 #endif
 
+#if defined(LIBBSP_I386_PC386_BSP_H)
+#define DEFAULT_NETWORK_PAGE_MBUFS_SIZE (64 * 1024 * 1024)
+#endif
+
 #define NET_CFG_SELF_IP "@NET_CFG_SELF_IP@"
 
 #define NET_CFG_NETMASK "@NET_CFG_NETMASK@"



More information about the vc mailing list