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-changelog

[Xen-changelog] [linux-2.6.18-xen] netback accel: Avoid BUG_ON when vifs

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] netback accel: Avoid BUG_ON when vifs have conflicting MAC addresses
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Mar 2008 13:50:10 -0700
Delivery-date: Tue, 25 Mar 2008 13:50:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206467699 0
# Node ID 14b9877742337506d1885d21763c31fe465b5512
# Parent  de57c3f218fb5c23bb767d2192e9beb1b4d09681
netback accel: Avoid BUG_ON when vifs have conflicting MAC addresses

Signed-off-by: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
---
 drivers/xen/sfc_netback/accel_fwd.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff -r de57c3f218fb -r 14b987774233 drivers/xen/sfc_netback/accel_fwd.c
--- a/drivers/xen/sfc_netback/accel_fwd.c       Thu Mar 20 11:35:25 2008 +0000
+++ b/drivers/xen/sfc_netback/accel_fwd.c       Tue Mar 25 17:54:59 2008 +0000
@@ -196,8 +196,13 @@ int netback_accel_fwd_add(const __u8 *ma
        index = rc;
 
        /* Shouldn't already be in the table */
-       BUG_ON(cuckoo_hash_lookup(&fwd_set->fwd_hash_table,
-                                 (cuckoo_hash_key *)(&key), &rc) != 0);
+       if (cuckoo_hash_lookup(&fwd_set->fwd_hash_table,
+                              (cuckoo_hash_key *)(&key), &rc) != 0) {
+               spin_unlock_irqrestore(&fwd_set->fwd_lock, flags);
+               EPRINTK("MAC address " MAC_FMT " already accelerated.\n",
+                       MAC_ARG(mac));
+               return -EEXIST;
+       }
 
        if ((rc = cuckoo_hash_add(&fwd_set->fwd_hash_table,
                                  (cuckoo_hash_key *)(&key), index, 1)) == 0) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] netback accel: Avoid BUG_ON when vifs have conflicting MAC addresses, Xen patchbot-linux-2.6.18-xen <=