All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-2.6] sfc: Set ip_summed correctly for page buffers passed to GRO
@ 2009-10-27 14:50 Ben Hutchings
  2009-10-27 19:44 ` [PATCH net-2.6] sfc: Really allow RX checksum offload to be disabled Ben Hutchings
  2009-10-28 10:44 ` [PATCH net-2.6] sfc: Set ip_summed correctly for page buffers passed to GRO David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Hutchings @ 2009-10-27 14:50 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-net-drivers

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>
Cc: stable@kernel.org
---
This affects 2.6.31 and seems like a candidate for a stable update.

Ben.

 drivers/net/sfc/rx.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index ea59ed2..4b65c62 100644
--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -441,7 +441,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;
 
@@ -463,7 +464,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);
 
@@ -472,6 +474,7 @@ out:
 		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;
@@ -567,7 +570,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;
 	}
 

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-10-28 10:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-27 14:50 [PATCH net-2.6] sfc: Set ip_summed correctly for page buffers passed to GRO Ben Hutchings
2009-10-27 19:44 ` [PATCH net-2.6] sfc: Really allow RX checksum offload to be disabled Ben Hutchings
2009-10-28  9:49   ` David Miller
2009-10-28 10:53     ` Ben Hutchings
2009-10-28 10:44 ` [PATCH net-2.6] sfc: Set ip_summed correctly for page buffers passed to GRO David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.