[ovs-dev] Kernel BUG on Xen

Jesse Gross jesse at nicira.com
Mon Apr 26 21:56:26 UTC 2010


On Mon, Apr 26, 2010 at 10:16 AM, Nick Couchman <Nick.Couchman at seakr.com>wrote:
>
> As reported before, no change with this patch.  I've also been in touch
> with James Harper, the developer of the Windows GPL PV drivers I'm using.
>  He suggested trying to leave checksum offloading enabled but disable Large
> Send Offload and Scatter/Gather.  I tried that, with the same result -
> kernel BUG.
>
>
Right, the stack trace indicates that this is a problem with checksum
offloading.


> One other interesting thing that I found...I'm using Open vSwitch with a
> primary bridge that has tagged VLANs, then creating "fake bridges" that
> translate those into untagged VLANs that the system can use.  When the domU
> interface is connected to the primary bridge that has tagged VLANs, there is
> no crash.  Of course, there's not really any usable traffic - just the guest
> sending out DHCP requests and looking for responses, but seeing tagged VLAN
> traffic.  The crash only occurs when the interface for the Xen domU is on
> one of the untagged fake bridges.  Don't know if that helps any or not, but
> thought I'd throw it out there.


It's probably not trying to do checksum offloading on the DHCP requests.
 Since it never gets a response, it doesn't continue onto packets that do
have checksum offloading, which is why it doesn't crash.

Here's another version of the patch.  It may be slightly more robust and
also contains some additional logging.  It against the master branch (not
the previous patch):

diff --git a/datapath/datapath.c b/datapath/datapath.c
index e1320f2..b9ed25a 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -552,14 +552,11 @@ void dp_process_received_packet(struct dp_port *p,
struct sk_buff *skb)
  * directly because it isn't exported in all versions. */
 static int skb_pull_up_to(struct sk_buff *skb, void *ptr)
 {
- if (ptr < (void *)skb->tail)
- return 1;
- if (__pskb_pull_tail(skb,
-     ptr - (void *)skb->data - skb_headlen(skb))) {
- return 1;
- } else {
- return 0;
- }
+ unsigned int pull_len = ptr - (void *)skb->data;
+ printk("trying to pull %d from skb len %d headlen %d\n", pull_len,
+ skb->len, skb_headlen(skb));
+
+ return pskb_may_pull(skb, pull_len);
 }

 int vswitch_skb_checksum_setup(struct sk_buff *skb)
@@ -597,6 +594,7 @@ int vswitch_skb_checksum_setup(struct sk_buff *skb)
  goto out;
  }

+ printk("ihl: %d csum_offset: %d\n", iph->ihl, csum_offset);
  if (!skb_pull_up_to(skb, th + csum_offset + 2))
  goto out;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100426/04b74e8c/attachment-0003.html>


More information about the dev mailing list