| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
netdev_find_dev_by_in4() appears to no longer be used and thus
can be removed. This also allows netdev_enumerate(), the
enumerate member of struct netdev_class and netdev_linux_enumerate()
to be removed.
I noticed this as netdev_linux_enumerate() makes use of if_nameindex()
and if_freenameindex() which are not available when compiling using
the Android NDK r6b (Android API level 13).
|
| |
|
|
|
|
|
|
| |
net/ethernet.h and linux/if_tunnel.h do not appear to be needed
on lib/netdev-linux.c.
I noticed this while trying to build on the Android NDK r6b (Android API
level 13) as these headers are not present there.
|
| |
|
|
|
|
|
|
|
| |
Android appears to lack SIG_ATOMIC_MAX which is only
used in fatal-signal.c.
Observed when compiling using the Android NDK r6b (Android API level 13).
Patch based on a suggestion by Ben Pfaff
|
| |
|
|
|
|
| |
sys/time.h appears to be required for a definition of timespec on Android.
Observed when compiling using the Android NDK r6b (Android API level 13).
|
| |
|
|
|
| |
This appears to be necessary to get a definition of socket_t
when compiling using the Android NDK r6b (Android API level 13).
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The nl_lookup_genl_mcgroup() function can fail on older kernels
which do not support the required netlink interface. Before this
patch, dpif-linux would refuse to create a datapath when this
happened. With this patch, it attempts to use a workaround. If
the workaround fails it simply disables the affected features
without completely disabling the dpif.
|
| |
|
|
|
|
|
| |
Before this patch, if dpif-linux failed to register a notifier it
would give up opening the datapath entirely. This seems draconian
as a dpif can still perform the majority of its intended
functionality without vport notifications.
|
| |
|
|
|
|
|
|
| |
This patch changes the interface of netlink-notifier and
rtnetlink-link. Now nln_notifiers are allocated and destroyed by
the module instead of passed in by callers. This allows the
definition of nln_notifier to be hidden, and generally cleans up
the code.
|
| |
|
|
|
|
|
|
| |
It makes more sense to call nln_notifier_run() and
nln_notifier_wait() simply nln_run() and nln_wait() since they
don't operate on notifiers but the entire nln object. This patch
changes the nln and the rtnetlink-link modules to the new
convention.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently ovs is using device stats for Linux devices and count them
itself in other situations. This leads to overlap with hardware stats,
inconsistencies, etc. It's much better to just always count the packets
flowing through the switch and let userspace do any merging that it wants.
Following patch removes vport->get_stats() interface. vport-stat is changed
to use new `struct ovs_vport_stat` rather than rtnl_link_stats64.
Definitions of rtnl_link_stats64 is removed from OVS. dipf_port->stat is also
removed as aggregate stats are only available at netdev layer.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
| | |
|
| |
|
|
|
|
|
| |
Commit d1e9b9bf3 "nicira-ext: Renumber NXT_FLOW_MOD_TABLE_ID" eliminated
the need for the NXT_SET_FLOW_FORMAT and NXT_FLOW_MOD_TABLE_ID commands to
have different sizes, so asserting that they are different isn't useful
anymore (although it is still correct and always will be).
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Most netdev provider functions are allowed to be null if the implementation
does not support this feature. This commit adds this feature for get_mtu
and set_mtu, and changes netdev-vport to take advantage of it.
Also, changes netdev_get_mtu() to report an MTU of 0 on error, instead of
leaving the MTU indeterminate.
|
| |
|
|
|
|
|
|
| |
The TYPE_IS_SIGNED macro does a less than zero comparision with an
unsigned type which can cause compiler warnings like the following:
lib/tag.c:100:9: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
|
| |
|
|
|
|
|
| |
This patch fixes the following compiler warning:
lib/socket-util.c:621:5: error: comparison is always false due to
limited range of data type [-Werror=type-limits]
|
| |
|
|
|
|
|
| |
This patch fixes compiler warnings like the following:
./lib/ovsdb-types.h:171:5: error: comparison of unsigned expression
>= 0 is always true [-Werror=type-limits]
|
| |
|
|
|
|
|
| |
Without this commit, every NXAST_LEARN action that adds a flow causes every
facet to be revalidated. With this commit, as long as the "Usage Advice"
in the large comment on struct nx_action_learn in nicira-ext.h is followed,
this no longer happens.
|
| |
|
|
| |
This will be used in an upcoming commit.
|
| |
|
|
|
| |
This function will soon be used elsewhere. As it doesn't inherently have
anything to with the classifier, move it to flow.c.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few loose ends here. First, learning actions cause too much
flow revalidation. Upcoming commits will fix that problem. The following
additional issues have not yet been addressed:
* Resource limits: nothing yet limits the maximum number of flows that
can be learned. It is possible to exhaust all system memory.
* Age reporting: there is no way to find out how soon a learned table
entry is due to be evicted.
To try this action out, here's a recipe for a very simple-minded MAC
learning switch. It uses a 10-second MAC expiration time to make it easier
to see what's going on:
ovs-vsctl del-controller br0
ovs-ofctl del-flows br0
ovs-ofctl add-flow br0 "table=0 actions=learn(table=1, hard_timeout=10, \
NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], \
output:NXM_OF_IN_PORT[]), resubmit(,1)"
ovs-ofctl add-flow br0 "table=1 priority=0 actions=flood"
You can then dump the MAC learning table with:
ovs-ofctl dump-flows br0 table=1
|
| |
|
|
|
|
|
|
| |
This allows a command like "test-openflowd --enable-dummy dummy@br0
--ports=dummy@eth0,dummy@eth1,dummy@eth2" to create a dummy datapath with
a number of dummy ports. This is more useful for testing than a dummy
datapath with just an internal port, since output to "flood" and "normal"
has less pathological results.
|
| |
|
|
|
|
|
| |
I've always intended this to work, but either I never tested it or the
support rotted.
This will soon be used in some tests that I will add.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
OVS already has a fairly good set of functions for working with fields that
are known at compile time, but support for working with fields that are
known only at runtime is fairly limited (and fairly unneeded). However,
with NXM identifiers becoming more and more widely used throughout Nicira
extensions, it's becoming corresponding more and more common to need to
refer to fields at runtime. This new library represents a first attempt
at a systematic approach for doing so.
|
| |
|
|
| |
This will soon have a new user, but it's a worthwhile cleanup on its own.
|
| | |
|
| |
|
|
|
|
| |
When a new action is added, compiler warnings show most of the places that
need new code to handle that action. The action parsing code in
ofp-parse.c was the one remaining missing case. This commit fixes that.
|
| |
|
|
|
|
|
|
|
| |
This commit primarily moves the OFPAT_ACTION and NXAST_ACTION invocations
into a new file ofp-util.def. This allows multiple places in the source to
use them.
This commit also adds a new function ofputil_action_code_from_name().
The following commit will add the first user.
|
| |
|
|
|
| |
These functions were previously used only in ofp-parse.c and ofp-print.c,
but they are more generally useful and future commits will add more users.
|
| |
|
|
|
|
|
| |
We had these functions scattered around the source tree anyway. packets.h
is a good place to centralize them.
I do plan to introduce some additional callers.
|
| |
|
|
|
|
|
| |
The other cls_rule_*() functions that take IPv6 addresses take a pointer
to an in6_addr, so cls_rule_set_nd_target() should as well for consistency.
Possibly this is more efficient also, although I guess it doesn't really
make much of a difference either way.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need to have vport attribute MTU (OVS_VPORT_ATTR_MTU) as
linux net-dev-ioctl can be used to get/set MTU for linux device.
Following patch removes OVS_VPORT_ATTR_MTU from datapath protocol.
This patch also adds netdev_set_mtu interface. So that MTU adjustments
can be done from OVS userspace. get_mtu() interface is also changed, now
get_mtu() returns EOPNOTSUPP rather than returning 0 and setting *pmtu
to INT_MAX in case there is no MTU attribute for given device.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add tunnel key support to CAPWAP vport. Uses the optional WSI field in a
CAPWAP header to store a 64bit key. It can also be used without keys, in which
case it is backward compatible with the old code. Documentation about the
WSI field format is in CAPWAP.txt.
Signed-off-by: Valient Gough <vgough@pobox.com>
[horms@verge.net.au: Various minor fixes (v4.1)]
Signed-off-by: Simon Horman <horms@verge.net.au>
[jesse: Additional parsing fixes]
Signed-off-by: Jesse Gross <jesse@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the kernel vlan actions mirror those used by OpenFlow 1.0.
i.e. MODIFY and STRIP. More flexible approach is to have an action to
push a tag and pop a tag off, so that it can handle multiple levels of vlan
tags. Plus it aligns with newer version of OpenFlow.
As this patch replaces MODIFY with PUSH semantic, action
mapping done in userpace is fixed accordingly.
GSO handling for multiple levels of vlan tags is also added as
Jesse suggested before.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Commit e408762f "netlink-socket: New function nl_lookup_genl_mcgroup()"
modified do_lookup_genl_family() to return the Netlink attributes to the
caller, but it still freed the Netlink message itself, which meant that
the attributes pointed into freed memory. This commit fixes the problem.
This commit is not a minimal fix. It refactors do_lookup_genl_family(),
changing the return value from "negative errno value or positive genl
family id" to the more common "zero or positive errno value".
Found by valgrind.
|
| |
|
|
|
|
|
|
| |
A controller may want to know which MPIDs are reachable from an
interface configured with CFM. This patch regularly writes this
information to the database.
Bug #7014.
|
| |
|
|
|
|
|
|
|
| |
802.1ag only allows for MPIDs in the range [1, 8191]. This is
restrictive enough to make assignment of MPIDs to instances of OVS
awkward. This patch allows eight byte MPIDs when running in
extended mode.
Bug #7014.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The standard CFM protocol only allows a handful of transmission
rates. This is particularly problematic if you want to support a
transmission rate slower than 100 ms and faster than 1000 ms.
This patch allows arbitrary transmission rates (between 1 ms and
65535 ms). It does this by commandeering parts of a reserved
"zero" field in the ccm message. This breaks wire compatibility
with standard 802.1ag implementations, and thus is only supported
in extended mode.
Bug #7014.
|
| |
|
|
|
|
|
|
| |
The new extended mode introduced in this patch will be used for
features which break wire compatibility with 802.1ag compliant
implementations.
Bug #7014.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the 802.1ag specification, users should be able to
configure the CFM module with a list of remote endpoints with which
the local endpoint should have connectivity. Commit 93b8df3853
"cfm: Remove Maintenance_Point and Monitor tables." changed the
behavior so that only one remote endpoint could be specified. This
commit takes it further, by disallowing specification of any
remote endpoints.
Due to this change, the semantics of the fault flag are slightly
different. Before, a fault was triggered if any of the configured
remote endpoints were unreachable (or with RDI), or if any
unconfigured remote endpoints were reachable. Now a fault is
triggered if no remote endpoints are reachable at all, or if
reachable endpoints have set their RDI.
Bug #7014.
|
| | |
|
| |
|
|
|
|
|
|
| |
There's no particular reason to force users of the LACP module to
be aware of the lacp_pdu structure. This patch hides that
information in the LACP module implementation. This results in
slightly cleaner code which is more consistent with the CFM
module.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When ovs-vswitchd executes actions on a synthesized packet, that is, on a
packet that is not being forwarded from any particular port but is being
generated by ovs-vswitchd itself or by an OpenFlow controller (using a
OFPT_PACKET_OUT message with an in_port of OFPP_NONE), there is no good
choice for the in_port to pass to the kernel in the flow in the
OVS_PACKET_CMD_EXECUTE message. This commit allows ovs-vswitchd to omit
the in_port entirely in this case.
This fixes a bug in OFPT_PACKET_OUT: using an in_port of OFPP_NONE would
cause the packet to be dropped by the kernel, since that's an invalid
input port.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Reported-by: Aaron Rosen <arosen@clemson.edu>
|
| |
|
|
|
|
|
|
| |
Remove iflink from vport interface. iflink is not used anywhere in
OVS. So there is not need to have iflink as vport attribute.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the current goals of netlink-protocol.h, for better or for worse, is
to ensure that the same definitions are available whether a Linux kernel is
in use or not. One of the ways it accomplishes this is by putting the
conditional definitions that test for features missing in old kernels at
the very end, after the dummy definitions used on non-Linux platforms.
However, commit b0025c8389f "netlink-protocol: Define missing symbols"
added new conditional definitions only in the Linux platform case, which
means that those definitions won't be available on non-Linux platforms.
This commit moves them to the end, instead.
The symbols that are moved are only used from netlink-socket.c, which is
only built on Linux platforms, so this does not change an actual bug. It
only makes the location of the definitions consistent with prior practice.
|
| |
|
|
|
| |
OVS fails to build with xenddk-56100build3926 because it has an
outdated genetlink header.
|
| |
|
|
|
|
|
|
| |
Currently dpif-linux listens for vport change events using
rtnetlink notifications. This patch switches to the ovs genl
notification system.
Feature #6809.
|
| | |
|