2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 13:27:59 +00:00

65 Commits

Author SHA1 Message Date
Ben Pfaff
5a003f6067 learning-switch: Reserved addresses are destinations, not sources.
A switch is not supposed to forward packets directed to MAC addresses
01:80:c2:00:00:0x.  This code was instead dropping packets *from* those
addresses.

(This code is only used by ovs-controller, so the bug is not a big deal.)
2010-07-16 12:04:11 -07:00
Ben Pfaff
fa37b408ea vconn: Move OpenFlow utility functions into new file ofp-util.c.
The main purpose of the vconn code is to ship OpenFlow messages across
network connections.  Over time a large number of utility functions related
to OpenFlow messages have also crept into vconn.c, but that's really
logically separate.  This commit breaks those functions out into a new
file.
2010-06-17 10:30:18 -07:00
Jesse Gross
7febb9100b bridge: Filter some gratuitous ARPs on bond slaves.
Normally we filter out packets received on a bond if we have
learned the source MAC as belonging to another port to avoid packets
sent on one slave and reflected back on another.  The exception to
this is gratuitous ARPs because they indicate that the host
has moved to another port.  However, this can result in an additional
problem on the switch that the host moved to if the gratuitous ARP is
reflected back on a bond slave.  In this case, we incorrectly relearn
the slave as the source of the MAC address.  To solve this, we lock the
learning entry for 5 seconds after receiving a gratuitous ARP against
further updates caused by gratuitous ARPs on bond slaves.

Bug #2516

Reported-by: Ian Campbell <ian.campbell@citrix.com>
2010-06-03 19:46:44 -07:00
Ben Pfaff
7cf8b2660f poll-loop: New function poll_timer_wait_until().
Many of poll_timer_wait()'s callers actually want to wait until a specific
time, so it's convenient for them to offer a function that does this.
2010-05-26 11:46:59 -07:00
Ben Pfaff
8bf4bbe390 poll-loop: Change poll_timer_wait() parameter from "int" to "long long".
Every so often I get concerned because OVS does most of its time arithmetic
in "long long int" but poll_timer_wait() takes an "int", so there is
potential for truncating a large value to a small value or a positive value
to a negative value.  That would cause excessive wakeups and possibly 100%
CPU usage.

This commit therefore changes poll_timer_wait()'s parameter type from "int"
to "long long int".  The file-scope 'timeout' variable remains type "int"
because that is the type of poll()'s timeout argument.

Factoring poll_timer_wait() into two functions is not necessary here but it
comes in handy in the following patch.
2010-05-26 11:46:59 -07:00
Jesse Gross
659586efcf tunneling: Add support for tunnel ID.
Add a tun_id field which contains the ID of the encapsulating tunnel
on which a packet was received (0 if not received on a tunnel).  Also
add an action which allows the tunnel ID to be set for outgoing
packets.  At this point there aren't any tunnel implementations so
these fields don't have any effect.

The matching is exposed to OpenFlow by overloading the high 32 bits
of the cookie as the tunnel ID.  ovs-ofctl is capable of turning
on this special behavior using a new "tun-cookie" command but this
command is intentially undocumented to avoid it being used without
a full understanding of the consequences.
2010-04-19 09:11:51 -04:00
Justin Pettit
b123cc3ce4 ofproto: Use 64-bit datapath id and management id (OpenFlow 0.9)
The length of a datapath was changed from 48 bits to 64 bits in OpenFlow
0.9.  For parity, we increased the management id size to match.

NOTE: This is the final commit in the OpenFlow 0.9 set.  Starting with
this commit, OVS is OpenFlow 0.9-compliant.
2010-02-20 02:22:27 -08:00
Justin Pettit
ca06922988 ofproto: Add selective Flow Removed messages and flow deletes (OpenFlow 0.9)
In OpenFlow 0.9, flow "expiration" messages are sent when flows are
explicitly removed by a delete action.  As such, the message is renamed
from Flow Expired to Flow Removed.  This commit adds that support as well
as supporting the ability to choose sending these messages on a per flow
basis.

NOTE: OVS at this point is not wire-compatible with OpenFlow 0.9 until the
final commit in this OpenFlow 0.9 set.
2010-02-20 02:22:27 -08:00
Ben Pfaff
c69ee87c10 Merge "master" into "next".
The main change here is the need to update all of the uses of UNUSED in
the next branch to OVS_UNUSED as it is now spelled on "master".
2010-02-11 11:11:23 -08:00
Ben Pfaff
67a4917b07 Rename UNUSED macro to OVS_UNUSED to avoid naming conflict.
Requested by Jean Tourrilhes <jt@hpl.hp.com>.
2010-02-11 10:59:47 -08:00
Ben Pfaff
58fda1dab1 Merge "master" branch into "db". 2009-12-02 11:49:53 -08:00
Jean Tourrilhes
9af9e2e8cf ovs-controller: Add --wildcard and --normal features.
This adds two command line switches to ovs-controller to:
	1) Use wildcards instead of exact matches.
	2) Use "normal" action instead of explicit port.
2009-11-19 12:48:36 -08:00
Ben Pfaff
ec6fde61c8 Add new function xzalloc(n) as a shorthand for xcalloc(1, n). 2009-11-04 14:52:32 -08:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00