summaryrefslogtreecommitdiff
path: root/vswitchd
Commit message (Collapse)AuthorAgeFilesLines
* dpdk: reflect status and version in the databaseAaron Conole2018-05-253-3/+24
| | | | | | | | | | | | | | | | The normal way of retrieving the running DPDK status involves parsing log files and issuing various incantations of ovs-vsctl and ovs-appctl commands to determine whether the rte_eal_init successfully started. This commit adds two new records to reflect the dpdk version, and the dpdk initialization status. To support this, the other_config:dpdk-init configuration block supports the 'true' and 'try' keywords now, instead of just 'true'. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* userspace: add erspan tunnel support.William Tu2018-05-211-0/+34
| | | | | | | | | | | | ERSPAN is a tunneling protocol based on GRE tunnel. The patch add erspan tunnel support for ovs-vswitchd with userspace datapath. Configuring erspan tunnel is similar to gre tunnel, but with additional erspan's parameters. Matching a flow on erspan's metadata is also supported, see ovs-fields for more details. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* userspace: add gre sequence number support.William Tu2018-05-211-0/+7
| | | | | | | | | | The patch adds support for gre sequence number. Default is disable. When enable with 'options:seq=true', the outgoing gre packet will have its sequence number incremented by one. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Configurable Link State Change (LSC) detection modeRĂ³bert Mulik2018-05-111-0/+17
| | | | | | | | | | | It is possible to set LSC detection mode to polling or interrupt mode for DPDK interfaces. The default is polling mode. To set interrupt mode, option dpdk-lsc-interrupt has to be set to true. For detailed description and usage see the dpdk install documentation. Signed-off-by: Robert Mulik <robert.mulik@ericsson.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* dpif-netdev: Detailed performance stats for PMDsJan Scheurich2018-05-112-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch instruments the dpif-netdev datapath to record detailed statistics of what is happening in every iteration of a PMD thread. The collection of detailed statistics can be controlled by a new Open_vSwitch configuration parameter "other_config:pmd-perf-metrics". By default it is disabled. The run-time overhead, when enabled, is in the order of 1%. The covered metrics per iteration are: - cycles - packets - (rx) batches - packets/batch - max. vhostuser qlen - upcalls - cycles spent in upcalls This raw recorded data is used threefold: 1. In histograms for each of the following metrics: - cycles/iteration (log.) - packets/iteration (log.) - cycles/packet - packets/batch - max. vhostuser qlen (log.) - upcalls - cycles/upcall (log) The histograms bins are divided linear or logarithmic. 2. A cyclic history of the above statistics for 999 iterations 3. A cyclic history of the cummulative/average values per millisecond wall clock for the last 1000 milliseconds: - number of iterations - avg. cycles/iteration - packets (Kpps) - avg. packets/batch - avg. max vhost qlen - upcalls - avg. cycles/upcall The gathered performance metrics can be printed at any time with the new CLI command ovs-appctl dpif-netdev/pmd-perf-show [-nh] [-it iter_len] [-ms ms_len] [-pmd core] [dp] The options are -nh: Suppress the histograms -it iter_len: Display the last iter_len iteration stats -ms ms_len: Display the last ms_len millisecond stats -pmd core: Display only the specified PMD The performance statistics are reset with the existing dpif-netdev/pmd-stats-clear command. The output always contains the following global PMD statistics, similar to the pmd-stats-show command: Time: 15:24:55.270 Measurement duration: 1.008 s pmd thread numa_id 0 core_id 1: Cycles: 2419034712 (2.40 GHz) Iterations: 572817 (1.76 us/it) - idle: 486808 (15.9 % cycles) - busy: 86009 (84.1 % cycles) Rx packets: 2399607 (2381 Kpps, 848 cycles/pkt) Datapath passes: 3599415 (1.50 passes/pkt) - EMC hits: 336472 ( 9.3 %) - Megaflow hits: 3262943 (90.7 %, 1.00 subtbl lookups/hit) - Upcalls: 0 ( 0.0 %, 0.0 us/upcall) - Lost upcalls: 0 ( 0.0 %) Tx packets: 2399607 (2381 Kpps) Tx batches: 171400 (14.00 pkts/batch) Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Acked-by: Billy O'Mahony <billy.o.mahony@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* ofproto: Allow bundle idle timeout to be configured.Flavio Leitner2018-05-093-2/+18
| | | | | | | | | | | In some cases 10 seconds might be too much time and in other cases it might be too little. The OpenFlow spec mandates that it should wait at least one second, so enforce that as the minimum acceptable value. Signed-off-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Expose missing --peer-ca-cert and SSL options in usage and manpages.Dan Williams2018-05-091-0/+1
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vswitchd: Enhance manager_options documentation.Darrell Ball2018-05-091-4/+14
| | | | | Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vswitch.xml: Add details for mac option.Tonghao Zhang2018-05-081-1/+2
| | | | | Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-vswitchd: Better document that ovs-vswitchd manages its own datapaths.Ben Pfaff2018-05-071-5/+6
| | | | | | More explicitly discourage users from managing them themselves. Signed-off-by: Ben Pfaff <blp@ovn.org>
* lacp: New command "lacp/show-stats" fordisplaying LACP counters.Nitin Katiyar2018-04-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | Currently OVS does not provide any command to display stats for LACP without which it is difficult to debug LACP issues. Here we propose to display various statistics about LACP PDUs and slave state change. Sample output: ovs_lacp # ovs-appctl lacp/stats-show ---- bond-prv statistics ---- slave: dpdk0: RX PDUs: 128 RX Bad PDUs: 0 TX PDUs: 5 Link Expired: 2 Link Defaulted: 1 Carrier Status Changed: 0 Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-vswitchd: Do not use system routing table with --disable-system.Ben Pfaff2018-04-031-0/+2
| | | | | | | | | | | | | | | | | | The --disable-system option indicates that the user wants to avoid using the host's datapath. This is also a good indication that the user does not want to use other host resources such as the routing table, so this commit implements that. This fixes a failure in the test "ptap - recirculate after packet_type change" when the host routing table contained an entry that affected the generated flow. Without this patch, the commands: led to a failure in that test. Reported-by: Timothy Redaelli <tredaelli@redhat.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-March/046406.html Tested-By: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vswitchd: Allow user to directly specify sFlow agent address.Ben Pfaff2018-04-031-7/+18
| | | | | | | | | | | | | | | At least for testing purposes, and perhaps in production, it is useful to be able to fix the agent IP address directly, rather that indirecting it through a device name or the routing table. This commit uses this feature to fix the agent IP address used in the unit tests. This will be particularly useful in an upcoming commit that disables the use of the system routing table in the unit tests, to make the tests' results independent of the host's routes. CC: Neil McKee <neil.mckee@inmon.com> Tested-By: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vswitchd: Remove support for deprecated "null" interfaces.Ben Pfaff2018-03-142-14/+1
| | | | | | | This interface type was deprecated in 2013, so it is time to remove it. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jjpettit@ovn.org>
* ofproto: Make ofproto_port_open_type() faster.Ben Pfaff2018-02-261-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ofproto_port_open_type() was surprisingly slow because it called the function ofproto_class_find__(), which itself was surprisingly slow because it actually creates a set of strings and enumerates all of the available classes. This patch improves performance by eliminating the call to ofproto_class_find__() from ofproto_port_open_type(). In turn that required changing a parameter type and updating all the callers. Possibly it would be worth making ofproto_class_find__() itself faster, but it doesn't look like any of its other callers would be used in inner loops. For more background, see also https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046140.html This patch arises as a result of testing done by Ali Ginwala and Han Zhou. Their test showed that commit 2d4beba resulted in slower performance of ovs-vswitchd than was seen in previous versions of OVS. With this patch, Ali retested and reported that performance drastically improved by ~60%. The test for 10k lports, 40 LSs and 8 LRs and 1k HVs just got completed in 3 hours 39 min vs 8+ hours for branch-2.9. Cpu utilization graph of a farm comparing Ben's ofproto patch vs branch-2.9 is available @ https://raw.githubusercontent.com/noah8713/ovn-scale-test/scale_results/results/ovs_2.9_vs_ben_ofproto.png Reported-by: Mark Michelson <mmichels@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Tested-by: aginwala <aginwala@asu.edu> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ofp-util, ofp-parse: Break up into many separate modules.Ben Pfaff2018-02-131-1/+0
| | | | | | | | | | | | ofp-util had been far too large and monolithic for a long time. This commit breaks it up into units that make some logical sense. It also moves the pieces of ofp-parse that were specific to each unit into the relevant unit. Most of this commit is just moving code around. Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
* Merge branch 'dpdk_merge' of https://github.com/istokes/ovs into HEADBen Pfaff2018-02-011-0/+11
|\
| * netdev-dpdk: Add support for vHost dequeue zero copy (experimental)Ciara Loftus2018-01-311-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zero copy is disabled by default. To enable it, set the 'dq-zero-copy' option to 'true' when configuring the Interface: ovs-vsctl set Interface dpdkvhostuserclient0 options:vhost-server-path=/tmp/dpdkvhostuserclient0 options:dq-zero-copy=true When packets from a vHost device with zero copy enabled are destined for a single 'dpdk' port, the number of tx descriptors on that 'dpdk' port must be set to a smaller value. 128 is recommended. This can be achieved like so: ovs-vsctl set Interface dpdkport options:n_txq_desc=128 Note: The sum of the tx descriptors of all 'dpdk' ports the VM will send to should not exceed 128. Due to this requirement, the feature is considered 'experimental'. Testing of the patch showed a ~8% improvement when switching 512B packets between vHost devices on different VMs on the same host when zero copy was enabled on the transmitting device. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* | ovs-vswitchd: Avoid or suppress memory leak warning for glibc aio.Ben Pfaff2018-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The asynchronous IO library in glibc starts threads that show up as memory leaks in valgrind. This commit attempts to avoid the warnings by flushing all the asynchronous I/O to the log file before exiting. This only does part of the job for glibc since it keeps the threads around for some undefined idle time before killing them, so in addition this commit adds a valgrind suppression to stop displaying these warnings in any case. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmai.com>
* | ovs-vswitchd: Fire RCU callbacks before exit to reduce memory leak warnings.Ben Pfaff2018-02-011-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | ovs-vswitchd makes extensive use of RCU to defer freeing memory past the latest time that it could be in use by a thread. Until now, ovs-vswitchd has not waited for RCU callbacks to fire before exiting. This meant that in many cases, when ovs-vswitchd exits, many blocks of memory are stuck in RCU callback queues, which valgrind often reports as "possible" memory leaks. This commit adds a new function ovsrcu_exit() that waits and fires as many RCU callbacks as it reasonably can. It can only do so for the thread that calls it and the thread that calls the callbacks, but generally speaking ovs-vswitchd shuts down other threads before it exits anyway, so this is pretty good. In my testing this eliminates most valgrind warnings for tests that run ovs-vswitchd. This ought to make it easier to distinguish new leaks that are real from existing non-leaks. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmai.com>
* vswitchd: show DPDK versionMatteo Croce2018-01-261-0/+1
| | | | | | | | | | Show DPDK version if Open vSwitch is compiled with DPDK support. Version can be retrieved with `ovs-vswitchd --version` or from OVS logs. Small change in ovs-ctl to avoid breakage on output change. Signed-off-by: Matteo Croce <mcroce@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* bridge: Fix custom stats' counters leak.Ilya Maximets2018-01-231-0/+1
| | | | | | | | | | The caller takes ownership over allocated array of counters. And it must free them. CC: Michal Weglicki <michalx.weglicki@intel.com> Fixes: 971f4b394c6e ("netdev: Custom statistics.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-linux: do not send packets to down tap ifaces.Flavio Leitner2018-01-221-1/+12
| | | | | | | | | | | | | | | | | | | | | | Today OVS pushes packets to the TAP interface ignoring its current state. That works because the kernel will return -EIO when it's not UP and OVS will just ignore that as it is not an OVS issue. However, it causes a huge impact when broadcasts happen when using userspace datapath accelerated with DPDK (e.g.: action NORMAL). This patch improves the situation by checking the TAP's interface state before issueing any syscall. However, there might be use-cases moving interfaces to other networking namespaces and in that case, OVS can't retrieve the iface state (sets it to DOWN). That would stop the traffic breaking the use-case. This patch relies on netlink notifications to find out if the device is local or not. When it's local, the device state is checked otherwise it will behave as before. Signed-off-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* dpif-netdev: Time based output batching.Ilya Maximets2018-01-171-0/+16
| | | | | | | | | | | | | | | This allows to collect packets from more than one RX burst and send them together with a configurable intervals. 'other_config:tx-flush-interval' can be used to configure time that a packet can wait in output batch for sending. 'tx-flush-interval' has microsecond resolution. Tested-by: Jan Scheurich <jan.scheurich@ericsson.com> Acked-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* netdev: Custom statistics.Michal Weglicki2018-01-101-6/+25
| | | | | | | | | | | | | | | | | | | | | - New get_custom_stats interface function is added to netdev. It allows particular netdev implementation to expose custom counters in dictionary format (counter name/counter value). - New statistics are retrieved using experimenter code and are printed as a result to ofctl dump-ports. - New counters are available for OpenFlow 1.4+. - New statistics are printed to output via ofctl only if those are present in reply message. - New statistics definition is added to include/openflow/intel-ext.h. - Custom statistics are implemented only for dpdk-physical port type. - DPDK-physical implementation uses xstats to collect statistics. Only dropped and error counters are exposed. Co-authored-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ofproto: Delete all groups and meters when (un)configuring a controller.Ben Pfaff2018-01-081-7/+8
| | | | | | | | | | | | | | Open vSwitch has always deleted all flows from the flow table whenever a controller is configured or whenever all the controllers are unconfigured. After this commit, OVS additionally deletes all OpenFlow groups and meters. Suggested-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> Suggested-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jan Scheurich <jan.scheurich@ericsson.com> Tested-by: Jan Scheurich <jan.scheurich@ericsson.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com> Tested-by: Greg Rose <gvrose8192@gmail.com>
* Merge branch 'dpdk_merge' of https://github.com/istokes/ovs into HEADBen Pfaff2018-01-021-0/+1
|\
| * vswitchd: Document netdev-dpdk commands.Ilya Maximets2017-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | netdev-dpdk appctl commands added to man pages. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Antonio Fischetti <antonio.fischetti@intel.com> Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Acked-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* | ovs-vswitchd: Allow more convenient 0x short form for specifying DPIDs.Ben Pfaff2017-12-211-2/+3
|/ | | | | | | | | | | Until now, ovs-vswitchd has insisted that other-config:datapath-id be exactly 16 hex digits. This commit allows shorter forms prefixed by 0x. This was prompted by Faucet controller examples such as this one: https://github.com/faucetsdn/faucet/blob/master/docs/README_config.rst which tend to suggest datapath IDs like 0x1. CC: Josh Bailey <joshb@google.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* doc: Add docs for linux-sfq QoS supported parametersLukasz Rzasik2017-12-181-0/+19
| | | | | | | | | | | Qdisc SFQ was already fully supported but ovs-vswtich.conf.db lacked documentation about supported parameters. This patch adds the documentation. CC: Jonathan Vestin <jonavest@kau.se> CC: Ben Pfaff <blp@ovn.org> Signed-off-by: Lukasz Rzasik <lukasz.rzasik@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Improve documentation.Ben Pfaff2017-12-141-4/+3
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* ovsdb-idlc: Replace C/C++ keyword in column nameYi-Hung Wei2017-12-131-1/+1
| | | | | | | | | With this patch, ovs-idlc appends an underscore to a column name if it is a C or C++ keyword. Therefore, C and C++ compiler will not get confused. Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-dpdk: extend netdev_dpdk_get_status to include if_type and if_descrMichal Weglicki2017-12-081-0/+64
| | | | | | | | | | | | | | | | This commit extends netdev_dpdk_get_status API to include additional driver-related information: if_type and if_descr. v2->v3: Code rebase. v3->v4: Minor comments applied. v5->v6: Adds DPDK port specific description in documentation. 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> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* netdev-dpdk: vHost IOMMU supportMark Kavanagh2017-12-081-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | DPDK v17.11 introduces support for the vHost IOMMU feature. This is a security feature, which restricts the vhost memory that a virtio device may access. This feature also enables the vhost REPLY_ACK protocol, the implementation of which is known to work in newer versions of QEMU (i.e. v2.10.0), but is buggy in older versions (v2.7.0 - v2.9.0, inclusive). As such, the feature is disabled by default in (and should remain so), for the aforementioned older QEMU verions. Starting with QEMU v2.9.1, vhost-iommu-support can safely be enabled, even without having an IOMMU device, with no performance penalty. This patch adds a new global config option, vhost-iommu-support, that controls enablement of the vhost IOMMU feature: ovs-vsctl set Open_vSwitch . other_config:vhost-iommu-support=true This value defaults to false; to enable IOMMU support, this field should be set to true when setting other global parameters on init (such as "dpdk-socket-mem", for example). Changing the value at runtime is not supported, and requires restarting the vswitch daemon. Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* system-stats: Include core number in the process stats.Bhanuprakash Bodireddy2017-11-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | When dumping process statistics, include the the core number the process was last scheduled. With 'other_config:enable-statistics=true', Before: {cpu="28", file_systems="/,8474624,7826220 /workspace,223835956,199394160", load_average="1.29,1.76,1.33", memory="65861460,27457540,3813488,1999868,0", process_ovs-vswitchd="4685896,17452,362920,0,383967,383967", process_ovsdb-server="48088,5172,60,0,384057,384057"} After: {cpu="28", file_systems="/,8474624,7826308 /workspace,223835956,199394172", load_average="1.30,1.04,1.13", memory="65861460,27469176,3815252,1999868,0", process_ovs-vswitchd="4686020,17360,127380,0,148406,148406,3", process_ovsdb-server="48096,5212,30,0,148496,148496,4"} eg: process vsz , rss , cputime, crashes, booted, uptime, core_id ovs-vswitchd="4686020,17360, 127380, 0 , 148406, 148406, 3" Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Convert dot2pic build tool from Perl to Python.Ben Pfaff2017-11-261-1/+1
| | | | | | | | Perl is unfashionable and Python is more widely available and understood, so this commit converts one of the OVS uses of Perl into Python. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com>
* vswitch.xml: Fix nonbreaking spaces.Ben Pfaff2017-11-081-1/+1
| | | | | Fixes: fb9fdd72893d ("vswitchd: Document option dst_port.") Signed-off-by: Ben Pfaff <blp@ovn.org>
* vswitchd: Document option dst_port.duanjiong2017-11-071-0/+5
| | | | | | | Otherwise the user does not know how to change it Signed-off-by: Duan Jiong <djduanjiong@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* lib: Move lib/poll-loop.h to include/openvswitchXiao Liang2017-11-033-3/+3
| | | | | | | | Poll-loop is the core to implement main loop. It should be available in libopenvswitch. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vswitch.xml: Fix typo in documentation.Ben Pfaff2017-10-231-1/+1
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
* vswitch.xml: Better document patch ports.Ben Pfaff2017-10-121-1/+29
| | | | | | Reported-by: Hui Xiang <xianghuir@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* bridge: Fix controller status update to passive connectionsAndy Zhou2017-09-141-5/+11
| | | | | | | | | | | | The bug can cause ovs-vswitchd to crash (due to assert) when it is set up with a passive controller connection. Since only active connections are kept, the passive connection status update should be ignored and not trigger asserts. Fixes: 85c55772a453 ("bridge: Fix controller status update") Reported-by: Josh Bailey <josh@faucet.nz> Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
* dpif-netdev: Add ovs-appctl dpif-netdev/pmd-rxq-rebalance.Kevin Traynor2017-08-251-0/+2
| | | | | | | | | | | | | | | Rxqs consumed processing cycles are used to improve the balance of how rxqs are assigned to pmds. Currently some reconfiguration is needed to perform a reassignment. Add an ovs-appctl command to perform a new assignment in order to balance based on the latest rxq processing cycle information. Note: Jan requested this for testing purposes. Suggested-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Darrell Ball <dlu998@gmail.com>
* ovsschema: Fix line lengths.Bhanuprakash Bodireddy2017-08-081-23/+44
| | | | | | | | | According to coding style the line lengths should be <=79. Fix the schema file and update the checksum and version number to reflect the change. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* bridge: Avoid read of uninitialized data configuring Auto-Attach.Ben Pfaff2017-08-031-1/+1
| | | | | | | Reported-by: "qintao (F)" <qintao5@huawei.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2017-April/044309.html Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* Eliminate most shadowing for local variable names.Ben Pfaff2017-08-021-19/+11
| | | | | | | | | | | | | | Shadowing is when a variable with a given name in an inner scope hides a different variable with the same name in a surrounding scope. This is generally undesirable because it can confuse programmers. This commit eliminates most of it. Found with -Wshadow=local in GCC 7. The repo is not really ready to enable this option by default because of a few cases that are harder to fix, and harmless, such as nested use of CMAP_FOR_EACH. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* vswitch.xml: Fix L2 balancing mentioning for balance-tcp bond.Ilya Maximets2017-07-251-3/+2
| | | | | | | | | | | | | | L2 fields are not used in userspace hash action since commit 4f150744921f ("dpif-netdev: Use miniflow as a flow key."). In kernel datapath RSS (which is not include L2 by default for most of the NICs) was used from the beginning. This means that if recirculation is in use, L2 fields are not used for flow balancing. Fix the documentation accordingly. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Andy Zhou <azhou@ovn.org>
* process: Consolidate process related APIs.Bhanuprakash Bodireddy2017-07-131-250/+1
| | | | | | | | | | | | 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>
* bridge: Filter all zero mac when use ovs-vsctl to set maczhongbaisong2017-07-131-0/+3
| | | | | Signed-off-by: zhongbaisong <zhongbaisong@huawei.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-dpdk: Remove Rx checksum reconfigure.Kevin Traynor2017-07-111-14/+0
| | | | | | | | | | | | | | | | | | | | 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>