Russell Bryant [Sun, 16 Jul 2017 20:07:12 +0000 (16:07 -0400)]
ovn-architecture: Add notes on L3 gateway HA.
Add some comments to the ovn-architecture document that distributed
gateway ports can also be made highly available. Provide a brief
overview of the approach and point to the gateway HA design document
for a more detailed discussion of the approach taken.
Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Miguel Angel Ajo <majopela@redhat.com>
odp-execute: Reuse rss hash in OVS_ACTION_ATTR_HASH.
If RSS hash exists in a packet it can be reused instead of
5 tuple hash re-calculation in OVS_ACTION_ATTR_HASH. This
leads to increasing the performance of sending packets to
the OVS bonding in userspace datapath up to 10-15%.
Additionally fixed unit test 'select group with dp_hash
selection method' to not depend on dp_hash value.
dpif-netdev: Indicate support for various ct features.
The userspace datapath uses a structure to indicate supported features
that affects debug output. This commit updates that structure to
indicate that "ct_state_nat", "ct_orig_tuple", and "ct_orig_tuple6" are
supported.
tunneling: Avoid datapath-recirc by combining recirc actions at xlate.
This patch set removes the recirculation of encapsulated tunnel packets
if possible. It is done by computing the post tunnel actions at the time of
translation. The combined nested action set are programmed in the datapath
using CLONE action.
The following test results shows the performance improvement offered by
this optimization for tunnel encap.
tunneling: Calculate and update packet l4_offset in tunnel push.
The following tunnel combine patch series avoids the packets recirculation
after the tunnel push. So it is necessary to populate all relevant packet meta
data fields for the following combined action-set.
In this eg: the last tunnel_pop operation uses the l4_offset in the packet to
validate the packets. So it must be calculated and updated in the packet before
executing the action. Since there is no recirculation now on, this calculation
is doing as part of tunnel_push.
Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com> Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Joe Stringer <joe@ovn.org>
xlate: Clear tunnel mask along with other fields while combine actions.
The tunnel mask in the translation state should be cleared along with other
context fields. It is necessary in 'apply_nested_clone_actions' as it will be
used to combine post tunnel output actions with tunnel push. This will assure
right openflow state while executing the translation.
Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com> Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Joe Stringer <joe@ovn.org>
Joe Stringer [Tue, 18 Jul 2017 22:32:44 +0000 (15:32 -0700)]
dpif-netlink: For non-Ethernet, use Ethertype from packet_type.
For non-Ethernet flows, when fixing up the netlink message we need make
sure to pass down a valid Ethertype. The kernel does not understand
packet_type so it's implicitly encoded by the absence of _ETHERNET and
exact match of _ETHERTYPE. Without this change match_validate in the
kernel complains when trying to match packets from L3 tunnels.
e.g.
openvswitch: netlink: Unexpected mask (mask=110088, allowed=3d9804c)
The mask use to always be set in xlate_wc_init() and xlate_wc_finish(),
but that changed for non-Ethernet frames with the commit listed below.
Fixes: 3d4b2e6eb74e ("userspace: Add OXM field MFF_PACKET_TYPE") Signed-off-by: Joe Stringer <joe@ovn.org> Co-authored-by: Eric Garver <e@erig.me> Acked-by: Eric Garver <e@erig.me>
Joe Stringer [Tue, 18 Jul 2017 22:32:43 +0000 (15:32 -0700)]
dpif-netlink: Use netlink helpers for packet_type.
Rather than open-coding access to netlink attribute pointers in
put_exclude_packet_type(), make use of the netlink attribute helpers.
This simplifies the following bugfix.
Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Eric Garver <e@erig.me>
Yang, Yi Y [Fri, 7 Jul 2017 03:02:13 +0000 (11:02 +0800)]
datapath: enable VxLAN-gpe port creation in compat mode
In compat mode, ovs can't create L3 VxLAN-gpe port in old
kernels if port creation failed by rtnetlink, this patch
enables old kernels to create L3 VxLAN-gpe port.
Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Joe Stringer <joe@ovn.org>
odp-util: Document size of OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4.
This attribute is exclusive of OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6 so it
doesn't take up additional space (IPv6 is larger), but it's still worth
documenting.
Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
ofproto-dpif-xlate: Fixes for propagating state of conntrack.
The "ct" action is not supposed to make the various ct match fields
available except for the pipeline instantiated through the "table"
argument to the "ct" action. This commit fixes a few issues related to
that and updates the tests appropriately.
Ben Pfaff [Mon, 17 Jul 2017 16:54:54 +0000 (09:54 -0700)]
connmgr: Fix crash when in_band_create() fails.
update_in_band_remotes() created an in-band manager and then tried to work
with it without first checking whether creation had succeeded. If it
failed, this led to a segfault.
Ben Pfaff [Fri, 14 Jul 2017 21:33:46 +0000 (14:33 -0700)]
Support IPv6 link-local address scopes on Linux.
I hadn't even heard of this feature before, but it seems to be at least
semi-standard to support Linux link-local address scopes via a % suffix,
e.g. fe80::1234%eth0 for a link-local address scoped to eth0. This commit
adds support.
I'd appreciate feedback from folks who understand this feature better than
me.
Ben Pfaff [Fri, 14 Jul 2017 21:33:45 +0000 (14:33 -0700)]
socket-util: Change ss_format_address() to take a dynamic string.
It's occasionally convenient to format into a fixed-size buffer, but
as the use cases, and the text to be formatted, get more sophisticated,
it becomes easier to deal with "struct ds *" than a buffer pointer and
length pair. An upcoming commit will make ss_format_address() do more
work, and I think that this is the point at which it becomes easier to
take a dynamic string. This commit makes the parameter type change
without yet changing what is formatted.
ovn: l3ha ensure no master bouncing when ovn-controller is restarted
When ovn-controller is restarted, ovn-controller removes the old
Chassis entry from the SBDB and a new one is inserted.
This cleared the Gateway_Chassis chassis column in the SBDB and then
ovn-northd removed the empty-column Gateway_Chassis entry.
Such event made the other (non-restarted and master gateway chassis)
believe that he was a single (non-HA) gateway, turning off BFD and
releasing the port for a tiny time frame causing unnecesary downtime.
Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
This patch extends gratuitous ARP support for NAT addresses so that it
applies to centralized NAT rules on a HA router.
Gratuitous ARP packets for centralized NAT rules on a HA router
are only generated on the active gateway chassis.
Signed-off-by: Anil Venkata <vkommadi@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
ovn: l3ha, make is_chassis_active aware of gateway_chassis
is_chassis_active now is only true for redirect-chassis ports
in the case of the specific lport being active on the
local chassis.
This will naturally make the ARP responder / redirection openflow
rules automatically inserted/removed when a router goes active/backup
in a way that BACKUP routers won't respond to ARP on gateway ports,
and they won't route packets that arrive on the wrong gateway
chassis (that can happen until all hypervisors converge in the
new MASTER thanks to the BFD monitoring of the tunnel endpoints).
Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
This patch enables bfd protocol between gateways and transport nodes,
all gateway nodes with any HA chassisredirect port will enable BFD
to all tunnel endpoints, while transport nodes will enable BFD
to all tunnel endpoints hosting an HA gateway chassisredirect port.
Signed-off-by: Venkata Anil <vkommadi@redhat.com> Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Co-Authored-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
This patch handles multiple gateway_chassis within chassisredirect
ports. All the gateway_chassis within chassisredirect port
will implement the rules to de-encapsulate incoming packets
for such port (please note that later patches in the series
will make is_chassis_redirect conditionals aware of the
MASTER/BACKUP status of the chassis).
Hosts targeting a remote chassisredirect port will setup a
bundle(active_backup, ..) action to each tunnel port, in the given
priority order. Following patches will enable BFD to detect
when a remote gateway chassis is no longer reachable.
Co-authored-by: Venkata Anil Kommaddi <vkommadi@redhat.com> Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Venkata Anil Kommaddi <vkommadi@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
ovn: l3ha, NBDB and SBDB changes and documentation
This commit introduces the north and south db changes necessary for
the l3ha router implementation.
It defines a new Table in both NBDB and SBDB.
The Gateway_Chassis table is created, with a tiny difference between
NBDB and SBDB, NBDB references the chassis via it's name (chassis_name)
and SBDB references the chassis via reference (chassis) to the Chassis table.
In NBDB a new column (gateway_chassis) is added to Logical_Router_Ports
with a list of Gateway_Chassis which can be empty.
In SBDB a new column (gateway_chassis) is added to Port_Binding with
the same list, this column will be used for ports of type chassis-redirect.
Bump minor version since we've added new backwards compatible features.
Co-authored-by: Russell Bryant <russell@ovn.org> Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
BRE alternative (\|) is an GNU sed extension. [1]
It isn't available in NetBSD sed.
[1] http://www.gnu.org/software/sed/manual/sed.html#Regular-Expressions
regexp1\|regexp2
Matches either regexp1 or regexp2. Use parentheses to use
complex alternative regular expressions. The matching process
tries each alternative in turn, from left to right, and the
first one that succeeds is used. It is a GNU extension.
Signed-off-by: YAMAMOTO Takashi <yamamoto@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
- It can cause problems for some utilities (e.g. ovs-pcap) after
The recent change. [1]
See also: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51152
xlate: Refactor translation of patch port output actions.
Outputting to a patch port is translated by its peer patch port actions.
Refactoring the translation part to use later in the patch series for the
tunnel push.
Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com> Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Joe Stringer <joe@ovn.org>
Ben Pfaff [Fri, 14 Jul 2017 21:20:07 +0000 (14:20 -0700)]
sparse: Add missing protoype for sendmmsg.
Reported-by: Joe Stringer <joe@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Fixes: 00f5565c7eed ("socket-util: Fix recursion issue in sendmmsg") Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
Mark Michelson [Fri, 14 Jul 2017 19:27:24 +0000 (14:27 -0500)]
Free port bindings when deleting cached ports.
Running test "ovn-controller-vtep binding 2" with address sanitizer
enabled resulted in a failure due to a memory leak. The cached switch
port's bindings were not being freed when the port was freed. The
fix is to destroy the bindings hash table when the switch port is
freed.
Signed-off-by: Mark Michelson <mmichels@redhat.com> Reported-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
dp-packet: Remove misleading comment for refill init function.
Function 'dp_packet_batch_refill_init' doesn't return anything.
Looks like this comment came from one of the intermediate versions
of the API enhancement patch. Additionally comment style changed
to be consistent with other comments in the same file.
CC: Andy Zhou <azhou@ovn.org> Fixes: 72c84bc2db23 ("dp-packet: Enhance packet batch APIs.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Andy Zhou <azhou@ovn.org>
Joe Stringer [Fri, 2 Jun 2017 16:38:47 +0000 (09:38 -0700)]
ofproto-dpif: Detect support for ct_tuple6.
Support for extracting original direction 5 tuple fields from the
connection tracking module may differ on some platforms between the IPv4
original tuple fields vs. IPv6. Detect IPv6 original tuple support
separately and reflect this support up to the OpenFlow layer.
Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
ZhiPeng Lu [Tue, 11 Jul 2017 00:47:10 +0000 (08:47 +0800)]
db-ctl-base: Fix reference-following feature in get_row_by_id().
If a particular column is supposed to be reached by following a reference
from a UUID column, then that really needs to happen; if there's no
reference, then we're probably starting from a row in the wrong table.
This fixes an assertion failure in command "ovs-vsctl list netflow br0",
if bridge br0 without any netflows.
$ovs-vsctl list netflow br0
ovs-vsctl: lib/ovsdb-idl.c:2407: assertion column_idx < class->n_columns failed
in ovsdb_idl_read()
Aborted
Fixes: 3f5b5f7b4115 ("db-ctl-base: Always support all tables in schema.") Signed-off-by: Zhipeng Lu <lu.zhipeng@zte.com.cn> Signed-off-by: Ben Pfaff <blp@ovn.org>
Zhou Yangchao [Sun, 12 Mar 2017 03:57:37 +0000 (11:57 +0800)]
id-pool: Fix allocation overflow and the leak of the first ID.
The range of IDs should be [base, base + n_ids),
but id_pool_alloc_id() allocated the range of IDs is [base, base + n_ids].
And id_pool_free_id() cannot free the ID value base correctly.
Signed-off-by: Yangchao Zhou <zhouyates@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
While it does have a sort of equivalent called `WSASendMsg`
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms741692(v=vs.85).aspx)
it uses a different structure `WSAMSG` instead of the normal msghdr which
in turn will have to be mapped properly (this goes further to iovec/wsabuf in the
structure itself).
Fixes broken build on Windows.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
ofproto-dpif-ipfix: add Exporting Process Reliability Statistics
This patch adds support for The Exporting Process Reliability Statistics
Option Template, which is defined in RFC 5101, Section 4.3. For now, this
Option Template includes only exporting process ID scope field and a
single counter - notSentPacketTotalCount.
Currently, Data Records that contain exporting process statistics are
transmitted at regular intervals, immediately after sending (Options) Template
Records. This behavior could be changed later on to allow the interval of
sending exporting process statistics to be configurable as RFC recommends it.
According to RFC 5101, Section 10.3.6. the frequency of the (Options) Template
transmissions MUST be configurable. OvS doesn't comply to this requirement.
Therefore, it seems to be a good idea to make both intervals configurable at
the same time.
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Eric Garver [Fri, 30 Jun 2017 20:27:45 +0000 (16:27 -0400)]
netdev: fix missing shifts of VXLAN_EXT_GPE
Contrary to the comment by the enum value, these are actually regular
enum values that need shifted. VXLAN_EXT_GBP for example is used as a
netlink value for vports.
Fixes: 875ab13020b1 ("userspace: Handling of versatile tunnel ports") Signed-off-by: Eric Garver <e@erig.me> Signed-off-by: Ben Pfaff <blp@ovn.org>
As part of retrieving system statistics, process status APIs along with
helper functions were implemented. Some of them are very generic and can
be reused by other subsystems.
Move the APIs in system-stats.c to process.c and util.c and make them
available. This patch doesn't change any functionality.
Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Ben Pfaff [Tue, 11 Jul 2017 04:55:56 +0000 (21:55 -0700)]
util: Make PADDED_MEMBERS work more than once per struct.
Until now, if the PADDED_MEMBERS macro was used more than once in a struct,
it caused Clang and GCC warnings because of multiple definition of a member
named "pad". This commit fixes the problem by giving each of these a
unique name.
MSVC, Clang, and GCC all support the __COUNTER__ macro, although it is not
standardized.
Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Bhanuprakash Bodireddy <Bhanuprakash.bodireddy@intel.com>
Yi-Hung Wei [Tue, 27 Jun 2017 18:11:34 +0000 (11:11 -0700)]
ofproto/trace: Add --ct-next option to ofproto/trace
Previous patch enables ofproto/trace to automatically trace a flow
that involves multiple recirculation on conntrack. However, it always
sets the ct_state to trk|est when it processes recirculated conntrack flows.
With this patch, users can customize the expected next ct_state in the
aforementioned use case.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Yi-Hung Wei [Tue, 27 Jun 2017 18:11:33 +0000 (11:11 -0700)]
ofproto/trace: Add support for tracing conntrack recirculation
Previously, a user need to run ofproto/trace multiple times to derive the
final datapath actions if a flow hit conntrack actions that involves
recirculation. To improve the usability of ofproto/trace, in this patch,
we keep track of the conntrack actions, and automatically run the
recirculation process so that a user only need to execute the ofproto/trace
command once. Currently, this patch sets the default ct_state as
trk and new in the automatic recirculation process. A following patch
will provide an option to customize ct_state.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
For a while, ubuntu used upstart scripts as an alternative
for sysv scripts. For e.g popular releases like ubuntu12.04
and ubuntu14.04 have upstart infrastructure. From Ubuntu16.04,
they have moved to systemd.
Ubuntu maintainers have a fork of openvswitch packages with
upstart scripts. When a user installs openvswitch-switch
package on a ubuntu 14.04 with 'apt-get install openvswitch-switch',
two upstart files are added to /etc/init directory.
Now, when the same user builds debian packages from this repo
and then installs them, the older upstart files don't get
deleted. What this means is that a command like
'invoke-rc.d openvswitch-switch restart' calls initctl scripts
instead of sysv script that this repo provides. In our sysv
scripts we have logic to carefully upgrade kernel module and
save openflow flows. This breaks the intent of the package from
this repo.
This commit deletes any stale upstart files that have remained
in the system.
Signed-off-by: Gurucharan Shetty <guru@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Yi-Hung Wei [Tue, 27 Jun 2017 18:11:32 +0000 (11:11 -0700)]
conntrack: Move ct_state parsing to lib/flow.c
This patch moves conntrack state parsing function from ovn-trace.c to
lib/flow.c, because it will be used by ofproto/trace unixctl command
later on. It also updates the ct_state checking logic, since we no longer
assume CS_TRACKED is enable by default.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
zhaozhanxu [Mon, 26 Jun 2017 10:29:22 +0000 (18:29 +0800)]
tnl-ports: Fix loss of tunneling upon removal of a single tunnel port.
When OVS had multiple tunnel ports of a single kind, and any one of them
was removed, the remaining ports could no longer receive traffic. This
fixes the problem.
Signed-off-by: zhaozhanxu <zhaozhanxu@163.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Kevin Traynor [Mon, 26 Jun 2017 21:51:51 +0000 (22:51 +0100)]
netdev-dpdk: Log Rx checksum offload not supported.
Rx checksum offload is enabled by default on DPDK NICs where
supported. Previously Rx checksum offload not supported was
logged only once. It meant that if multiple NICs did not
support Rx checksum offload, it was only reported for the
first NIC configured.
Fixes: 1a2bb11817a4 ("netdev-dpdk: Enable Rx checksum offloading feature on DPDK physical ports.") Reported-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Kevin Traynor [Mon, 26 Jun 2017 21:51:50 +0000 (22:51 +0100)]
netdev-dpdk: Remove Rx checksum reconfigure.
Rx checksum offload is enabled by default on DPDK physical NICs
where available, with reconfiguration through
options:rx-checksum-offload. However, changing rx-checksum-offload
did not result in a reconfiguration of the NIC and wrong status is
reported for it.
As there seems to be diminishing reasons why a user would want
to disable Rx checksum offload, just remove the broken reconfiguration
option.
Fixes: 1a2bb11817a4 ("netdev-dpdk: Enable Rx checksum offloading feature on DPDK physical ports.") Reported-by: Kevin Traynor <ktraynor@redhat.com> Suggested-by: Sugesh Chandran <sugesh.chandran@intel.com> Acked-by: Darrell Ball <dlu998@gmail.com> Tested-by: Sugesh Chandran <sugesh.chandran@intel.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
ovn-controller: fix use-after-free in physical_run()
The hmap "tunnels" is persistent across IDL loop iterations, but
stores pointers to strings in the local db replica which can be
freed as database updates are processed. Fix by storing a copy
of the string in the hmap instead of a pointer to the string in
the replica.
Found via valgrind.
Fixes: 40128e371ec3 ("physical: Refactor port binding processing.") Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Lance Richardson [Wed, 28 Jun 2017 18:54:47 +0000 (14:54 -0400)]
ovn-controller: avoid crash when vswitchd connection is lost
When ovs-vswitchd has dropped its connection to ovn-controller,
rconn_get_version() will return -1. OpenFlow messages built by
ofctrl_put() in this condition will have an invalid OpenFlow version
value of 255, which eventually leads to ovn-controller crashing
due to an assertion failure in raw_instance_get().
Avoid this crash by improving the ofctrl_can_put() test to ensure
that the negotiated version is available. (Note that checking
rconn_is_connected() would not be sufficient since rconn S_IDLE
state is considered "connected" but version negotiation is not
necessarily complete).
Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
For ingress/egress counters, flow direction is checked in order to
determine which counters should be increased. Utility functions
from lib/packets.h are used for checking if packet is unicast,
multicast or broadcast.
Co-authored-by: Michal Weglicki <michalx.weglicki@intel.com> Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Zhenyu Gao [Mon, 26 Jun 2017 10:30:55 +0000 (10:30 +0000)]
vswitchd: Fix IFACE_STAT name error in iface_refresh_stats
The element of rx_1024_to_1522_packets has wrong name(rx_1024_to_1518_packets).
Change it from rx_1024_to_1518_packets to rx_1024_to_1522_packets, it should
record packets between 1024 to 1522.
The element of tx_1024_to_1522_packets has wrong name(tx_1024_to_1518_packets).
Change it from tx_1024_to_1518_packets to tx_1024_to_1522_packets, it should
record packets between 1024 to 1522.
CC: mweglicx <michalx.weglicki@intel.com> Fixes: d6e3feb57c44 ("Add support for extended netdev statistics based on RFC 2819.") Signed-off-by: Zhenyu Gao <sysugaozhenyu@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Zoltán Balogh [Fri, 30 Jun 2017 15:29:40 +0000 (15:29 +0000)]
netdev: Fix crash when interface option is changed to invalid value.
When trying to modify an interface option (e.g. remote IP of a GRE port) to
an invalid value, the vswitchd does crash. For instance:
ovs-vsctl add-br br0
ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre \
options:remote_ip=10.0.0.2
ovs-vsctl set interface gre0 options:remote_ip=9.9.9
The bug is caused by trying to dereference a NULL pointer. It was introduced
by the commit 9fff138ec3a6. Before that, the NULL pointer was handled by the
VLOG_WARN_BUF macro.
Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com> CC: Daniele Di Proietto <diproiettod@vmware.com> Fixes: 9fff138ec3a6 ("netdev: Add 'errp' to set_config().") Signed-off-by: Ben Pfaff <blp@ovn.org>