sfc: Fix reading of inserted hash
The hash appears immediately before the packet data, not at the beginning of the buffer. This means we can easily use negative offsets from the start of packet data, so adjust the data and length at the top of __efx_rx_packet() instead of wherever we consume the hash. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
29046f9b1e
commit
604f6049ba
@@ -258,9 +258,6 @@ void efx_loopback_rx_packet(struct efx_nic *efx,
|
||||
|
||||
payload = &state->payload;
|
||||
|
||||
buf_ptr += efx->type->rx_buffer_hash_size;
|
||||
pkt_len -= efx->type->rx_buffer_hash_size;
|
||||
|
||||
received = (struct efx_loopback_payload *) buf_ptr;
|
||||
received->ip.saddr = payload->ip.saddr;
|
||||
if (state->offload_csum)
|
||||
|
Reference in New Issue
Block a user