First of all, thank you for your reply Flavio.

On 12.09.2018 19:33, Flavio Leitner wrote:
> On Wed, Sep 12, 2018 at 09:21:18AM +0200, Andrzej Ostruszka wrote:
[...]
>> 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.

The version is 2.9.2 (build from git tag v2.9.2 with the previously
mentioned configure line).

This is the ovs-ctl that is unconditionally trying to load modules.

start -> start_ovsdb & start_forwarding
start_forwarding -> do_start_forwarding -> insert_mod_if_required

and "if_required" part of that function only skips loading if module is
already present or there is no support in kernel for modules.  Below are
some snippets from "sh -x
/usr/local/ovs/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server start"

[...]
+ dbdir=/usr/local/ovs/etc/openvswitch
+ VERSION=2.9.2
[...]
+ command=start

+ start_ovsdb

+ test Xno = Xyes

+ return 0

+ start_forwarding

+ test Xyes = Xyes

+ do_start_forwarding

+ check_force_cores

+ test Xyes = Xyes

+ ulimit -c 67108864

+ insert_mod_if_required

+ test ! -e /proc/modules

+ test -e /sys/module/openvswitch

+ insert_mods

+ action Inserting openvswitch module modprobe openvswitch

+ STRING=Inserting openvswitch module

+ shift

+ modprobe openvswitch

modprobe: ERROR: could not insert 'openvswitch': Unknown symbol in
module, or unknown parameter (see d
mesg)

+ rc=1

+ test 1 = 0

+ log_failure_msg Inserting openvswitch module


I'm not sure why openvswitch module is needed in case of using DPDK
based ports.  That might be just the case of documentation not being up
to date (in case it is needed) or missing checks in ovs-ctl (in case it
can be skipped for DPDK based switching).

Anyway I've decided to reconfigure my kernel to match requirements of
openvswitch module (some config options were missing) and now I have
some progress (I load Marvell's modules, configure huge pages first,
then I start db and set dpd-init to true - as previously):

# ovs-ctl --no-ovsdb-server start
 * Starting ovs-vswitchd

 * Enabling remote OVSDB managers

# ovs-ctl status
ovsdb-server is running with pid 2928

ovs-vswitchd is running with pid 3055

# ovs-vsctl show
78e4732f-e2e1-4784-971c-f4d67e163a26

    Bridge "br0"

        Port "br0"

            Interface "br0"

                type: internal

    ovs_version: "2.9.2"


so it looks like I'm good to go but I get problems when I try to add
ports to it.

# ovs-vsctl add-port br0 port0 -- set Interface port0 type=dpdk
options:dpdk-devargs=eth_mvpp20,iface=eth0 ofport_request=1

[ 7156.926062] pgd = ffffffc23465a000

[ 7156.927215] pgd = ffffffc23465a000

[ 7156.927278] [00000008] *pgd=0000000235346003, *pud=0000000235346003,
*pmd=0000000000000000
[ 7156.941365] [00000000] *pgd=0000000235346003, *pud=0000000235346003,
*pmd=0000000000000000
[ 7161.622915] pgd = ffffffc1ddd54000

[ 7161.622938] [00000008] *pgd=00000001ddd55003, *pud=00000001ddd55003,
*pmd=0000000000000000

and I don't get command prompt again unless I interrupt with ^C.
I have no idea what ofport_request=1 is for - I'm just copying from the
docs (I assume this just gives id to port).  This type of log is
periodic - ovs-vswitchd seems to be crashing and is being periodically
restarted.  In dmesg I see periodic entries as in [1] and in
var/run/openvswitch I get ovs-vswitchd.PID.ctl sockets being added.

So I infer that for some reason vswitchd is crashing and I'd like to
investigate that.  Any tips on how could I proceed with it?

Best regards
Andrzej

[1] example of dmesg entry:
--8<----------------
[10262.204213] CMA buffer released: size = 41943040 Bytes, kvaddr =
ffffffc1de5f1000, paddr = 0xb0500
000
[10262.208121] CMA: total alloc 314, total free: 314 (garbage 1)
[10271.717382] CMA buffer allocated: size = 41943040 Bytes, kvaddr =
ffffffc1de5f6000, paddr = 0xb050
0000
[10271.717458] CMA buffer remapped: vm_start=0x7f3c800000, size =
41943040 bytes, paddr = 0xb0500000
[10271.893887] pmd8[6947]: unhandled level 2 translation fault (11) at
0x00000000, esr 0x92000006
[10271.893893] pgd = ffffffc1de506000
[10271.893957] [6936]: unhandled level 2 translation fault (11) at
0x00000008, esr 0x92000006
[10271.893958] pgd = ffffffc1de506000
[10271.893962] [00000008] *pgd=00000001dde36003, *pud=00000001dde36003,
*pmd=0000000000000000

[10271.893966] CPU: 1 PID: 6936 Comm:  Tainted: G           O
4.4.52-armada-17.10.4-g2dfc733 #2
[10271.893967] Hardware name: Marvell Armada-8040 development board
default (A) setup (DT)
[10271.893968] task: ffffffc234609700 ti: ffffffc2345e8000 task.ti:
ffffffc2345e8000
[10271.893970] PC is at 0x86ba68
[10271.893971] LR is at 0x5f03d0
[10271.893973] pc : [<000000000086ba68>] lr : [<00000000005f03d0>]
pstate: 80000000
[10271.893974] sp : 0000007fd2d09aa0
[10271.893976] x29: 0000007fd2d09aa0 x28: 000000000d971688
[10271.893978] x27: 000000000d971660 x26: 000000000d898590
[10271.893980] x25: 000000000d9d2820 x24: 000000000d8c4370
[10271.893982] x23: 0000000000000000 x22: 0000000000000000
[10271.893983] x21: 0000000000000000 x20: 000000000000000d
[10271.893985] x19: 000000000d9d2910 x18: 0000000000000014
[10271.893987] x17: 0000007f88100340 x16: 00000000009f8580
[10271.893989] x15: ffffffffffffffff x14: ffff000000000000
[10271.893991] x13: ffffffffffffffff x12: 0000000000000030
[10271.893993] x11: 0000000000000004 x10: 0000007fd2d09bb0
[10271.893994] x9 : 0000000000000004 x8 : 000000000d9d29e0
[10271.893996] x7 : ffffffffffffffff x6 : 000000000000003f
[10271.893998] x5 : 00000000000001d1 x4 : 0000000000000000
[10271.894000] x3 : 00000000005f03a0 x2 : 0000000000000000
[10271.894001] x1 : 0000007fd2d09ba8 x0 : 0000007fd2d09b38
--8<----------------

_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to