sfc: de-indirect TSO handling
Remove the tx_queue->handle_tso function pointer, and just use tx_queue->tso_version to decide which function to call, thus removing an indirect call from the fast path. Instead of passing a tso_v2 flag to efx_mcdi_tx_init(), set the desired tx_queue->tso_version before calling it. In efx_mcdi_tx_init(), report back failure to obtain a TSOv2 context by setting tx_queue->tso_version to 0, which will cause the TX path to use the GSO-based fallback. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
fe0c4060c1
commit
1679c72cf4
@@ -208,8 +208,6 @@ struct efx_tx_buffer {
|
||||
* @initialised: Has hardware queue been initialised?
|
||||
* @timestamping: Is timestamping enabled for this channel?
|
||||
* @xdp_tx: Is this an XDP tx queue?
|
||||
* @handle_tso: TSO xmit preparation handler. Sets up the TSO metadata and
|
||||
* may also map tx data, depending on the nature of the TSO implementation.
|
||||
* @read_count: Current read pointer.
|
||||
* This is the number of buffers that have been removed from both rings.
|
||||
* @old_write_count: The value of @write_count when last checked.
|
||||
@@ -272,9 +270,6 @@ struct efx_tx_queue {
|
||||
bool timestamping;
|
||||
bool xdp_tx;
|
||||
|
||||
/* Function pointers used in the fast path. */
|
||||
int (*handle_tso)(struct efx_tx_queue*, struct sk_buff*, bool *);
|
||||
|
||||
/* Members used mainly on the completion path */
|
||||
unsigned int read_count ____cacheline_aligned_in_smp;
|
||||
unsigned int old_write_count;
|
||||
|
Reference in New Issue
Block a user