Commit Graph
102 Commits
Author SHA1 Message Date
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
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
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
Ben Pfaff 0d5760232d Fix "make dist" by distributing some more files. 2008-06-02 17:03:45 -07:00
Ben Pfaff d558974c4a Fix "make clean" to delete symlinks created by "make". 2008-05-29 12:55:55 -07:00
Ben Pfaff 59ba307325 Make the OFPP_LOCAL port work in the kernel OpenFlow implementation. 2008-05-28 10:46:54 -07:00
Ben Pfaff 94ce314ecb Get rid of obsolete, commented-out debugging code in datapath.c. 2008-05-28 09:58:22 -07:00
Ben Pfaff 253d1704aa Always do exact-match on undefined flow fields, so that such flows can be in table-hash. 2008-05-28 09:58:22 -07:00
Ben Pfaff e5ccf3cc8b Don't allow CONFIG_PREEMPT with Linux 2.6.x before 2.6.21, because it's busted. 2008-05-28 09:58:22 -07:00
Ben Pfaff 4f8e1eb539 Fix buggy table-linear iterator function.
Apparently the linear table iteration had never really been tested,
since most flows go into table-hash.  It didn't work.  This fixes it.
2008-05-28 09:58:22 -07:00
Ben Pfaff dfdde7a55f Don't ever send frames on OpenFlow devices to the host stack.
On Linux 2.6 only, we would send frames received on OpenFlow devices to
the host TCP/IP stack if the dest Ethernet address matched the device's
Ethernet address (or under some other conditions).  This caused confusion
when the host stack was configured for forwarding, because received IP
packets would be forwarded to other interfaces with IP addresses even if
the device on which they were received was configured with no IP address.
(This was discovered by Murphy.  Thanks Murphy!)

This change drops this "feature".  A more or less equivalent feature that
may be less prone to confusion and which works on any kernel version will
be added in a future commit via the of%d device.

This also allowed factoring out common code from the bridge hooks.
2008-05-27 17:42:40 -07:00
root 10d1259a9b - When deleting an entry, remove the entry from "iter_node" as well as "node".
- Clean code up a bit to make it more consistent.
2008-05-22 21:38:16 -07:00
Justin Pettit e8a84e56c9 - Add Stanford License.
- Remove unnecessary printk.
2008-05-20 12:44:56 -07:00
Justin Pettit b968c34567 Make sure destroy function was defined before trying to call it. 2008-05-20 12:43:19 -07:00
Ben Pfaff a0fd7dde11 Add-on hardware tables initial implementation.
Incorporates suggestions from Justin.
2008-05-14 22:18:36 -07:00
Justin Pettit df50f327ff Remove definition of unused function "hash_in6". 2008-05-14 17:06:12 -07:00
Justin Pettit 7a1d4f038d Fix problem with identifying SNAP frames when extracting flows.
The ssap field was being checked twice to see if it was SNAP, when one of the checks should have been dsap.
2008-05-14 15:50:30 -07:00
Justin Pettit 03addaad57 Don't try to use the IP addresses from ARP packets when matching. 2008-05-10 00:45:06 -07:00
Justin Pettit d22fc1ef68 IPv6 is not supported in OpenFlow, so don't try to parse it. 2008-05-10 00:27:13 -07:00
Justin Pettit 3cf996b4cd Zero-out invalid fields when extracting a "match" and transforming it into a "flow".
When the controller wishes to add a flow entry to the switch, it sends a request with a description of matching flows in a "match".  The switch was adding these exactly as described into the flow tables.  However, when packets arrived, all invalid fields (e.g., the TCP/UDP ports in a non-TCP/UDP packet) are set to zero.  If the rule being added by the controller had not set these invalid fields to zero, the packets would never match.  We now zero out these fields when extracing a "match".

-- Reported by Brandon H. --
2008-05-09 11:24:04 -07:00
Justin Pettit 5f4a12ce38 Implement the OFPP_ALL virtual port.
-- Reported by Brandon H. --
2008-05-09 11:24:04 -07:00
Ben Pfaff c8e4cbbd3a Treat flows without any wildcards as maximum priority.
Otherwise, we give the table implementations the opportunity to screw up
by distinguishing between two flows without wildcards but with apparently
different priorities that are required to be treated as the same priority.
2008-05-07 15:23:45 -07:00
Ben Pfaff bbf5f5607f When deleting flows, only insist on matching priority with strict matching.
(The code before this change would only ever delete flows if strict
matching was turned on.)
2008-05-07 15:23:45 -07:00
root a6c34acd7a Clean-up some compiler warnings related to printing numbers. 2008-05-05 18:49:10 -07:00
Ben Pfaff ff9464d2ad Fix compilation on Linux 2.6.20: declare NLMSG_DEFAULT_SIZE with this kernel.
NLMSG_DEFAULT_SIZE was introduced in 2.6.20-rc1 in commit 339bf98ff,
"[NETLINK]: Do precise netlink message allocations where possible", but
we only defined it for kernels 2.6.18 and earlier.  This change fixes
up the discrepancy.
2008-05-05 14:56:28 -07:00
Ben Pfaff 510763c801 Support pre-Linux 2.6.20 genetlink, which didn't have "done" functions for dumps. 2008-05-05 14:56:28 -07:00
Ben Pfaff 726bd68327 Compile fix for Linux 2.6.26-rc1: don't use the removed list_for_each_safe_rcu macro.
There is no need for a "safe" version of the RCU list iteration macros,
because the ordinary version of the macros is "safe".  Linux 2.6.26-rc1
removed these "safe" versions, so this change modifies OpenFlow's uses
of these macros to use the ordinary versions.  This also simplifies the
code because we don't need to use the list_entry macros any longer.
2008-05-05 12:17:04 -07:00
Justin Pettit f4c3fbc94d Check whether kernel has been configured by "version.h" instead of "utsrelease.h", since that convention wasn't introduced until 2.6.18. 2008-05-05 11:36:15 -07:00
Justin Pettit 0b22dde033 Get rid of compiler warning under gcc 4.2. 2008-05-04 22:29:48 -07:00
Justin Pettit d54088ba92 Fix problem introduced by kernel threads when building for 2.4.20. 2008-05-04 21:07:24 -07:00
Ben Pfaff 98657c45e9 Add build directory to include path.
Otherwise generated headers (forward_t.h) will not be found at build
time.
2008-05-02 17:33:34 -07:00