mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 15:48:23 +00:00
sfc: Wrap __efx_rx_packet() with efx_rx_flush_packet()
The pipeline mechanism will need to change a bit for scattered packets. Add a wrapper to insulate efx_process_channel() from this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
9bc2fc9b52
commit
ff734ef4bc
3 changed files with 9 additions and 7 deletions
|
@ -250,11 +250,7 @@ static int efx_process_channel(struct efx_channel *channel, int budget)
|
||||||
struct efx_rx_queue *rx_queue =
|
struct efx_rx_queue *rx_queue =
|
||||||
efx_channel_get_rx_queue(channel);
|
efx_channel_get_rx_queue(channel);
|
||||||
|
|
||||||
/* Deliver last RX packet. */
|
efx_rx_flush_packet(channel);
|
||||||
if (channel->rx_pkt) {
|
|
||||||
__efx_rx_packet(channel, channel->rx_pkt);
|
|
||||||
channel->rx_pkt = NULL;
|
|
||||||
}
|
|
||||||
if (rx_queue->enabled)
|
if (rx_queue->enabled)
|
||||||
efx_fast_push_rx_descriptors(rx_queue);
|
efx_fast_push_rx_descriptors(rx_queue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,13 @@ extern void __efx_rx_packet(struct efx_channel *channel,
|
||||||
struct efx_rx_buffer *rx_buf);
|
struct efx_rx_buffer *rx_buf);
|
||||||
extern void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
|
extern void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
|
||||||
unsigned int len, u16 flags);
|
unsigned int len, u16 flags);
|
||||||
|
static inline void efx_rx_flush_packet(struct efx_channel *channel)
|
||||||
|
{
|
||||||
|
if (channel->rx_pkt) {
|
||||||
|
__efx_rx_packet(channel, channel->rx_pkt);
|
||||||
|
channel->rx_pkt = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue);
|
extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue);
|
||||||
|
|
||||||
#define EFX_MAX_DMAQ_SIZE 4096UL
|
#define EFX_MAX_DMAQ_SIZE 4096UL
|
||||||
|
|
|
@ -465,8 +465,7 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
|
||||||
*/
|
*/
|
||||||
rx_buf->len = len - efx->type->rx_buffer_hash_size;
|
rx_buf->len = len - efx->type->rx_buffer_hash_size;
|
||||||
out:
|
out:
|
||||||
if (channel->rx_pkt)
|
efx_rx_flush_packet(channel);
|
||||||
__efx_rx_packet(channel, channel->rx_pkt);
|
|
||||||
channel->rx_pkt = rx_buf;
|
channel->rx_pkt = rx_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue