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 mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to