Age | Commit message (Collapse) | Author |
|
Signed-off-by: Justin Pettit <jpettit@nicira.com>
|
|
nx_put_match() can reallocate the ofpbuf's data so we need to reload the
pointer.
Found by inspection.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
By default DKMS doesn't build on demand for each kernel booted or updated.
Adding AUTOINSTALL=yes gives it this behavior. Based on a small sample of
Debian packages and how-to guides for Ubuntu, AUTOINSTALL=yes is what most
packages use and what users expect.
Fix-suggested-by: Kirill Kabardin
Reported-by: Ralf Heiringhoff <ralf@frosty-geek.net>
Reported-at: https://bugs.launchpad.net/bugs/962189
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Signed-off-by: Justin Pettit <jpettit@nicira.com>
|
|
Found by valgrind.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Fix return check typo.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #11933
|
|
dp_notify, in unregister case, is accessing vport after detaching
it. Following patch fixes it.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
|
In one edge case, ofoperation_complete() destroys its rule, without
updating its ofoperation that the rule is gone. Later in the same
function, ofoperation_destroy() attempts to modify the rule which
already destroyed.
Bug #11797.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
Signed-off-by: Justin Pettit <jpettit@nicira.com>
|
|
Changes to the default MAC learning timeout and making it configurable
were added in 1.5.0, not 1.6.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
|
|
Commit e72e793 (Add ability to restrict flow mods and flow stats
requests to cookies.) modified cookie handling. Some of its behavior
was unintuitive and there was at least one bug (described below).
Commit f66b87d (DESIGN: Document uses for flow cookies.) attempted to
document a clean design for cookie handling. This commit updates the
DESIGN document and brings the implementation in line with it.
In commit e72e793, the code that handled processing OpenFlow flow
modification requests set the cookie mask to exact-match. This seems
reasonable for adding flows, but is not correct for matching, since
OpenFlow 1.0 doesn't support matching based on the cookie. This commit
changes to cookie mask to fully wildcarded, which is the correct
behavior for modifications and deletions. It doesn't cause any problems
for flow additions, since the mask is ignored for that operation.
Bug #9742
Reported-by: Luca Giraudo <lgiraudo@nicira.com>
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
|
|
The CONTROLLER action assumed that all Ethernet frames stored their
Ethernet Type in the two bytes succeeding the source and
destination addresses. This turns out not to be true for 802.2 LLC
frames, potentially causing an assertion failure. This patch
solves the issue by skipping the assertion in this case.
Bug #10349.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
Commit bae7208e91a0 (bridge: Refactor bridge_reconfigure().)
introduced a regression in which the switch would attempt to
instantiate "null" interfaces in the datapath. This would, of
course, fail and trigger a warning. Though harmless, these
warnings confused users.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
It's possible that packets that are sent on internal devices (from
the OVS perspective) have already traversed the local IP stack.
After they go through the internal device, they will again travel
through the IP stack which may get confused by the presence of
existing information in the skb. The problem can be observed
when switching between namespaces. This clears out that information
to avoid problems but deliberately leaves other metadata alone.
This is to provide maximum flexibility in chaining together OVS
and other Linux components.
Bug #10995
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
Before we submitted the kernel module upstream, we updated the flow format
by adding two fields to the description of packets with VLAN headers, but
we forgot to update ODPUTIL_FLOW_KEY_BYTES to reflect these changes. The
result was that a maximum-length flow did not fit in the given space.
This fixes a crash processing IPv6 neighbor discovery packets with VLAN
headers received in a tunnel configured with key=flow or in_key=flow.
This updates some comments to better describe the implications of
ODPUTIL_FLOW_KEY_BYTES (suggested by Justin).
This also updates test-odp.c so that it would have caught this problem, and
updates odp.at to demonstrate that a full 156 bytes are necessary. (To see
that, revert the change to ODPUTIL_FLOW_KEY_BYTES and run the test.)
Reported-by: Dan Wendlandt <dan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Until now, bridges with datapath_type=netdev did not destroy the datapath
when deleted. In particular, the tap device implementing the internal
interface was not close()d, and therefore the tap persists until
ovs-vswitchd exit()s.
This behaviour was caused by the missing callback for 'enumerate' in the
dpif-netdev class. Without this callback 'bridge_reconfigure' failed to
realize that there are datapaths with no bridge, and thus cannot destroy
them. Providing an 'enumerate' callback fixes this.
Signed-off-by: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Some OpenFlow 1.0 controllers incorrectly use OPFP_CONTROLLER as the
in_port in packet-out messages, when OFPP_NONE is their intent. Until now,
Open vSwitch has rejected such requests with an error message. This commit
makes Open vSwitch instead treat OFPP_CONTROLLER the same as OFPP_NONE for
compatibility with those controllers.
(Also, as of this writing, OpenFlow 1.0.1 appears to be changing the port
to use from OFPP_NONE to OFPP_CONTROLLER.)
Suggested-by: Rob Sherwood <rob.sherwood@bigswitch.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
If the daemon(s) aren't running for whatever reason, the RHEL ovs
ifup/ifdown scripts don't take that into account and an attempt to reboot a
system could take forever. (literally. endless loop!) Here are a couple of
patches (one of ifup, one for ifdown) to add timeouts (10 seconds), because
it runs per interface you have configured and that could take awhile to
reboot a system if needed.
Signed-off-by: Brian Kruger <bkruger+ovsdev@gmail.com>
[blp@nicira.com fixed up a conflict against master]
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
When the kernel validates set TCP/UDP port actions, it looks at
the ports in the existing flow to make sure that the L4 header exists.
However, these actions always use the IPv4 version of the struct.
Following patch fixes this by checking for flow ip protocol first.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #11205
|
|
An OpenFlow message is limited to 65535 bytes so if there are more than
(65535 - sizeof(struct ofp_switch_features)) / sizeof(struct ofp_phy_port)
== 1364 ports then the feature reply cannot hold them all. This commit
prevents the feature reply from overflowing, at the cost of only reporting
a random sampling of ports.
Bug #11087.
Reported-by: Michael Mao <mmao@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Found by valgrind.
Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
GCC 4.4.5 issues the following warning without this patch:
bridge.c: In function ‘bridge_run’:
bridge.c:2032: error: ‘database_changed’ may be used uninitialized in
this function
I think it's unnecessary, but it doesn't hurt to always initialize this
variable.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
iface_create() did its work in an order that meant it had to do a lot more
cleanup on error paths than is otherwise needed. This commit reorders the
work to avoid this extra cleanup.
bridge_ofproto_port_del() is no longer used after the refactoring so this
commit deletes it.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Commit bae7208e91a0 (bridge: Refactor bridge_reconfigure().) introduced
a regression in bridge reconfiguration. Previously, reconfiguration would
update the configuration of each bridge port, so that if the controller
(or the admin) changed a port's options, then that change would propagate
to the datapath. Following that commit, that no longer happened.
This commit restores that feature.
Bug #10972.
Reported-by: Michael Hu <mhu@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
This is the minimal change that gets the job done. There are much nicer
ways to do this, but I'll leave that refactoring for later in the series.
The return value will have its first user in an upcoming commit.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
An upcoming patch will need the same code in another function.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
The calculation that this function does will need to be used in a
context where no "struct iface" is available in an upcoming commit.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
It's no longer useful.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Just a tiny code cleanup.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
The existing bridge_reconfigure() implementation is suboptimal.
When adding lots of new ports, on every pass through the run loop
it allocates a bunch of "struct iface"s and "struct port"s, only to
destroy them when out of time. Additionally, when there are errors
adding or deleting ports, it can fail to converge. Instead it will
attempt and fail to add the same set of ports forever.
This patch rewrites bridge_reconfigure() using a new strategy.
Whenever the database changes, some initial bookkeeping is done,
and a list of future work is compiled. The bridge begins whittling
down this list, and stops processing database changes until
finished.
Bug #10902.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
update_port() can delete the port for which it is called, if the underlying
network device has been destroyed, so HMAP_FOR_EACH is unsafe in
ofproto_run().
Less obviously, update_port() can delete unrelated ports. For example,
suppose that initially device A is port 1 and device B is port 2. If
update_port("A") runs just after this, then it will ofport_remove() both
ports, then ofport_install() A as the new port 2.
So this commit first assembles a list of ports to update, then updates them
in a separate loop.
Without this commit, running "ovs-dpctl del-dp" while ovs-vswitchd is
running consistently causes a crash for me within a few seconds.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
There's no need to log this to the on-disk database.
Spotted while examining "ovsdb-tool show-log" output.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
There isn't a lot of value in sending inactivity probes on unix
sockets. This patch changes the default to disable them.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
The python reconnect library attempted to send a probe every 0
milliseconds instead of disabling probing when the probe_interval
was zero.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
The implementation of the "learn" action now properly implements
specifications such as 0x20010db885a308d313198a2e03707348->NXM_NX_IPV6_DST
but the parser used in ovs-ofctl and elsewhere could not generate such
specifications. This commit adds that support.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Bug #10576.
Reported-by: James Schmidt <jschmidt@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
The existing functions for reading and writing the values of subfields only
handle subfields up to 64 bits wide. These new functions handle subfields
of any width.
Also update some existing comments.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
It's the obvious counterpart to bitwise_zero().
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
In some datapaths, adding or deleting OpenFlow ports can take quite
a bit of time. If there are lots of OpenFlow ports which needed to
be added in a run loop, this can cause Open vSwitch to lock up and
stop setting up flows while trying to catch up. This patch lessons
the severity of the problem by only doing a few OpenFlow port adds
or deletions per run loop allowing other work to be done in
between.
Bug #10672.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
This information is typically not more useful if displayed more
often.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
|
|
If kernel module rejects config changes then vswitchd sets the ofport
column to -1, but does not remove the non-operational port from the
datapath. This patch fixes this problem.
ovs-vsctl add-br ovsbr
ovs-vsctl add-port ovsbr p1
ovs-vsctl add-port ovsbr p2
ovs-vsctl set Interface p1 options:remote_ip=2.1.1.1 options:key=123 type=gre
ovs-vsctl set Interface p2 options:remote_ip=1.1.1.1 options:key=123 type=gre
ovs-vsctl set Interface p2 options:remote_ip=2.1.1.1 options:key=123 type=gre
ovs-dpctl show #observe that p2 does not appear here anymore
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
|
|
There is no need to send a notification if ovs_vport_set_options() failed
and ovs_vport_cmd_set() did not change anything.
Issue#10285
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
|
|
This could cause a slow but steady memory leak in ovs-vswitchd.
Found by valgrind.
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Commit 11460e2316b88f0bd0ea0005d94338d800ea16bd
(flow: Enable retrieval of TCP flags from IPv6 traffic.) updated
one of the TCP flags extraction functions in userspace but missed
the other. This updates that function and converts the other to
use it to reduce duplication.
Bug #10194
Signed-off-by: Jesse Gross <jesse@nicira.com>
|