Why rtems_bsdnet_initialize_network takes 1 second?

Sergei Organov osv at javad.ru
Tue Aug 20 13:53:32 UTC 2002

Eric Norum <eric.norum at sasktel.net> writes:
> On Tuesday, August 20, 2002, at 05:11 AM, Sergei Organov wrote:
> > Hello,
> >
> > I've observed that execution time of rtems_bsdnet_initialize_network() is
> > about 1 second on my board. I'd like to decrease this time but before I
> > dig into the problem I'd like to ask if somebody knows out of the head
> > where this delay comes from and is intrinsic to the network code
> > initialization or not.
> This is hard to answer without more details of your setup.
> Are you using BOOTP/DHCP?

I believe I don't. At least the only packet that the board sends on startup

# tcpdump -l -i eth1
tcpdump: listening on eth1
17:22:29.986797 arp who-has rcv tell rcv

where 'rcv' is the name of the board. It also seems that the packet appears at
the end of this 1 second interval.

The configuration looks like this:

// Default network interface
static struct rtems_bsdnet_ifconfig netdriver_config =
  RTEMS_BSP_NETWORK_DRIVER_ATTACH,      // attach function
  NULL,                                 // link to next interface
  ipAddr,                               // IP address
  ipNetMask,                            // IP net mask
  conf.mac,                             // Ethernet hardware address
  0,                                    // Use default driver parameters

// Network configuration
struct rtems_bsdnet_config rtems_bsdnet_config = {
  48,                   // Default network task priority
  0,                    // Default mbuf capacity
  0,                    // Default mbuf cluster capacity
  0,                    // Host name
  0,                    // Domain name
  ipGateway,            // Gateway
  0,                    // Log host
  {0, 0, 0},            // Name server(s)
  {0, 0, 0}             // NTP server(s)

where ipAddr, ipNetMask, conf.mac, and ipGateway are already set to the valid 
values at the time rtems_bsdnet_initialize_network() is invoked.

> What NIC are you using?  Some of them have probe code that takes a while to
> run.

I'm using CS8900A chip with the driver I've wrote myself. There is the only
wait loop in the driver initialization code with 50ms timeout so it should not
create 1 second delay anyway.

> What CPU and BSP?

It's MPC509 with my own BSP.

If this delay is not integral part of the network initialization code, I'll
dig into the problem myself and will find where the delay is, I believe. I
just wanted to make sure that I don't spend much time to finally just reinvent
the wheel.


More information about the users mailing list