[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] use of pbuf_queue() at interrupt level
From: |
John Horton |
Subject: |
[lwip-users] use of pbuf_queue() at interrupt level |
Date: |
Tue, 28 Mar 2006 11:28:41 +0100 |
Hi all,
I am interfacing the lwIP stack with an FPGA implementation that is
capable of tx/rx of eth frames. I am looking for some tips from you guys
please.
The rx can be interrupt driven or polled. I would like to use rx
interrupts to queue up rx'd frames and exit the isr. Then in background
loop, the rx queue can be processed and all packets q'd up can be fed to
the stack.
There is no RTOS in this system, just a main (background) loop with
foreground interrupts. So this means raw API with both
SYS_LIGHTWEIGHT_PROT and NO_SYS set to 1.
I would like to use the existing pbuf_queue and _dequeue mechanism to q
incoming packets under interrupt. This means that I need to call
pbuf_alloc( PBUF_RAW, FPGA_RX_BUFFSIZE, PBUF_POOL ) and pbuf_queue( rxQ,
p ) from the rx isr.
This in turn means that in the main loop when the rx q is read, I would
have to disable FPGA rx interrupts during the call to pbuf_dequeue()
(pbuf_alloc() is already taken care of with SYS_ARCH_PROTECT/UNPROTECT
mechanism and SYS_LIGHTWEIGHT_PROT enabled).
So my questions are:
- Is my rx netif design ok for lwIP?
- If so, why aren't pbuf_queue() and pbuf_dequeue() already protected
with SYS_ARCH_PROTECT/UNPROTECT ?
Best regards and thanks for an excellent stack!!!
John
Disclaimer:
This message is intended for the use of the individual(s) or entity named
above. It may contain information which is privileged or confidential.
If you are not the intended recipient, please return it to sender as soon as
possible and be aware that any disclosure, copying, distribution or use of its
contents is prohibited. The views expressed in this communication may not
necessarily be the views held by the company.
- [lwip-users] use of pbuf_queue() at interrupt level,
John Horton <=