mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 20:10:18 +03:00
Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom(). Add pkb_headroom().
This commit is contained in:
@@ -137,12 +137,22 @@ static inline size_t pkb_len ( struct pk_buff *pkb ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate available space in a packet buffer
|
||||
* Calculate available space at start of a packet buffer
|
||||
*
|
||||
* @v pkb Packet buffer
|
||||
* @ret len Length of data available in buffer
|
||||
* @ret len Length of data available at start of buffer
|
||||
*/
|
||||
static inline size_t pkb_available ( struct pk_buff *pkb ) {
|
||||
static inline size_t pkb_headroom ( struct pk_buff *pkb ) {
|
||||
return ( pkb->data - pkb->head );
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate available space at end of a packet buffer
|
||||
*
|
||||
* @v pkb Packet buffer
|
||||
* @ret len Length of data available at end of buffer
|
||||
*/
|
||||
static inline size_t pkb_tailroom ( struct pk_buff *pkb ) {
|
||||
return ( pkb->end - pkb->tail );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user