diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2013-04-27 01:55:18 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-27 22:29:07 +0100 |
commit | 3dced740c243f454a9b83fbe73133911d5c6ce8d (patch) | |
tree | 74177f58da775d3176bc0f26a9867b07f82562bf /drivers/net/ethernet/sfc/net_driver.h | |
parent | 02e121650b5e46ef3f2b3ed1ebc4b70e47799056 (diff) |
sfc: Add support for reading packet length from prefix
Define a flag for struct efx_rx_buffer and efx_rx_packet() that
indicates packet length must be read from the prefix. If this
is set, read the length in __efx_rx_packet() (when the prefix
should have arrived in cache).
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r-- | drivers/net/ethernet/sfc/net_driver.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index f52b38c1ef26..e85bed09b5e9 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -263,6 +263,7 @@ struct efx_rx_buffer { #define EFX_RX_PKT_CSUMMED 0x0002 #define EFX_RX_PKT_DISCARD 0x0004 #define EFX_RX_PKT_TCP 0x0040 +#define EFX_RX_PKT_PREFIX_LEN 0x0080 /* length is in prefix only */ /** * struct efx_rx_page_state - Page-based rx buffer state @@ -668,6 +669,8 @@ struct vfdi_status; * @rx_prefix_size: Size of RX prefix before packet data * @rx_packet_hash_offset: Offset of RX flow hash from start of packet data * (valid only if @rx_prefix_size != 0; always negative) + * @rx_packet_len_offset: Offset of RX packet length from start of packet data + * (valid only for NICs that set %EFX_RX_PKT_PREFIX_LEN; always negative) * @rx_hash_key: Toeplitz hash key for RSS * @rx_indir_table: Indirection table for RSS * @rx_scatter: Scatter mode enabled for receives @@ -800,6 +803,7 @@ struct efx_nic { unsigned int rx_pages_per_batch; unsigned int rx_prefix_size; int rx_packet_hash_offset; + int rx_packet_len_offset; u8 rx_hash_key[40]; u32 rx_indir_table[128]; bool rx_scatter; |