[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Blocking netif_linkoutput
From: |
Dimax |
Subject: |
[lwip-users] Blocking netif_linkoutput |
Date: |
Wed, 5 Jun 2013 13:08:54 +0300 |
HI,
I continue working on STM32 Ethernet driver. I'd like to understand
the right implementation of the netif_linkoutput.
1. What should driver do if it has no free DMA descriptors to post
output packet? Should it try to wait some time? If yes what is a
reasonable wait time?
2. As far as I can see linkoutput is called from tcpip_thread context
(in case of OS usage). Should it be reenterable? I do not think so but
want to make sure as in original implementation there is a semaphore
taken at the beginning and given at the end.
if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME))
{
/* Post pbuf to DMA descriptor(s) */
....
.....
xSemaphoreGive(xTxSemaphore);
}
return ERR_OK;
- [lwip-users] Blocking netif_linkoutput,
Dimax <=