aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-02INSTALL.ODP: change how CFLAGS passed to Debian buildodp-v2Zoltan Kiss
Since 3d8ded "debian: Rationalize packaging using new debhelper." the dpkg-buildflags is no longer called. DEB_CFLAGS_APPEND is no longer useful, add CFLAGS to DATAPATH_CONFIGURE_OPTS. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01Port 74ff3298 "userspace: Define and use struct eth_addr."Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01netdev-odp: fix using uninitialized rss_hashIlya Maximets
uninitialized rss_hash is used in dpif_netdev_packet_get_rss_hash(). This leads to avoiding of hash calculation and subsequent problems with flow matching. Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2015-09-01dp-packet: assert when allocated space touched for ODP packetsZoltan Kiss
Assert when someone tries to get/set it, it shouldn't happen with ODP packets. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01acinclude: link with new DPDK library nameZoltan Kiss
It changed between 2.0 and 2.1. This patch is necessary to work with latest ODP-DPDK. Tested with 2.1-rc3. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org>
2015-09-01dpif-netdev: add odp_time_cycles() supportSantosh Shukla
Add odp_time_cycles() so dpif-netdev/pmd-stats-show can show correct profiling stats for polling and processing. Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> [Zoltan: fixed commit message and ifdef] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01netdev: fix compilation without ODPZoltan Kiss
odp_initialized is only visible if ODP is enabled through configure Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com>
2015-09-01netdev-odp: fix pmd_thread_setaffinity_cpu()Zoltan Kiss
Since abb594 "netdev-dpdk: Allow changing NON_PMD_CORE_ID for testing purpose." it's possible to use other core than 0 for non-PMD works. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@enea.com>
2015-09-01dp-packet: simplify dp_packet_init_odp()Zoltan Kiss
We only need to set the 'source' field during receive. 'allocated' now uses the right accessors, the offsets and pad_size are reset in miniflow_extract before used, and the metadata is set in dp_netdev_process_rxq_port() after receive. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com>
2015-09-01netdev-odp: remove stats counting from hot pathZoltan Kiss
It shouldn't be there, it hits performance. An ODP API function should be used to collect those stats. There is no such function at the moment, but it's better to remove this anyway to have a better picture about performance. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org>
2015-09-01dp-packet: implement dp_packet_base()Zoltan Kiss
It should return a pointer to the beginning of headroom. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com> Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org>
2015-09-01dp-packet: change to ovs_assert() in accessorsZoltan Kiss
It has the advantage that with the --enable-ndebug compile option the branch could be avoided. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com> Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org>
2015-09-01INSTALL.ODP: warn about compiler optimization settingsZoltan Kiss
Since 40c967 "debian: Remove obsolete manual setting of CFLAGS and warnings from rules." OVS doesn't set itself the optimization settings, let's warn about it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com>
2015-09-01style: fixed indents and space at EOLIlya Maximets
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2015-09-01netdev-odp: release unsent packetsIlya Maximets
According to ODP API the caller has to take care of unsent packets Cc: Dyasly Sergey <s.dyasly@samsung.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01netdev-odp: fix commentsIlya Maximets
Cc: Dyasly Sergey <s.dyasly@samsung.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01Update to latest ODP API 1.2.0.0Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01INSTALL.ODP: don't block ovs-vsctlZoltan Kiss
By default it waits for ovs-vswitchd to reconfigure itself, even if it's not running. The --no-wait parameter prevents that. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Ciprian Barbu <ciprian.barbu@enea.com>
2015-09-01netdev-odp: abort if odp fails to initializeCiprian Barbu
If ovs is switched to odp mode but odp_init fails it's better to abort to make it obvious that something went wrong. This patch also removes the return code because it was not used anymore. Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com> [Zoltan: removed curly brackets] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01dpif-netdev: add support for graceful termination apiSantosh Shukla
I hit this problem reported by odp-ovs: 2015-05-29T21:38:02.463Z|00034|odp(pmd99)|ERR|odp_thread.c:179:odp_thread_init_local():odp_thread_init_local : thd_is : 127 cpu : 9 2015-05-29T21:38:02.464Z|00033|odp(pmd105)|ERR|odp_thread.c:168:odp_thread_init_local():Too many threads 2015-05-29T21:38:02.465Z|00034|odp(pmd105)|ERR|odp_init.c:168:odp_init_local():ODP thread local init failed. This happens when user create multiple ports and delete them. Due to lack of termination, ODP keep on giving alloc_id in sequence from 0--127, and pretty soon it reachs ODP_CONFIG_MAX_THREADS Below fix address this problem. Also avoid ovs-vsctl del-br br0 stalling problem when alloc_id > ODP_CONFIG_MAX_THREADS. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
2015-09-01netdev: affinity fix for ovs-odpMarko Kallio
This patch will fix the core affinity setting in ovs, when using ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=1e In case of 2 NUMA nodes there is needed to do more work to netdev-odp.c Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Signed-off-by: Marko Kallio <marko.kallio@tieto.com>
2015-09-01netdev-odp: implemenet odp_override_logZoltan Kiss
ODP logs now end up in OVS logs. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01vlog: add vlog_rate_limit_valistZoltan Kiss
We will need this for odp_override_log Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01ovs-numa: workaround missing numa support for pmd netdevsCiprian Barbu
This is a workaround to make odp-ovs compile on KS2 which has no NUMA support. It might make it as a proper fix, because the only thing needed is the list of cpus, and the number of numa nodes can very well be 1. Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
2015-09-01netdev-odp: fix pmd threads reinitializingCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
2015-09-01netdev-odp: add get_numa_idCiprian Barbu
This change was introduced for DPDK, but it applies to the more general case and so ODP netdev got affected. The easiest solution, the same way DPDK netdev does, is to default to numa node 0. Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
2015-09-01dp_packet: init the buffer source before any other operationsCiprian Barbu
The source was not initialized before calling dp_packet_init__, which is needed by the ODP netdev implementation. Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
2015-09-01INSTALL.ODP: Add info about Debian packagingZoltan Kiss
This makes it easier to deploy OVS with ODP support. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01utilities: Add option to start with ODPCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01dpif-netdev: Add ODP netdevCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01Config options for building with ODPCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-01dp_packet: Added DPBUF_ODP type.Ciprian Barbu
This will be used by ODP for zero copy IO. Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-08-31ovsdb: Remove misleading OVS_UNUSED from ovsdb_monitor_change_cb().Ben Pfaff
This function does use this parameter. (This does not change any behavior.) Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
2015-08-31datapath-windows: Support for IRP cancelling mechanismSorin Vinturis
Under certain circumstances, we might need to cancel a pending IRP that has been submitted and not yet responded. This might occur when the request takes too long to complete or when the process which initiated the request terminated, leaving the request outstanding. This patch provides this missing piece by adding support for IRP cancelling mechanism. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/95 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-31datapath-windows: Process tunnel filter requests iterativelySorin Vinturis
In order to support IRP cancelling mechanism for pending IRPs, all tunnel filter requests, VXLAN create/delete tunnel, need to be processed iteratively. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-31netdev-windows: Fix typo in call to memcpy().Nithin Raju
This fixes a build error introduced by commit 74ff3298c (userspace: Define and use struct eth_addr.) Signed-off-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-31flow: Fix MSVC compile errors.Ben Pfaff
This fixes some MSVC build errors introduced by commit 74ff3298c (userspace: Define and use struct eth_addr.) MSVC doesn't like the change in 'const' between function declaration and definition: it reports "formal parameter 2 different from declaration" for each of the functions in flow.h corrected by this (commit. I think it's technically wrong about that, standards-wise.) MSVC doesn't like an empty-brace initializer. (I think it's technically right about that, standards-wise.) This commit attempts to fix both problems, but I have not tested it with MSVC. CC: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Nithin Raju <nithin@vmware.com> Tested-by: Nithin Raju <nithin@vmware.com>
2015-08-31datapath: check for rx handler registerFlavio Leitner
Red Hat Enterprise Linux 6 has backported the netdev RX handler facility so use the netdev_rx_handler_register as an indicator. The handler prototype changed between 2.6.36 and 2.6.39 since there could be backports in any stage, don't look at the kernel version, but at the prototype. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2015-08-28tunnel: Support matching on the presence of Geneve options.Jesse Gross
Sometimes it is useful to match only on whether a Geneve option is present even if the specific value is unimportant. A special case of this is zero length options where there is no value at all and the only information conveyed is whether the option was included in the packet. This operation was partially supported before but it was not consistent - in particular, options were never serialized through NXM/OXM unless they had a non-zero mask. Furthermore, zero length options were rejected altogether when they were installed through the Geneve map OpenFlow command. This adds support for these types of matches by making any NXM/OXM for tunnel metadata force a match on that field. In the case of a zero length option, both the value and mask of the NXM are ignored. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-08-29bridge: Relax the whitelist format for punix path.Alex Wang
This commit relaxes the whitelist format for punix path of service controller. Instead of only allowing punix:<ovs_rundir>/<bridge_name>.controller, the new format allows any suffix, like punix:<ovs_rundir>/<bridge_name>.*. (except one containing '/'). Signed-off-by: Alex Wang <ee07b291@gmail.com> Acked-by: Ben Pfaff <blp@nicira.com>
2015-08-29ofproto-dpif-upcall: Do not attribute stats when flow_del returns error.Alex Wang
In the push_ukey_ops__(), when flow_del operation returns error, the 'struct stats' passed to the operation function will be set to all zero. And we should not use it to calculate the delta (i.e. minus the zero stats by the cached stats causes overflow). Even though this should rarely happen, it is still good to make push_ukey_ops__() just ignore the operation when it fails. Signed-off-by: Alex Wang <ee07b291@gmail.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2015-08-28datapath-windows: Fix broken build.Alin Serdean
Change variable name from nlAttrs to flowAttrs. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-28userspace: Define and use struct eth_addr.Jarno Rajahalme
Define struct eth_addr and use it instead of a uint8_t array for all ethernet addresses in OVS userspace. The struct is always the right size, and it can be assigned without an explicit memcpy, which makes code more readable. "struct eth_addr" is a good type name for this as many utility functions are already named accordingly. struct eth_addr can be accessed as bytes as well as ovs_be16's, which makes the struct 16-bit aligned. All use seems to be 16-bit aligned, so some algorithms on the ethernet addresses can be made a bit more efficient making use of this fact. As the struct fits into a register (in 64-bit systems) we pass it by value when possible. This patch also changes the few uses of Linux specific ETH_ALEN to OVS's own ETH_ADDR_LEN, and removes the OFP_ETH_ALEN, as it is no longer needed. This work stemmed from a desire to make all struct flow members assignable for unrelated exploration purposes. However, I think this might be a nice code readability improvement by itself. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-08-28appveyor: Renew SSL link.Alin Serdean
1_0_2a version not available for download. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2015-08-28rhel: Add variables for OVN and VTEP db locations.Russell Bryant
Most real deployments will need to customize the database locations for ovn-controller and ovn-controller-vtep. Instead of making them override the entire command used to start the daemons, provide and document some environment variables that can be overridden in a custom config file. Signed-off-by: Russell Bryant <rbryant@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-28rhel: Add systemd suport for ovn-controller-vtep.Russell Bryant
Signed-off-by: Russell Bryant <rbryant@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-28rhel: Use same rundir for ovs and ovn.Russell Bryant
The previous systemd units for OVN had systemd create a rundir for each daemon (ovn-northd and ovn-controller). This "worked", in that the services did start successfully. However, they didn't actually work. In practice, both services make use of files in the main ovs rundir, so just run everything from there. It keeps things simple and makes the services actually work. Signed-off-by: Russell Bryant <rbryant@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-28ofp-actions: Don't encode variable length fields using NXAST_REG_LOAD.Jesse Gross
Currently, when using an OpenFlow 1.0 connection to encode a tunnel metadata set field action, a series of NXAST_REG_LOADs are emitted. The result is something like this: actions=load:0xa->NXM_NX_TUN_METADATA0[0..63],load:0-> NXM_NX_TUN_METADATA0[64..127],load:0->NXM_NX_TUN_METADATA0[128..191], load:0->NXM_NX_TUN_METADATA0[192..255],load:0->NXM_NX_TUN_METADATA0 [256..319],load:0->NXM_NX_TUN_METADATA0[320..383],load:0-> NXM_NX_TUN_METADATA0[384..447],load:0->NXM_NX_TUN_METADATA0[448..511], load:0->NXM_NX_TUN_METADATA0[512..575],load:0->NXM_NX_TUN_METADATA0 [576..639],load:0->NXM_NX_TUN_METADATA0[640..703],load:0-> NXM_NX_TUN_METADATA0[704..767],load:0->NXM_NX_TUN_METADATA0[768..831], load:0->NXM_NX_TUN_METADATA0[832..895],load:0->NXM_NX_TUN_METADATA0 [896..959],load:0->NXM_NX_TUN_METADATA0[960..991] This happens because tunnel metadata is seen as a maximum size field and so many loads need to be emitted to cover the entire thing. Besides being ugly (this shows up when using ovs-ofctl in the default configuration), it exposes the internal size of the field. While this shouldn't be an issue since specific protocol fields (such as Geneve options) have fixed max sizes even if the OVS implementation is extended, it's still not a great idea. If we instead use NXAST_REG_LOAD2 in cases where there isn't a suitable OpenFlow alternative, both problems are avoided: actions=set_field:0xa->tun_metadata0 This prefers NXAST_REG_LOAD2 for variable length fields since they would all generally have the same problems. In addition, since the concept of this type of field is fairly new, there are no backwards compatibility issues. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2015-08-28datapath-windows: Suppress flow attribute probe.Alin Serdean
This patch surpresses flow attribute probing in the windows datapath. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-28tests: Avoid nonportable "sed -i".Ben Pfaff
"sed -i" isn't entirely portable, and we can avoid it by using the argument to check_logs as intended. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>