[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <08b128001903268801d5406ee821f4365dbb987b.1492692976.git.dcaratti@redhat.com>
Date: Thu, 20 Apr 2017 15:38:12 +0200
From: Davide Caratti <dcaratti@...hat.com>
To: Tom Herbert <tom@...bertland.com>,
Alexander Duyck <alexander.duyck@...il.com>,
David Laight <David.Laight@...lab.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
netdev@...r.kernel.org, linux-sctp@...r.kernel.org
Subject: [PATCH RFC net-next v4 6/7] openvswitch: more accurate checksumming in queue_userspace_packet()
if skb carries an SCTP packet and ip_summed is CHECKSUM_PARTIAL, it needs
CRC32c in place of Internet Checksum: use skb_csum_hwoffload_help to avoid
corrupting such packets while queueing them towards userspace.
Signed-off-by: Davide Caratti <dcaratti@...hat.com>
---
net/openvswitch/datapath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 7b17da9..9ddc9f8 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -453,7 +453,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
/* Complete checksum if needed */
if (skb->ip_summed == CHECKSUM_PARTIAL &&
- (err = skb_checksum_help(skb)))
+ (err = skb_csum_hwoffload_help(skb, 0)))
goto out;
/* Older versions of OVS user space enforce alignment of the last
--
2.7.4
Powered by blists - more mailing lists