diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-05-17 23:52:20 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-08-24 22:00:26 +0400 |
commit | 7668ff9c2ad7d354655e23afa836a92d54d2ea63 (patch) | |
tree | 01eaf41af56d406f1783f2bc8f7f70812759a130 /drivers/net/ethernet/sfc/nic.c | |
parent | 8f4cccbbd92f2ad0ddbbc498ef7cee2a1c3defe9 (diff) | |
download | linux-7668ff9c2ad7d354655e23afa836a92d54d2ea63.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.c')
-rw-r--r-- | drivers/net/ethernet/sfc/nic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index 326d799762d6..aa113709831d 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c @@ -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); |