netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO.
@ 2019-01-23  3:33 Mao Wenan
  2019-01-29  3:00 ` maowenan
  0 siblings, 1 reply; 12+ messages in thread
From: Mao Wenan @ 2019-01-23  3:33 UTC (permalink / raw)
  To: netdev, davem, edumazet

When udp4_gro_receive() get one packet that uh->check=0,
skb_gro_checksum_validate_zero_check() will set the
skb->ip_summed = CHECKSUM_UNNECESSARY;
skb->csum_level = 0;
Then udp_gro_receive() will flush the packet which is not CHECKSUM_PARTIAL,
It is not our expect,  because check=0 in udp header indicates this
packet is no need to caculate checksum, we should go further to do GRO.

This patch changes the value of csum_cnt according to skb->csum_level.
---
 include/linux/netdevice.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1377d08..9c819f1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2764,6 +2764,7 @@ static inline void skb_gro_incr_csum_unnecessary(struct sk_buff *skb)
 		 * during GRO. This saves work if we fallback to normal path.
 		 */
 		__skb_incr_checksum_unnecessary(skb);
+		NAPI_GRO_CB(skb)->csum_cnt = skb->csum_level + 1;
 	}
 }
 
-- 
1.8.3.1


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

end of thread, other threads:[~2019-02-20  8:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-23  3:33 [PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO Mao Wenan
2019-01-29  3:00 ` maowenan
2019-01-29  4:01   ` Tom Herbert
2019-01-29  6:04     ` maowenan
2019-01-29  6:24       ` Tom Herbert
2019-01-29  8:08         ` maowenan
2019-01-29 20:24           ` Tom Herbert
2019-01-31  1:57             ` maowenan
2019-01-31  2:43               ` Tom Herbert
2019-01-31  2:58                 ` maowenan
2019-01-31  4:33                   ` Tom Herbert
2019-02-20  8:32                     ` maowenan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).