Commit Graph
130 Commits
Author SHA1 Message Date
Glen Gibb 0c3ebf64e5 Compatibility fixes for CentOS 5.2 2008-09-23 12:53:32 -07:00
Ben Pfaff b569f3fdb8 Compatibility fixes for 2.6.18 kernel
Functions added in the 2.6.22 kernel in tcp.h and skbuff.h
have been added to the compatibility headers. Additionally
the data argument was dropped in 2.6.22 for the work queue
macros, requiring them to be redfined for previous kernels.

Based on changes from David Erickson.
2008-09-22 16:08:48 -07:00
Ben Pfaff 0882a576a0 Fix memory leak when OFPP_TABLE is used for a packet that matches no flow. 2008-09-22 16:08:37 -07:00
Glen Gibb 1feb499bf3 Merge commit '7b3017805866b2bb36a092a3ea25ff0ec9b6fd9e' into experimental
Conflicts:

	datapath/hwtable-dummy/hwtable-dummy.c
	datapath/hwtable_dummy/Modules.mk
	datapath/hwtable_dummy/hwtable_dummy.c
	datapath/hwtable_nf2/hwtable_nf2.c
	utilities/dpctl.c

Resolved above conflicts
2008-09-22 16:02:39 -07:00
Justin Pettit 15c94784de Export the "dp_mutex" symbol, since it's needed by the hardware tables. 2008-07-28 16:08:37 -07:00
Ben Pfaff be25fa83e8 Merge branch 'locking' 2008-07-24 16:07:32 -07:00
Ben Pfaff 42c25524bf Distribute new rculist.h headers. 2008-07-21 15:41:38 -07:00
Ben Pfaff 829de2e8b9 Get rid of now-excessive levels of indirection in hwtable_dummy. 2008-07-21 14:06:36 -07:00
Ben Pfaff fbdb49ffdc Verify that sleeping is allowed in chain contexts where Broadcom will need to. 2008-07-21 13:59:55 -07:00
Ben Pfaff f2232335ab Don't need 'deleted' member of struct flow.
Flow deletion is already fully serialized on dp_mutex.
2008-07-21 13:59:55 -07:00
Ben Pfaff 7d73c8bac5 Don't use atomic_t for tracking table flow counts.
Changes to n_flows is already fully serialized by dp_mutex.
2008-07-21 13:59:54 -07:00
Ben Pfaff 53e16ab6f3 Get rid of unnecessary synchronization in tables.
The table insert and delete functions are already fully serialized
on dp_mutex (and genl_mutex), so there's no need for them to use
additional spinlocks.
2008-07-21 13:59:54 -07:00
Ben Pfaff d50ae013a2 Properly synchronize dp_dev destruction.
Before, we didn't really synchronize this at all.  Now, when we want
to destroy the ofX device, we stop the transmit path and wait for
in-progress transmissions to finish.
2008-07-21 13:59:12 -07:00
Ben Pfaff 47b8652dbe Simplify use of dp_mutex.
There was little point in taking the dp_mutex farther down in the
code than dp_genl_openflow, since that function is already completely
serialized by genl_rcv across the genl_mutex.  We could get rid of
dp_mutex completely, except that we still need it to serialize timeout.
2008-07-21 13:59:10 -07:00
Ben Pfaff 988b8ef729 Get rid of useless use of rcu_read_lock.
These code paths are fully protected by the Generic Netlink genl_mutex,
which is taken by genl_rcv() that calls dp_genl_openflow(), so there is
no need for them to take the rcu_read_lock.
2008-07-21 13:26:37 -07:00
Ben Pfaff b926a8f5e6 Fix build on Linux 2.6.26.
Linux 2.6.26 requires us to additionally include <linux/rculist.h>
to use RCU lists.
2008-07-19 16:14:18 -07:00
Ben Pfaff 21185e5db1 Set skb->dev before calling netif_rx().
Fixes null pointer dereference reported by David Erickson
<derickso@stanford.edu>.
2008-07-18 13:42:37 -07:00
Ben Pfaff 86ffdbea9f Fix "make dist". 2008-07-18 13:42:37 -07:00
Ben Pfaff a304614f57 Prevent switch implementations from complaining about echo-reply messages.
Thanks to Reid Price <reid@nicira.com> for reporting the issue (which
only caused spurious warning messages).
2008-07-15 12:43:59 -07:00
Ben Pfaff 88df6edbfa Drop "benchmark" netlink message and "benchmark-nl" dpctl command.
The new OFPT_ECHO_REQUEST and OFPT_ECHO_REPLY OpenFlow messages
have the same functionality and are more general (in that they
are not Netlink-specific).
2008-07-01 10:59:04 -07:00
Ben Pfaff 258f32a084 Respond to echo requests in OpenFlow implementations.
Nothing yet sends such requests.  This is preparation for their
use in following commits.
2008-07-01 10:51:50 -07:00
Ben Pfaff 210b2ad921 Fix commit 8bdd107e0 (jiffies linking error) when not running on Red Hat.
From David Erickson <derickso@stanford.edu>.
2008-07-01 09:02:59 -07:00
Justin Pettit 91cfc8f5dc Don't allow adding a flow entry with an output port of OFPP_NONE. 2008-06-30 21:41:46 -07:00
David Erickson 8bdd107e04 Fixed a linking collision where jiffies have been backported to kernel
2.6.18-53 which is included in CENTOS 5.1.
2008-06-30 20:27:00 -07:00
brandonh cedfdebfd0 added check for RH kernel, copied from master, to get past build error 2008-06-29 18:19:15 -07:00
Ben Pfaff 89d08b1a17 Modified the naming scheme for hardware tables.
Because of historical string munging during the kernel build process
if you named your hardware table hwtable-something, when it was built
the filename would look appropriate, but the actual module info would change
the internal name to be hwtable_something, thus after an insmod with the filename
you could not perform an rmmod with the same filename. As a result
the naming scheme has been changed to hwtable_NAME, NAME being the hardware
the table supports.

Further, include files in the hardware table should be prefixed with the
folder name, e.g. #include "hwtable_NAME/my_header.h".

Based on commits from David Erickson <derickso@stanford.edu>.
2008-06-26 16:21:18 -07:00
David Erickson f4fed74d12 Updated header file includes to include relative pathname.
-All header includes now contain the hwtable_nf2 prefix.
2008-06-26 14:26:50 -07:00
David Erickson 536327b54b Modified the naming scheme for hardware tables.
Because of historical string munging during the kernel build process
if you named your hardware table hwtable-something, when it was built
the filename would look appropriate, but the actual module info would change
the internal name to be hwtable_something, thus after an insmod with the filename
you could not perform an rmmod with the same filename. As a result
the naming scheme has been changed to hwtable_NAME, NAME being the hardware
the table supports.

Further, include files in the hardware table should be prefixed with the folder name, ie
\#include "hwtable_NAME/my_header.h".
2008-06-26 14:26:50 -07:00
Justin Pettit 58dc4ead3b Fix VLAN modification action in kernel switch.
A number of errors were uncovered when we actually tried playing with VLAN tags on real traffic.  This fixes endian, sk_buff, and other issues.  Unrelated to VLAN tagging, this also protects some printk calls with net_ratelimit.
2008-06-25 23:22:39 -07:00
David Erickson 29b98a4a4e Fixed a linking collision where jiffies have been backported to kernel
2.6.18-53 which is included in CENTOS 5.1.
2008-06-23 16:22:49 -07:00
Ben Pfaff bc96a226a9 Drop "send_openflow_skb: send failed: -3" warning.
This message appeared in the normal course of OpenFlow usage when
a packet arrived on an OpenFlow interface and no secure channel
was running, or if packets arrived too fast for the secure channel
to process them.  It confused more people than it assisted, so drop
it.
2008-06-23 14:08:37 -07:00
jiangzhu 9d11a3bc70 mpis related changes. 2008-06-22 23:49:12 -07:00
David Erickson 54ffb5a7f6 Changed the naming of the module to correspond with the build system name change 2008-06-21 18:39:08 -07:00
David Erickson 23b028c833 Added the base directory of the hardware table modules to the include path for compilation.
Renamed the base directory of a hardware table module from hwtable-* to hwtable_* to alleviate
the KBUILD_NODNAME string munging that occurs during compilation which changes all -'s to _'s
causing the bug that when you load the kernel module then try to remove it with the same
filename, it will fail.
2008-06-21 18:26:25 -07:00
David Erickson 16dbc5e770 Removed a merge remnant 2008-06-21 16:12:33 -07:00
David Erickson b8268ab882 First NF2 Hardware Table commit, functionally passes tests as of 06-21-08. 2008-06-21 15:59:37 -07:00
Justin Pettit 8c0321d913 Have the switch list all the stats types it support in the capabilities field.
Thanks to Brandon for pointing this out.
2008-06-12 20:40:02 -07:00
Justin Pettit 3df9750d38 Fix identification of SNAP packets.
The result of the memcmp that checks whether the OUI is all zeroes was the reverse of what it should have been.  This checkin also removes the masking of the least signficant bit from SAP checks, since it's not need for checking SNAP.

Thanks to Masa and Brandon for catching this.
2008-06-12 20:07:11 -07:00
Ben Pfaff 4a513559a8 Fix "NOHZ: local_softirq_pending 08" message.
Only call netif_rx within an interrupt.
Outside an interrupt, netif_rx_in has to be used.
2008-06-10 14:41:04 -07:00
Ben Pfaff 6787fab28f Fix "waiting for of0 to become free" message on deldp.
Thanks to Murphy for help debugging this.
2008-06-05 13:38:09 -07:00
Ben Pfaff 2f90b053c1 Delete unneeded line. 2008-06-04 16:14:39 -07:00
Ben Pfaff fac543387f Fix "make dist" in datapath/linux-2.4 when --with-l24 not used.
This makes the linux-2.4 Makefile.main.in structure much more
similar to the linux-2.6 Makefile.main.in.
2008-06-04 16:14:23 -07:00
Justin Pettit a3479a759d Fixed typos in dummy hardware table example that caused compilation errors.
This still has a license conflict with GPL-only "call_rcu" function.  We'll figure this out later.  Thanks for pointing it out, Ben!
2008-06-04 00:40:05 -07:00
Ben Pfaff 34b307bea6 Use kernel build system for linux-2.4.
Based on changes originally by Bobby Holley <bobbyholley@stanford.edu>.
2008-06-03 14:02:13 -07:00
Justin Pettit be92f541ae Define skb_reset_mac_header for Linux 2.6 kernels older than 2.6.22. 2008-06-02 21:30:20 -07:00
Ben Pfaff fc51dcfff9 Don't oops on deldp, by avoiding use-after-free on net_bridge_port. 2008-06-02 20:18:38 -07:00
Ben Pfaff 0b75446a26 Don't try to destroy dp_dev while the local port holds a reference to it.
Fixes a message output at deldp time:
unregister_netdevice: waiting for of0 to become free. Usage count = 1

Thanks to Murphy and Justin for reporting this bug.
2008-06-02 20:18:38 -07:00
Ben Pfaff 913e36d3f6 Free ofX network device when we're done with it. 2008-06-02 20:18:38 -07:00
Ben Pfaff 26e5b3af27 Avoid wild pointer write in del_switch_port(). 2008-06-02 20:18:38 -07:00
Ben Pfaff cdb3bb9ebf Remove vestigial support for auto-running unit tests.
These hadn't worked for a long time.
2008-06-02 17:06:52 -07:00