mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: Infrastructure for CHECKSUM_PARTIAL with remote checsum offload
This patch adds infrastructure so that remote checksum offload can set CHECKSUM_PARTIAL instead of calling csum_partial and writing the modfied checksum field. Add skb_remcsum_adjust_partial function to set an skb for using CHECKSUM_PARTIAL with remote checksum offload. Changed skb_remcsum_process and skb_gro_remcsum_process to take a boolean argument to indicate if checksum partial can be set or the checksum needs to be modified using the normal algorithm. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
baa32ff428
commit
15e2396d4e
5 changed files with 37 additions and 6 deletions
|
|
@ -4024,6 +4024,7 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
|
|||
NAPI_GRO_CB(skb)->flush = 0;
|
||||
NAPI_GRO_CB(skb)->free = 0;
|
||||
NAPI_GRO_CB(skb)->udp_mark = 0;
|
||||
NAPI_GRO_CB(skb)->gro_remcsum_start = 0;
|
||||
|
||||
/* Setup for GRO checksum validation */
|
||||
switch (skb->ip_summed) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ static struct guehdr *gue_remcsum(struct sk_buff *skb, struct guehdr *guehdr,
|
|||
return NULL;
|
||||
guehdr = (struct guehdr *)&udp_hdr(skb)[1];
|
||||
|
||||
skb_remcsum_process(skb, (void *)guehdr + hdrlen, start, offset);
|
||||
skb_remcsum_process(skb, (void *)guehdr + hdrlen, start, offset, true);
|
||||
|
||||
return guehdr;
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ static struct guehdr *gue_gro_remcsum(struct sk_buff *skb, unsigned int off,
|
|||
}
|
||||
|
||||
skb_gro_remcsum_process(skb, (void *)guehdr + hdrlen,
|
||||
start, offset, grc);
|
||||
start, offset, grc, true);
|
||||
|
||||
skb->remcsum_offload = 1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue