WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH ixgbe] Fix VMDq operation when maxcpus=1

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH ixgbe] Fix VMDq operation when maxcpus=1
From: Mitch Williams <mitch.a.williams@xxxxxxxxx>
Date: Tue, 17 Feb 2009 15:44:23 -0800
Cc: steven.smith@xxxxxxxxxxxxx, joserenato.santos@xxxxxx
Delivery-date: Tue, 17 Feb 2009 15:45:04 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=X51LBE3BvVbGG3cUdf8bAwtn4q0jqa5sQfOX4/lmfQY=; b=JJGx76HKWqQfPBZejlEI+k7670s82vMuxck5vitFrO6MWF8VB5AdsTUNqLoHwY1eJ2 t7UPzZj3T3ku0/ZWKaUA242eq605jmSHG+tXsazc7uWSxMjIVapWnjgK52QJSofGr+3g teCHH+heHZ31/4xA2gnJjlmpHKQv/ntZyYI4k=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=CFiG4WlNlNNCQO7rzLDb1v4wVXiTK/mba8UMKmjq51N0JWdSVxz7fBEh/lEh9EQ7Lq pe1/Nz++aZrHGd6g6Xe6A+JinYBuXmxBkOxjoUQ1fY4WQPuG7Jyg8U7TGuuV/eWiGJrc qQIOSHAI6XJpnnevVG3civojs3IYSgxZiWD+w=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Renato reported a crash in ixgbe when the Dom0 kernel was booted with
maxcpus=1.

Added checks to the single-vector code path to make sure we don't call
any vmq functions before the ring is activated.

Signed-off-by: Mitch Williams <mitch.a.williams@xxxxxxxxx>

(Patch is attached as well as inline due to previous issue with
mangled patches.)

diff -r 9681e69b222b drivers/net/ixgbe/ixgbe_main.c
--- a/drivers/net/ixgbe/ixgbe_main.c    Thu Feb 12 17:38:15 2009 +0000
+++ b/drivers/net/ixgbe/ixgbe_main.c    Tue Feb 17 14:06:44 2009 -0800
@@ -541,6 +541,11 @@

        i = rx_ring->next_to_use;
        bi = &rx_ring->rx_buffer_info[i];
+#ifdef CONFIG_XEN_NETDEV2_VMQ
+       if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
+           (!rx_ring->active))
+               return;
+#endif

        while (cleaned_count--) {
                rx_desc = IXGBE_RX_DESC_ADV(*rx_ring, i);
@@ -1123,7 +1128,13 @@

                /* ERR_MASK will only have valid bits if EOP set */
                if (unlikely(staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK)) {
-                       dev_kfree_skb_irq(skb);
+#ifdef CONFIG_XEN_NETDEV2_VMQ
+                       if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
+                            rx_ring->queue_index)
+                               vmq_free_skb(skb, rx_ring->queue_index);
+                       else
+#endif
+                               dev_kfree_skb_irq(skb);
                        goto next_desc;
                }

@@ -1600,7 +1611,8 @@
                ixgbe_update_rx_dca(adapter, rx_ring);
 #endif

-       ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget);
+       if (rx_ring->active)
+               ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget);

        /* If all Rx work done, exit the polling mode */
        if ((work_done == 0) || !netif_running(adapter->netdev)) {
@@ -1644,7 +1656,9 @@
                if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
                        ixgbe_update_rx_dca(adapter, rx_ring);
 #endif
-               ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget);
+               if (rx_ring->active)
+                       ixgbe_clean_rx_irq(adapter, rx_ring,
+                                          &work_done, budget);
                enable_mask |= rx_ring->v_idx;
                r_idx = find_next_bit(q_vector->rxr_idx, adapter->num_rx_queues,
                                      r_idx + 1);

Attachment: ixgbe-onecpu.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>