Ben Pfaff [Thu, 26 Jun 2008 16:25:47 +0000 (09:25 -0700)]
Add --max-idle option to secchan and controller.
Justin Pettit [Thu, 26 Jun 2008 06:22:39 +0000 (23:22 -0700)]
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.
Justin Pettit [Sat, 14 Jun 2008 02:12:51 +0000 (19:12 -0700)]
Add printing of all supported action types.
Ben Pfaff [Mon, 23 Jun 2008 21:08:37 +0000 (14:08 -0700)]
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.
Ben Pfaff [Fri, 13 Jun 2008 20:36:00 +0000 (13:36 -0700)]
Implement Debian-based packaging and deployment infrastructure.
Ben Pfaff [Fri, 13 Jun 2008 17:18:07 +0000 (10:18 -0700)]
Bring manpages and usage messages up-to-date.
Ben Pfaff [Fri, 13 Jun 2008 17:20:12 +0000 (10:20 -0700)]
Allow priority to be specified in dpctl del-flows command.
Ben Pfaff [Fri, 13 Jun 2008 17:19:46 +0000 (10:19 -0700)]
Make flow specifications more general in dpctl:
- More special port names.
- Allow fields to be comma-separated, for use on command line.
- Allow ANY as a synonym for *, to avoid globbing on command line.
Ben Pfaff [Fri, 13 Jun 2008 18:29:39 +0000 (11:29 -0700)]
Add --detach and --pidfile options to daemons.
Ben Pfaff [Fri, 13 Jun 2008 17:16:58 +0000 (10:16 -0700)]
Set fail-open explicitly as default.
It was the default accidentally before, because FAIL_OPEN happened
to have the value 0.
Justin Pettit [Fri, 13 Jun 2008 03:40:02 +0000 (20:40 -0700)]
Have the switch list all the stats types it support in the capabilities field.
Thanks to Brandon for pointing this out.
Justin Pettit [Fri, 13 Jun 2008 03:07:11 +0000 (20:07 -0700)]
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.
Ben Pfaff [Tue, 10 Jun 2008 21:41:04 +0000 (14:41 -0700)]
Fix "NOHZ: local_softirq_pending 08" message.
Only call netif_rx within an interrupt.
Outside an interrupt, netif_rx_in has to be used.
Ben Pfaff [Mon, 9 Jun 2008 18:01:46 +0000 (11:01 -0700)]
Move manpages from man directory to next to their programs.
Ben Pfaff [Mon, 9 Jun 2008 17:35:49 +0000 (10:35 -0700)]
Add "fail open" feature to secchan.
Ben Pfaff [Wed, 4 Jun 2008 18:08:08 +0000 (11:08 -0700)]
Factor learning switch out of controller into library.
This prepares for adding "fail-open" support to the secchan, which
will require the secchan to act as a learning switch.
Ben Pfaff [Wed, 4 Jun 2008 17:54:01 +0000 (10:54 -0700)]
Only log unprocessed packets in the controller if debugging enabled.
Otherwise OFP_FLOW_EXPIRED messages tend to swamp the console after
a while.
Ben Pfaff [Thu, 5 Jun 2008 20:38:03 +0000 (13:38 -0700)]
Fix "waiting for of0 to become free" message on deldp.
Thanks to Murphy for help debugging this.
Ben Pfaff [Wed, 4 Jun 2008 23:14:39 +0000 (16:14 -0700)]
Delete unneeded line.
Ben Pfaff [Wed, 4 Jun 2008 23:14:23 +0000 (16:14 -0700)]
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.
Ben Pfaff [Wed, 4 Jun 2008 22:57:33 +0000 (15:57 -0700)]
Make boot.sh give an error if pkg-config is not installed.
Ben Pfaff [Wed, 4 Jun 2008 19:30:23 +0000 (12:30 -0700)]
Improve formatting of manpage.
Ben Pfaff [Fri, 30 May 2008 23:09:00 +0000 (16:09 -0700)]
Prevent deadlock in OpenSSL.
Justin Pettit [Wed, 4 Jun 2008 07:40:05 +0000 (00:40 -0700)]
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!
Ben Pfaff [Tue, 3 Jun 2008 00:05:42 +0000 (17:05 -0700)]
Use kernel build system for linux-2.4.
Based on changes originally by Bobby Holley <bobbyholley@stanford.edu>.
Justin Pettit [Tue, 3 Jun 2008 04:30:20 +0000 (21:30 -0700)]
Define skb_reset_mac_header for Linux 2.6 kernels older than 2.6.22.
Ben Pfaff [Mon, 2 Jun 2008 17:18:00 +0000 (10:18 -0700)]
Don't oops on deldp, by avoiding use-after-free on net_bridge_port.
Ben Pfaff [Mon, 2 Jun 2008 17:16:34 +0000 (10:16 -0700)]
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.
Ben Pfaff [Mon, 2 Jun 2008 17:14:02 +0000 (10:14 -0700)]
Free ofX network device when we're done with it.
Ben Pfaff [Mon, 2 Jun 2008 17:13:23 +0000 (10:13 -0700)]
Avoid wild pointer write in del_switch_port().
Ben Pfaff [Tue, 3 Jun 2008 00:06:52 +0000 (17:06 -0700)]
Remove vestigial support for auto-running unit tests.
These hadn't worked for a long time.
Ben Pfaff [Tue, 3 Jun 2008 00:03:29 +0000 (17:03 -0700)]
Fix "make dist" by distributing some more files.
Justin Pettit [Sat, 24 May 2008 20:54:22 +0000 (13:54 -0700)]
Make capitalization consistent.
Ben Pfaff [Thu, 29 May 2008 19:55:55 +0000 (12:55 -0700)]
Fix "make clean" to delete symlinks created by "make".
Ben Pfaff [Wed, 28 May 2008 23:03:36 +0000 (16:03 -0700)]
Ignore NLMSG_DONE Netlink messages in dpif.
Otherwise the secchan considers the NLMSG_DONE at the end of a stats
dump to be an error and disconnects from the netlink connection.
Thanks to Martin for discovering the problem.
Ben Pfaff [Wed, 28 May 2008 23:02:00 +0000 (16:02 -0700)]
Fix use-after-free bug.
Ben Pfaff [Wed, 28 May 2008 23:01:49 +0000 (16:01 -0700)]
Fix typo in error message.
Ben Pfaff [Wed, 21 May 2008 21:31:33 +0000 (14:31 -0700)]
Make in-band communication work.
Ben Pfaff [Wed, 21 May 2008 18:36:43 +0000 (11:36 -0700)]
Make the OFPP_LOCAL port work in the kernel OpenFlow implementation.
Ben Pfaff [Wed, 21 May 2008 17:06:58 +0000 (10:06 -0700)]
Break MAC learning out of controller into library.
This is preparation for use of MAC learning in the secure channel.
Ben Pfaff [Wed, 21 May 2008 21:11:59 +0000 (14:11 -0700)]
New functions for getting and setting network device flags.
This allows us to open network devices without bringing them up
and setting them for promiscuous mode, which will be useful in the
secchan for in-band communication.
Ben Pfaff [Wed, 28 May 2008 17:26:03 +0000 (10:26 -0700)]
Expose device IP addresses through netdev.
This will be useful for the secure channel later.
Ben Pfaff [Wed, 21 May 2008 21:57:15 +0000 (14:57 -0700)]
Move netdev from switch to lib.
This is in preparation for the secure channel wanting to access
network devices.
Ben Pfaff [Tue, 20 May 2008 23:46:57 +0000 (16:46 -0700)]
Print actions in ofp_flow_mod messages.
Ben Pfaff [Wed, 28 May 2008 17:46:40 +0000 (10:46 -0700)]
Pretty-print port numbers when printing ofp_switch_features messages.
Ben Pfaff [Tue, 20 May 2008 23:46:39 +0000 (16:46 -0700)]
Print special ports by name in ofp_packet_in messages.
Ben Pfaff [Tue, 20 May 2008 23:46:15 +0000 (16:46 -0700)]
Put newline before packet info in ofp_packet_out pretty-print output.
Ben Pfaff [Sat, 17 May 2008 03:20:14 +0000 (20:20 -0700)]
Print more special ports by name in ofp-print.c.
Ben Pfaff [Fri, 16 May 2008 19:41:47 +0000 (12:41 -0700)]
Get rid of obsolete, commented-out debugging code in datapath.c.
Ben Pfaff [Wed, 21 May 2008 17:49:02 +0000 (10:49 -0700)]
Demote warning about runt frames to debug message.
This message is not too useful since there are various legitimate
ways that we can end up with runt frames, e.g. frames that only
ever passed through virtual network devices and never touched a
physical Ethernet.
Ben Pfaff [Sat, 17 May 2008 00:00:36 +0000 (17:00 -0700)]
Always do exact-match on undefined flow fields, so that such flows can be in table-hash.
Ben Pfaff [Fri, 16 May 2008 23:02:34 +0000 (16:02 -0700)]
Don't allow CONFIG_PREEMPT with Linux 2.6.x before 2.6.21, because it's busted.
Ben Pfaff [Mon, 19 May 2008 20:39:24 +0000 (13:39 -0700)]
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.
Ben Pfaff [Wed, 28 May 2008 00:42:16 +0000 (17:42 -0700)]
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.
root [Fri, 23 May 2008 04:38:16 +0000 (21:38 -0700)]
- When deleting an entry, remove the entry from "iter_node" as well as "node".
- Clean code up a bit to make it more consistent.
Justin Pettit [Tue, 20 May 2008 19:44:56 +0000 (12:44 -0700)]
- Add Stanford License.
- Remove unnecessary printk.
Justin Pettit [Tue, 20 May 2008 19:43:19 +0000 (12:43 -0700)]
Make sure destroy function was defined before trying to call it.
Justin Pettit [Tue, 20 May 2008 00:35:01 +0000 (17:35 -0700)]
Cleanup extraneous printing of spaces when dumping flows.
Ben Pfaff [Mon, 28 Apr 2008 20:28:45 +0000 (13:28 -0700)]
Add-on hardware tables initial implementation.
Incorporates suggestions from Justin.
Justin Pettit [Thu, 15 May 2008 00:06:39 +0000 (17:06 -0700)]
Prepare for 0.8.1 release.
Justin Pettit [Thu, 15 May 2008 00:06:12 +0000 (17:06 -0700)]
Remove definition of unused function "hash_in6".
Justin Pettit [Wed, 14 May 2008 22:50:30 +0000 (15:50 -0700)]
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.
Justin Pettit [Sat, 10 May 2008 07:45:06 +0000 (00:45 -0700)]
Don't try to use the IP addresses from ARP packets when matching.
Justin Pettit [Sat, 10 May 2008 07:37:41 +0000 (00:37 -0700)]
Fix compiler warning about mismatch with format type.
Justin Pettit [Sat, 10 May 2008 07:27:13 +0000 (00:27 -0700)]
IPv6 is not supported in OpenFlow, so don't try to parse it.
Justin Pettit [Fri, 9 May 2008 18:22:45 +0000 (11:22 -0700)]
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. --
Justin Pettit [Fri, 9 May 2008 17:28:50 +0000 (10:28 -0700)]
Implement the OFPP_ALL virtual port.
-- Reported by Brandon H. --
root [Thu, 8 May 2008 01:19:24 +0000 (18:19 -0700)]
When printing flow expired messages, we should end the line with "\n" instead of "n".
Justin Pettit [Wed, 7 May 2008 22:35:53 +0000 (15:35 -0700)]
Fixed problem where the first line of a stats reply message was not showing up on its own line.
Ben Pfaff [Wed, 7 May 2008 22:21:30 +0000 (15:21 -0700)]
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.
Ben Pfaff [Wed, 7 May 2008 21:43:06 +0000 (14:43 -0700)]
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.)
Justin Pettit [Wed, 7 May 2008 05:11:06 +0000 (22:11 -0700)]
Mark the "vlan_eth_header" struct as packed, because it's getting padded on some architectures.
-- Reported by GigaFin --
root [Tue, 6 May 2008 01:47:50 +0000 (18:47 -0700)]
Clean-up some compiler warnings related to printing numbers.
Ben Pfaff [Mon, 5 May 2008 22:49:22 +0000 (15:49 -0700)]
Fix a secure channel memory leak that appears only under high load.
Ben Pfaff [Mon, 5 May 2008 21:44:24 +0000 (14:44 -0700)]
Fix memory leak in secure channel.
Thanks to Reid for noticing and helping to track down this leak.
Ben Pfaff [Mon, 5 May 2008 19:08:00 +0000 (12:08 -0700)]
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.
Ben Pfaff [Mon, 5 May 2008 18:41:48 +0000 (11:41 -0700)]
Support pre-Linux 2.6.20 genetlink, which didn't have "done" functions for dumps.
Ben Pfaff [Mon, 5 May 2008 18:14:02 +0000 (11:14 -0700)]
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.
Justin Pettit [Mon, 5 May 2008 18:36:15 +0000 (11:36 -0700)]
Check whether kernel has been configured by "version.h" instead of "utsrelease.h", since that convention wasn't introduced until 2.6.18.
Justin Pettit [Mon, 5 May 2008 18:27:39 +0000 (11:27 -0700)]
Officially designate the v0.8.0 release.
Justin Pettit [Mon, 5 May 2008 05:29:48 +0000 (22:29 -0700)]
Get rid of compiler warning under gcc 4.2.
Justin Pettit [Mon, 5 May 2008 04:07:24 +0000 (21:07 -0700)]
Fix problem introduced by kernel threads when building for 2.4.20.
Justin Pettit [Mon, 5 May 2008 04:05:51 +0000 (21:05 -0700)]
Clean-up OpenFlow main header a bit.
Justin Pettit [Sat, 3 May 2008 04:53:15 +0000 (21:53 -0700)]
Fix typo in comment.
Justin Pettit [Sat, 3 May 2008 04:51:02 +0000 (21:51 -0700)]
Finishing touches on v0.8.0 release candidate.
Justin Pettit [Sat, 3 May 2008 04:46:39 +0000 (21:46 -0700)]
- Update man pages to reflect recent spat of changes.
- Clean-up man pages.
Justin Pettit [Sat, 3 May 2008 00:43:16 +0000 (17:43 -0700)]
Send the features request before the set config to be OpenFlow-compliant.
Ben Pfaff [Sat, 3 May 2008 00:32:39 +0000 (17:32 -0700)]
Add build directory to include path.
Otherwise generated headers (forward_t.h) will not be found at build
time.
Ben Pfaff [Sat, 3 May 2008 00:10:12 +0000 (17:10 -0700)]
Suppress Automake warnings about GNU make extensions in Modules.mk files.
Ben Pfaff [Fri, 2 May 2008 23:57:54 +0000 (16:57 -0700)]
Implement aggregate flow statistics in kernel and userspace switches.
Ben Pfaff [Fri, 2 May 2008 22:51:08 +0000 (15:51 -0700)]
Reduce spurious recompilations for Linux 2.4 datapath.
We need object files to depend on the build directories, so that the
build directories get created before we try to output files into them.
But making them depend directly on the build directories means that
whenever a build directory changes (including any change to the set of
files inside it) all the source files get recompiled. So, instead, make
them depend on dummy files inside the directories, which will only get
modified if someone does it intentionally.
Ben Pfaff [Fri, 2 May 2008 18:37:04 +0000 (11:37 -0700)]
Remove MAX_ACTIONS (which was 16) as a limit on the number of actions in a flow table entry.
Now the number of actions is limited, as a practical matter, to the size
of the buffer that the kernel provides for Netlink dumps, which is usually
4096 bytes. A flow statistics entry must fit in a single one of these
buffers. Actions are 8 bytes each, so this is about 500 actions
considering overhead.
Ben Pfaff [Fri, 2 May 2008 17:52:53 +0000 (10:52 -0700)]
Send actions as part of flow statistics messages.
Ben Pfaff [Fri, 2 May 2008 01:26:21 +0000 (18:26 -0700)]
Add max_idle field to flow stats messages.
Justin Pettit [Fri, 2 May 2008 00:10:20 +0000 (17:10 -0700)]
- Add priority to flow expiration messages.
- Clear contents of "pad" field port status messages.
Ben Pfaff [Fri, 2 May 2008 00:01:25 +0000 (17:01 -0700)]
Convert tabs to spaces to fix indentation issues.
Ben Pfaff [Fri, 2 May 2008 00:02:13 +0000 (17:02 -0700)]
Implement new statistics format in kernel and userspace switches.
This change really cuts the muster!
Ben Pfaff [Wed, 30 Apr 2008 21:16:35 +0000 (14:16 -0700)]
Drop prototype for function that does not exist.
Ben Pfaff [Wed, 30 Apr 2008 23:26:33 +0000 (16:26 -0700)]
Clear padding bytes in fill_flow_stats(), to avoid state leakage.
Found by valgrind.
Ben Pfaff [Wed, 30 Apr 2008 22:33:21 +0000 (15:33 -0700)]
Initialize n_flows member in table-hash.
Found by valgrind.