Commit 884d338c041c2aa4536ade8620efa585e7c57f3c
Committed by
David S. Miller
1 parent
2abb7cdc0d
gre: Add support for checksum unnecessary conversions
Call skb_checksum_try_convert and skb_gro_checksum_try_convert after checksum is found present and validated in the GRE header for normal and GRO paths respectively. In GRO path, call skb_gro_checksum_try_convert Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 10 additions and 2 deletions Side-by-side Diff
net/ipv4/gre_demux.c
net/ipv4/gre_offload.c
... | ... | @@ -172,9 +172,13 @@ |
172 | 172 | } |
173 | 173 | |
174 | 174 | /* Don't bother verifying checksum if we're going to flush anyway. */ |
175 | - if ((greh->flags & GRE_CSUM) && !NAPI_GRO_CB(skb)->flush && | |
176 | - skb_gro_checksum_simple_validate(skb)) | |
175 | + if ((greh->flags & GRE_CSUM) && !NAPI_GRO_CB(skb)->flush) { | |
176 | + if (skb_gro_checksum_simple_validate(skb)) | |
177 | 177 | goto out_unlock; |
178 | + | |
179 | + skb_gro_checksum_try_convert(skb, IPPROTO_GRE, 0, | |
180 | + null_compute_pseudo); | |
181 | + } | |
178 | 182 | |
179 | 183 | flush = 0; |
180 | 184 |