mvme167: "Can't get network memory"
rwas
rbtwas at gmail.com
Thu Dec 27 03:24:17 UTC 2012
Joel Sherrill wrote:
> Are you looking at the network-demos?
Yes, this is "netdemo" in network-demos.
>
> There is a parameter to configure for number of mbufs.
I thought that was this: "CONFIGURE_MESSAGE_BUFFER_MEMORY".
There's a function to do it manually but I don't see how that's
different than the call the bsp makes.
Tracing the source code, I see this error message "Can't get network
memory" is generated right after
a "malloc()" call:
//**************************
in "rtems_glue.c"
/*
* Do the initializations required by the BSD code
*/
static int
bsd_init (void)
{
int i;
char *p;
.
.
.
p = rtems_bsdnet_malloc_mbuf(nmbuf * MSIZE + MSIZE -
1,MBUF_MALLOC_MBUF);
p = (char *)(((uintptr_t)p + MSIZE - 1) & ~(MSIZE - 1));
if (p == NULL) {
printf ("Can't get network memory.\n");
return -1;
}
.
.
.
}
//***********************
and in: "rtems_malloc_mbuf.c"
void* rtems_bsdnet_malloc_mbuf(size_t size, int type)
{
return malloc(size);
}
So I'm wondering if I've over allocated or something.
One issue on the "CONIGURE" items is what units the memory size is in.
Someplace I saw that it was
in *kbytes* but elsewhere it appears to be in *bytes*. If it's in
*kbytes* I could easily have over allocated
elsewhere and not allowed anything for networking.
Robert W.
>
> rwas <rbtwas at gmail.com> wrote:
>
>
> Hello,
>
> Anyway have network working on the mvme167?
>
> I've tried a number of config options but I keep getting the "Can't
> get network memory" message.
>
> Thanks.
>
> Robert W.
>
>
>
> config options used:
>
> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define
> CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>
> #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define
> CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 #define
> CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
>
> #define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024)
>
>
> // rwas #define CONFIGURE_MESSAGE_BUFFER_MEMORY (32 *
> 1024) #define CONFIGURE_MAXIMUM_SEMAPHORES 40 #define
> CONFIGURE_MAXIMUM_TASKS 30 #define
> CONFIGURE_MAXIMUM_MESSAGE_QUEUES 30 #define
> CONFIGURE_MAXIMUM_DRIVERS 10
>
>
>
> //#define CONFIGURE_MAXIMUM_SEMAPHORES 20 //#define
> CONFIGURE_MAXIMUM_TASKS 20
>
> // rwas #define CONFIGURE_MINIMUM_TASK_STACK_SIZE (16 * 1024)
> #define CONFIGURE_MEMORY_OVERHEAD 4096 // in k
> bytes
>
> // rwas #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE 16384
>
> #define CONFIGURE_MICROSECONDS_PER_TICK 10000
>
> //#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) //#define
> CONFIGURE_INIT_TASK_STACK_SIZE (64*1024) #define
> CONFIGURE_INIT_TASK_STACK_SIZE (128*1024) #define
> CONFIGURE_INIT_TASK_PRIORITY 120 #define
> CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
> RTEMS_NO_TIMESLICE | \ RTEMS_NO_ASR | \ RTEMS_INTERRUPT_LEVEL(0))
>
> _______________________________________________ rtems-users mailing
> list rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
More information about the users
mailing list