From 6fd7f640596f1c8f0848a189b19bc7f5c7847e7e Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 6 Oct 2011 12:51:11 -0700 Subject: [PATCH] increase number of cores, minor optimizations --- drivers/net/mmnif.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/mmnif.c b/drivers/net/mmnif.c index 3ceabfb2..2e509e0e 100644 --- a/drivers/net/mmnif.c +++ b/drivers/net/mmnif.c @@ -93,7 +93,7 @@ #define MMNIF_MAX_DESCRIPTORS 64 -#define MMNIF_CORES 2 +#define MMNIF_CORES 48 #define MMNIF_STATUS_FREE 0x00 #define MMNIF_STATUS_PENDING 0x01 @@ -682,13 +682,13 @@ realloc: { //DEBUGPRINTF("mmnif_tx(): concurrency"); - if (chances <= 0) - goto drop_packet; + //if (chances <= 0) + // goto drop_packet; - chances--; + //chances--; //mmnif_trigger_irq(dest_ip); - //NOP8;NOP8;NOP8;NOP8;NOP8;NOP8;NOP8;NOP8; - udelay(10); + NOP8;NOP8;NOP8;NOP8;NOP8;NOP8;NOP8;NOP8; + //udelay(10); goto realloc; } @@ -983,7 +983,7 @@ err_t mmnif_init(struct netif *netif) // align mpb size to the granularity of a page size header_size = (header_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); header_start_address = (void*) RCCE_shmalloc(header_size * MMNIF_CORES); - DEBUGPRINTF("RCCE_shmalloc : %p\n", header_start_address); + DEBUGPRINTF("RCCE_shmalloc : %p (size %u)\n", header_start_address, MMNIF_CORES * header_size); // map physical address in the virtual address space header_start_address = (void*) map_region(0, (size_t) header_start_address, (MMNIF_CORES * header_size) >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_NO_CACHE); @@ -992,7 +992,7 @@ err_t mmnif_init(struct netif *netif) /* Alloc and clear shared memory for rx_buff */ - heap_size = (MMNIF_RX_BUFFERLEN); + heap_size = MMNIF_RX_BUFFERLEN; // align mpb size to the granularity of a page size heap_size = (heap_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); @@ -1011,7 +1011,7 @@ err_t mmnif_init(struct netif *netif) #else heap_start_address = (void*) RCCE_shmalloc(heap_size * MMNIF_CORES); - DEBUGPRINTF("RCCE_shmalloc : %p\n", header_start_address); + DEBUGPRINTF("RCCE_shmalloc : %p (size %u)\n", header_start_address, MMNIF_CORES * header_size); // map physical address in the virtual address space #if USE_CACHE