Commit Graph

206 Commits

Author SHA1 Message Date
Justin Pettit 320437cd40 Add support for understanding ICMP type and code in flow entries. 2008-11-26 20:58:33 -08:00
Justin Pettit b7f66c424f Pull configuration information from DMI.
Pull configuration information from DMI when available.  In its current form,
it will only use DMI information set by Nicira.  Otherwise, it will use default
values.  This change also makes DPIDs the same as the MAC address of the
local OpenFlow device.
2008-10-30 16:23:27 -07:00
Ben Pfaff 6b617bac12 Move exported headers to include/openflow, private headers to lib/.
This makes it easier to install the headers, or to use them directly from
another software package with -I$(openflow)/include, without invading
the top-level include file namespace.
2008-10-29 15:15:45 -07:00
Ben Pfaff b4518e78a0 New function netdev_set_etheraddr(). 2008-10-29 13:46:54 -07:00
Ben Pfaff 65ac65a6d2 Improve the command interface so that it sends back acks or errors. 2008-10-28 12:46:18 -07:00
Ben Pfaff b2aec952c7 Add Nicira extension for remote command execution. 2008-10-27 12:58:27 -07:00
Ben Pfaff 18d534b64e Break secchan into multiple files, to make it more maintainable. 2008-10-24 09:43:44 -07:00
Ben Pfaff b6eb6bc746 vlog: Add ability to log to an arbitrary file, and following related changes:
* New command-line options for configuring log files, hence:
  - Centralized vlog usage messages.
* New vlogconf action for reopening log files.
* New vlogconf support for specifying a target by pidfile.
2008-10-23 14:07:25 -07:00
Ben Pfaff ddbf6040e3 Make pkidir, rundir, logdir modifiable from "configure" command line.
Make "make" behave properly when these are changed by re-running
"configure", by putting their definitions into a generated file that
depends on Makefile.
2008-10-23 14:07:25 -07:00
Ben Pfaff 7014135d8b vlog: Avoid calling any function if nothing will be logged. 2008-10-23 11:09:02 -07:00
Ben Pfaff be0ea769dd Make the format of vlog messages user-configurable. 2008-10-23 11:08:23 -07:00
Ben Pfaff c07c7f5e9e New functions xvasprintf() and strlcpy() and macro va_copy(). 2008-10-23 10:59:42 -07:00
Ben Pfaff 7a7b8e4878 New functions ds_put_uninit(), ds_put_char_multiple(). 2008-10-23 10:59:22 -07:00
Justin Pettit f1126f43ad Switch default OpenFlow port from 975 and 976 to 6633. 2008-10-22 17:17:50 -07:00
Ben Pfaff b50bbdf27d Centralize daemon option processing and usage. 2008-10-16 16:16:36 -07:00
Ben Pfaff 4fbcabe104 Revamp build system to make it easier to integrate openflowext. 2008-10-16 11:11:59 -07:00
Ben Pfaff 37c94b45fd Rework STP implementation in controller.
Before, we tried to use the port configuration bits to implement STP; e.g.
if a port was in LISTEN state we turned off sending and receiving frame
other than BPDUs.  Unfortunately this interacts very badly with in-band
control: when the switch connects to the controller, it can be connected
to the controller over a port that is not in FORWARD, and so then the
controller disabled that port, and the connection eventually dropped when
an echo request/reply failed to get through.

Now, we implement STP by querying the flows on the switch and killing
off the ones that STP does not allow.  This works much better because,
although we still kill off the in-band control connection, the in-band
hook in secchan is then able to resurrect it.

--no-stp is still the default since this has not been tested very much.
2008-10-14 16:48:47 -07:00
Ben Pfaff 2c5272bc28 Set DHCP maximum retransmission timeout to 3 seconds in secchan.
This should help discovery complete faster, especially with hops across
multiple OpenFlow switches to the controller.
2008-10-14 16:14:13 -07:00
Ben Pfaff a948b96315 New routine ofpbuf_put_zeros() to simplify a common code sequence. 2008-10-14 13:31:09 -07:00
Ben Pfaff 4a4424a739 Support up to 0xff00 ports in OpenFlow, without changing the implemented max. 2008-10-14 10:53:27 -07:00
Justin Pettit a835cab0ea Return error message when a flow can't be added due to full tables.
When a flow cannot be added to any tables because they are full, send
a message with type OFPET_FLOW_MOD_FAILED and code OFPFMFC_ALL_TABLES_FULL.
2008-10-13 17:49:45 -07:00
Justin Pettit 48edfb7cf9 Remove OFPT_TABLE reference. 2008-10-12 00:46:52 -07:00
Justin Pettit 94f287969d Add support for Source-NAT to Linux 2.6 datapaths.
To enable SNAT, run configure with the "--enable-snat" flag.  This has
only been tested with the 2.6.23 kernel...more diverse testing will follow.
Documentation and a cleaner build setup will also be in a future check-in.
2008-10-11 00:30:02 -07:00
Ben Pfaff e10dfcf357 rconn: Be pickier about what constitutes a successful connection.
When secchan is configured to "fail open" after failing to connect to
a controller for a period of time, it needs a heuristic for what
constitutes a successful connection.  Until now, that heuristic was
simply that when it received an OpenFlow message from the controller
(any OpenFlow message), it considered the connection successful.

However, this is no longer good enough, because NOX performs
admission control on connections after sending a number of OpenFlow
messages, in particular after doing OpenFlow version negotiation and
requesting the switch features (and receiving the reply).  Thus, this
commit adjusts the heuristic by only considering certain OpenFlow
messages to demonstrate that admission control checks have passed and
thus that the connection should be considered successful.

As a fallback, any connection that persists for 30 seconds or longer is
also considered successful.

An alternate and complementary approach (that this commit does not
implement) would be to use an OpenFlow error message to indicate why
the connection is closing.

Fixes bug #239.
2008-10-10 10:13:12 -07:00
Ben Pfaff 6ef891ae6b New function stp_set_bridge_id() to change the bridge ID of a running STP. 2008-10-09 15:53:05 -07:00
Ben Pfaff b253101bd6 New function dhclient_get_netdev(). 2008-10-09 15:53:05 -07:00
Ben Pfaff 3bcc21747f Add support for TAP virtual network devices in netdev. 2008-10-09 15:53:05 -07:00
Ben Pfaff 7e5e638ede New function get_unix_name_len() to simplify code. 2008-10-06 09:44:45 -07:00
Ben Pfaff 82b05cb81e Random Ethernet addresses should be private and should not be multicast. 2008-10-06 09:44:45 -07:00
Ben Pfaff 22956af80b Fix typo in comment. 2008-10-06 09:44:45 -07:00
Justin Pettit 1489ca2657 Add support for vendor-defined and variable-length actions.
Allow vendors to define their own actions.  Actions were originally fixed-
length, which was a bit constraining.  Actions now contain a length field,
which gives them more flexibility.
2008-10-03 16:44:13 -07:00
Justin Pettit 06e22ff0fe Modify VLAN actions to support setting both VID and priority.
Stripping VLANs is now done through the OFPAT_STRIP_VLAN action (i.e., you
don't specify a magic value in the generirc VLAN action).  Also, it is now
possible to modify the priority bits associated with the VLAN tag through
the OFPAT_SET_VLAN_PCP action.  The OFPAT_SET_DL_VLAN has been renamed to
OFPAT_SET_VLAN_VID.
2008-09-25 15:00:38 -07:00
Ben Pfaff 4eec1e41ce Remove unused, obsolete attributes from OpenFlow netlink protocol. 2008-09-24 14:09:00 -07:00
Ben Pfaff a53f52b256 Fix typo in comment. 2008-09-24 12:43:23 -07:00
Justin Pettit 902b816539 Fix some old references to OFPPFL_ in comments. 2008-09-22 17:48:06 -07:00
Justin Pettit 9da88ee2ad Modify OpenFlow commands related to ports to be more expressive.
This new OpenFlow message format provides a cleaner interface and greater
detail and control over ports.  It is now possible to see what features
the switch's port is currently configured as having, what it's advertising,
and what it's capable of handling.  It is also possible to return the
features advertised by the port's peer.
2008-09-22 15:18:22 -07:00
Ben Pfaff 512f02d405 Get rid of per-port STP implemented bits, by reducing OFPP_MAX to 255.
802.1D Spanning Tree Protocol supports a maximum of 255 ports per bridge,
but OpenFlow supported 256, so 1 port had to not implement STP.  This
gets rid of the problem by reducing the maximum number of ports to 255.
2008-09-19 17:07:47 -07:00
Justin Pettit 034f125955 Added lookup count to ofp_table_stats. 2008-09-18 19:47:27 -07:00
Justin Pettit e4cf5c4b82 Added OFPFC_MODIFY_STRICT flow mod command.
This cleans up the handling of modifying existing flows.  There now exists
OFPFC_MODIFY and OFPFC_MODIFY_STRICT commands, which have the same matching
characteristics to their OFPFC_DELETE* counterparts.  When adding a flow that
already exists, the counters and timers are now reset (ie, its treated as a
new flow).  This commit also adds the "--strict" option to dpctl to allow
strict matching for "mod-flows" and "del-flows".
2008-09-16 16:07:41 -07:00
Ben Pfaff 84f7d34079 Make it easier to bootstrap the PKI for SSL connections in OpenFlow. 2008-09-16 16:06:45 -07:00
Ben Pfaff 08cd0bc83c Fix "make distcheck". 2008-09-15 16:32:12 -07:00
Ben Pfaff b7d8bab74d Merge commit 'origin/master'
Conflicts:

	switch/datapath.c
	utilities/dpctl.c
2008-09-15 15:43:44 -07:00
Ben Pfaff f593e3ab70 Merge branch "partner", to simplify partner integration. 2008-09-15 15:31:36 -07:00
Justin Pettit 57d5205765 Add support for OFPFC_MODIFY Flow Mod command.
The OFPFC_MODIFY command allows the controller to modify the actions of
existing flows.  When it does this, it does not reset counters or timers.
2008-09-15 15:27:04 -07:00
Ben Pfaff 9c1b16772c Implement OFPT_HELLO simple version negotiation. 2008-09-15 14:29:53 -07:00
Ben Pfaff 553dfa572d Break passive vconns out into separate pvconn routines and data structures.
There really was nothing in common between the active and passive vconns.
This arrangement makes more sense.
2008-09-15 14:29:53 -07:00
Ben Pfaff 9fe9a47916 Make "struct vconn" opaque. 2008-09-15 14:29:53 -07:00
Ben Pfaff 74cacf6067 Get rid of OFP_MAXLEN.
Statistics or vendor extensions can fill up the whole 64 kB.
2008-09-10 20:05:49 -07:00
Ben Pfaff d0fb7347b9 Delete OFPST_SWITCH and make it available as a Nicira vendor extension. 2008-09-10 15:00:47 -07:00
Ben Pfaff 39136b0fb9 Make switches send error messages when they receive a bad request. 2008-09-10 13:22:25 -07:00