14 Oct, 2020
1 commit
-
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
Link: https://lore.kernel.org/r/5e52dc91-97b1-82b0-214b-65d404e4a2ec@gmail.com
Signed-off-by: Jakub Kicinski
06 Oct, 2020
1 commit
-
use new helper for netstats settings
Signed-off-by: Fabian Frederick
Signed-off-by: David S. Miller
23 Oct, 2019
1 commit
-
syzbot found the following crash on:
HEAD commit: 1e78030e Merge tag 'mmc-v5.3-rc1' of git://git.kernel.org/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=148d3d1a600000
kernel config: https://syzkaller.appspot.com/x/.config?x=30cef20daf3e9977
dashboard link: https://syzkaller.appspot.com/bug?extid=13210896153522fe1ee5
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=136aa8c4600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=109ba792600000=====================================================================
BUG: memory leak
unreferenced object 0xffff8881207e4100 (size 128):
comm "syz-executor032", pid 7014, jiffies 4294944027 (age 13.830s)
hex dump (first 32 bytes):
00 70 16 18 81 88 ff ff 80 af 8c 22 81 88 ff ff .p........."....
00 b6 23 17 81 88 ff ff 00 00 00 00 00 00 00 00 ..#.............
backtrace:
[] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
[] slab_post_alloc_hook mm/slab.h:522 [inline]
[] slab_alloc mm/slab.c:3319 [inline]
[] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548
[] kmalloc include/linux/slab.h:552 [inline]
[] kzalloc include/linux/slab.h:748 [inline]
[] ovs_vport_alloc+0x37/0xf0 net/openvswitch/vport.c:130
[] internal_dev_create+0x24/0x1d0 net/openvswitch/vport-internal_dev.c:164
[] ovs_vport_add+0x81/0x190 net/openvswitch/vport.c:199
[] new_vport+0x19/0x80 net/openvswitch/datapath.c:194
[] ovs_dp_cmd_new+0x22f/0x410 net/openvswitch/datapath.c:1614
[] genl_family_rcv_msg+0x2ab/0x5b0 net/netlink/genetlink.c:629
[] genl_rcv_msg+0x54/0x9c net/netlink/genetlink.c:654
[] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
[] genl_rcv+0x29/0x40 net/netlink/genetlink.c:665
[] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
[] netlink_unicast+0x1ec/0x2d0 net/netlink/af_netlink.c:1328
[] netlink_sendmsg+0x270/0x480 net/netlink/af_netlink.c:1917
[] sock_sendmsg_nosec net/socket.c:637 [inline]
[] sock_sendmsg+0x54/0x70 net/socket.c:657
[] ___sys_sendmsg+0x393/0x3c0 net/socket.c:2311
[] __sys_sendmsg+0x80/0xf0 net/socket.c:2356
[] __do_sys_sendmsg net/socket.c:2365 [inline]
[] __se_sys_sendmsg net/socket.c:2363 [inline]
[] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2363BUG: memory leak
unreferenced object 0xffff88811723b600 (size 64):
comm "syz-executor032", pid 7014, jiffies 4294944027 (age 13.830s)
hex dump (first 32 bytes):
01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 02 00 00 00 05 35 82 c1 .............5..
backtrace:
[] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
[] slab_post_alloc_hook mm/slab.h:522 [inline]
[] slab_alloc mm/slab.c:3319 [inline]
[] __do_kmalloc mm/slab.c:3653 [inline]
[] __kmalloc+0x169/0x300 mm/slab.c:3664
[] kmalloc include/linux/slab.h:557 [inline]
[] ovs_vport_set_upcall_portids+0x54/0xd0 net/openvswitch/vport.c:343
[] ovs_vport_alloc+0x7f/0xf0 net/openvswitch/vport.c:139
[] internal_dev_create+0x24/0x1d0 net/openvswitch/vport-internal_dev.c:164
[] ovs_vport_add+0x81/0x190 net/openvswitch/vport.c:199
[] new_vport+0x19/0x80 net/openvswitch/datapath.c:194
[] ovs_dp_cmd_new+0x22f/0x410 net/openvswitch/datapath.c:1614
[] genl_family_rcv_msg+0x2ab/0x5b0 net/netlink/genetlink.c:629
[] genl_rcv_msg+0x54/0x9c net/netlink/genetlink.c:654
[] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
[] genl_rcv+0x29/0x40 net/netlink/genetlink.c:665
[] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
[] netlink_unicast+0x1ec/0x2d0 net/netlink/af_netlink.c:1328
[] netlink_sendmsg+0x270/0x480 net/netlink/af_netlink.c:1917
[] sock_sendmsg_nosec net/socket.c:637 [inline]
[] sock_sendmsg+0x54/0x70 net/socket.c:657
[] ___sys_sendmsg+0x393/0x3c0 net/socket.c:2311
[] __sys_sendmsg+0x80/0xf0 net/socket.c:2356BUG: memory leak
unreferenced object 0xffff8881228ca500 (size 128):
comm "syz-executor032", pid 7015, jiffies 4294944622 (age 7.880s)
hex dump (first 32 bytes):
00 f0 27 18 81 88 ff ff 80 ac 8c 22 81 88 ff ff ..'........"....
40 b7 23 17 81 88 ff ff 00 00 00 00 00 00 00 00 @.#.............
backtrace:
[] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
[] slab_post_alloc_hook mm/slab.h:522 [inline]
[] slab_alloc mm/slab.c:3319 [inline]
[] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548
[] kmalloc include/linux/slab.h:552 [inline]
[] kzalloc include/linux/slab.h:748 [inline]
[] ovs_vport_alloc+0x37/0xf0 net/openvswitch/vport.c:130
[] internal_dev_create+0x24/0x1d0 net/openvswitch/vport-internal_dev.c:164
[] ovs_vport_add+0x81/0x190 net/openvswitch/vport.c:199
[] new_vport+0x19/0x80 net/openvswitch/datapath.c:194
[] ovs_dp_cmd_new+0x22f/0x410 net/openvswitch/datapath.c:1614
[] genl_family_rcv_msg+0x2ab/0x5b0 net/netlink/genetlink.c:629
[] genl_rcv_msg+0x54/0x9c net/netlink/genetlink.c:654
[] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
[] genl_rcv+0x29/0x40 net/netlink/genetlink.c:665
[] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
[] netlink_unicast+0x1ec/0x2d0 net/netlink/af_netlink.c:1328
[] netlink_sendmsg+0x270/0x480 net/netlink/af_netlink.c:1917
[] sock_sendmsg_nosec net/socket.c:637 [inline]
[] sock_sendmsg+0x54/0x70 net/socket.c:657
[] ___sys_sendmsg+0x393/0x3c0 net/socket.c:2311
[] __sys_sendmsg+0x80/0xf0 net/socket.c:2356
[] __do_sys_sendmsg net/socket.c:2365 [inline]
[] __se_sys_sendmsg net/socket.c:2363 [inline]
[] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2363
=====================================================================The function in net core, register_netdevice(), may fail with vport's
destruction callback either invoked or not. After commit 309b66970ee2
("net: openvswitch: do not free vport if register_netdevice() is failed."),
the duty to destroy vport is offloaded from the driver OTOH, which ends
up in the memory leak reported.It is fixed by releasing vport unless device is registered successfully.
To do that, the callback assignment is defered until device is registered.Reported-by: syzbot+13210896153522fe1ee5@syzkaller.appspotmail.com
Fixes: 309b66970ee2 ("net: openvswitch: do not free vport if register_netdevice() is failed.")
Cc: Taehee Yoo
Cc: Greg Rose
Cc: Eric Dumazet
Cc: Marcelo Ricardo Leitner
Cc: Ying Xue
Cc: Andrey Konovalov
Signed-off-by: Hillf Danton
Acked-by: Pravin B Shelar
[sbrivio: this was sent to dev@openvswitch.org and never made its way
to netdev -- resending original patch]
Signed-off-by: Stefano Brivio
Reviewed-by: Greg Rose
Signed-off-by: Jakub Kicinski
02 Oct, 2019
1 commit
-
commit 174e23810cd31
("sk_buff: drop all skb extensions on free and skb scrubbing") made napi
recycle always drop skb extensions. The additional skb_ext_del() that is
performed via nf_reset on napi skb recycle is not needed anymore.Most nf_reset() calls in the stack are there so queued skb won't block
'rmmod nf_conntrack' indefinitely.This removes the skb_ext_del from nf_reset, and renames it to a more
fitting nf_reset_ct().In a few selected places, add a call to skb_ext_reset to make sure that
no active extensions remain.I am submitting this for "net", because we're still early in the release
cycle. The patch applies to net-next too, but I think the rename causes
needless divergence between those trees.Suggested-by: Eric Dumazet
Signed-off-by: Florian Westphal
Signed-off-by: Pablo Neira Ayuso
18 Jun, 2019
1 commit
-
Pull networking fixes from David Miller:
"Lots of bug fixes here:1) Out of bounds access in __bpf_skc_lookup, from Lorenz Bauer.
2) Fix rate reporting in cfg80211_calculate_bitrate_he(), from John
Crispin.3) Use after free in psock backlog workqueue, from John Fastabend.
4) Fix source port matching in fdb peer flow rule of mlx5, from Raed
Salem.5) Use atomic_inc_not_zero() in fl6_sock_lookup(), from Eric Dumazet.
6) Network header needs to be set for packet redirect in nfp, from
John Hurley.7) Fix udp zerocopy refcnt, from Willem de Bruijn.
8) Don't assume linear buffers in vxlan and geneve error handlers,
from Stefano Brivio.9) Fix TOS matching in mlxsw, from Jiri Pirko.
10) More SCTP cookie memory leak fixes, from Neil Horman.
11) Fix VLAN filtering in rtl8366, from Linus Walluij.
12) Various TCP SACK payload size and fragmentation memory limit fixes
from Eric Dumazet.13) Use after free in pneigh_get_next(), also from Eric Dumazet.
14) LAPB control block leak fix from Jeremy Sowden"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (145 commits)
lapb: fixed leak of control-blocks.
tipc: purge deferredq list for each grp member in tipc_group_delete
ax25: fix inconsistent lock state in ax25_destroy_timer
neigh: fix use-after-free read in pneigh_get_next
tcp: fix compile error if !CONFIG_SYSCTL
hv_sock: Suppress bogus "may be used uninitialized" warnings
be2net: Fix number of Rx queues used for flow hashing
net: handle 802.1P vlan 0 packets properly
tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
tcp: add tcp_min_snd_mss sysctl
tcp: tcp_fragment() should apply sane memory limits
tcp: limit payload size of sacked skbs
Revert "net: phylink: set the autoneg state in phylink_phy_change"
bpf: fix nested bpf tracepoints with per-cpu data
bpf: Fix out of bounds memory access in bpf_sk_storage
vsock/virtio: set SOCK_DONE on peer shutdown
net: dsa: rtl8366: Fix up VLAN filtering
net: phylink: set the autoneg state in phylink_phy_change
net: add high_order_alloc_disable sysctl/static key
tcp: add tcp_tx_skb_cache sysctl
...
12 Jun, 2019
1 commit
-
In order to create an internal vport, internal_dev_create() is used and
that calls register_netdevice() internally.
If register_netdevice() fails, it calls dev->priv_destructor() to free
private data of netdev. actually, a private data of this is a vport.Hence internal_dev_create() should not free and use a vport after failure
of register_netdevice().Test command
ovs-dpctl add-dp bonding_mastersSplat looks like:
[ 1035.667767] kasan: GPF could be caused by NULL-ptr deref or user memory access
[ 1035.675958] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
[ 1035.676916] CPU: 1 PID: 1028 Comm: ovs-vswitchd Tainted: G B 5.2.0-rc3+ #240
[ 1035.676916] RIP: 0010:internal_dev_create+0x2e5/0x4e0 [openvswitch]
[ 1035.676916] Code: 48 c1 ea 03 80 3c 02 00 0f 85 9f 01 00 00 4c 8b 23 48 b8 00 00 00 00 00 fc ff df 49 8d bc 24 60 05 00 00 48 89 fa 48 c1 ea 03 3c 02 00 0f 85 86 01 00 00 49 8b bc 24 60 05 00 00 e8 e4 68 f4
[ 1035.713720] RSP: 0018:ffff88810dcb7578 EFLAGS: 00010206
[ 1035.713720] RAX: dffffc0000000000 RBX: ffff88810d13fe08 RCX: ffffffff84297704
[ 1035.713720] RDX: 00000000000000ac RSI: 0000000000000000 RDI: 0000000000000560
[ 1035.713720] RBP: 00000000ffffffef R08: fffffbfff0d3b881 R09: fffffbfff0d3b881
[ 1035.713720] R10: 0000000000000001 R11: fffffbfff0d3b880 R12: 0000000000000000
[ 1035.768776] R13: 0000607ee460b900 R14: ffff88810dcb7690 R15: ffff88810dcb7698
[ 1035.777709] FS: 00007f02095fc980(0000) GS:ffff88811b400000(0000) knlGS:0000000000000000
[ 1035.777709] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1035.777709] CR2: 00007ffdf01d2f28 CR3: 0000000108258000 CR4: 00000000001006e0
[ 1035.777709] Call Trace:
[ 1035.777709] ovs_vport_add+0x267/0x4f0 [openvswitch]
[ 1035.777709] new_vport+0x15/0x1e0 [openvswitch]
[ 1035.777709] ovs_vport_cmd_new+0x567/0xd10 [openvswitch]
[ 1035.777709] ? ovs_dp_cmd_dump+0x490/0x490 [openvswitch]
[ 1035.777709] ? __kmalloc+0x131/0x2e0
[ 1035.777709] ? genl_family_rcv_msg+0xa54/0x1030
[ 1035.777709] genl_family_rcv_msg+0x63a/0x1030
[ 1035.777709] ? genl_unregister_family+0x630/0x630
[ 1035.841681] ? debug_show_all_locks+0x2d0/0x2d0
[ ... ]Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.")
Signed-off-by: Taehee Yoo
Reviewed-by: Greg Rose
Signed-off-by: David S. Miller
05 Jun, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of version 2 of the gnu general public license as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 51 franklin street fifth floor boston ma
02110 1301 usaextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 21 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Alexios Zavras
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141334.228102212@linutronix.de
Signed-off-by: Greg Kroah-Hartman
29 Sep, 2018
1 commit
-
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.Found by coccinelle.
Signed-off-by: YueHaibing
Signed-off-by: David S. Miller
09 Jan, 2018
1 commit
-
Preempt counter APIs have been split out, currently, hardirq.h just
includes irq_enter/exit APIs which are not used by openvswitch at all.So, remove the unused hardirq.h.
Signed-off-by: Yang Shi
Acked-by: Pravin B Shelar
Cc: "David S. Miller"
Cc: dev@openvswitch.org
Signed-off-by: David S. Miller
03 Dec, 2017
1 commit
-
After commit 3a927bc7cf9d ("ovs: propagate per dp max headroom to
all vports") the need_headroom for the internal vport is updated
accordingly to the max needed headroom in its datapath.That avoids the pskb_expand_head() costs when sending/forwarding
packets towards tunnel devices, at least for some scenarios.We still require such copy when using the ovs-preferred configuration
for vxlan tunnels:br_int
/ \
tap vxlan
(remote_ip:X)br_phy
\
NICwhere the route towards the IP 'X' is via 'br_phy'.
When forwarding traffic from the tap towards the vxlan device, we
will call pskb_expand_head() in vxlan_build_skb() because
br-phy->needed_headroom is equal to tun->needed_headroom.With this change we avoid updating the internal vport needed_headroom,
so that in the above scenario no head copy is needed, giving 5%
performance improvement in UDP throughput test.As a trade-off, packets sent from the internal port towards a tunnel
device will now experience the head copy overhead. The rationale is
that the latter use-case is less relevant performance-wise.Signed-off-by: Paolo Abeni
Acked-by: Pravin B Shelar
Signed-off-by: David S. Miller
08 Jun, 2017
1 commit
-
Network devices can allocate reasources and private memory using
netdev_ops->ndo_init(). However, the release of these resources
can occur in one of two different places.Either netdev_ops->ndo_uninit() or netdev->destructor().
The decision of which operation frees the resources depends upon
whether it is necessary for all netdev refs to be released before it
is safe to perform the freeing.netdev_ops->ndo_uninit() presumably can occur right after the
NETDEV_UNREGISTER notifier completes and the unicast and multicast
address lists are flushed.netdev->destructor(), on the other hand, does not run until the
netdev references all go away.Further complicating the situation is that netdev->destructor()
almost universally does also a free_netdev().This creates a problem for the logic in register_netdevice().
Because all callers of register_netdevice() manage the freeing
of the netdev, and invoke free_netdev(dev) if register_netdevice()
fails.If netdev_ops->ndo_init() succeeds, but something else fails inside
of register_netdevice(), it does call ndo_ops->ndo_uninit(). But
it is not able to invoke netdev->destructor().This is because netdev->destructor() will do a free_netdev() and
then the caller of register_netdevice() will do the same.However, this means that the resources that would normally be released
by netdev->destructor() will not be.Over the years drivers have added local hacks to deal with this, by
invoking their destructor parts by hand when register_netdevice()
fails.Many drivers do not try to deal with this, and instead we have leaks.
Let's close this hole by formalizing the distinction between what
private things need to be freed up by netdev->destructor() and whether
the driver needs unregister_netdevice() to perform the free_netdev().netdev->priv_destructor() performs all actions to free up the private
resources that used to be freed by netdev->destructor(), except for
free_netdev().netdev->needs_free_netdev is a boolean that indicates whether
free_netdev() should be done at the end of unregister_netdevice().Now, register_netdevice() can sanely release all resources after
ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit()
and netdev->priv_destructor().And at the end of unregister_netdevice(), we invoke
netdev->priv_destructor() and optionally call free_netdev().Signed-off-by: David S. Miller
16 Feb, 2017
1 commit
-
Commit 91572088e3fd ("net: use core MTU range checking in core net
infra") changed the openvswitch internal device to use the core net
infra for controlling the MTU range, but failed to actually set the
max_mtu as described in the commit message, which now defaults to
ETH_DATA_LEN.This patch fixes this by setting max_mtu to ETH_MAX_MTU after
ether_setup() call.Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra")
Signed-off-by: Jarno Rajahalme
Signed-off-by: David S. Miller
09 Jan, 2017
1 commit
-
The network device operation for reading statistics is only called
in one place, and it ignores the return value. Having a structure
return value is potentially confusing because some future driver could
incorrectly assume that the return value was used.Fix all drivers with ndo_get_stats64 to have a void function.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
21 Oct, 2016
1 commit
-
geneve:
- Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu
- This one isn't quite as straight-forward as others, could use some
closer inspection and testingmacvlan:
- set min/max_mtutun:
- set min/max_mtu, remove tun_net_change_mtuvxlan:
- Merge __vxlan_change_mtu back into vxlan_change_mtu
- Set max_mtu to IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
- This one is also not as straight-forward and could use closer inspection
and testing from vxlan folksbridge:
- set max_mtu of IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu functionopenvswitch:
- set min/max_mtu, remove internal_dev_change_mtu
- note: max_mtu wasn't checked previously, it's been set to 65535, which
is the largest possible size supportedsch_teql:
- set min/max_mtu (note: max_mtu previously unchecked, used max of 65535)macsec:
- min_mtu = 0, max_mtu = 65535macvlan:
- min_mtu = 0, max_mtu = 65535ntb_netdev:
- min_mtu = 0, max_mtu = 65535veth:
- min_mtu = 68, max_mtu = 655358021q:
- min_mtu = 0, max_mtu = 65535CC: netdev@vger.kernel.org
CC: Nicolas Dichtel
CC: Hannes Frederic Sowa
CC: Tom Herbert
CC: Daniel Borkmann
CC: Alexander Duyck
CC: Paolo Abeni
CC: Jiri Benc
CC: WANG Cong
CC: Roopa Prabhu
CC: Pravin B Shelar
CC: Sabrina Dubroca
CC: Patrick McHardy
CC: Stephen Hemminger
CC: Pravin Shelar
CC: Maxim Krasnyansky
Signed-off-by: Jarod Wilson
Signed-off-by: David S. Miller
13 Oct, 2016
1 commit
-
The internal device does support 802.1AD offloading since 018c1dda5ff1
("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink
attributes").Signed-off-by: Jiri Benc
Acked-by: Pravin B Shelar
Acked-by: Eric Garver
Signed-off-by: David S. Miller
06 Aug, 2016
1 commit
-
net_device->ndo_set_rx_headroom (introduced in
871b642adebe300be2e50aa5f65a418510f636ec) says"Setting a negtaive value reset the rx headroom
to the default value".It seems that the OVS implementation in
3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7 overlooked this and sets
dev->needed_headroom unconditionally.This doesn't have an immediate effect, but can mess up later
LL_RESERVED_SPACE calculations, such as done in
net/ipv6/mcast.c:mld_newpack. For reference, this issue was found
from a skb_panic raised there after the length calculations had given
the wrong result.Note the other current users of this interface
(drivers/net/tun.c:tun_set_headroom and
drivers/net/veth.c:veth_set_rx_headroom) are both checking this
correctly thus need no modification.Thanks to Ben for some pointers from the crash dumps!
Cc: Benjamin Poirier
Cc: Paolo Abeni
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1361414
Signed-off-by: Ian Wienand
Signed-off-by: David S. Miller
03 Jun, 2016
1 commit
-
Set name_assign_type of internal port to NET_NAME_USER.
Signed-off-by: Zhang Shengju
Acked-by: Pravin B Shelar
Signed-off-by: David S. Miller
17 Apr, 2016
1 commit
-
Cc: Pravin Shelar
Signed-off-by: Phil Sutter
Signed-off-by: David S. Miller
19 Mar, 2016
1 commit
-
Signed-off-by: Fengguang Wu
Signed-off-by: David S. Miller
02 Mar, 2016
1 commit
-
This patch implements bookkeeping support to compute the maximum
headroom for all the devices in each datapath. When said value
changes, the underlying devs are notified via the
ndo_set_rx_headroom method.This also increases the internal vports xmit performance.
Signed-off-by: Paolo Abeni
Signed-off-by: David S. Miller
24 Oct, 2015
1 commit
-
Conflicts:
net/ipv6/xfrm6_output.c
net/openvswitch/flow_netlink.c
net/openvswitch/vport-gre.c
net/openvswitch/vport-vxlan.c
net/openvswitch/vport.c
net/openvswitch/vport.hThe openvswitch conflicts were overlapping changes. One was
the egress tunnel info fix in 'net' and the other was the
vport ->send() op simplification in 'net-next'.The xfrm6_output.c conflicts was also a simplification
overlapping a bug fix.Signed-off-by: David S. Miller
22 Oct, 2015
2 commits
-
With use of lwtunnel, we can directly call dev_queue_xmit()
rather than calling netdev vport send operation.
Following change make tunnel vport code bit cleaner.Signed-off-by: Pravin B Shelar
Acked-by: Thomas Graf
Acked-by: Jiri Benc
Signed-off-by: David S. Miller -
"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:=============%] internal_dev_recv+0xa8/0x170 [openvswitch]
[] do_output.isra.31+0x60/0x19c [openvswitch]
[] do_execute_actions+0x208/0x11c0 [openvswitch]
[] ovs_execute_actions+0xc8/0x238 [openvswitch]
[] ovs_packet_cmd_execute+0x21c/0x288 [openvswitch]
[] genl_family_rcv_msg+0x1b0/0x310
[] genl_rcv_msg+0xa4/0xe4
[] netlink_rcv_skb+0xb0/0xdc
[] genl_rcv+0x38/0x50
[] netlink_unicast+0x164/0x210
[] netlink_sendmsg+0x304/0x368
[] sock_sendmsg+0x30/0x4c
[SNIP]
Kernel panic - not syncing: Fatal exception in interrupt
=============%
Acked-by: Pravin B Shelar
Signed-off-by: David S. Miller
30 Aug, 2015
1 commit
-
Since all vport types are now backed by netdev, we can directly
use netdev stats. Following patch removes redundant stat
from vport.Signed-off-by: Pravin B Shelar
Signed-off-by: David S. Miller
28 Aug, 2015
1 commit
-
Add this helper so code can easily figure out if netdev is openswitch.
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
22 Jul, 2015
2 commits
-
This allows to get rid of the get_name() vport ops later on.
Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller -
This is the first step in representing all OVS vports as regular
struct net_devices. Move the net_device pointer into the vport
structure itself to get rid of struct vport_netdev.Signed-off-by: Thomas Graf
Signed-off-by: Pravin B Shelar
Signed-off-by: David S. Miller
06 Nov, 2014
1 commit
-
If the internal device is not up, it should drop received
packets. Sometimes it receive the broadcast or multicast
packets, and the ip protocol stack will casue more cpu
usage wasted.Signed-off-by: Chunhe Li
Signed-off-by: Pravin B Shelar
29 Oct, 2014
1 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
Signed-off-by: David S. Miller
24 Jul, 2014
1 commit
-
Following patch enables all available tunnel GSO features for OVS
bridge device so that ovs can use hardware offloads available to
underling device.Signed-off-by: Pravin B Shelar
Acked-by: Andy Zhou
16 Jul, 2014
1 commit
-
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.Coccinelle patch:
@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)v9: move comments here from the wrong commit
Signed-off-by: Tom Gundersen
Reviewed-by: David Herrmann
Signed-off-by: David S. Miller
02 Jul, 2014
1 commit
-
This stub now allows userspace to see IFLA_INFO_KIND for ovs master and
IFLA_INFO_SLAVE_KIND for slave.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
14 May, 2014
1 commit
-
net: get rid of SET_ETHTOOL_OPS
Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone.
This does that.Mostly done via coccinelle script:
@@
struct ethtool_ops *ops;
struct net_device *dev;
@@
- SET_ETHTOOL_OPS(dev, ops);
+ dev->ethtool_ops = ops;Compile tested only, but I'd seriously wonder if this broke anything.
Suggested-by: Dave Miller
Signed-off-by: Wilfried Klaebe
Acked-by: Felipe Balbi
Signed-off-by: David S. Miller
02 Nov, 2013
1 commit
-
OVS already can handle all types of segmentation offloads that
are supported by the kernel.
Following patch specifically enables UDP and IPV6 segmentation
offloads.Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross
20 Jun, 2013
1 commit
-
Add ovs tunnel interface for set tunnel action for userspace.
Signed-off-by: Pravin B Shelar
Acked-by: Jesse Gross
Signed-off-by: David S. Miller
15 Jun, 2013
1 commit
-
Following patch keeps skb->csum correct across ovs.
Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross
30 Apr, 2013
1 commit
-
The only user is get_dpifindex(), no need to redirect via the port
operations.Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller
20 Apr, 2013
1 commit
-
Rename the hardware VLAN acceleration features to include "CTAG" to indicate
that they only support CTAGs. Follow up patches will introduce 802.1ad
server provider tagging (STAGs) and require the distinction for hardware not
supporting acclerating both.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
16 Apr, 2013
1 commit
-
Currently OVS uses combination of genl and rtnl lock to protect
datapath state. This was done due to networking stack locking.
But this has complicated locking and there are few lock ordering
issues with new tunneling protocols.
Following patch simplifies locking by introducing new ovs mutex
and now this lock is used to protect entire ovs state.Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross
18 Mar, 2013
1 commit
-
Conflicts:
net/openvswitch/vport-internal_dev.cJesse Gross says:
====================
A couple of minor enhancements for net-next/3.10. The largest is an
extension to allow variable length metadata to be passed to userspace
with packets.There is a merge conflict in net/openvswitch/vport-internal_dev.c:
A existing commit modifies internal_dev_mac_addr() and a new commit
deletes it. The new one is correct, so you can just remove that function.
====================Signed-off-by: David S. Miller