increase number of cores, minor optimizations

This commit is contained in:
Stefan Lankes 2011-10-06 12:51:11 -07:00
parent 58c9e33e47
commit 6fd7f64059

View file

@ -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