Changeset 5c62b53 in rtems


Ignore:
Timestamp:
Feb 5, 2008, 10:29:19 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
f26747e
Parents:
068d7aa7
Message:

2008-02-05 Joel Sherrill <joel.sherrill@…>

  • libnetworking/kern/uipc_socket2.c, libnetworking/netinet/tcp_usrreq.c, libnetworking/netinet/udp_usrreq.c, libnetworking/rtems/rtems_bsdnet.h, libnetworking/rtems/rtems_glue.c: Add configuration parameters for network stack efficiency multiplier and default socket buffer sizes. Change default multiplier from 8 to 2 to match GNU/Linux. This has no impact on performance on the BSPs tested.
Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r068d7aa7 r5c62b53  
     12008-02-05      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libnetworking/kern/uipc_socket2.c,
     4        libnetworking/netinet/tcp_usrreq.c,
     5        libnetworking/netinet/udp_usrreq.c,
     6        libnetworking/rtems/rtems_bsdnet.h, libnetworking/rtems/rtems_glue.c:
     7        Add configuration parameters for network stack efficiency multiplier
     8        and default socket buffer sizes. Change default multiplier from 8 to
     9        2 to match GNU/Linux. This has no impact on performance on the BSPs
     10        tested.
     11
    1122008-02-04      Jennifer Averett <jennifer.averett@OARcorp.com>
    213
  • cpukit/libnetworking/kern/uipc_socket2.c

    r068d7aa7 r5c62b53  
    6565SYSCTL_INT(_kern, OID_AUTO, sockbuf_waste_factor, CTLFLAG_RW, &sb_efficiency,
    6666           0, "");
     67
     68#if defined(__rtems__)
     69  void rtems_set_sb_efficiency(
     70    u_long efficiency
     71  )
     72  {
     73    sb_efficiency = (efficiency == 0) ? 2 : efficiency;
     74  }
     75#endif
    6776
    6877/*
  • cpukit/libnetworking/netinet/tcp_usrreq.c

    r068d7aa7 r5c62b53  
    731731        CTLFLAG_RW, &tcp_recvspace , 0, "");
    732732
     733#if defined(__rtems__)
     734  void rtems_set_tcp_buffer_sizes(
     735    u_long sendspace,
     736    u_long recvspace
     737  )
     738  {
     739    if ( sendspace != 0 )
     740      tcp_sendspace = sendspace;
     741    if ( recvspace != 0 )
     742      tcp_recvspace = recvspace;
     743  }
     744#endif
     745
    733746/*
    734747 * Attach TCP protocol to socket, allocating
  • cpukit/libnetworking/netinet/udp_usrreq.c

    r068d7aa7 r5c62b53  
    580580        &udp_recvspace, 0, "");
    581581
     582#if defined(__rtems__)
     583  void rtems_set_udp_buffer_sizes(
     584    u_long sendspace,
     585    u_long recvspace
     586  )
     587  {
     588    if ( sendspace != 0 )
     589      udp_sendspace = sendspace;
     590    if ( recvspace != 0 )
     591      udp_recvspace = recvspace;
     592  }
     593#endif
     594
    582595/*ARGSUSED*/
    583596int
  • cpukit/libnetworking/rtems/rtems_bsdnet.h

    r068d7aa7 r5c62b53  
    155155        char                    *name_server[3];        /* BOOTP        */
    156156        char                    *ntp_server[3];         /* BOOTP        */
     157        /*
     158         *  Default "multiplier" on buffer size.  This is
     159         *  claimed by the TCP/IP implementation to be for
     160         *  efficiency but you will have to measure the
     161         *  benefit for buffering beyond double buffering
     162         *  in your own application.
     163         *
     164         *  The default value is 2.
     165         *
     166         *  See kern/uipc_socket2.c for details.
     167         */
     168        unsigned long           sb_efficiency;
     169        /*
     170         * Default UDP buffer sizes PER SOCKET!!
     171         *
     172         *   TX = 9216 -- max datagram size
     173         *   RX = 40 * (1024 + sizeof(struct sockaddr_in))
     174         *
     175         * See netinet/udp_usrreq.c for details
     176         */
     177        unsigned long           udp_tx_buf_size;
     178        unsigned long           udp_rx_buf_size;
     179        /*
     180         * Default UDP buffer sizes PER SOCKET!!
     181         *
     182         *   TX = 16 * 1024
     183         *   RX = 16 * 1024
     184         *
     185         * See netinet/tcp_usrreq.c for details
     186         */
     187        unsigned long           tcp_tx_buf_size;
     188        unsigned long           tcp_rx_buf_size;
    157189};
    158190
  • cpukit/libnetworking/rtems/rtems_glue.c

    r068d7aa7 r5c62b53  
    222222{
    223223        rtems_status_code sc;
     224        extern void rtems_set_udp_buffer_sizes( u_long, u_long );
     225        extern void rtems_set_tcp_buffer_sizes( u_long, u_long );
     226        extern void rtems_set_sb_efficiency( u_long );
    224227
    225228        /*
     
    238241        if (rtems_bsdnet_config.mbuf_cluster_bytecount)
    239242                nmbclusters = rtems_bsdnet_config.mbuf_cluster_bytecount / MCLBYTES;
     243
     244        rtems_set_udp_buffer_sizes(
     245          rtems_bsdnet_config.udp_tx_buf_size,
     246          rtems_bsdnet_config.udp_rx_buf_size
     247        );
     248
     249        rtems_set_tcp_buffer_sizes(
     250          rtems_bsdnet_config.tcp_tx_buf_size,
     251          rtems_bsdnet_config.tcp_rx_buf_size
     252        );
     253
     254        rtems_set_sb_efficiency( rtems_bsdnet_config.sb_efficiency );
    240255
    241256        /*
Note: See TracChangeset for help on using the changeset viewer.