linux/net/openvswitch
James Morse 1241365f1a openvswitch: Allocate memory for ovs internal device stats.
"openvswitch: Remove vport stats" removed the per-vport statistics, in
order to use the netdev's statistics fields.
"openvswitch: Fix ovs_vport_get_stats()" fixed the export of these stats
to user-space, by using the provided netdev_ops to collate them - but ovs
internal devices still use an unallocated dev->tstats field to count
packets, which are no longer exported by this api.

Allocate the dev->tstats field for ovs internal devices, and wire up
ndo_get_stats64 with the original implementation of
ovs_vport_get_stats().

On its own, "openvswitch: Fix ovs_vport_get_stats()" fixes the OOPs,
unmasking a full-on panic on arm64:

=============%<==============
[<ffffffbffc00ce4c>] internal_dev_recv+0xa8/0x170 [openvswitch]
[<ffffffbffc0008b4>] do_output.isra.31+0x60/0x19c [openvswitch]
[<ffffffbffc000bf8>] do_execute_actions+0x208/0x11c0 [openvswitch]
[<ffffffbffc001c78>] ovs_execute_actions+0xc8/0x238 [openvswitch]
[<ffffffbffc003dfc>] ovs_packet_cmd_execute+0x21c/0x288 [openvswitch]
[<ffffffc0005e8c5c>] genl_family_rcv_msg+0x1b0/0x310
[<ffffffc0005e8e60>] genl_rcv_msg+0xa4/0xe4
[<ffffffc0005e7ddc>] netlink_rcv_skb+0xb0/0xdc
[<ffffffc0005e8a94>] genl_rcv+0x38/0x50
[<ffffffc0005e76c0>] netlink_unicast+0x164/0x210
[<ffffffc0005e7b70>] netlink_sendmsg+0x304/0x368
[<ffffffc0005a21c0>] sock_sendmsg+0x30/0x4c
[SNIP]
Kernel panic - not syncing: Fatal exception in interrupt
=============%<==============

Fixes: 8c876639c9 ("openvswitch: Remove vport stats.")
Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-21 19:06:36 -07:00
..
actions.c openvswitch: Ensure flow is valid before executing ct 2015-10-07 05:03:05 -07:00
conntrack.c openvswitch: Change CT_ATTR_FLAGS to CT_ATTR_COMMIT 2015-10-07 05:03:06 -07:00
conntrack.h openvswitch: Extend ct_state match field to 32 bits 2015-10-07 05:03:06 -07:00
datapath.c openvswitch: Zero flows on allocation. 2015-09-22 17:33:41 -07:00
datapath.h ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
dp_notify.c openvswitch: Move dev pointer into vport itself 2015-07-21 10:39:07 -07:00
flow_netlink.c openvswitch: Extend ct_state match field to 32 bits 2015-10-07 05:03:06 -07:00
flow_netlink.h ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
flow_table.c ovs: do not allocate memory from offline numa node 2015-10-05 06:42:03 -07:00
flow_table.h openvswitch: Zero flows on allocation. 2015-09-22 17:33:41 -07:00
flow.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
flow.h openvswitch: Rename LABEL->LABELS 2015-10-05 06:34:28 -07:00
Kconfig openvswitch: Fix dependency on IPv6 defrag. 2015-09-11 15:39:04 -07:00
Makefile openvswitch: Remove conntrack Kconfig option. 2015-09-06 23:48:33 -07:00
vport-geneve.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
vport-gre.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
vport-internal_dev.c openvswitch: Allocate memory for ovs internal device stats. 2015-10-21 19:06:36 -07:00
vport-internal_dev.h openvswitch: introduce rtnl ops stub 2014-07-01 14:40:17 -07:00
vport-netdev.c openvswitch: Remove vport stats. 2015-08-29 19:07:15 -07:00
vport-netdev.h openvswitch: Remove vport stats. 2015-08-29 19:07:15 -07:00
vport-vxlan.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
vport.c openvswitch: Scrub skb between namespaces 2015-10-18 22:24:50 -07:00
vport.h ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00