Commit Graph

36 Commits

Author SHA1 Message Date
Ben Pfaff c5f976a78f Get rid of build dependency on netlink-related headers from Linux 2.6.
This fixes userspace program build problems on top of systems with
Linux 2.4 headers.
2008-04-24 16:29:53 -07:00
Justin Pettit fc2925fecf Add priority field to flow_mod...code to support this forthcoming. 2008-04-21 18:13:42 -07:00
Justin Pettit 95a73db4c2 Mark structures as packed that cause alignment problems on architectures like ARM. 2008-04-21 13:46:36 -07:00
Justin Pettit 0d3a0643c4 Switch from "stat" to "stats" everywhere. 2008-04-16 15:38:25 -07:00
Justin Pettit 541d0fee0d - Keep datapath config in host-byte order (and fix a couple of bugs related to this).
- Fix type for "get config" replies.
2008-04-16 14:09:27 -07:00
Justin Pettit 17c21631d5 Use new OpenFlow protocol versioning scheme. 2008-04-16 10:39:21 -07:00
Justin Pettit d485c3f0ce Finish removing references to the MAC table. 2008-04-15 13:42:35 -07:00
Ben Pfaff 6f8d45bf7d Merge remote branch 'repo/master' into stats
Conflicts:

	datapath/table-mac.c
2008-04-15 09:57:38 -07:00
Ben Pfaff d2552c15f3 Make table_id in OpenFlow messages 8 bits, since 255 should be enough.
Suggested by Justin.
2008-04-15 09:56:46 -07:00
Ben Pfaff 0a1a667973 Make duration in ofp_flow_stats a 32-bit quantity (instead of 16).
Otherwise duration is capped at under 24 hours.

Suggested by Justin.
2008-04-15 09:56:41 -07:00
Justin Pettit e28564c5fa Add support for OFPP_TABLE virtual port. 2008-04-11 17:40:05 -07:00
Justin Pettit 0a9024a2d7 Changes based on feedback from GigaFin. 2008-04-10 15:50:25 -07:00
Ben Pfaff f6cae73ec3 Implement OpenFlow statistics in switches and in dpctl.
This has two notable omissions.  First, only at most 4k of flow statistics
are reported.  Second, aggregate statistics are not yet supported.  Both
of these are fairly easily fixable, just not fixed yet.
2008-04-04 16:22:40 -07:00
Ben Pfaff f30d8168a7 Factor out parsing vconn-ssl options. 2008-04-04 16:22:23 -07:00
Ben Pfaff a14c841f32 Factor out printing the list of available vconns. 2008-04-04 16:22:23 -07:00
Ben Pfaff 60a87c9b00 Break data_hello and control_hello messages into multiple messages.
We want to allow multiple OpenFlow connections to a switch, so that
dpctl and other management tools can also connect to a switch that
is connecte to the controller.  These tools will want to fetch the
information in the data_hello message, but currently this can only
be done by sending a control_hello message, which changes the
switch configuration state.  So breaking the hello messages up into
multiple different messages, only some of which affect configuration
state, cures the problem.

Also, clean up the kernel datapath a bit, by adding helper functions
for allocating and resizing Generic Netlink messages that encapsulate
OpenFlow messages.
2008-04-04 16:22:21 -07:00
Ben Pfaff 14da11884d Rename controller_connection to rconn and use it in secchan also.
Also, clean up code and add comments.
2008-04-04 16:20:55 -07:00
Ben Pfaff c2fa32706e Add new functions for pretty-printing an OpenFlow message to a string.
This makes it possible to send pretty-printed versions of OpenFlow
messages to vlog.
2008-04-04 16:20:55 -07:00
Ben Pfaff 0a0a1dbe4c Add vlog functions and macros for testing whether a module and level are enabled. 2008-04-04 16:20:54 -07:00
Ben Pfaff d819180e3d Add comments to queue module. 2008-04-01 09:52:59 -07:00
Ben Pfaff 327a6be24f Clean up and comment poll-loop module. 2008-04-01 09:52:59 -07:00
Ben Pfaff 57ed58bca4 Get rid of ip.h, migrating its users to packets.h. 2008-04-01 09:52:59 -07:00
Ben Pfaff d927b51cb4 Get rid of mac.h, migrating its users to packets.h.
As a consequence, this fixes tests for multicast and local Ethernet
addresses, which formerly tested for the high bits but should
have tested for the low bits of the first octet.
2008-04-01 09:52:59 -07:00
casado 3f0201adb5 Update copyright on all non-GPL files 2008-03-27 20:12:18 -07:00
Ben Pfaff a8b4fd4096 Improve comment. 2008-03-27 17:50:33 -07:00
Ben Pfaff fa20a0ed56 Add tag to enum for OpenFlow statistics type. 2008-03-27 17:50:33 -07:00
Ben Pfaff ee5d466f7f New function list_replace(), to replace a list element in-place. 2008-03-27 17:50:33 -07:00
Ben Pfaff 76c58e37e3 Add pointers to headers to buffer, and initialize them in flow_extract.
This will be used in the userspace switch implementation.
2008-03-27 17:50:33 -07:00
Ben Pfaff bce273b4c0 Add abstraction of packet queue, and use it in the controller.
The packet queue abstraction will also be used in the userspace
switch.
2008-03-27 17:50:33 -07:00
Ben Pfaff a9111b6015 Add the ability to connect to a vconn asynchronously.
Until now, vconn_connect() has always completed the connection
synchronously, blocking as necessary.  In the userspace
switch, we want to be able to continue forwarding packets even
if the connection to the controller drops.  Thus, this change set
that makes that possible.

The approach taken is perhaps more ambitious than needed, as it
actually adds a new high-level mechanism for polling on arbitrary
file descriptors.  This necessitates quite a bit of change to
each of the userspace programs that use vconns, but it also has
the effect of simplifying them.  The new structure of these programs
is a lot less fragile than the old one (which tended to end up
livelocking or hanging when something wasn't quite right), so it
seems like the changes are worth it.
2008-03-27 17:50:33 -07:00
Ben Pfaff 5875f5b634 Make vlog preserve errno.
This means that adding logging to code disturbs the program's state
as little as possible.  This is a precautionary measure, not in response
to any particular bug.
2008-03-27 17:50:33 -07:00
Ben Pfaff beddfa0e0e Add additional definitions for Ethernet addresses and headers and for VLAN headers. 2008-03-27 17:50:33 -07:00
Ben Pfaff be8f42912a Fix LIST_FOR_EACH_SAFE macro.
The previous definition had a syntax error that prevented it from
working.
2008-03-27 17:50:33 -07:00
Justin Pettit d170209c76 Make sure all the needed SSL files are included in generated distributions. 2008-03-19 23:13:42 -07:00
Ben Pfaff cf6207b610 Support SSL in secchan and controller. 2008-03-13 15:17:45 -07:00
Martin Casado 468e00132f Initial import 2008-03-04 13:12:53 -08:00