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

xen-devel

[Top] [All Lists]

[Xen-devel] [Patch] Fix for BUG when MAC addresses conflict

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [Patch] Fix for BUG when MAC addresses conflict
From: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Date: 2008年3月25日 14:26:51 +0000
Delivery-date: 2008年3月25日 07:27:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
When the Solarflare network acceleration plugins are used they currently
do a BUG check to make sure that they're not being used on multiple
guest interfaces with the same MAC address. While this is a
configuration error it's not very nice to BUG dom0 as a result, so I've
attached a patch that instead returns an error. Acceleration will
continue on the first interface with that MAC address but any subsequent
ones will be declined and continue to use the normal network path.
Signed-off-by: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Avoid BUG_ON when vifs have conflicting MAC addresses
diff -r de57c3f218fb drivers/xen/sfc_netback/accel_fwd.c
--- a/drivers/xen/sfc_netback/accel_fwd.c
+++ b/drivers/xen/sfc_netback/accel_fwd.c
@@ -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) {
Kieran

Attachment: accel_mac_conflict
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [Patch] Fix for BUG when MAC addresses conflict, Kieran Mansley <=
Previous by Date: RE: [Xen-devel] MSI and VT-d interrupt remapping , Espen Skoglund
Next by Date: RE: [Xen-devel] MSI and VT-d interrupt remapping , Jiang, Yunhong
Previous by Thread: [Xen-devel][PATCH]Processor count in ACPI firmware , Xu, Dongxiao
Next by Thread: [Xen-devel] [PATCH] stubdom: fix x86_64 irq stack size , Samuel Thibault
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /