[ovs-dev] [PATCH] datapath: Turn vports with dependencies into separate modules

Pravin Shelar pshelar at nicira.com
Wed Mar 25 21:48:09 UTC 2015


On Tue, Mar 17, 2015 at 5:00 AM, Thomas Graf <tgraf at noironetworks.com> wrote:
> Upstream commit:
>     The internal and netdev vport remain part of openvswitch.ko. Encap
>     vports including vxlan, gre, and geneve can be built as separate
>     modules and are loaded on demand. Modules can be unloaded after use.
>     Datapath ports keep a reference to the vport module during their
>     lifetime.
>
>     Allows to remove the error prone maintenance of the global list
>     vport_ops_list.
>
>     Signed-off-by: Thomas Graf <tgraf at suug.ch>
>     Signed-off-by: David S. Miller <davem at davemloft.net>
>
> Also folds in the follow-up commit 9ba559d9ca3 to turned the non-GPL
> symbol exports to GPL exports.
>
> Exports various backwards compat functions linked into the main
> openvswitch module as GPL symbols to ensure vport modules can use them.
>
> Some fiddling with the Makefile was needed to work around the fact
> that Makefile variables can't contain '-' characters needed to define
> 'vport-xxx' module sources. Also, Kbuild complains heavily if a
> $(module)-y = $(module).o is defined which is actually backed with a .c
> file of the same name. Therefore, a new $(build_multi_modules) variable
> is defined which lists all module which consist of more than one source
> file.
>
> Upstream: 62b9c8d0372 ("ovs: Turn vports with dependencies into separate modules")
> Upstream: 9ba559d9ca3 ("openvswitch: Export symbols as GPL symbols.")
> Signed-off-by: Thomas Graf <tgraf at noironetworks.com>

Thanks for the patch. I saw couple of issues:-
I saw following warning due to missing symbol.
WARNING: "lockdep_ovsl_is_held"
[/home/pravin/ovs/w8/datapath/linux/vport-gre.ko] undefined!

Command to reload kernel datapath does not work anymore.
`ovs-ctl force-reload-kmod` seg faults as follows:


device br0 left promiscuous mode
general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
Modules linked in: openvswitch(OF) vxlan ip_tunnel libcrc32c veth
netconsole configfs autofs4 ipt_REJECT ip6t_REJECT nf_conntrack_ipv6
nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6
vhost_net macvtap macvlan vhost tun kvm_intel kvm iTCO_wdt
iTCO_vendor_support dcdbas microcode pcspkr sb_edac edac_core acpi_pad
lpc_ich mfd_core shpchp tg3 ptp pps_core ses enclosure sg wmi ext4(F)
jbd2(F) mbcache(F) usb_storage(F) sd_mod(F) crc_t10dif(F)
crct10dif_common(F) megaraid_sas(F) dm_mirror(F) dm_region_hash(F)
dm_log(F) dm_mod(F) [last unloaded: openvswitch]
CPU: 10 PID: 22434 Comm: ovs-dpctl Tainted: GF          O 3.14.30 #4
Hardware name: Dell Inc. PowerEdge T320/07C9XP, BIOS 2.1.2 01/20/2014
task: ffff8807e7560000 ti: ffff8807fd7e6000 task.ti: ffff8807fd7e6000
RIP: 0010:[<ffffffffa07267ca>]  [<ffffffffa07267ca>]
ovs_vport_del+0x4a/0x70 [openvswitch]
RSP: 0018:ffff8807fd7e7958  EFLAGS: 00010292
RAX: 6b6b6b6b6b6b6b6b RBX: ffff8807fef57cf0 RCX: 0000000000000006
RDX: 0000000000006990 RSI: ffff8807e7560c50 RDI: ffff8807fd7e78f8
RBP: ffff8807fd7e7968 R08: 0000000000000001 R09: 0000000000000000
R10: ffffea001ff96c18 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000008 R14: ffffffff81d13300 R15: ffffffffa072d888
FS:  00007fb4272ec860(0000) GS:ffff880806a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000408430 CR3: 00000007fee86000 CR4: 00000000001407e0
Stack:
 ffff8807fd7e7968 ffff8807fef57cf0 ffff8807fd7e7988 ffffffffa0718e14
 0000000000000000 ffff8800c79918f0 ffff8807fd7e79b8 ffffffffa07194de
 ffff8807fd7e7a28 ffff8807fd7e7a28 ffff8807fc1aa1c0 ffff8800c79918f0
Call Trace:
 [<ffffffffa0718e14>] ovs_dp_detach_port+0x44/0x60 [openvswitch]
 [<ffffffffa07194de>] __dp_destroy+0x4e/0xc0 [openvswitch]
 [<ffffffffa071cebe>] ovs_dp_cmd_del+0x7e/0xd0 [openvswitch]
 [<ffffffff81562033>] genl_family_rcv_msg+0x233/0x3a0
 [<ffffffff810b4935>] ? __lock_acquired+0x145/0x360
 [<ffffffff815621a0>] ? genl_family_rcv_msg+0x3a0/0x3a0
 [<ffffffff81562203>] genl_rcv_msg+0x63/0xb0
 [<ffffffff81560029>] netlink_rcv_skb+0xa9/0xd0
 [<ffffffff8156191d>] ? genl_rcv+0x1d/0x40
 [<ffffffff8156192c>] genl_rcv+0x2c/0x40
 [<ffffffff8155fdc2>] netlink_unicast+0x182/0x210
 [<ffffffff8156113f>] netlink_sendmsg+0x2af/0x400
 [<ffffffff81515c60>] sock_sendmsg+0x90/0xc0
 [<ffffffff810b8c4e>] ? __lock_release+0x9e/0x1f0
 [<ffffffff81192c16>] ? might_fault+0x66/0xc0
 [<ffffffff81524b0d>] ? verify_iovec+0x8d/0x110
 [<ffffffff81516576>] ___sys_sendmsg+0x3f6/0x410
 [<ffffffff81621e9c>] ? __do_page_fault+0x2bc/0x4d0
 [<ffffffff810b83f1>] ? __lock_acquire+0x381/0x5e0
 [<ffffffff811f8b25>] ? rcu_read_lock_held+0x45/0x50
 [<ffffffff811faa05>] ? __fget_light+0x105/0x110
 [<ffffffff81516759>] __sys_sendmsg+0x49/0x90
 [<ffffffff815167b9>] SyS_sendmsg+0x19/0x20
 [<ffffffff816278d2>] system_call_fastpath+0x16/0x1b



More information about the dev mailing list