minor optimizations

This commit is contained in:
Stefan Lankes 2011-10-05 22:54:49 -07:00
parent 06ddffe09a
commit 816b3438af

View file

@ -667,7 +667,7 @@ static err_t mmnif_tx(struct netif *netif, struct pbuf *p)
uint32_t i;
struct pbuf *q; /* interator */
uint32_t dest_ip = mmnif_get_destination(netif, p);
int8_t chances = 40;
int32_t chances = 4000;
/* check for over/underflow */
if (BUILTIN_EXPECT((p->tot_len < 20 /* IP header size */) || (p->tot_len > 1536), 0)) {
@ -682,12 +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);
goto realloc;
}
@ -1088,7 +1089,6 @@ err_t mmnif_init(struct netif *netif)
#if MMNIF_FAST_SOCKET_BLOCK
sem_init(&mmnif_hashtable[i].sem, 0);
#endif
}