mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 17:12:40 +03:00
[tcp] Allow out-of-order receive queue to be discarded
Allow packets in the receive queue to be discarded in order to free up memory. This avoids a potential deadlock condition in which the missing packet can never be received because the receive queue is occupying all of the memory available for further RX buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -162,6 +162,18 @@ static inline int list_empty ( const struct list_head *head ) {
|
||||
&pos->member != (head); \
|
||||
pos = list_entry ( pos->member.next, typeof ( *pos ), member ) )
|
||||
|
||||
/**
|
||||
* Iterate over entries in a list in reverse order
|
||||
*
|
||||
* @v pos The type * to use as a loop counter
|
||||
* @v head The head for your list
|
||||
* @v member The name of the list_struct within the struct
|
||||
*/
|
||||
#define list_for_each_entry_reverse( pos, head, member ) \
|
||||
for ( pos = list_entry ( (head)->prev, typeof ( *pos ), member ); \
|
||||
&pos->member != (head); \
|
||||
pos = list_entry ( pos->member.prev, typeof ( *pos ), member ) )
|
||||
|
||||
/**
|
||||
* Iterate over entries in a list, safe against deletion of entries
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user