Commit Graph

435 Commits

Author SHA1 Message Date
Justin Pettit f1c6daebf3 Send PORT_STATUS messages on port and link changes. Add ability to remotely enable and disable a port through the PORT_MOD message. 2008-08-22 12:47:54 -07:00
Ben Pfaff 8f133305af rconn: Fix bug #100, "Inactivity time-out slow under heavy load."
The timeout() function returns a duration relative to the time at which the
current state was entered, but rconn_run_wait() was treating it as the
waiting time remaining.
2008-08-22 10:34:15 -07:00
Ben Pfaff 95eb308262 Un-learn the port on which a MAC is located after some time.
Otherwise, we can send frames the wrong port indefinitely, if the device
in question does not itself initiate sending data.
2008-08-22 10:30:29 -07:00
Justin Pettit de98090721 Remove unnecessary AC_PROG_LD since OpenFlow no longer uses libtool. 2008-08-21 16:16:33 -07:00
Justin Pettit b5348aef10 Initialize the table structures to zero. 2008-08-19 17:06:10 -07:00
Justin Pettit 68106c1676 Cleanup git-status by not showing some unnecessary files. 2008-08-18 23:48:58 -07:00
Justin Pettit 3be2832bf4 Fix problem where packets never matched in hash table and flows always added regardless of whether they currently exist. 2008-08-18 22:23:03 -07:00
Justin Pettit 829f7d3961 Link to the normal OpenFlow lib directory, not this hidden one. 2008-08-18 22:13:36 -07:00
Ben Pfaff 15938f6d22 Don't compare wildcards, nw_src_mask, nw_dst_mask fields in hash table.
They should always compare equal, so there's no point in wasting the
time.
2008-08-18 14:26:50 -07:00
Ben Pfaff 3dcacb2268 Allow and use shorthands such as "ip" or "tcp" for specifying flows. 2008-08-18 14:26:50 -07:00
Ben Pfaff 1aa7f822ed Make ofp_packet_in() print the flow corresponding to the buffer also. 2008-08-18 14:26:50 -07:00
Ben Pfaff 9630e41005 Implement subnet mask matching in OpenFlow. 2008-08-18 14:26:50 -07:00
Ben Pfaff 73105a7ca6 Use ETH_ALEN in place of hard-coded 6 in datapath/flow.h. 2008-08-18 14:22:39 -07:00
Ben Pfaff 17a6a6dade Fix typo in comment. 2008-08-18 14:02:48 -07:00
Justin Pettit a71357e8f7 Fix dump-flows to be usable by add-flows.
Some of the fields when printing a flow are hex, but they don't have a
preceeding "0x".  When one tries to import them, they're treated as decimal
and weird results occur.  Bug 27.
2008-08-17 23:17:07 -07:00
Justin Pettit fc13a47f4d Use a consistent naming convention for counts. 2008-08-17 23:15:21 -07:00
Justin Pettit d6a1e67a8d Add stats message that allows querying description of components in OpenFlow. 2008-08-16 09:43:05 -07:00
Justin Pettit b41a6a0a6d Added new interface statistics. 2008-08-14 23:12:37 -07:00
Ben Pfaff 256d4c1fa0 Make hwtable_dummy compile again.
Bug #109.
2008-08-14 16:22:00 -07:00
Ben Pfaff 9159ab1402 Fix vlogconf EINTR error returns.
Bug #111.
2008-08-14 16:18:46 -07:00
Ben Pfaff deba43acea Use OpenFlow OUI for Ethernet address of local ports. 2008-08-14 16:10:59 -07:00
Ben Pfaff 3b0470d419 Use proper byte order for dl_type of 802.2, non-SNAP frames. 2008-08-14 11:06:18 -07:00
Justin Pettit 0226bbc742 Switch to new packet-out format and add OFPP_IN_PORT.
The original packet-out format allowed multiple actions to be specified for
buffered packets, but only a destination port for messages including data.
This change makes packet-out more consistent by allowing multiple actions
regardless of how the packet is stored.

This change also disallows sending packets through the incoming port without
explicitly using the OFPP_IN_PORT virtual port.
2008-08-14 00:07:18 -07:00
Ben Pfaff 8a83c00302 Print OpenFlow ref. impl. and protocol versions at secchan startup time.
Bug #83.
2008-08-13 14:37:36 -07:00
Ben Pfaff 91c3455d0d Describe how to build and use Debian packages in INSTALL. 2008-08-13 14:29:33 -07:00
Ben Pfaff 5990f0423c Add missing prerequisite to debian/control. 2008-08-13 14:29:18 -07:00
Ben Pfaff 9bff3b7f01 rconn: Wake up immediately if we drain the send queue.
It is possible that some task is waiting for space to open up in the
send queue, so we need to give it a chance to run.
2008-08-13 11:30:31 -07:00
Ben Pfaff b749bdfaf5 rconn: Use rconn_send() to send echo requests.
There's no point in sending echo requests by hand.
2008-08-13 11:26:26 -07:00
Ben Pfaff cd3ac840dd rconn: Queue packets for tx only if connected.
Until now, the rconn code would queue up packets not just while connected
but also while connecting.  This is not just unnecessary, however, it
actually causes a problem in secchan: if the secchan receives packets
from nl:0 and tries to transmit them, then they will quickly fill up
the rconn's transmit buffer (it uses a 1-packet buffer), which causes
secchan to stop reading packets from nl:0 until the buffer frees up.
That cannot happen until the connection completes.  With in-band control,
however, the connection cannot complete until we receive and process
packet_in messages in our in-band hook.  Thus, we have a deadlock.

Fixes bug #90, "Sometimes secchan has to go into fail-open mode to connect."
2008-08-13 11:21:49 -07:00
Ben Pfaff 69abd4346d Prevent the secchan from dying due to SIGPIPE.
Fix for bug #88.
2008-08-12 16:21:45 -07:00
Ben Pfaff c9b82cb59c Reduce default burst limit to rate limit / 4.
With the previous default burst limit of rate limit * 2, we would queue
up 2 seconds worth of packet_in messages.  This is not only much more
than actually needed, it causes an actual problem: the datapath only
retains buffered packets for up to 1 second, by default, so that flow
setups sent in response have no packet to work with.
2008-08-12 16:15:42 -07:00
Ben Pfaff 72984bb5e9 Make discovery happen faster.
This reduces the initial delay before sending DHCPDISCOVER from
1...10 seconds to 1...3 seconds.
2008-08-12 16:10:01 -07:00
Ben Pfaff 142f33e898 Implement rate limiting in secchan. 2008-08-12 15:34:47 -07:00
Ben Pfaff 903d0940fb Drop rconn's responsibility for limiting the tx queue.
Now it helps clients track the number of in-flight messages, but lets the
clients do the limiting themselves.  This will come in handy for packet-in
rate limiting (in an upcoming commit), in which we want to track in-flight
packet-in messages separately from other in-flight messages.
2008-08-12 15:21:30 -07:00
Ben Pfaff b3b28afb7b Use signal-based timekeeping functions throughout the source base. 2008-08-12 15:21:30 -07:00
Ben Pfaff 3f683b32c8 Initialize the timetracking module in each userspace program.
Also, use time_alarm() instead of the POSIX alarm() function, because
alarm() interferes with time_alarm().
2008-08-12 15:21:30 -07:00
Ben Pfaff a837a38209 Implement signal-driven time tracking.
Checking the current time only when a periodic timer expires allows us
to reduce the number of system calls to obtain the current time to 10 per
second (from an arbitrary number) plus one per poll loop.

This fixes poll_block() to properly handle being interrupted.
Otherwise, a timeout longer than the interval between signals will never
complete (because it will restart from the beginning after every
signal).
2008-08-12 15:21:30 -07:00
Ben Pfaff b67da66b07 Make fatal-signal more willing to share signals with other handlers. 2008-08-12 14:24:22 -07:00
Ben Pfaff 57fb2fe378 Set up flow to drop packets that come in on their output port.
Commit 0a3d4ba3a, "Don't allow the learning switch to send packets back
out the incoming port," drops packets that come in on their incoming port,
but it does not set up a flow to drop those packets.  If we are connected
to a hub, then this can be very expensive, since we can continue to get
many packets in that flow and have to drop them in secchan one by one.  So
now we set up a flow to drop them for us.
2008-08-08 15:39:20 -07:00
Ben Pfaff 483624de9a Fix handling of IP but non-TCP, non-UDP packets in kernel flow_extract().
In particular, ICMP was broken.
2008-08-08 11:43:41 -07:00
Ben Pfaff 37dc29f930 Make vconn_open() consistently set *vconnp to NULL on failure.
Fixes issue #80.
2008-08-07 15:37:44 -07:00
Ben Pfaff 7bee00fad9 Implement OpenFlow hard timeouts.
This updates the OpenFlow protocol version and changes the names of
structure members, so any software that uses OpenFlow will need to be
updated to match.
2008-08-07 15:19:31 -07:00
Ben Pfaff 1c6aac2d04 Fix formatting of flow matches in ofp-print:
Print a comma after wildcard matches as well as exact matches.
2008-08-07 13:29:10 -07:00
Ben Pfaff 874bb0cbc1 Fix uninitialized struct member in userspace table-linear. 2008-08-07 13:29:10 -07:00
Ben Pfaff 7462f2e8bd Fix bug in clearing unsupported switch flags.
We need to keep the flags we support, not drop them.
2008-08-07 13:29:10 -07:00
Ben Pfaff 5a31afdd0c Don't call kfree_skb() with interrupts disabled.
Freeing an skb that has a destructor may require interrupts to be enabled.
This can happen when netfilter is performing NAT, for example.

Discovered by Murphy McCauley.
2008-08-07 11:46:22 -07:00
Ben Pfaff 8effb451eb Don't allow unsupported flags to be set in the switch. 2008-08-07 10:34:37 -07:00
Ben Pfaff eca2aeb329 Implement OFPC_FRAG_DROP fragment handling policy. 2008-08-07 10:34:37 -07:00
Ben Pfaff 2a6dc4f319 Reduce redundancy in datapath code. 2008-08-07 10:34:37 -07:00
Ben Pfaff 844a4678aa Maintain userspace switch configuration in host byte order.
This makes it easier to work with and makes the code more like the
kernel switch.
2008-08-07 10:23:06 -07:00