Commit Graph

227 Commits

Author SHA1 Message Date
Mikio Hara 0e59606d43 Remove experimental bridge compat header file 2009-06-29 11:36:09 -07:00
Mikio Hara 292ffb1f39 Barrier command: Add new protocol messages: barrier request and reply
When a switch receives a barrier message it must first complete all
commands sent before the barrier message before executing any commands
after it. When all commands before the Barrier message have completed,
it must send a barrier reply message back to the controller.
2009-06-29 11:21:40 -07:00
Yiannis Yiakoumis a47208dc76 Flow mod behavior: Add a new flag to flow mods and flow conflict
detection handler for table maintanance

Add a CHECK_OVERLAP flag to flow mods which requires the switch to do
the (potentially more costly) check that there doesn't already exist a
conflicting flow with the same priority. If there is one, the mod
fails and an error code is returned.

Flow expiry: Record OFPFF_SEND_FLOW_EXP flag in user data path
2009-06-29 10:00:55 -07:00
tyabe dde4979698 Vlan pcp match: Implemented on datapath and udatapath 2009-06-29 07:27:42 -07:00
Brandon Heller b5525791b5 Spec: Notify controller of flows that are forcefully deleted
Previously, a switch would only notify the controller when flows expired.
Now, when a switch is told to delete flows, it sends a flow expiration
message, enabling the controller to get packet and byte counts from
deleted flows. Without this, the controller must retrieve flow statistics
and then delete the flow, during which time the counts could change. This
could also aid in debugging if multiple applications or programs
controlling the same switch are deleting each others' flows.

This commit adds a OFPER_DELETE as a choice for the reason field of a flow
expiration.
2009-06-29 07:07:29 -07:00
Glen Gibb 44d43c2988 Flow expiry: Add send_flow_exp to nx_flow_end msg
Need to pass message that indicates whether to send flow expiry message
to the controller.
2009-06-29 07:04:02 -07:00
Brandon Heller a00b917457 Spec: Selective flow expirations
Make flow expirations per-flow-entry, rather than per-switch.

This commit should give controllers extra flexibility to decide when they
want expirations, will simplify the job of an OpenFlow hypervisor, and may
reduce CPU load at the switch.
2009-06-29 07:02:44 -07:00
Glen Gibb ad42ba0b93 Flow expiry: Added idle_timout to nx_flow_end struct
Extra field added to struct
Padding field split
Populate idle_timeout in dp_send_flow_end funcs
2009-06-29 06:59:05 -07:00
Glen feb1764b43 Flow expiry: Add idle timeout to ofp_flow_expire struct 2009-06-29 06:58:07 -07:00
Mikio Hara 58ee7f213f Emergency flow cache: Add emergency flow cache framework
Emergency flow cache use completely separate flow table from working
and its table ID for stats is 0xfe.
2009-06-29 06:57:37 -07:00
Mikio Hara d56d5661df Protocol stats: Add OpenFlow protocol statistical information
collector

Fix BUG#49: Add OpenFlow protocol statistical information collector
and user interface. This feature use PRIVATE_VENDOR_ID to communicate
betwewn control plane process and user interface. PRIVATE_VENDOR_ID is
defined only for private use (and based on private OUI).
2009-06-29 05:22:54 -07:00
Mikio Hara 5ff6ec248d Change code base to Nicira's master branch 2009-06-29 05:03:42 -07:00
Mikio Hara 695db2964e Change code base to Nicira's for-nox/0.4 branch
Remove monolithic OpenFlow switch.
Add userspace datapath.
Fix BUG#13: Revise check wildcards for in_port != out_port output
validation.
Fix BUG#30: Made use of get_jiffies_64 instead of jiffies.
Fix BUG#31: Fix NetFPGA crash in case of test_delete test harness run.
Fix BUG#32: Add stack depth limitation to avoid inifinite loop in
log_backtrace.
Fix BUG#33: Improve NetFPGA kernel extension and NetFPGA image to
support MAC address rewrite features (two actions) on NetFPGA enabled
OpenFlow switch.
Fix BUG#34: Add NetFPGA kernel extension source codes to create
distribution package with NetFPGA correctly.
Fix BUG#38: Improve regression test for FLOW_MOD ACTION SET_DL_SRC and
SET_DL_DST.
Fix BUG#39: Correct misunderstanding of byte order ops for OFPAT_XXX.
2009-06-29 05:02:16 -07:00
Justin Pettit 75f7b917bc Add support for listing and deleting entries based on an output port.
To support this, an "out_port" field has been added to the "ofp_flow_mod",
"ofp_flow_stats_request", and "ofp_aggregate_stats_request" messages.  If an
"out_port" contains a value other than "OFPP_NONE", it introduces a constraint
when matching.  This constraint is that the rule must contain an output action
directed at that port.  Other constraints such as ofp_match structs and
priorities are still used; this is purely an *additional* constraint.  Note
that to get previous behavior, though, "out_port" must be set to "OFPP_NONE",
since "0" is a valid port id.  This only applies to the delete and
delete_strict flow mod commands; the field is ignored by add, modify, and
modify_strict.
2008-12-02 00:48:28 -08:00
Brandon Heller 87a101788e Pull OpenFlow TCP port, version number, and miss send len default in tests and dissector 2008-12-01 05:12:44 -08:00
Brandon Heller 676eae5942 Merge commit 'nicira-private/master' into experimental 2008-11-30 22:50:45 -08:00
Justin Pettit 320437cd40 Add support for understanding ICMP type and code in flow entries. 2008-11-26 20:58:33 -08:00
Brandon Heller 030327999b temporarily maintain OpenFlow TCP port as 975; this will need to change in docs too, once a final port is decided. 2008-11-25 07:53:39 -08:00
Brandon Heller 6e342edace Merge commit 'nicira-public/master' into experimental 2008-11-25 07:00:40 -08:00
Brandon Heller 4ed4553be5 Spec: clarified OFPPC_NO_RECV 2008-11-21 16:57:34 -08:00
Brandon Heller 0d2ec0a90a Spec: clarified errors fields in ofp_port_stats 2008-11-21 16:57:34 -08:00
Brandon Heller fcd58296aa fixed minor spelling/grammar errors 2008-11-21 16:57: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