Changeset f01b1f72 in rtems-libbsd


Ignore:
Timestamp:
Jun 30, 2016, 1:42:49 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
fc26479
Parents:
dc5b267
Message:

Add RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE.

The domain allocator page abd mbuf size can be configured by the
user using RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE.

Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • libbsd.py

    rdc5b267 rf01b1f72  
    5959            'rtems/ipsec_get_policylen.c',
    6060            'rtems/rtems-bsd-arp-processor.c',
     61            'rtems/rtems-bsd-allocator-domain-size.c',
    6162            'rtems/rtems-bsd-get-allocator-domain-size.c',
    6263            'rtems/rtems-bsd-get-ethernet-addr.c',
  • libbsd_waf.py

    rdc5b267 rf01b1f72  
    10501050              'rtemsbsd/pppd/utils.c',
    10511051              'rtemsbsd/rtems/ipsec_get_policylen.c',
     1052              'rtemsbsd/rtems/rtems-bsd-allocator-domain-size.c',
    10521053              'rtemsbsd/rtems/rtems-bsd-arp-processor.c',
    10531054              'rtemsbsd/rtems/rtems-bsd-get-allocator-domain-size.c',
  • rtemsbsd/include/machine/rtems-bsd-config.h

    rdc5b267 rf01b1f72  
    2929 * Configuration defines:
    3030 *
    31  *  RTEMS_BSD_CONFIG_NET_PF_UNIX     : Packet Filter.
    32  *  RTEMS_BSD_CONFIG_NET_IF_LAGG     : Link Aggregetion and Failover.
    33  *  RTEMS_BSD_CONFIG_NET_IF_VLAN     : Virtual LAN.
    34  *  RTEMS_BSD_CONFIG_SERVICE_FTPD    : File Transfer Protocol (FTP).
    35  *  RTEMS_BSD_CONFIG_BSP_CONFIG      : Configure default BSP devices.
    36  *  RTEMS_BSD_CONFIG_INIT            : Configure the LibBSD support.
     31 *  RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE : Memory in bytes for mbufs
     32 *  RTEMS_BSD_CONFIG_NET_PF_UNIX            : Packet Filter.
     33 *  RTEMS_BSD_CONFIG_NET_IF_LAGG            : Link Aggregetion and Failover.
     34 *  RTEMS_BSD_CONFIG_NET_IF_VLAN            : Virtual LAN.
     35 *  RTEMS_BSD_CONFIG_SERVICE_FTPD           : File Transfer Protocol (FTP).
     36 *  RTEMS_BSD_CONFIG_BSP_CONFIG             : Configure default BSP devices.
     37 *  RTEMS_BSD_CONFIG_INIT                   : Configure the LibBSD support.
    3738 *
    3839 * Rules for adding to this file:
     
    6465#include <machine/rtems-bsd-rc-conf-services.h>
    6566
     67/*
     68 * Include the RTEMS BSD support.
     69 */
     70#include <rtems/bsd/bsd.h>
     71
    6672#ifdef __cplusplus
    6773extern "C" {
    6874#endif /* __cplusplus */
     75
     76/*
     77 * BSD Kernel configuration.
     78 */
     79#if defined(RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE)
     80  #define RTEMS_BSD_CFGDECL_DOMAIN_PAGE_MBUFS_SIZE RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE
     81#else
     82  #define RTEMS_BSD_CFGDECL_DOMAIN_PAGE_MBUFS_SIZE RTEMS_BSD_ALLOCATOR_DOMAIN_PAGE_MBUF_DEFAULT
     83#endif
    6984
    7085/*
     
    107122 */
    108123#if defined(RTEMS_BSD_CONFIG_INIT)
    109  /*
    110   * If a BSP configuration is requested include the Nexus bus BSP configuration.
    111   */
    112  #if defined(RTEMS_BSD_CONFIG_BSP_CONFIG)
    113   #include <bsp/nexus-devices.h>
    114  #endif
     124  /*
     125   * Configure the domain allocation memory size.
     126   */
     127  uintptr_t rtems_bsd_allocator_domain_page_mbuf_size = \
     128    RTEMS_BSD_CFGDECL_DOMAIN_PAGE_MBUFS_SIZE;
    115129
    116  /*
    117   * Create the networking modules and interfaces.
    118   */
    119  RTEMS_BSD_CFGDECL_NET_PF_UNIX;
    120  RTEMS_BSD_CFGDECL_IF_LAGG;
    121  RTEMS_BSD_CFGDECL_NET_IF_VLAN;
     130  /*
     131   * If a BSP configuration is requested include the Nexus bus BSP
     132   * configuration.
     133   */
     134  #if defined(RTEMS_BSD_CONFIG_BSP_CONFIG)
     135    #include <bsp/nexus-devices.h>
     136  #endif /* RTEMS_BSD_CONFIG_BSP_CONFIG */
    122137
    123  /*
    124   * Create the services.
    125   */
    126  RTEMS_BSD_CFGDECL_FTPD;
     138  /*
     139   * Create the networking modules and interfaces.
     140   */
     141  RTEMS_BSD_CFGDECL_NET_PF_UNIX;
     142  RTEMS_BSD_CFGDECL_IF_LAGG;
     143  RTEMS_BSD_CFGDECL_NET_IF_VLAN;
     144
     145  /*
     146   * Create the services.
     147   */
     148  RTEMS_BSD_CFGDECL_FTPD;
    127149#endif /* RTEMS_BSD_CONFIG_INIT */
    128150
  • rtemsbsd/include/rtems/bsd/bsd.h

    rdc5b267 rf01b1f72  
    5353#endif /* __cplusplus */
    5454
     55/*
     56 * The default memory size. Do not change, use
     57 * RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE to override for your application.
     58 */
     59#define RTEMS_BSD_ALLOCATOR_DOMAIN_PAGE_MBUF_DEFAULT (8 * 1024 * 1024)
     60
    5561typedef enum {
    5662        RTEMS_BSD_RES_IRQ = 1,
  • rtemsbsd/rtems/rtems-bsd-get-allocator-domain-size.c

    rdc5b267 rf01b1f72  
    4040#include <rtems/bsd/bsd.h>
    4141
    42 uintptr_t rtems_bsd_allocator_domain_page_mbuf_size = 8 * 1024 * 1024;
    43 
    4442uintptr_t
    4543rtems_bsd_get_allocator_domain_size(rtems_bsd_allocator_domain domain)
  • testsuite/include/rtems/bsd/test/default-init.h

    rdc5b267 rf01b1f72  
    5252#ifdef DEFAULT_EARLY_INITIALIZATION
    5353  early_initialization();
    54 #endif
    55 
    56 #ifdef DEFAULT_NETWORK_PAGE_MBUFS_SIZE
    57   rtems_bsd_allocator_domain_page_mbuf_size =
    58     DEFAULT_NETWORK_PAGE_MBUFS_SIZE;
    5954#endif
    6055
  • testsuite/include/rtems/bsd/test/default-network-init.h

    rdc5b267 rf01b1f72  
    264264#endif
    265265
    266 #ifdef DEFAULT_NETWORK_PAGE_MBUFS_SIZE
    267         rtems_bsd_allocator_domain_page_mbuf_size =
    268           DEFAULT_NETWORK_PAGE_MBUFS_SIZE;
    269 #endif
    270 
    271266        rtems_bsd_initialize();
    272267
     
    296291}
    297292
    298 #include <machine/rtems-bsd-sysinit.h>
    299 
    300 SYSINIT_NEED_NET_PF_UNIX;
    301 SYSINIT_NEED_NET_IF_LAGG;
    302 SYSINIT_NEED_NET_IF_VLAN;
    303 
    304 #include <bsp/nexus-devices.h>
     293/*
     294 * Configure LibBSD.
     295 */
     296#define RTEMS_BSD_CONFIG_NET_PF_UNIX
     297#define RTEMS_BSD_CONFIG_NET_IF_LAGG
     298#define RTEMS_BSD_CONFIG_NET_IF_VLAN
     299#define RTEMS_BSD_CONFIG_BSP_CONFIG
     300#define RTEMS_BSD_CONFIG_INIT
     301
     302#include <machine/rtems-bsd-config.h>
    305303
    306304#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
  • testsuite/include/rtems/bsd/test/network-config.h.in

    rdc5b267 rf01b1f72  
    4848
    4949#if defined(LIBBSP_I386_PC386_BSP_H)
    50 #define DEFAULT_NETWORK_PAGE_MBUFS_SIZE (64 * 1024 * 1024)
     50#define RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE (64 * 1024 * 1024)
    5151#endif
    5252
Note: See TracChangeset for help on using the changeset viewer.