Re: [ovs-discuss] ovs-dpdk-rpm not contains dpdk

2017-04-21 Thread Timothy Redaelli
On 04/20/2017 01:52 PM, wangrongs163 wrote:
> Hi,
> I used dpdk-17.2 and ovs-2.7 to rpm a package follows the
> instructions on :http://docs.openvswitch.org/en/latest/intro/install/fedora/
> first,I have RPM the dpdk package, and rpm i dpdk.rpm and insmod the
> igb_uio.ko,
>  then, I start to RPM the ovs-2.7, with next cmd:
> # ./boot.sh
> #./configure
> #make rpm-fedora RPMBUILD_OPT="--with dpdk"
> but , theres no dpdk files in the ovs.rpm, like this:
> # rpm -qpl x86_64/openvswitch-2.7.0-1.el7.centos.x86_64.rpm | grep librte
> #openvswitch-2.7.0-1.el7.centos.x86_64.rpm | grep dpdk
>
> why the dpdk not contains in the ovs-dpdk.rpm package ?

Since OVS is statically built with DPDK (best performance, less
dependencies and DPDK by default is built as static library:
http://docs.openvswitch.org/en/latest/intro/install/dpdk/#install-dpdk),
you won't find any DPDK library installed, but DPDK support is still
available inside OVS.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] DPDK with UIO drivers is broken on Fedora since OVS 2.8.0

2018-01-08 Thread Timothy Redaelli
On Sat, Jan 6, 2018 at 2:41 AM, Marcos Felipe Schwarz
 wrote:
> Got it fixed.
>
> The problem was related to not setting the CAP_SYS_ADMIN capability at 
> daemon-unix.c. Follows the patch bellow to set the capability and dynamically 
> extract the group from OVS_USER_ID instead of forcing it to :hugetlbfs.
>
> diff --git a/lib/daemon-unix.c b/lib/daemon-unix.c
> index 839114f3e..3b94164ea 100644
> --- a/lib/daemon-unix.c
> +++ b/lib/daemon-unix.c
> @@ -818,6 +818,9 @@ daemon_become_new_user_linux(bool access_datapath 
> OVS_UNUSED)
>  ret = capng_update(CAPNG_ADD, cap_sets, CAP_NET_ADMIN)
>|| capng_update(CAPNG_ADD, cap_sets, CAP_NET_RAW);
>  }
> +if (!ret) {
> +ret = capng_update(CAPNG_ADD, cap_sets, CAP_SYS_ADMIN);
> +}
>  } else {
>  ret = -1;
>  }
> diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in 
> b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
> index c6d9aa1b8..94290a847 100644
> --- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
> +++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
> @@ -14,7 +14,7 @@ Environment=HOME=/var/run/openvswitch
>  EnvironmentFile=/etc/openvswitch/default.conf
>  EnvironmentFile=-/etc/sysconfig/openvswitch
>  @begin_dpdk@
> -ExecStartPre=-/usr/bin/chown :hugetlbfs /dev/hugepages
> +ExecStartPre=-/bin/sh -c 'chown :$(echo $OVS_USER_ID | tr ":" "\n" | tail 
> -1) /dev/hugepages'

I think it's better to avoid using multiple useless forks, shell
script parameter expansion are better in this case:

ExecStartPre=-/bin/sh -c '/usr/bin/chown $${OVS_USER_ID##*:} /dev/hugepages'

>  ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages
>  @end_dpdk@
>  ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
>
> Regards,
>
> Marcos Schwarz
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] [openvswitch 2.9.2] testsuite: 8 978 failed on Fedora Rawhide after fa9a62453ea4

2018-07-03 Thread Timothy Redaelli
Hi,
I'm debugging a failure in "8: vsctl-bashcomp - argument completion"
and "978: ofproto - ofport_request" on Fedora Rawhide that prevent me
to release OVS 2.9.2. The 2 tests fails for the same root cause and
they are present on current ovs master too.

After a bisect I found that the problematic commit is fa9a62453ea4
("ovsdb: Introduce experimental support for clustered databases.").

I can only see the problem on Fedora Rawhide since it has some
debugging kernel config options enables that emphasize the problem.
If I re-build the same kernel without debugging kernel option the
problem is not easily reproducible.

After other analysis I found that the problem is that some ovs-vsctl
commands (for example "ovs-vsctl get-manager" that is used by
"ovs-vsctl-bashcomp.bash") sometimes generates a "Connection reset by
peer" in ovsdb-server.log and, with the kernel-debug, it became a:
"2018-07-03T09:53:36.401Z|00038|jsonrpc|WARN|Dropped 23 log messages in
last 11 seconds (most recently, 1 seconds ago) due to excessive rate"
error that makes the test fail since `check_logs` (ofproto-macros.at)
doesn't ignore the "Dropped X log messages" log message.

In check_logs I can read the following comments:
# We most notably ignore 'Broken pipe' warnings.  These often and
# intermittently appear in ovsdb-server.log, because *ctl commands
# (e.g. ovs-vsctl, ovn-nbctl) exit right after committing a change to
the # database.  However, in reaction, some daemon may immediately
update the # database, and this later update may cause database sending
update back to # *ctl command if *ctl has not exited yet.  If *ctl
command exits before # the database calls send, the send fails with
'Broken pipe'.  Also removes # all "connection reset" warning logs for
similar reasons (either EPIPE or # ECONNRESET can be returned on a send
depending on whether the peer had # unconsumed data when it closed the
socket).

so I don't know which could be a good approach since after the
fa9a62453ea4 commit is not "often", but it's almost "always" (on
kernel-debug).

Do you have any ideas?

Thank you

-- 
Timothy Redaelli
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Openvswitch and NetworkManager

2018-11-18 Thread Timothy Redaelli
On Sat, 17 Nov 2018 19:38:21 +
Alexander Witte  wrote:

> Hi!
> 
> 
> Brace yourself for a noob question-
> 
> 
> Im working through a guide on setting up OVS on Fedora 29 (Desktop).  By 
> default the system uses Network Manager (I had to manually install the 
> network-scripts package to get the network.service).  I've read that the plan 
> is to solely use Network Manager in the near future.
> 
> 
> Does OVS play nice with Network Manager; do you foresee/are there issues 
> running NetworkManager with OVS?

Hi,
there is a preliminary support to manage OVS bridges inside
NetworkManager itself (NetworkManager-ovs Fedora package) [1].

The official openvswitch package for Fedora 29 and Fedora Rawhide has
the "legacy network service support" in the
"network-scripts-openvswitch" package that is installed, by default,
only if you have the network-scripts package installed.

Moreover Network Manager should not interfere with interfaces not
created or managed by it and so you should be able to create and manage
OVS interfaces manually without any problem, if you want to do that.

[1]
https://developer.gnome.org/NetworkManager/unstable/nm-openvswitch.html
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Cannot Install Open vSwitch with DKDP

2018-11-23 Thread Timothy Redaelli
On Fri, 23 Nov 2018 16:02:30 +0500
Ramzah Rehman  wrote:

> Hi. I Have installed Open vSwitch 2.9.4 with DPDK 17.11.4 on Ubuntu 14.04.5
> LTD and kernel version 4.4.0-31-generic following these two links:
> http://docs.openvswitch.org/en/latest/intro/install/dpdk/
> http://docs.openvswitch.org/en/latest/intro/install/general/#general-bootstrapping
[...]
> Even though I followed all steps, ovs-vsctl get Open_vSwitch .
> dpdk_initialized gives  ovs-vsctl: Open_vSwitch does not contain a column
> whose name matches "dpdk_initialized"  error. Please help.

Hi,
this is a normal behavior on OVS 2.9.x since "dpdk_initialized" support
was added in 2.10 (https://github.com/openvswitch/ovs/commit/3e52fa5).

So you can update to OVS 2.10(.1) or you can look for dpdk entries on
ovs-vswitchd.log 
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS/DPDK Build Failing with MLX5 Adapter Enabled

2018-12-16 Thread Timothy Redaelli
On Thu, 13 Dec 2018 16:53:55 -0800
David Christensen  wrote:

> Attempting to use DPDK 18.11 with Monday's OVS commit that supports DPDK 
> 18.11 (commit 03f3f9c0faf838a8506c3b5ce6199af401d13cb3).  When building 
> OVS with DPDK support I'm receiving a build error related to libmnl not 
> being found while compiling the Mellanox driver as follows:
> 
> ...
> gcc -std=gnu99 -DHAVE_CONFIG_H -I.-I ./include -I ./include -I ./lib 
> -I ./lib-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare 
> -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum 
> -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes 
> -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
> -fno-strict-aliasing -Wshadow 
> -I/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/include 
> -D_FILE_OFFSET_BITS=64  -g -O2 -MT vswitchd/xenserver.o -MD -MP -MF 
> $depbase.Tpo -c -o vswitchd/xenserver.o vswitchd/xenserver.c &&\
> mv -f $depbase.Tpo $depbase.Po
> /bin/sh ./libtool  --tag=CC   --mode=link gcc -std=gnu99 
> -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith 
> -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter 
> -Wbad-function-cast -Wcast-align -Wstrict-prototypes 
> -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
> -fno-strict-aliasing -Wshadow 
> -I/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/include 
> -D_FILE_OFFSET_BITS=64  -g -O2 
> -L/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/lib 
> -Wl,--whole-archive,-ldpdk,--no-whole-archive  -o vswitchd/ovs-vswitchd 
> vswitchd/bridge.o vswitchd/ovs-vswitchd.o vswitchd/system-stats.o 
> vswitchd/xenserver.o ofproto/libofproto.la lib/libsflow.la 
> lib/libopenvswitch.la -ldpdk -ldl -lnuma -latomic -lpthread -lrt -lm  -lnuma
> libtool: link: gcc -std=gnu99 -Wstrict-prototypes -Wall -Wextra 
> -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security 
> -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align 
> -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
> -Wmissing-field-initializers -fno-strict-aliasing -Wshadow 
> -I/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/include 
> -D_FILE_OFFSET_BITS=64 -g -O2 -Wl,--whole-archive -Wl,-ldpdk 
> -Wl,--no-whole-archive -o vswitchd/ovs-vswitchd vswitchd/bridge.o 
> vswitchd/ovs-vswitchd.o vswitchd/system-stats.o vswitchd/xenserver.o 
> -L/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/lib 
> ofproto/.libs/libofproto.a 
> /home/davec/src/p9-dpdk-perf/ovs/lib/.libs/libsflow.a 
> lib/.libs/libsflow.a lib/.libs/libopenvswitch.a -ldpdk -ldl -latomic 
> -lpthread -lrt -lm -lnuma
> /home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/lib/librte_pmd_mlx5.a(mlx5_flow_tcf.o):
>  
> In function `flow_tcf_nl_ack':
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3753: 
> undefined reference to `mnl_socket_get_portid'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3765: 
> undefined reference to `mnl_socket_sendto'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3777: 
> undefined reference to `mnl_socket_recvfrom'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3790: 
> undefined reference to `mnl_cb_run'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3777: 
> undefined reference to `mnl_socket_recvfrom'
> ...
> 
> Both the OVS and DPDK builds work individually but I receive the error 
> after running "./configure --with-dpdk=; make" to 
> build OVS with DPDK.  I ran across this post on the DPDK list regarding 
> libmnl, indicating there is a dependency issue:
> 
> http://mails.dpdk.org/archives/dev/2018-July/108573.html
> 
> But DPDK builds successfully by itself.  Any suggestions where the build 
> is breaking down?

Hi,
I sent a patch for this problem
(https://patchwork.ozlabs.org/patch/1013466/).

Can you try (and maybe ack) it?

NOTE: This problem is only present if you link with DPDK as static
library, since with shared library the linker doesn't need to know the
full list of indirect dependencies.

Thank you

> Dave
> 
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss