| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I came around a BSOD that happened when trying to access pidHashLock
from the gOvsSwitchContext, which was NULL. The stop happened in
OvsAcquirePidHashLock function.
To reproduce this BSOD, make sure the extension is enabled and running,
disable it and, after that, execute 'ovs-dpctl.exe show'. The BSOD is
triggered afterwards.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/53
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch, we update HvCreatePort() to be able to re-add a Hyper-V
port. Specifically, we handle the case where the port had also been
added by OVS userspace, so that when the port was previously deleted
from Hyper-V, we did not deallocate the port.
The key to a vport is its name. We lookup the list of vports both in the
'portIdHashArray' as well as 'portNoHashArray' to make sure that we
don't have a port with the same name.
Validation:
- deleted an re-added a port with and without the corresponding OVS port
existing
- deleted, changed the name of a port, and re-added it back with and
without the corresponding OVS port existing.
- uninstall was succcessful. No asserts hit.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
| |
OvsInitVxlanTunnel() need not return a NL_ERROR. In this patch, we
change it to NTSTATUS, and also update the mapping function that maps a
NTSTATUS to NL_ERROR.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a Hyper-V port (for which there exists an OVS port), gets deleted and
re-added, we'll call into InitOvsVportCommon() for the port to insert
the port into the 'portIdHashArray' as well as do a few other
initialization in the switch ocntext.
We should not be incrementing 'numHvPorts' at this point since this
vport has been counted before when it was first allocated. To account
for this, we add a new parameter to InitOvsVportCommon(). The arguments
passed by some of the callers are not 100% correct, and will be fixed in
future commit in the series.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch, we add changes to OvsRemoveAndDeleteVport() to allow the
caller to specify if a vport is being deleted because it got deleted on
Hyper-V or if it got deleted from OVS userspace.
The reason we need to make the distinction is to be able to delete the
vport from the relevant hash tables.
If a port has been deleted from all the hash tables ie. has been deleted
from Hyper-V as well as OVS userspace, it gets deallocated.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch, we update the documentation for 'portIdHashArray' to
indicate that a vport would exist in this hash table if and only if it
also exists on the Hyper-V switch.
This functionality to implement this semantic will follow in subsequent
patches.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch, we rename the existing OvsFindVportByHvName() to
OvsFindVportByHvNameA() to indicate that the input string is an ASCII
string. We also define a OvsFindVportByHvNameW() that takes as input a
WCHAR string.
This will be used later in HvCreatPort() to check for ports with
duplicate names.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
| |
A few fixes around locking.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
|
|
| |
The breakage was introduced by commit: a36de779
("openvswitch: Userspace tunneling.").
Reported-by: Edwin Chiu <echiu@nicira.com>
Signed-off-by: Saurabh Shah <ssaurabh@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
|
|
|
|
|
|
|
|
| |
RHEL 6.6 kernel percpu APIs are broken, so following patch is using OVS
backported version.
Reported-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
|
|
|
|
|
|
|
| |
bundle_move() expects two struct ofbundle pointers as arguments, but
void pointers hide the error.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
| |
With this patch setters invoke procedures only if values have changed.
Also rstp_set_bridge_address__() keeps the existing priority in the
bridge_identifier.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
| |
Other ports should stop forwarding and learning when a port receives a
superior BPDU carrying a Proposal flag.
Without this patch this does not happen and other ports keep executing
the learning and forwarding processes.
This patch contains some fixes reported in the 802.1q-2008 standard.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Global transitions are highest priority transitions. When the
condition associated with a global transition is met, it supersedes
all other exit conditions including UCT.
Extracted from 802.1D-2004 standard (17.16):
A transition that is global in nature (i.e., a transition that occurs
from any of the possible states if the condition attached to the arrow
is met) is denoted by an open arrow, i.e., no specific state is
identified as the origin of the transition. When the condition
associated with a global transition is met, it supersedes all other
exit conditions including UCT. The special global condition BEGIN
supersedes all other global conditions, and once asserted remains
asserted until all state blocks have executed to the point that
variable assignments and other consequences of their execution remain
unchanged.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
| |
All MAC addresses previously learned on a Root Port can be moved to an
Alternate Port that becomes the new Root Port; i.e., Dynamic Filtering
Entries for those addresses may be modified to show the new Root Port as
their source, reducing the need to flood frames when recovering from
some component failures.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a new functions classifier_defer() and
classifier_publish(), which control when the classifier modifications
are made available to lookups. By default, all modifications are made
available to lookups immediately. Modifications made after a
classifier_defer() call MAY be 'deferred' for later 'publication'. A
call to classifier_publish() will both publish any deferred
modifications, and cause subsequent changes to to be published
immediately.
Currently any deferring is limited to the visibility of the subtable
vector changes. pvector now processes modifications mostly in a
working copy, which needs to be explicitly published with
pvector_publish(). pvector_publish() sorts the working copy and
removes gaps before publishing it.
This change helps avoiding O(n**2) memory behavior in corner cases,
where large number of rules with different masks are inserted or
deleted.
VMware-BZ: #1322017
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
| |
classifier_remove() was recently changed to take a const struct
cls_rule *. Make the corresponding change to classifier_replace() and
classifier_insert(). This simplifies existing calling sites in
ofproto.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Almost all classifier users already exclude concurrent modifications,
or are single-threaded, hence the classifier internal mutex can be
removed. Due to this change, ovs-router.c and tnl-ports.c need new
mutexes, which are added.
As noted by Ben in review, ovs_router_flush() should also free the
entries it removes from the classifier. It now calls
ovsrcu_postpone() to that effect.
Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, accurate iteration required writers to be excluded during
iteration. This patch adds an rculist to struct cls_subtable, and a
corresponding list node to struct cls_rule, which makes iteration more
straightforward, and allows the iterators to remain ignorant of the
internals of the cls_match. This new list allows iteration of rules
in the classifier by traversing the RCU-friendly subtables vector, and
the rculist of rules in each subtable.
Classifier modifications may be performed concurrently, but whether or
not the concurrent iterator sees those changes depends on the timing
of change. More specifically, an concurrent iterator:
- May or may not see a rule that is being inserted or removed.
- Will see either the new or the old version of a rule that is replaced.
- Will see all the other rules (that are not being modified).
Finally, The subtable's rculist also allows to make
classifier_rule_overlaps() lockless, which this patch also does.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no point in adding duplicate information into prefix tries.
Also, since the lower-priority duplicate rules are not visible to
lookups, they do not need to be in staged lookup indices directly
either (the head rule is).
Finally, now that cmap operations return the number of elements in the
cmap, subtable's 'n_rules' member is not needed any more.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now the gOvsSwitchContext pointer is checked against NULL
in a lot of places of the OVS extension code. This check should
be done only once to avoid wasteful checks. Thus I have added the
check in the dispatch routine, before doing any processing, and
removed all other checks from the rest of the code.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
| |
A Config BPDU always conveys a Designated Port Role.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Invoke move_rstp__() in rstp_port_set_administrative_bridge_port__()
if port is not initializing. This is necessary in a test that checks
that a Port becoming alternate/backup/disabled stops learning and
forwarding. The move_rstp__() call is necessary to immediatly disable
learning and forwarding on that port. Without this, the test fails.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
| |
With this commit, RSTP is able to flush from the MAC learning table
entries pertaining to a single port. Before this commit the whole
table was flushed every time a port requested flushing actions.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a difference between a port with STP/RSTP protocol enabled and a
disabled role and a port which has a disabled role because STP/RSTP is
not active. This commit ensure to make such distinction.
Standard 802.1D claims that the Topology Change state machine (17.31)
treats a Port as no longer active when it becomes an Alternate, Backup,
or Disabled Port and stops learning from received frames.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was necessary in a test on the acceptable range values of
max_age and forward_delay. Since rstp_set_bridge_max_age__() and
rstp_set_bridge_forward_delay__() set the rstp->bridge_max_age and
rstp->bridge_forward_delay variables, it was necessary to call
updt_roles_tree__() to immediately update p->designated_times, used in
tx_rstp() (in lib/rstp-state-machines.c). After this change the
validation software received the expected maxAge and forwardDelay
values. Otherwise, such test failed.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
| |
Set rcdv_tcn and return OTHER_INFO when a
TOPOLOGY_CHANGE_NOTIFICATION_BPDU is received, as required by
802.1Q-2008.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
| |
All other similar port_role_transition_sm states are named according
to this pattern.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
| |
If the DesignatedBridgeID Bridge Address component is equal to that
component of the Bridge's own bridge priority vector skip to the next
port.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Accordingly to the 802.1D-2004 standard, the transition from the
TOPOLOGY_CHANGE_SM_NOTIFIED_TCN_EXEC state should go to the
TOPOLOGY_CHANGE_SM_NOTIFIED_TC_EXEC state and not to the
TOPOLOGY_CHANGE_SM_ACTIVE.
See section 17.31 of 802.1D-2004 standard.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
| |
The bridge_port_id is never conveyed in Configuration Messages, but is
used as a tie-breaker within a Bridge. This patch extends the
comparison to this fifth field in a rstp_priority_vector.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
| |
If the Unknown value of the Port Role parameter is received, the state
machines should treat the RST BPDU as if it were a Configuration BPDU.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'rstp-admin-port-state' is the Administrative Bridge Port state
variable defined in the 802.1D-2004 standard. It can be set to
include or exclude a port from the active topology by management
(section 7.4).
operPointToPointMAC and 'rstp-admin-p2p-mac' are a pair of parameters
that permit inspection of, and control over, the administrative and
operational state of the point-to-point status of the MAC entity by
the MAC Relay Entity. adminPointToPointMAC can be set by management
and its value is reflected on operPointToPointMAC.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
| |
designated_bridge_id, designated_port_id and designated_path_cost are
now displayed in rstp_status when using 'ovs-vsctl list port'.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
| |
Also updates ovs-router README documentation.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
|
|
|
|
|
|
|
| |
designated_bridge_id, designated_port_id and designated_path_cost are
now displayed in rstp_status when using 'ovs-vsctl list port'.
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
|
|
|
| |
(Draft) OpenFlow 1.5 flow mod commands include commands to manipulate the
buckets of existing groups. This patch add support to ovs-ofctl for these
commands. It also adds documentation and tests for them.
ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
| |
Handle (draft) OpenFlow 1.5 insert and remove group commands
of group mod messages.
ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
| |
Signed-off-by: Shu Shen <shu.shen@radisys.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As headers are installed by 'make install' now, the explicit install
instructions can be be removed from the spec file.
The spec file has been including <config.h> plus all headers in lib/ so
far which is dangerous:
* config.h is a description of the capabilities of the build machine
where the package was built. Although it may hint on what is
included in the library, the defines do not necessarily hold true on
another build machine.
* Some headers in lib/ do not contain proper prefixes and pollute the
global header name space. Do not include them anymore. Properly
cleaned up headers will be exposed in openvswitch/ and openflow/
For the RHEL spec, both pkgconfig and headers are omitted as no -devel
package exists yet.
Cc: Flavio Leitner <fbl@redhat.com>
Suggested-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
| |
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
| |
Add rule to generate pkgconfig .pc file from configure.
Install pkg-config file to $(libdir)/pkgconfig
Signed-off-by: Rob Adams <readams@readams.net>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
| |
Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, when 'struct dp_netdev_port' is deleted from
'dpif-netdev' datapath, if there is pmd thread, the pmd thread
will release the last reference to the port and ovs-rcu postpone
the destroy. However, the delayed close of object like 'struct
netdev' could cause failure in immediate re-add or reconfigure of
the same device.
To fix the above issue, this commit uses condition variable and
makes the main thread wait for pmd thread to release the reference
when deleting port. Then, the main thread can directly destroy the
port.
Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, the ofproto-dpif-xlate module uses ovs-rcu to
postpone the destroy of previous configuration. However, the delayed
close of object like 'struct netdev' could cause failure in immediate
re-add or reconfigure of the same device.
To fix the above issue, this commit makes the ofproto-dpif-xlate
module call ovsrcu_synchronize(), which waits for all threads
to finish the use of reference to previous config. Then, the
module can just directly destroy the previous config.
Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a portion of the 'struct dp_netdev_port' initialization
that is placed after the reload of pmd threads. This means in
theory, there could be a race where pmd threads access half-
initialized struct. Although such race has not been seen, it
makes sense to fully initialize the struct before use.
Found by code inspection.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
|
|
|
|
|
|
|
|
| |
insert_rule() only had one caller and this makes the code easier to
understand.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
|
|
|
|
|
|
|
| |
Sort the flow dump results to always have them in consistent order.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
|