Re: [ovs-discuss] Unnecessary sorting in production JSON code

2018-09-12 Thread Daniel Alvarez


> On 12 Sep 2018, at 16:06, Ben Pfaff  wrote:
> 
>> On Wed, Sep 12, 2018 at 01:11:03AM +0200, Daniel Alvarez Sanchez wrote:
>> I noticed that we're doing a lot of sorting in the JSON code which is not
>> needed except for testing. Problem is that if I remove the sorting, then
>> most of the tests break. I spent a fair amount of time trying to fix them
>> but it's getting harder and harder.
>> 
>> Possibly, the best way to fix it would be to rewrite the tests in some
>> other way but I'd like to get your feedback.
> 
> Is it just a matter of the tests expecting JSON to be output in sorted
> order?  If so, we can pipe output through "ovstest test-json -" to sort
> it, e.g.:
I don’t think that works. For example:

https://github.com/openvswitch/ovs/blob/master/tests/ovsdb-data.at#L353

We would get the set in different order and the test fails.
> 
>$ echo '{"b":1, "a": 0}' | tests/ovstest test-json - 
>{"a":0,"b":1}
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Unnecessary sorting in production JSON code

2018-09-12 Thread Ben Pfaff
On Wed, Sep 12, 2018 at 01:11:03AM +0200, Daniel Alvarez Sanchez wrote:
> I noticed that we're doing a lot of sorting in the JSON code which is not
> needed except for testing. Problem is that if I remove the sorting, then
> most of the tests break. I spent a fair amount of time trying to fix them
> but it's getting harder and harder.
> 
> Possibly, the best way to fix it would be to rewrite the tests in some
> other way but I'd like to get your feedback.

Is it just a matter of the tests expecting JSON to be output in sorted
order?  If so, we can pipe output through "ovstest test-json -" to sort
it, e.g.:

$ echo '{"b":1, "a": 0}' | tests/ovstest test-json - 
{"a":0,"b":1}
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS Faucet tutorial broken

2018-09-12 Thread Brad Cowie
On 31 August 2018 at 08:05, Ben Pfaff  wrote:

> > Well, that wouldn't be too hard, I guess.  It's too bad that there's no
> > way with a Table Features Request to just modify *some* of the
> > properties of a table (such as the name).  I guess that Faucet would
> > have to spit back at OVS all the capabilities that OVS says it supports,
> > and then OVS would have to verify that it was actually the same.  That
> > seems a little prone to error, but probably we could get it right.
>
> It was more work than I expected (what isn't?) but I did finish it:
> https://patchwork.ozlabs.org/project/openvswitch/list/?series=63372
> or
> https://github.com/blp/ovs-reviews/tree/multipart-requests2



Perfect,

We had a play internally with mod-table and it seems to work.
We are a little swamped at faucet at the moment due to some
impending deployment deadlines but I have raised a feature
request against faucet to use the new code:

https://github.com/faucetsdn/faucet/issues/2420

I have also submitted a patch upstream for updating the faucet
tutorial, do let me know if you want any changes!

https://mail.openvswitch.org/pipermail/ovs-dev/2018-September/352046.html

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


Re: [ovs-discuss] Starting OVS w/ DPDK ...

2018-09-12 Thread Flavio Leitner
On Wed, Sep 12, 2018 at 09:21:18AM +0200, Andrzej Ostruszka wrote:
> Hello all
> 
> I'm new to OVS so please have some patience with me :)
> 
> What I'm trying to do is to start OVS with DPDK based ports.
> The actual setup is a board with Marvell's Armada 8040 chip.
> 
> I don't have any problems with starting DPDK based apps, it goes more or
> less like:
> - load required kernel modules (Marvell ones, specific for this chip)
> - start DPDK app and pass to EAL options to create correct vdev:
>   ./testpmd ... --vdev=eth_mvpp2,iface=eth0 ...
> 
> So my understanding is that I don't need any OVS specific kernel modules
> in order to use these ports via DPDK in OVS.  So I build OVS with option
> "--with-dpdk" but without "--with-linux" (as intro/install/dpdk.rst
> seems to suggest) [1].  Then I start the db:
> 
> # ovs-ctl --no-ovs-vswitchd start
> 
>  * Starting ovsdb-server
>  * system ID not configured, please use --system-id
>  * Configuring Open vSwitch system IDs
> 
> and indicate that I want to initialize DPDK:
> 
> # ovs-vsctl set Open_vSwitch . other_config:dpdk-init=true
> # ovs-vsctl get Open_vSwitch . other_config:dpdk-init
> "true"
> 
> but when I try to start the vswitchd I'm getting errors:
> 
> # ovs-ctl --no-ovsdb-server start

I don't know which OVS version is this and it may be because ovs-ctl
is trying to load the module or because ovs-vswitchd is doing that.
So, running sh -x ovs-ctl ... might shed a bit of light.

fbl

> 
> 
> modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not
> open moddep file
> '/lib/modules/4.4.52-armada-17.10.4-g2dfc733/modules.dep.bin'
> modprobe: FATAL: Module openvswitch not found in directory
> /lib/modules/4.4.52-armada-17.10.4-g2dfc733
>  * Inserting openvswitch module
> rmmod: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not
> open builtin file
> '/lib/modules/4.4.52-armada-17.10.4-g2dfc733/modules.builtin.bin'
> rmmod: ERROR: ../libkmod/libkmod-module.c:1921 kmod_module_get_holders()
> could not open '/sys/module/bridge/holders': No such file or directory
> rmmod: ERROR: Module bridge is in use
>  * removing bridge module
> 
> and obviously vswitchd is not running:
> # ovs-ctl status
> ovsdb-server is running with pid 7566
> ovs-vswitchd is not running
> 
> Why there are attempts to load some kernel modules?  How should I start
> vswitchd with DPDK based ports?  My expectation was that
> "dpdk-init=true" will indicate to ovs to not use any kernel modules and
> that I will be able later to add ports just like:
> 
> ovs-vsctl add-port br0 mrvl0 -- set Interface mrvl0 \
> type=dpdk options:dpdk-devargs=eth_mvpp20,iface=eth0
> ovs-vsctl add-port br0 mrvl2 -- set Interface mrvl2 \
> type=dpdk options:dpdk-devargs=eth_mvpp21,iface=eth2
> 
> I'd appreciate some tip/insight into what I am doing wrong and/or how
> can I debug this in order to solve it.
> 
> Best regards
> Andrzej
> 
> [1] Actually I'm cross compiling ovs, the full configure line is:
> ./configure CC=${CROSS}gcc --prefix=/usr/local/ovs
> --with-dpdk=${ROOTDIR}/marvell-dpdk/arm64-armv8a-linuxapp-gcc
> --host=aarch64-linux-gnu --disable-libcapng
> LDFLAGS="-L${ROOTDIR}/install/usr/local/lib -lmusdk"
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

-- 
Flavio

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


Re: [ovs-discuss] ovs-dpdk TSO offload feather

2018-09-12 Thread Ian Stokes

On 9/12/2018 7:02 AM, multi_task wrote:

Hi,

What is the current state about the ovs-dpdk TSO offload feature? Is 
this planned any time soon?




There is ongoing work to enable TSO for OVS with DPDK.

There are patches available that are under review currently but have not 
been upstreamed to master yet.


If you are interested in testing you will need to apply the multi 
segment patch-set first available at the link below.


https://patchwork.ozlabs.org/project/openvswitch/list/?series=62384

This is a requirement for enabling TSO.

After applying the multi segment series you should then apply the TSO 
patches availalbe in the link below (Note this patch series is RFC so is 
still under review and testing by the community).


https://patchwork.ozlabs.org/project/openvswitch/list/?series=59913

Any feedback is welcome.

Thanks
Ian


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


[ovs-discuss] Starting OVS w/ DPDK ...

2018-09-12 Thread Andrzej Ostruszka
Hello all

I'm new to OVS so please have some patience with me :)

What I'm trying to do is to start OVS with DPDK based ports.
The actual setup is a board with Marvell's Armada 8040 chip.

I don't have any problems with starting DPDK based apps, it goes more or
less like:
- load required kernel modules (Marvell ones, specific for this chip)
- start DPDK app and pass to EAL options to create correct vdev:
  ./testpmd ... --vdev=eth_mvpp2,iface=eth0 ...

So my understanding is that I don't need any OVS specific kernel modules
in order to use these ports via DPDK in OVS.  So I build OVS with option
"--with-dpdk" but without "--with-linux" (as intro/install/dpdk.rst
seems to suggest) [1].  Then I start the db:

# ovs-ctl --no-ovs-vswitchd start

 * Starting ovsdb-server
 * system ID not configured, please use --system-id
 * Configuring Open vSwitch system IDs

and indicate that I want to initialize DPDK:

# ovs-vsctl set Open_vSwitch . other_config:dpdk-init=true
# ovs-vsctl get Open_vSwitch . other_config:dpdk-init
"true"

but when I try to start the vswitchd I'm getting errors:

# ovs-ctl --no-ovsdb-server start


modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not
open moddep file
'/lib/modules/4.4.52-armada-17.10.4-g2dfc733/modules.dep.bin'
modprobe: FATAL: Module openvswitch not found in directory
/lib/modules/4.4.52-armada-17.10.4-g2dfc733
 * Inserting openvswitch module
rmmod: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not
open builtin file
'/lib/modules/4.4.52-armada-17.10.4-g2dfc733/modules.builtin.bin'
rmmod: ERROR: ../libkmod/libkmod-module.c:1921 kmod_module_get_holders()
could not open '/sys/module/bridge/holders': No such file or directory
rmmod: ERROR: Module bridge is in use
 * removing bridge module

and obviously vswitchd is not running:
# ovs-ctl status
ovsdb-server is running with pid 7566
ovs-vswitchd is not running

Why there are attempts to load some kernel modules?  How should I start
vswitchd with DPDK based ports?  My expectation was that
"dpdk-init=true" will indicate to ovs to not use any kernel modules and
that I will be able later to add ports just like:

ovs-vsctl add-port br0 mrvl0 -- set Interface mrvl0 \
type=dpdk options:dpdk-devargs=eth_mvpp20,iface=eth0
ovs-vsctl add-port br0 mrvl2 -- set Interface mrvl2 \
type=dpdk options:dpdk-devargs=eth_mvpp21,iface=eth2

I'd appreciate some tip/insight into what I am doing wrong and/or how
can I debug this in order to solve it.

Best regards
Andrzej

[1] Actually I'm cross compiling ovs, the full configure line is:
./configure CC=${CROSS}gcc --prefix=/usr/local/ovs
--with-dpdk=${ROOTDIR}/marvell-dpdk/arm64-armv8a-linuxapp-gcc
--host=aarch64-linux-gnu --disable-libcapng
LDFLAGS="-L${ROOTDIR}/install/usr/local/lib -lmusdk"
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Can't add Bridge

2018-09-12 Thread Ramzah Rehman
The issue got resolved. I had to run the command as root.

On Tue, Sep 11, 2018 at 9:31 PM Ramzah Rehman 
wrote:

> I have been trying to create a bridge with openvswitch using the command
> on Ubuntu 18.04:
>
> ovs-vsctl add-br br1 --set bridge br1 datapath_type=netdev
>
> but I keep getting this error:
>
> ovs-vsctl: Error detected while setting up 'br0'.  See ovs-vswitchd log for 
> details.
> ovs-vsctl: The default log directory is "/usr/local/var/log/openvswitch".
>
> When I checked logs I found operation not permitted error.
>
> Content from the log file:
>
> 2018-09-11T11:10:35.659Z|00255|ofproto_dpif|ERR|failed to open datapath of 
> type netdev: Operation not permitted
> 2018-09-11T11:10:35.659Z|00256|ofproto|ERR|failed to open datapath br1: 
> Operation not permitted
> 2018-09-11T11:10:35.659Z|00257|bridge|ERR|failed to create bridge br1: 
> Operation not permitted
>
> I tried changing file/folder permissions allowing everyone to read, write
> and execute on the folder, but nothing worked.
>
> Any help in this regard will really be appreciated.
>
> Best Regards,
>
> Ramzah Rehman
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] ovs-dpdk TSO offload feather

2018-09-12 Thread multi_task
Hi,What is the current state about the ovs-dpdk TSO offload feature? Is this planned any time soon?___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss