mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
sfc: Refactor struct efx_tx_buffer to use a flags field
Add a flags field to struct efx_tx_buffer, replacing the continuation and map_single booleans. Since a single descriptor cannot be both a TSO header and the last descriptor for an skb, unionise efx_tx_buffer::{skb,tsoh} and add flags for validity of these fields. Clear all flags in free buffers (whereas previously the continuation flag would be set). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
8f4cccbbd9
commit
7668ff9c2a
3 changed files with 53 additions and 56 deletions
|
@ -401,8 +401,10 @@ void efx_nic_push_buffers(struct efx_tx_queue *tx_queue)
|
|||
++tx_queue->write_count;
|
||||
|
||||
/* Create TX descriptor ring entry */
|
||||
BUILD_BUG_ON(EFX_TX_BUF_CONT != 1);
|
||||
EFX_POPULATE_QWORD_4(*txd,
|
||||
FSF_AZ_TX_KER_CONT, buffer->continuation,
|
||||
FSF_AZ_TX_KER_CONT,
|
||||
buffer->flags & EFX_TX_BUF_CONT,
|
||||
FSF_AZ_TX_KER_BYTE_COUNT, buffer->len,
|
||||
FSF_AZ_TX_KER_BUF_REGION, 0,
|
||||
FSF_AZ_TX_KER_BUF_ADDR, buffer->dma_addr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue