netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* suspicius csum initialization in vmxnet3_rx_csum
@ 2018-05-24  8:47 Paolo Abeni
       [not found] ` <EDF373A9-CD98-428C-B9D5-6C9139D35A72@vmware.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Abeni @ 2018-05-24  8:47 UTC (permalink / raw)
  To: Ronak Doshi, Shrikrishna Khare, pv-drivers; +Cc: netdev, Neil Horman

Hi all,

we are hitting the BUG() condition in skb_checksum_help() -
skb_checksum_start_offset(skb) >= skb_headlen(skb) for skb received
from vmnxnet3 and queued from OVS to user-space

I think that the root cause is in vmxnet3_rx_csum():

			if (gdesc->rcd.csum) {
                                skb->csum = htons(gdesc->rcd.csum);
                                skb->ip_summed = CHECKSUM_PARTIAL;

CHECKSUM_PARTIAL looks suspicious here, as the csum field is
initialized, instead of csum_offset/csum_start. To be honest I find
also strange that the csum value is converted from host byte order.

I'm wild guessing something like the below patch should fix the issue,
but I'm not familiar with the vmxnet3 code. Can you please have a look?

Thank you,

Paolo
---
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 9ebe2a689966..06ade074c32c 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1172,7 +1172,7 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter,
 		} else {
 			if (gdesc->rcd.csum) {
 				skb->csum = htons(gdesc->rcd.csum);
-				skb->ip_summed = CHECKSUM_PARTIAL;
+				skb->ip_summed = CHECKSUM_COMPLETE;
 			} else {
 				skb_checksum_none_assert(skb);
 			}

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

end of thread, other threads:[~2018-06-05 19:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-24  8:47 suspicius csum initialization in vmxnet3_rx_csum Paolo Abeni
     [not found] ` <EDF373A9-CD98-428C-B9D5-6C9139D35A72@vmware.com>
     [not found]   ` <BLUPR05MB1907699C14C2F900BA57323DD96A0@BLUPR05MB1907.namprd05.prod.outlook.com>
2018-05-30 20:29     ` Paolo Abeni
2018-05-31 18:02       ` Ronak Doshi
2018-05-31 23:32         ` Neil Horman
2018-06-01 18:10           ` Ronak Doshi
2018-06-01 22:12             ` Neil Horman
2018-06-05 16:08             ` Paolo Abeni
2018-06-05 19:15               ` Ronak Doshi

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).