From: Jon Mason <jdmason@us.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Log error in csum dev_queue_xmit error path
Date: Thu, 1 Dec 2005 13:40:04 -0600 [thread overview]
Message-ID: <20051201194003.GC31301@us.ibm.com> (raw)
While working bug #143, it came to my attention that no verbose error is
loged if the dom0 kernel mangles a packet and tries to checksum
offload it.
This should let the user know what is going wrong (instead of silently
dropping the packet).
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
# HG changeset patch
# User root@opteron.ltc.austin.ibm.com
# Node ID 6e8be095dd8406da697b3956ba65ed724e55e50f
# Parent f5b119533cc825726c9ecaa3bd2650b38033d4d8
Log an error if dom0 dev_queue_xmit receives a packet to be checksummed
that is not TCP/UDP. Since we can only offload TCP/UDP checksums,
this error path should be entered. If this is the case, domU checksum
offload needs to be diabled.
diff -r f5b119533cc8 -r 6e8be095dd84 linux-2.6-xen-sparse/net/core/dev.c
--- a/linux-2.6-xen-sparse/net/core/dev.c Thu Dec 1 14:22:22 2005
+++ b/linux-2.6-xen-sparse/net/core/dev.c Thu Dec 1 19:29:00 2005
@@ -1283,6 +1283,11 @@
skb->csum = offsetof(struct udphdr, check);
break;
default:
+ if (net_ratelimit())
+ printk(KERN_ERR "Attempting to checksum a "
+ "non-TCP/UDP packet, dropping a protocol"
+ " %d packet", skb->nh.iph->protocol);
+ rc = -EPROTO;
goto out_kfree_skb;
}
if ((skb->h.raw + skb->csum + 2) > skb->tail)
reply other threads:[~2005-12-01 19:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051201194003.GC31301@us.ibm.com \
--to=jdmason@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.