Re: [PATCH v3 bpf-next] btf: expose BTF info through sysfs

2019-08-12 Thread Greg KH
On Sun, Aug 11, 2019 at 11:14:05PM -0700, Andrii Nakryiko wrote: > Make .BTF section allocated and expose its contents through sysfs. > > /sys/kernel/btf directory is created to contain all the BTFs present > inside kernel. Currently there is only kernel's main BTF, represented as > /sys/kernel/bt

Re: [PATCHv2 net 0/2] Add netdev_level_ratelimited to avoid netdev msg flush

2019-08-12 Thread Hangbin Liu
On Sun, Aug 11, 2019 at 09:08:20PM -0700, David Miller wrote: > From: Hangbin Liu > Date: Fri, 9 Aug 2019 08:29:39 +0800 > > > ibmveth 3003 env3: h_multicast_ctrl rc=4 when adding an entry to the > > filter table > > error when add more thann 256 memberships in one multicast group. I haven

[PATCH v2 1/3] tipc: fix memory leak issue

2019-08-12 Thread Ying Xue
syzbot found the following memory leak: [ 68.602482][ T7130] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) BUG: memory leak unreferenced object 0x88810df83c00 (size 512): comm "softirq", pid 0, jiffies 4294942354 (age 19.830s) hex dump (first 32 bytes): 38

[PATCH v2 3/3] tipc: fix issue of calling smp_processor_id() in preemptible

2019-08-12 Thread Ying Xue
syzbot found the following issue: [ 81.119772][ T8612] BUG: using smp_processor_id() in preemptible [] code: syz-executor834/8612 [ 81.136212][ T8612] caller is dst_cache_get+0x3d/0xb0 [ 81.141450][ T8612] CPU: 0 PID: 8612 Comm: syz-executor834 Not tainted 5.2.0-rc6+ #48 [ 81.149

[PATCH v2 0/3] Fix three issues found by syzbot

2019-08-12 Thread Ying Xue
In this series, try to fix two memory leak issues and another issue of calling smp_processor_id() in preemptible context. Changes since v1: - Fix "Reported-by:" missing in patch #3, which was reported by Jakub Kicinski Ying Xue (3): tipc: fix memory leak issue tipc: fix memory leak issue

[PATCH v2 2/3] tipc: fix memory leak issue

2019-08-12 Thread Ying Xue
syzbot found the following memory leak issue: [ 72.286706][ T7064] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) BUG: memory leak unreferenced object 0x888122bca200 (size 128): comm "syz-executor232", pid 7065, jiffies 4294943817 (age 8.880s) hex dump (first 32

Re: [PATCH v2 1/3] tipc: fix memory leak issue

2019-08-12 Thread Eric Dumazet
On 8/12/19 9:32 AM, Ying Xue wrote: > syzbot found the following memory leak: > > [ 68.602482][ T7130] kmemleak: 2 new suspected memory leaks (see > /sys/kernel/debug/kmemleak) > BUG: memory leak > unreferenced object 0x88810df83c00 (size 512): > comm "softirq", pid 0, jiffies 42949423

Re: [PATCH v2 net-next 2/2] net: mvpp2: support multiple comphy lanes

2019-08-12 Thread Antoine Tenart
Hello Matt, On Fri, Aug 09, 2019 at 06:20:28PM -0400, Matt Pelland wrote: > On Fri, Aug 09, 2019 at 10:32:50AM +0200, Antoine Tenart wrote: > > On Thu, Aug 08, 2019 at 07:06:06PM -0400, Matt Pelland wrote: > > > @@ -5084,14 +5107,38 @@ static int mvpp2_port_probe(struct > > > platform_device *pde

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread Jiri Pirko
Mon, Aug 12, 2019 at 03:37:26AM CEST, dsah...@gmail.com wrote: >On 8/11/19 7:34 PM, David Ahern wrote: >> On 8/10/19 12:30 AM, Jiri Pirko wrote: >>> Could you please write me an example message of add/remove? >> >> altnames are for existing netdevs, yes? existing netdevs have an id and >> a name -

Re: [PATCH net] netdevsim: Restore per-network namespace accounting for fib entries

2019-08-12 Thread Jiri Pirko
Mon, Aug 12, 2019 at 06:02:18AM CEST, da...@davemloft.net wrote: >From: David Ahern >Date: Tue, 6 Aug 2019 12:15:17 -0700 > >> From: David Ahern >> >> Prior to the commit in the fixes tag, the resource controller in netdevsim >> tracked fib entries and rules per network namespace. Restore that

[PATCH ipsec] xfrm: policy: avoid warning splat when merging nodes

2019-08-12 Thread Florian Westphal
syzbot reported a splat: xfrm_policy_inexact_list_reinsert+0x625/0x6e0 net/xfrm/xfrm_policy.c:877 CPU: 1 PID: 6756 Comm: syz-executor.1 Not tainted 5.3.0-rc2+ #57 Call Trace: xfrm_policy_inexact_node_reinsert net/xfrm/xfrm_policy.c:922 [inline] xfrm_policy_inexact_node_merge net/xfrm/xfrm_po

Re: [PATCH net-next v5 6/6] net: mscc: PTP Hardware Clock (PHC) support

2019-08-12 Thread Antoine Tenart
Hi Andrew, On Sat, Aug 10, 2019 at 07:32:24PM +0200, Andrew Lunn wrote: > > @@ -596,11 +606,53 @@ static int ocelot_port_xmit(struct sk_buff *skb, > > struct net_device *dev) > > > > dev->stats.tx_packets++; > > dev->stats.tx_bytes += skb->len; > > - dev_kfree_skb_any(skb); > > + > >

Error when loading BPF_CGROUP_INET_EGRESS program with bpftool

2019-08-12 Thread Fejes Ferenc
Greetings! I found a strange error when I tried to load a BPF_CGROUP_INET_EGRESS prog with bpftool. Loading the same program from C code with bpf_prog_load_xattr works without problem. The error message I got: bpftool prog loadall hbm_kern.o /sys/fs/bpf/hbm type cgroup/skb libbpf: load bpf progra

Re: [PATCH v3] tools: bpftool: fix reading from /proc/config.gz

2019-08-12 Thread Daniel Borkmann
On 8/9/19 2:39 AM, Peter Wu wrote: /proc/config has never existed as far as I can see, but /proc/config.gz is present on Arch Linux. Add support for decompressing config.gz using zlib which is a mandatory dependency of libelf. Replace existing stdio functions with gzFile operations since the latt

Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup

2019-08-12 Thread Sergei Shtylyov
Hello! On 11.08.2019 18:08, Marek Behún wrote: The mv88e6xxx_port_setup_mac looks if one of the {link, speed, duplex} parameters is being changed from the current setting, and if not, does not do anything. This test is wrong in some situations: this method also has the mode argument, which can

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-12 Thread Holger Hoffstätte
On 8/9/19 10:52 AM, Holger Hoffstätte wrote: On 8/9/19 10:25 AM, Eric Dumazet wrote: (snip) So that didn't take long - got another timeout this morning during some random light usage, despite sg/tso being disabled this time. Again the only common element is the xmit_more patch. :( Not sure whet

[patch net-next] netdevsim: implement support for devlink region and snapshots

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko Implement dummy region of size 32K and allow user to create snapshots or random data using debugfs file trigger. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/dev.c | 66 ++- drivers/net/netdevsim/netdevsim.h | 1 + 2 files changed, 66

Re: [PATCH bpf-next v2 2/4] bpf: support cloning sk storage on accept()

2019-08-12 Thread Daniel Borkmann
On 8/9/19 6:10 PM, Stanislav Fomichev wrote: Add new helper bpf_sk_storage_clone which optionally clones sk storage and call it from sk_clone_lock. Cc: Martin KaFai Lau Cc: Yonghong Song Signed-off-by: Stanislav Fomichev [...] +int bpf_sk_storage_clone(const struct sock *sk, struct sock *ne

[PATCH iproute2] tc: Fix block-handle support for filter operations

2019-08-12 Thread Ido Schimmel
From: Ido Schimmel Commit e991c04d64c0 ("Revert "tc: Add batchsize feature for filter and actions"") reverted more than it should and broke shared block functionality. Fix this by restoring the original functionality. To reproduce: # tc qdisc add dev swp1 ingress_block 10 ingress # tc filter ad

Re: [PATCH iproute2] tc: Fix block-handle support for filter operations

2019-08-12 Thread Jiri Pirko
Mon, Aug 12, 2019 at 12:17:06PM CEST, ido...@idosch.org wrote: >From: Ido Schimmel > >Commit e991c04d64c0 ("Revert "tc: Add batchsize feature for filter and >actions"") reverted more than it should and broke shared block >functionality. Fix this by restoring the original functionality. > >To repro

[PATCH 0/3] ocelot_ace: fix and improve the driver

2019-08-12 Thread Yangbo Lu
This patch-set is to fix some issues and improve the ocelot_ace driver for using. Yangbo Lu (3): ocelot_ace: drop member port from ocelot_ace_rule structure ocelot_ace: fix ingress ports setting for rule ocelot_ace: fix action of trap drivers/net/ethernet/mscc/ocelot_ace.c| 20

[PATCH 3/3] ocelot_ace: fix action of trap

2019-08-12 Thread Yangbo Lu
The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet

[PATCH 1/3] ocelot_ace: drop member port from ocelot_ace_rule structure

2019-08-12 Thread Yangbo Lu
The ocelot_ace_rule is not port specific. We don't need a member port in ocelot_ace_rule structure. Drop it and use member ocelot instead. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c| 12 ++-- drivers/net/ethernet/mscc/ocelot_ace.h| 2 +- drivers/net/ethe

[PATCH 2/3] ocelot_ace: fix ingress ports setting for rule

2019-08-12 Thread Yangbo Lu
The ingress ports setting of rule should support covering all ports. This patch is to use u16 ingress_port for ingress port mask setting for ace rule. One bit corresponds one port. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c| 2 +- drivers/net/ethernet/mscc/ocelot_ace

[PATCH net] nexthop: use nlmsg_parse_deprecated()

2019-08-12 Thread Eric Dumazet
David missed that commit 8cb081746c03 ("netlink: make validation more configurable for future strictness") has renamed nlmsg_parse() syzbot reported : BUG: KMSAN: uninit-value in nh_valid_get_del_req+0x6f1/0x8c0 net/ipv4/nexthop.c:1510 CPU: 0 PID: 11812 Comm: syz-executor444 Not tainted 5.3.0-rc3

[PATCH net] batman-adv: fix uninit-value in batadv_netlink_get_ifindex()

2019-08-12 Thread Eric Dumazet
batadv_netlink_get_ifindex() needs to make sure user passed a correct u32 attribute. syzbot reported : BUG: KMSAN: uninit-value in batadv_netlink_dump_hardif+0x70d/0x880 net/batman-adv/netlink.c:968 CPU: 1 PID: 11705 Comm: syz-executor888 Not tainted 5.1.0+ #1 Hardware name: Google Google Compute

[patch net-next] devlink: send notifications for deleted snapshots on region destroy

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko Currently the notifications for deleted snapshots are sent only in case user deletes a snapshot manually. Send the notifications in case region is destroyed too. Signed-off-by: Jiri Pirko --- net/core/devlink.c | 23 --- 1 file changed, 12 insertions(+), 11

Re: [PATCH bpf-next v4 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-08-12 Thread Daniel Borkmann
On 8/2/19 10:11 AM, Björn Töpel wrote: From: Björn Töpel When an AF_XDP socket is released/closed the XSKMAP still holds a reference to the socket in a "released" state. The socket will still use the netdev queue resource, and block newly created sockets from attaching to that queue, but no use

Re: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-12 Thread Allan W. Nielsen
The 08/12/2019 18:48, Yangbo Lu wrote: > The trap action should be copying the frame to CPU and > dropping it for forwarding, but current setting was just > copying frame to CPU. Are there any actions which do a "copy-to-cpu" and still forward the frame in HW? > Signed-off-by: Yangbo Lu > --- >

Re: [PATCH 2/3] ocelot_ace: fix ingress ports setting for rule

2019-08-12 Thread Allan W. Nielsen
The 08/12/2019 18:48, Yangbo Lu wrote: > The ingress ports setting of rule should support covering all ports. > This patch is to use u16 ingress_port for ingress port mask setting > for ace rule. One bit corresponds one port. That is how the HW is working, and it would be nice if we could operate o

Re: [PATCH net] nexthop: use nlmsg_parse_deprecated()

2019-08-12 Thread David Ahern
On 8/12/19 5:36 AM, Eric Dumazet wrote: > David missed that commit 8cb081746c03 ("netlink: make validation > more configurable for future strictness") has renamed nlmsg_parse() Thanks for the report, Eric. It is quite likely I overlooked something with that rename given the timing. However, the ne

[PATCH net] sctp: fix the transport error_count check

2019-08-12 Thread Xin Long
As the annotation says in sctp_do_8_2_transport_strike(): "If the transport error count is greater than the pf_retrans threshold, and less than pathmaxrtx ..." It should be transport->error_count checked with pathmaxrxt, instead of asoc->pf_retrans. Fixes: 5aa93bcf66f4 ("sctp: Implement qui

[patch net-next v3 1/3] net: devlink: allow to change namespaces

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko All devlink instances are created in init_net and stay there for a lifetime. Allow user to be able to move devlink instances into namespaces. Signed-off-by: Jiri Pirko --- v2->v3: - added notifications for all objects v1->v2: - change the check for multiple attributes - add war

[patch net-next v3 3/3] netdevsim: create devlink and netdev instances in namespace

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko When user does create new netdevsim instance using sysfs bus file, create the devlink instance and related netdev instance in the namespace of the caller. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski --- v1->v2: - remove net_namespace.h include and forward decralared

[patch net-next v3 2/3] net: devlink: export devlink net set/get helpers

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko Allow drivers to set/get net struct for devlink instance. Set is only allowed for newly allocated devlink instance. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski --- include/net/devlink.h | 3 +++ net/core/devlink.c| 18 ++ 2 files changed, 17 insert

[patch net-next v3 0/3] net: devlink: Finish network namespace support

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko Devlink from the beginning counts with network namespaces, but the instances has been fixed to init_net. The first patch allows user to move existing devlink instances into namespaces: $ devlink dev netdevsim/netdevsim1 $ ip netns add ns1 $ devlink dev set netdevsim/netdevsim1 n

[patch iproute2-next v3 1/2] devlink: introduce cmdline option to switch to a different namespace

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- devlink/devlink.c | 12 ++-- man/man8/devlink.8 | 4 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 91c85dc1de73..6bda25e92238 100644 --- a/devlink/devlink.c +++ b/devlink/

[patch iproute2-next v3 2/2] devlink: add support for network namespace change

2019-08-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- devlink/devlink.c| 54 +++- include/uapi/linux/devlink.h | 4 +++ man/man8/devlink-dev.8 | 12 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/de

Re: [PATCH net-next v7 5/6] flow_offload: support get multi-subsystem block

2019-08-12 Thread Vlad Buslov
On Wed 07 Aug 2019 at 04:13, we...@ucloud.cn wrote: > From: wenxu > > It provide a callback list to find the blocks of tc > and nft subsystems > > Signed-off-by: wenxu > Acked-by: Jakub Kicinski > --- > v7: add a mutex lock for add/del flow_indr_block_ing_cb > > include/net/flow_offload.h | 10

[PATCH net] s390/qeth: serialize cmd reply with concurrent timeout

2019-08-12 Thread Julian Wiedmann
Callbacks for a cmd reply run outside the protection of card->lock, to allow for additional cmds to be issued & enqueued in parallel. When qeth_send_control_data() bails out for a cmd without having received a reply (eg. due to timeout), its callback may concurrently be processing a reply that jus

[PATCH net-next v6 6/6] net: mscc: PTP Hardware Clock (PHC) support

2019-08-12 Thread Antoine Tenart
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot switch for both PTP 1-step and 2-step modes. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.c | 401 ++- drivers/net/ethernet/mscc/ocelot.h | 39 +++ drivers/net/ethernet/mscc/

[PATCH net-next v6 2/6] Documentation/bindings: net: ocelot: document the PTP ready IRQ

2019-08-12 Thread Antoine Tenart
One additional interrupt needs to be described within the Ocelot device tree node: the PTP ready one. This patch documents the binding needed to do so. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn --- Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++- 1 file chang

[PATCH net-next v6 5/6] net: mscc: remove the frame_info cpuq member

2019-08-12 Thread Antoine Tenart
In struct frame_info, the cpuq member is never used. This cosmetic patch removes it from the structure, and from the parsing of the frame header as it's only set but never used. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn --- drivers/net/ethernet/mscc/ocelot.h | 1 - drivers/ne

[PATCH net-next v6 0/6] net: mscc: PTP Hardware Clock (PHC) support

2019-08-12 Thread Antoine Tenart
Hello, This series introduces the PTP Hardware Clock (PHC) support to the Mscc Ocelot switch driver. In order to make use of this, a new register bank is added and described in the device tree, as well as a new interrupt. The use this bank and interrupt was made optional in the driver for dt compa

[PATCH net-next v6 1/6] Documentation/bindings: net: ocelot: document the PTP bank

2019-08-12 Thread Antoine Tenart
One additional register range needs to be described within the Ocelot device tree node: the PTP. This patch documents the binding needed to do so. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn --- Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++--- 1 file changed, 6 in

[PATCH net-next v6 4/6] net: mscc: improve the frame header parsing readability

2019-08-12 Thread Antoine Tenart
This cosmetic patch improves the frame header parsing readability by introducing a new macro to access and mask its fields. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot_board.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dr

[PATCH net-next v6 3/6] net: mscc: describe the PTP register range

2019-08-12 Thread Antoine Tenart
This patch adds support for using the PTP register range, and adds a description of its registers. This bank is used when configuring PTP. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn --- drivers/net/ethernet/mscc/ocelot.h | 9 ++ drivers/net/ethernet/mscc/ocelot_board.c |

[PATCH bpf] s390/bpf: fix lcgr instruction encoding

2019-08-12 Thread Ilya Leoshkevich
"masking, test in bounds 3" fails on s390, because BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. The associated comment indicates that the code was intended to emit lcgr in the first place, it's just that the wrong opc

Re: [net-next 01/15] ice: Implement ethtool ops for channels

2019-08-12 Thread Nguyen, Anthony L
On Fri, 2019-08-09 at 14:15 -0700, Jakub Kicinski wrote: > On Fri, 9 Aug 2019 11:31:25 -0700, Jeff Kirsher wrote: > > From: Henry Tieman > > > > Add code to query and set the number of queues on the primary > > VSI for a PF. This is accessed from the 'ethtool -l' and 'ethtool > > -L' > > command

Re: [BUG] fec mdio times out under system stress

2019-08-12 Thread Fabio Estevam
Hi Russell, On Sun, Aug 11, 2019 at 10:37 AM Russell King - ARM Linux admin wrote: > > Hi Fabio, > > When I woke up this morning, I found that one of the Hummingboards > had gone offline (as in, lost network link) during the night. > Investigating, I find that the system had gone into OOM, and at

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread Roopa Prabhu
On Mon, Aug 12, 2019 at 1:31 AM Jiri Pirko wrote: > > Mon, Aug 12, 2019 at 03:37:26AM CEST, dsah...@gmail.com wrote: > >On 8/11/19 7:34 PM, David Ahern wrote: > >> On 8/10/19 12:30 AM, Jiri Pirko wrote: > >>> Could you please write me an example message of add/remove? > >> > >> altnames are for ex

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread Roopa Prabhu
On Sun, Aug 11, 2019 at 3:10 PM Michal Kubecek wrote: > > On Sat, Aug 10, 2019 at 12:39:31PM -0700, Roopa Prabhu wrote: > > On Sat, Aug 10, 2019 at 8:50 AM Michal Kubecek wrote: > > > > > > On Sat, Aug 10, 2019 at 06:46:57AM -0700, Roopa Prabhu wrote: > > > > On Fri, Aug 9, 2019 at 8:46 AM Michal

Re: [PATCH v2 0/3] Fix three issues found by syzbot

2019-08-12 Thread David Miller
From: Ying Xue Date: Mon, 12 Aug 2019 15:32:39 +0800 > Ying Xue (3): > tipc: fix memory leak issue > tipc: fix memory leak issue Please make the subject lines for these two patches unique. Perhaps mention what part of the tipc code has the memory leak you are fixing. Thanks.

Re: [PATCH net] netdevsim: Restore per-network namespace accounting for fib entries

2019-08-12 Thread David Miller
From: Jiri Pirko Date: Mon, 12 Aug 2019 10:36:35 +0200 > I understand it with real devices, but dummy testing device, who's > purpose is just to test API. Why? Because you'll break all of the wonderful testing infrastructure people like David have created.

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread Stephen Hemminger
On Mon, 12 Aug 2019 10:31:39 +0200 Jiri Pirko wrote: > Mon, Aug 12, 2019 at 03:37:26AM CEST, dsah...@gmail.com wrote: > >On 8/11/19 7:34 PM, David Ahern wrote: > >> On 8/10/19 12:30 AM, Jiri Pirko wrote: > >>> Could you please write me an example message of add/remove? > >> > >> altnames a

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread Michal Kubecek
On Mon, Aug 12, 2019 at 08:21:31AM -0700, Roopa Prabhu wrote: > On Sun, Aug 11, 2019 at 3:10 PM Michal Kubecek wrote: > > > > Not all of them are hardware based, there are also links based on > > filesystem label or UUID. But my point is rather that udev creates > > multiple links so that any of t

Re: [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface

2019-08-12 Thread Doug Ledford
On Thu, 2019-08-08 at 10:11 +, Leon Romanovsky wrote: > On Thu, Aug 08, 2019 at 11:43:54AM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Hi, > > > > This small series extends DEVX interface with SRQ and XRQ legacy > > commands. > > Sorry for typo in cover letter, there is

Re: [PATCH bpf] s390/bpf: fix lcgr instruction encoding

2019-08-12 Thread Vasily Gorbik
On Mon, Aug 12, 2019 at 05:03:32PM +0200, Ilya Leoshkevich wrote: > "masking, test in bounds 3" fails on s390, because > BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of > BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. > The associated comment indicates that the code

Re: [PATCH v3 14/17] fm10k: no need to check return value of debugfs_create functions

2019-08-12 Thread Jeff Kirsher
On Sat, 2019-08-10 at 12:17 +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic > should > never do something different based on this. > > Cc: Jeff Kirsher > Cc: "David S. Miller"

Re: [PATCH v3 15/17] i40e: no need to check return value of debugfs_create functions

2019-08-12 Thread Jeff Kirsher
On Sat, 2019-08-10 at 12:17 +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic > should > never do something different based on this. > > Cc: Jeff Kirsher > Cc: "David S. Miller"

Re: [PATCH v3 16/17] ixgbe: no need to check return value of debugfs_create functions

2019-08-12 Thread Jeff Kirsher
On Sat, 2019-08-10 at 12:17 +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic > should > never do something different based on this. > > Cc: Jeff Kirsher > Cc: "David S. Miller"

Re: [PATCHv2 net 0/2] Add netdev_level_ratelimited to avoid netdev msg flush

2019-08-12 Thread Thomas Falcon
On 8/12/19 2:37 AM, Hangbin Liu wrote: On Sun, Aug 11, 2019 at 09:08:20PM -0700, David Miller wrote: From: Hangbin Liu Date: Fri, 9 Aug 2019 08:29:39 +0800 ibmveth 3003 env3: h_multicast_ctrl rc=4 when adding an entry to the filter table error when add more thann 256 memberships in on

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread David Ahern
On 8/12/19 2:31 AM, Jiri Pirko wrote: > Mon, Aug 12, 2019 at 03:37:26AM CEST, dsah...@gmail.com wrote: >> On 8/11/19 7:34 PM, David Ahern wrote: >>> On 8/10/19 12:30 AM, Jiri Pirko wrote: Could you please write me an example message of add/remove? >>> >>> altnames are for existing netdevs, yes

Re: [PATCH bpf] s390/bpf: fix lcgr instruction encoding

2019-08-12 Thread Daniel Borkmann
On 8/12/19 5:03 PM, Ilya Leoshkevich wrote: "masking, test in bounds 3" fails on s390, because BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. The associated comment indicates that the code was intended to emit lcgr in

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-12 Thread Pravin Shelar
On Sun, Aug 11, 2019 at 3:46 AM Paul Blakey wrote: > > > On 8/8/2019 11:53 PM, Pravin Shelar wrote: > > On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: > >> Offloaded OvS datapath rules are translated one to one to tc rules, > >> for example the following simplified OvS rule: > >> > >> recirc_i

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-12 Thread Roopa Prabhu
On Mon, Aug 12, 2019 at 8:40 AM Stephen Hemminger wrote: > > On Mon, 12 Aug 2019 10:31:39 +0200 > Jiri Pirko wrote: > > > Mon, Aug 12, 2019 at 03:37:26AM CEST, dsah...@gmail.com wrote: > > >On 8/11/19 7:34 PM, David Ahern wrote: > > >> On 8/10/19 12:30 AM, Jiri Pirko wrote: > > >>> Could you plea

[PATCH net-next] net: devlink: remove redundant rtnl lock assert

2019-08-12 Thread Vlad Buslov
It is enough for caller of devlink_compat_switch_id_get() to hold the net device to guarantee that devlink port is not destroyed concurrently. Remove rtnl lock assertion and modify comment to warn user that they must hold either rtnl lock or reference to net device. This is necessary to accommodate

Re: [PATCH net] nexthop: use nlmsg_parse_deprecated()

2019-08-12 Thread David Ahern
On 8/12/19 5:36 AM, Eric Dumazet wrote: > David missed that commit 8cb081746c03 ("netlink: make validation > more configurable for future strictness") has renamed nlmsg_parse() I think the root cause is nlmsg_parse() calling __nla_parse and not __nlmsg_parse. Users of nlmsg_parse are missing the h

Re: [PATCH bpf-next v4 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-08-12 Thread Björn Töpel
On Mon, 12 Aug 2019 at 14:28, Daniel Borkmann wrote: > [...] > > diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c > > index 59b57d708697..c3447bad608a 100644 > > --- a/net/xdp/xsk.c > > +++ b/net/xdp/xsk.c > > @@ -362,6 +362,50 @@ static void xsk_unbind_dev(struct xdp_sock *xs) > > dev_put(dev); >

Re: [PATCH net] ibmveth: Convert multicast list size for little-endian systems

2019-08-12 Thread Joe Perches
On Mon, 2019-08-12 at 12:43 -0500, Thomas Falcon wrote: > The ibm,mac-address-filters property defines the maximum number of > addresses the hypervisor's multicast filter list can support. It is > encoded as a big-endian integer in the OF device tree, but the virtual > ethernet driver does not conv

Re: [PATCH net-next,v4 08/12] drivers: net: use flow block API

2019-08-12 Thread Edward Cree
On 09/07/2019 21:55, Pablo Neira Ayuso wrote: > This patch updates flow_block_cb_setup_simple() to use the flow block API. > Several drivers are also adjusted to use it. > > This patch introduces the per-driver list of flow blocks to account for > blocks that are already in use. > > Remove tc_block

Re: [PATCH bpf-next v2 2/4] bpf: support cloning sk storage on accept()

2019-08-12 Thread Stanislav Fomichev
On 08/12, Daniel Borkmann wrote: > On 8/9/19 6:10 PM, Stanislav Fomichev wrote: > > Add new helper bpf_sk_storage_clone which optionally clones sk storage > > and call it from sk_clone_lock. > > > > Cc: Martin KaFai Lau > > Cc: Yonghong Song > > Signed-off-by: Stanislav Fomichev > [...] > > +in

RE: [PATCH v3 net-next 0/3] net: batched receive in GRO path

2019-08-12 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: Edward Cree > Sent: Friday, August 9, 2019 8:32 PM > To: Ioana Ciocoi Radulescu > Cc: David Miller ; netdev ; > Eric Dumazet ; linux-net-driv...@solarflare.com > Subject: Re: [PATCH v3 net-next 0/3] net: batched receive in GRO path > > On 09/08/2019 18:14, Io

Re: [PATCH v3 13/17] mvpp2: no need to check return value of debugfs_create functions

2019-08-12 Thread Nick Desaulniers
On Sat, Aug 10, 2019 at 3:17 AM Greg Kroah-Hartman wrote: > > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. Maybe adding this recommendation to the comment b

Re: [PATCH net] ibmveth: Convert multicast list size for little-endian systems

2019-08-12 Thread Thomas Falcon
On 8/12/19 12:49 PM, Joe Perches wrote: On Mon, 2019-08-12 at 12:43 -0500, Thomas Falcon wrote: The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the

Re: [PATCH 1/2] ip nexthop: Add space to display properly when showing a group

2019-08-12 Thread David Ahern
On 8/9/19 6:18 PM, Donald Sharp wrote: > When displaying a nexthop group made up of other nexthops, the display > line shows this when you have additional data at the end: > > id 42 group > 43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74proto > zeb

Re: [PATCH v3 net-next 0/3] net: batched receive in GRO path

2019-08-12 Thread Eric Dumazet
On 8/12/19 7:51 PM, Ioana Ciocoi Radulescu wrote: >> -Original Message- >> From: Edward Cree >> Sent: Friday, August 9, 2019 8:32 PM >> To: Ioana Ciocoi Radulescu >> Cc: David Miller ; netdev ; >> Eric Dumazet ; linux-net-driv...@solarflare.com >> Subject: Re: [PATCH v3 net-next 0/3] n

Re: [PATCHv2 net 0/2] Add netdev_level_ratelimited to avoid netdev msg flush

2019-08-12 Thread David Miller
From: Thomas Falcon Date: Mon, 12 Aug 2019 10:56:39 -0500 > Hi, thanks for reporting this. I was able to recreate this on my own > system. The virtual ethernet's multicast filter list size is limited, > and the driver will check that there is available space before adding > entries.  The problem

Re: Error when loading BPF_CGROUP_INET_EGRESS program with bpftool

2019-08-12 Thread Andrii Nakryiko
On Mon, Aug 12, 2019 at 1:59 AM Fejes Ferenc wrote: > > Greetings! > > I found a strange error when I tried to load a BPF_CGROUP_INET_EGRESS > prog with bpftool. Loading the same program from C code with > bpf_prog_load_xattr works without problem. > > The error message I got: > bpftool prog loada

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-12 Thread Heiner Kallweit
On 12.08.2019 11:59, Holger Hoffstätte wrote: > On 8/9/19 10:52 AM, Holger Hoffstätte wrote: >> On 8/9/19 10:25 AM, Eric Dumazet wrote: >> (snip) So that didn't take long - got another timeout this morning during some random light usage, despite sg/tso being disabled this time.

[RESEND][PATCH v3 bpf-next] btf: expose BTF info through sysfs

2019-08-12 Thread Andrii Nakryiko
Make .BTF section allocated and expose its contents through sysfs. /sys/kernel/btf directory is created to contain all the BTFs present inside kernel. Currently there is only kernel's main BTF, represented as /sys/kernel/btf/kernel file. Once kernel modules' BTFs are supported, each module will ex

[PATCH net] ibmveth: Convert multicast list size for little-endian systems

2019-08-12 Thread Thomas Falcon
The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet driver does not convert it for use by little-endian systems. As a result, the driver

[PATCH net-next] r8169: fix sporadic transmit timeout issue

2019-08-12 Thread Heiner Kallweit
Holger reported sporadic transmit timeouts and it turned out that one path misses ringing the doorbell. Fix was suggested by Eric. Fixes: ef14358546b1 ("r8169: make use of xmit_more") Suggested-by: Eric Dumazet Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit --- drivers/net/etherne

Re: [PATCH v3 13/17] mvpp2: no need to check return value of debugfs_create functions

2019-08-12 Thread Greg Kroah-Hartman
On Mon, Aug 12, 2019 at 10:55:51AM -0700, Nick Desaulniers wrote: > On Sat, Aug 10, 2019 at 3:17 AM Greg Kroah-Hartman > wrote: > > > > When calling debugfs functions, there is no need to ever check the > > return value. The function can work or not, but the code logic should > > never do somethi

[PATCH net] net: phy: consider AN_RESTART status when reading link status

2019-08-12 Thread Heiner Kallweit
After configuring and restarting aneg we immediately try to read the link status. On some systems the PHY may not yet have cleared the "aneg complete" and "link up" bits, resulting in a false link-up signal. See [0] for a report. Clause 22 and 45 both require the PHY to keep the AN_RESTART bit set

Re: [PATCH v3 13/17] mvpp2: no need to check return value of debugfs_create functions

2019-08-12 Thread Nick Desaulniers
On Mon, Aug 12, 2019 at 12:01 PM Greg Kroah-Hartman wrote: > > On Mon, Aug 12, 2019 at 10:55:51AM -0700, Nick Desaulniers wrote: > > On Sat, Aug 10, 2019 at 3:17 AM Greg Kroah-Hartman > > wrote: > > > > > > When calling debugfs functions, there is no need to ever check the > > > return value. Th

Re: [PATCH v3 13/17] mvpp2: no need to check return value of debugfs_create functions

2019-08-12 Thread Greg Kroah-Hartman
On Mon, Aug 12, 2019 at 12:44:36PM -0700, Nick Desaulniers wrote: > On Mon, Aug 12, 2019 at 12:01 PM Greg Kroah-Hartman > wrote: > > > > On Mon, Aug 12, 2019 at 10:55:51AM -0700, Nick Desaulniers wrote: > > > On Sat, Aug 10, 2019 at 3:17 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > When cal

[PATCH net] netlink: Fix nlmsg_parse as a wrapper for strict message parsing

2019-08-12 Thread David Ahern
From: David Ahern Eric reported a syzbot warning: BUG: KMSAN: uninit-value in nh_valid_get_del_req+0x6f1/0x8c0 net/ipv4/nexthop.c:1510 CPU: 0 PID: 11812 Comm: syz-executor444 Not tainted 5.3.0-rc3+ #17 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Ca

Re: [PATCH net] net: phy: consider AN_RESTART status when reading link status

2019-08-12 Thread Andrew Lunn
On Mon, Aug 12, 2019 at 09:20:02PM +0200, Heiner Kallweit wrote: > After configuring and restarting aneg we immediately try to read the > link status. On some systems the PHY may not yet have cleared the > "aneg complete" and "link up" bits, resulting in a false link-up > signal. See [0] for a repo

Re: Error when loading BPF_CGROUP_INET_EGRESS program with bpftool

2019-08-12 Thread Fejes Ferenc
Thanks for the answer, I really appreciate it. I tried omitting "cgroup/skb" to let libbpf guess the attach type, but I got the same error. Really interesting, because I got the error > libbpf: failed to load program 'cgroup_skb/egress' wich is weird because it shows that libbpf guess the program t

[PATCH net v2] ibmveth: Convert multicast list size for little-endian system

2019-08-12 Thread Thomas Falcon
The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet driver does not convert it for use by little-endian systems. As a result, the driver

[PATCH net-next 0/3] net: phy: let phy_speed_down/up support speeds >1Gbps

2019-08-12 Thread Heiner Kallweit
So far phy_speed_down/up can be used up to 1Gbps only. Remove this restriction and add needed helpers to phy-core.c Heiner Kallweit (3): net: phy: add __set_linkmode_max_speed net: phy: add __phy_speed_down and phy_resolve_min_speed net: phy: let phy_speed_down/up support speeds >1Gbps dri

[PATCH net] netfilter: ebtables: Fix argument order to ADD_COUNTER

2019-08-12 Thread Todd Seidelmann
The ordering of arguments to the x_tables ADD_COUNTER macro appears to be wrong in ebtables (cf. ip_tables.c, ip6_tables.c, and arp_tables.c). This causes data corruption in the ebtables userspace tools because they get incorrect packet & byte counts from the kernel. ---  net/bridge/netfilter/ebt

[PATCH net-next 2/3] net: phy: add __phy_speed_down and phy_resolve_min_speed

2019-08-12 Thread Heiner Kallweit
__phy_speed_down provides most of the functionality for phy_speed_down. It makes use of new helper phy_resolve_min_speed that is based on the sorting of the settings[] array. In certain cases it may be helpful to be able to exclude legacy half duplex modes, therefore prepare phy_resolve_min_speed()

[PATCH net-next 3/3] net: phy: let phy_speed_down/up support speeds >1Gbps

2019-08-12 Thread Heiner Kallweit
So far phy_speed_down/up can be used up to 1Gbps only. Remove this restriction by using new helper __phy_speed_down. New member adv_old in struct phy_device is used by phy_speed_up to restore the advertised modes before calling phy_speed_down. Don't simply advertise what is supported because a user

[PATCH net-next 1/3] net: phy: add __set_linkmode_max_speed

2019-08-12 Thread Heiner Kallweit
We will need the functionality of __set_linkmode_max_speed also for linkmode bitmaps other than phydev->supported. Therefore split it. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-core.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy-

Re: [PATCH net] netfilter: ebtables: Fix argument order to ADD_COUNTER

2019-08-12 Thread Florian Westphal
Todd Seidelmann wrote: > The ordering of arguments to the x_tables ADD_COUNTER macro > appears to be wrong in ebtables (cf. ip_tables.c, ip6_tables.c, > and arp_tables.c). > > This causes data corruption in the ebtables userspace tools > because they get incorrect packet & byte counts from the ke

Re: [PATCH net-next 1/3] net: phy: add __set_linkmode_max_speed

2019-08-12 Thread Andrew Lunn
On Mon, Aug 12, 2019 at 11:19:31PM +0200, Heiner Kallweit wrote: > We will need the functionality of __set_linkmode_max_speed also for > linkmode bitmaps other than phydev->supported. Therefore split it. > > Signed-off-by: Heiner Kallweit > --- > drivers/net/phy/phy-core.c | 10 -- > 1 f

Re: [PATCH net-next 1/3] net: phy: add __set_linkmode_max_speed

2019-08-12 Thread Heiner Kallweit
On 12.08.2019 23:27, Andrew Lunn wrote: > On Mon, Aug 12, 2019 at 11:19:31PM +0200, Heiner Kallweit wrote: >> We will need the functionality of __set_linkmode_max_speed also for >> linkmode bitmaps other than phydev->supported. Therefore split it. >> >> Signed-off-by: Heiner Kallweit >> --- >> dr

Re: [PATCH net-next 2/3] net: phy: add __phy_speed_down and phy_resolve_min_speed

2019-08-12 Thread Andrew Lunn
> +int __phy_speed_down(struct phy_device *phydev) > +{ > + int min_common_speed = phy_resolve_min_speed(phydev, true); > + > + if (min_common_speed == SPEED_UNKNOWN) > + return -EINVAL; > + > + return __set_linkmode_max_speed(phydev, min_common_speed, > +

  1   2   >