Commit Graph

47 Commits

Author SHA1 Message Date
Ben Pfaff bab6bdbe58 vconn: Implement Unix domain socket vconn.
These are useful for local management connections because, unlike TCP
sockets, they are subject to regular file system permissions.
2008-07-30 15:45:21 -07:00
Ben Pfaff 5fed6531b9 Enable secchan, ofp-discover to update /etc/resolv.conf.
This way it becomes possible to more reliably refer to the controller
and the PKI server using hostnames.
2008-07-23 14:30:59 -07:00
Ben Pfaff a1255475a4 New utility ofp-kill.
Needed for controller discovery in upcoming revision of ofp-switch-setup.
2008-07-23 13:12:23 -07:00
Ben Pfaff 32c18a40af New program ofp-discover. 2008-07-23 13:12:21 -07:00
Ben Pfaff 685ac1fe5a dpctl: Get rid of effectively unused variable. 2008-07-22 13:56:26 -07:00
Ben Pfaff 4d7977d636 Don't unnecessarily link against -lresolv and -ldl.
Eliminates warnings given by dpkg-shlibdeps when building Debian
packages.
2008-07-21 15:45:35 -07:00
Ben Pfaff f730dded18 Move Autoconf's macro definitions into config.h.
This makes "make" output slightly more readable.
2008-07-21 15:05:53 -07:00
Ben Pfaff f24230f9d9 Drop use of libtool for libraries.
libtool was needed when NOX was directly linking against libopenflow.
Since it doesn't do that anymore, we can drop its use (and that makes
OpenFlow configure and build slightly faster).
2008-07-21 15:05:53 -07:00
Ben Pfaff 6e1d7e4254 Only link programs that need it against OpenSSL.
This keeps vlogconf, in particular, from being linked against OpenSSL,
which in turn keeps the Debian package build tools from complaining that
the openflow-common package shouldn't need to depend on OpenSSL but does
because of the spurious library link.
2008-07-21 15:05:53 -07:00
Ben Pfaff 1b6df17a65 Make facility and level optional in -v, --verbose options.
This makes it easier to set a given module to maximum verbosity,
as is often useful for debugging.
2008-07-18 14:16:40 -07:00
Ben Pfaff 1297ff43df vconn: Add new function vconn_transact() and use it to simplify dpctl.c. 2008-07-18 14:16:38 -07:00
Ben Pfaff 4d90ee6aef vconn: Add utility functions make_openflow() and update_openflow_length().
Use these functions to simplify code that creates and sends
OpenFlow packets.
2008-07-18 14:08:18 -07:00
Ben Pfaff 4f0f7b0316 Add "probe" command to dpctl. 2008-07-15 13:03:33 -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 b1411b9c75 Add "benchmark" command to work like "benchmark-nl" with echo requests.
Suggested by Justin.
2008-07-01 10:59:04 -07:00
Ben Pfaff 94b1e7a7de Add "ping" command to dpctl for testing echo requests.
Also may be useful for latency testing.
2008-07-01 10:51:50 -07:00
Ben Pfaff 7225d06a78 Add utility functions for generating random numbers, and use where appropriate. 2008-07-01 10:51:47 -07:00
Justin Pettit 34d507b6a6 Improve flow handling in dpctl.
This makes the handling of defining and printing actions more consistent in
dpctl.  The flow portion of the output of "dump-flows" can now be used as the
input of "add-flows".  Flows can be added on the command line with the new
"add-flow" command.
2008-06-30 23:05:14 -07:00
Ben Pfaff 62fd5fc447 Implement Debian-based packaging and deployment infrastructure. 2008-06-13 13:36:00 -07:00
Ben Pfaff 07f8d9645c Bring manpages and usage messages up-to-date. 2008-06-13 13:30:39 -07:00
Ben Pfaff 24ff8279e7 Allow priority to be specified in dpctl del-flows command. 2008-06-13 13:30:39 -07:00
Ben Pfaff 72223f2a8b 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.
2008-06-13 13:30:34 -07:00
Ben Pfaff 9446ee791c Move manpages from man directory to next to their programs. 2008-06-09 11:01:46 -07:00
Ben Pfaff f7bf3916ff Implement aggregate flow statistics in kernel and userspace switches. 2008-05-02 16:58:33 -07:00
Ben Pfaff 3b9c97ee01 Implement new statistics format in kernel and userspace switches.
This change really cuts the muster!
2008-05-01 17:04:44 -07:00
Justin Pettit d1d2f3f321 - On flow entries with wildcards, match priority field when doing a "strict" delete.
- Remove group_id from flow entries.
- Show priority when print flow mod messages.
2008-04-29 15:00:28 -07:00
Ben Pfaff 5ef980e9e2 Rename variables with duplicate names, so as to be less confusing.
Suggestion from Justin.
2008-04-29 10:18:45 -07:00
Ben Pfaff db74f01873 Make dumping large numbers of flows possible.
This changes the kernel switch implementation to use the kernel Netlink
"dump" interface to allow flow stats that don't fit in the socket buffer
to be dumped gradually as the caller drains the socket buffer.

One of the changes here is a bug fix for nla_unreserve.  Because Netlink
attributes' lengths are rounded up to a multiple of 4 bytes, reducing
the length of the payload by N bytes doesn't necessarily reduce the
length of the skb by N bytes.  Instead, we need to know the original
length and final length of the attribute.  This means that using 'len'
as a difference in bytes doesn't really make sense, so this changes
'len' to be the new length of the attribute payload and renames the
function to nla_shrink to (IMO) better reflect what it is now doing.

Since we have to release the RCU read lock between calls to the dump
function, we need table iterators that persist across RCU epochs.  One
way to do this would be to add new "iterator_save" and "iterator_restore"
functions, but this seemed like overkill since there would then be a
total of 5 iterator functions that have only one user (flow stats dumping).
Instead, this patch refactors table iteration into a single "iterate"
function that takes a callback.  This simplifies the table iteration code
significantly.

This change also modifies dpctl to understand the new format of flow
stats.
2008-04-29 10:12:46 -07:00
Justin Pettit f60a0b20d6 BUG #6
Fix problem with "dpctl monitor" not working.

** Fix by Ben. **
2008-04-28 14:33:02 -07:00
Justin Pettit 44e9d4f5fc Clean-up related to supporting priorities...mostly suggestions from Ben. 2008-04-26 14:27:32 -07:00
Justin Pettit d7b253eaca BUG #5
Fixes crash when a non-existent command is given to dpctl.
2008-04-26 14:08:41 -07:00
Justin Pettit f1bfddabdb Print the configuration of the switch in addition to the features when "dpctl show" is run. 2008-04-26 14:08:41 -07:00
Justin Pettit 6df83df15e Add support for deleting flow entries with "del-flows" command in "dpctl". 2008-04-26 14:08:41 -07:00
Justin Pettit bfe3b4df89 - Add support for flow entry priorities.
- Fix "flow-add" action for dpctl.
2008-04-26 14:08:41 -07:00
Justin Pettit 1cd415531c Fix problem where the add_flow command is reading an unitialized array. 2008-04-26 14:08:41 -07:00
Justin Pettit 928a5ae0c1 Fix call from vfprintf to fprintf, which could cause seg faults. 2008-04-16 16:49:42 -07:00
Justin Pettit 0d3a0643c4 Switch from "stat" to "stats" everywhere. 2008-04-16 15:38:25 -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 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
casado 3f0201adb5 Update copyright on all non-GPL files 2008-03-27 20:12:18 -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 5130018ff0 Change tabs to spaces in ofp-pki to make indentation consistent across text editors.
Based on suggestion by Justin.
2008-03-19 09:52:30 -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