summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/rx.c
diff options
context:
space:
mode:
authorJon Cooper <jcooper@solarflare.com>2017-02-08 16:51:02 +0000
committerDavid S. Miller <davem@davemloft.net>2017-02-09 16:47:53 -0500
commitda50ae2eae96e00e0188b24014efc10161e60925 (patch)
treec42954a9b66dbdbd47e6226dcce73a907a05414a /drivers/net/ethernet/sfc/rx.c
parenta0ee3541483767e82bf26b8269693eec25c01cba (diff)
downloadlinux-da50ae2eae96e00e0188b24014efc10161e60925.tar.gz
linux-da50ae2eae96e00e0188b24014efc10161e60925.tar.bz2
linux-da50ae2eae96e00e0188b24014efc10161e60925.zip
sfc: set csum_level for encapsulated packets
Set the csum_level for encapsulated packets where the encapsulation type, l3 class and l4 class are sets that need it. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/rx.c')
-rw-r--r--drivers/net/ethernet/sfc/rx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index 31587f4066ab..42443f434569 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -434,6 +434,7 @@ efx_rx_packet_gro(struct efx_channel *channel, struct efx_rx_buffer *rx_buf,
PKT_HASH_TYPE_L3);
skb->ip_summed = ((rx_buf->flags & EFX_RX_PKT_CSUMMED) ?
CHECKSUM_UNNECESSARY : CHECKSUM_NONE);
+ skb->csum_level = !!(rx_buf->flags & EFX_RX_PKT_CSUM_LEVEL);
for (;;) {
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
@@ -621,8 +622,10 @@ static void efx_rx_deliver(struct efx_channel *channel, u8 *eh,
/* Set the SKB flags */
skb_checksum_none_assert(skb);
- if (likely(rx_buf->flags & EFX_RX_PKT_CSUMMED))
+ if (likely(rx_buf->flags & EFX_RX_PKT_CSUMMED)) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
+ skb->csum_level = !!(rx_buf->flags & EFX_RX_PKT_CSUM_LEVEL);
+ }
efx_rx_skb_attach_timestamp(channel, skb);