Skip to content

Commit

Permalink
sfc: Set ip_summed correctly for page buffers passed to GRO
Browse files Browse the repository at this point in the history
Page buffers containing packets with an incorrect checksum or using a
protocol not handled by hardware checksum offload were previously not
passed to LRO.  The conversion to GRO changed this, but did not set
the ip_summed value accordingly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Oct 28, 2009
1 parent d054938 commit 345056a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/net/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ static void efx_rx_packet__check_len(struct efx_rx_queue *rx_queue,
* the appropriate LRO method
*/
static void efx_rx_packet_lro(struct efx_channel *channel,
struct efx_rx_buffer *rx_buf)
struct efx_rx_buffer *rx_buf,
bool checksummed)
{
struct napi_struct *napi = &channel->napi_str;

Expand All @@ -466,7 +467,8 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
skb->len = rx_buf->len;
skb->data_len = rx_buf->len;
skb->truesize += rx_buf->len;
skb->ip_summed = CHECKSUM_UNNECESSARY;
skb->ip_summed =
checksummed ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE;

napi_gro_frags(napi);

Expand All @@ -475,6 +477,7 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
rx_buf->page = NULL;
} else {
EFX_BUG_ON_PARANOID(!rx_buf->skb);
EFX_BUG_ON_PARANOID(!checksummed);

napi_gro_receive(napi, rx_buf->skb);
rx_buf->skb = NULL;
Expand Down Expand Up @@ -570,7 +573,7 @@ void __efx_rx_packet(struct efx_channel *channel,
}

if (likely(checksummed || rx_buf->page)) {
efx_rx_packet_lro(channel, rx_buf);
efx_rx_packet_lro(channel, rx_buf, checksummed);
goto done;
}

Expand Down

0 comments on commit 345056a

Please sign in to comment.