On Thu, Sep 10, 2009 at 03:29:14PM -0700, Ben Pfaff wrote:
> Jean Tourrilhes <[email protected]> writes:
> 
> >     To reproduce :
> > -----------------------------------------------------------
> > # rmmod openflow_mod
> > # insmod datapath/linux-2.6/openvswitch_mod.ko
> > insmod: error inserting 'datapath/linux-2.6/openvswitch_mod.ko': -1 Address 
> > already in use
> > # rmmod 8021q garp stp
> > # insmod datapath/linux-2.6/openvswitch_mod.ko
> > # 
> > -----------------------------------------------------------
> 
> You can remove the calls to llc_sap_open() and llc_sap_put() from
> dp_init() and dp_cleanup() in datapath/datapath.c.  They are
> there for mutual exclusion only, but that stopped working
> sometime in 2.6.2x.  We will fix this eventually; so far this is
> the first report we've received of it causing trouble "in the
> wild", so maybe it's time to raise the priority.

        Thanks for the super quick answer, it was very helpful.
        I still have a few issue to make it work fully, but I already
made some good progress.

        I've got a little patch for 0.90.4 :
                o The VLAN issue
                o compilation with 2.6.30
                o enable actions other than OFPAT_OUTPUT and OFPAT_VENDOR

        Good luck...

        Jean
diff -u -p -r -x '*~' openvswitch-0.90.4/datapath/datapath.c openvswitch-0.90.4-jean-1/datapath/datapath.c
--- openvswitch-0.90.4/datapath/datapath.c	2009-07-28 10:32:16.000000000 -0700
+++ openvswitch-0.90.4-jean-1/datapath/datapath.c	2009-09-10 15:39:33.000000000 -0700
@@ -177,7 +177,8 @@ static void dp_ifinfo_notify(int event, 
 		kfree_skb(skb);
 		goto errout;
 	}
-	err = rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_KERNEL);
+	/* Jean II : returns void in 2.6.30 */
+	rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_KERNEL);
 errout:
 	if (err < 0)
 		rtnl_set_sk_err(net, RTNLGRP_LINK, err);
@@ -1550,6 +1551,7 @@ static int __init dp_init(void)
 
 	printk("Open vSwitch %s, built "__DATE__" "__TIME__"\n", VERSION BUILDNR);
 
+#ifdef BUG_VLAN
 	/* Register to receive STP packets because the bridge module also
 	 * attempts to do so.  Since there can only be a single listener for a
 	 * given protocol, this provides mutual exclusion against the bridge
@@ -1560,6 +1562,7 @@ static int __init dp_init(void)
 		printk(KERN_ERR "openvswitch: can't register sap for STP (probably the bridge module is loaded)\n");
 		return -EADDRINUSE;
 	}
+#endif	/* BUG_VLAN */
 
 	err = flow_init();
 	if (err)
@@ -1594,7 +1597,9 @@ static void dp_cleanup(void)
 	unregister_netdevice_notifier(&dp_device_notifier);
 	flow_exit();
 	br_handle_frame_hook = NULL;
+#ifdef BUG_VLAN
 	llc_sap_put(dp_stp_sap);
+#endif	/* BUG_VLAN */
 }
 
 module_init(dp_init);
diff -u -p -r -x '*~' openvswitch-0.90.4/lib/vconn.c openvswitch-0.90.4-jean-1/lib/vconn.c
--- openvswitch-0.90.4/lib/vconn.c	2009-07-28 10:32:16.000000000 -0700
+++ openvswitch-0.90.4-jean-1/lib/vconn.c	2009-09-10 16:49:07.000000000 -0700
@@ -1247,7 +1247,7 @@ check_action(const union ofp_action *a, 
 {
     int error;
 
-    switch (a->type) {
+    switch (ntohs(a->type)) {
     case OFPAT_OUTPUT:
         error = check_action_port(ntohs(a->output.port), max_ports);
         if (error) {
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org

Reply via email to