Re: [EXT] Re: [PATCH v2 net-next 00/17] net: atlantic: A2 support

2020-05-03 Thread Igor Russkikh
> > Series applied. > > Please follow up with a patch that makes the new structures use > "__packed" instead of the full expanion. Thanks, David! Sure will do this. Regards Igor

[PATCH bpf-next v2 20/20] tools/bpf: selftests: add bpf_iter selftests

2020-05-03 Thread Yonghong Song
The added test includes the following subtests: - test verifier change for btf_id_or_null - test load/create_iter/read for ipv6_route/netlink/bpf_map/task/task_file - test anon bpf iterator - test anon bpf iterator reading one char at a time - test file bpf iterator - test overflow

[PATCH bpf-next v2 08/20] bpf: implement common macros/helpers for target iterators

2020-05-03 Thread Yonghong Song
Macro DEFINE_BPF_ITER_FUNC is implemented so target can define an init function to capture the BTF type which represents the target. The bpf_iter_meta is a structure holding meta data, common to all targets in the bpf program. Additional marker functions are called before/after bpf_seq_read() sho

[PATCH bpf-next v2 12/20] bpf: add PTR_TO_BTF_ID_OR_NULL support

2020-05-03 Thread Yonghong Song
Add bpf_reg_type PTR_TO_BTF_ID_OR_NULL support. For tracing/iter program, the bpf program context definition, e.g., for previous bpf_map target, looks like struct bpf_iter__bpf_map { struct bpf_iter_meta *meta; struct bpf_map *map; }; The kernel guarantees that meta is not NULL, but ma

[PATCH bpf-next v2 10/20] net: bpf: add netlink and ipv6_route bpf_iter targets

2020-05-03 Thread Yonghong Song
This patch added netlink and ipv6_route targets, using the same seq_ops (except show() and minor changes for stop()) for /proc/net/{netlink,ipv6_route}. The net namespace for these targets are the current net namespace at file open stage, similar to /proc/net/{netlink,ipv6_route} reference countin

[PATCH bpf-next v2 14/20] bpf: handle spilled PTR_TO_BTF_ID properly when checking stack_boundary

2020-05-03 Thread Yonghong Song
This specifically to handle the case like below: // ptr below is a socket ptr identified by PTR_TO_BTF_ID u64 param[2] = { ptr, val }; bpf_seq_printf(seq, fmt, sizeof(fmt), param, sizeof(param)); In this case, the 16 bytes stack for "param" contains: 8 bytes for ptr with spilled PTR_TO

[PATCH bpf-next v2 19/20] tools/bpf: selftests: add iter progs for bpf_map/task/task_file

2020-05-03 Thread Yonghong Song
The implementation is arbitrary, just to show how the bpf programs can be written for bpf_map/task/task_file. They can be costomized for specific needs. For example, for bpf_map, the iterator prints out: $ cat /sys/fs/bpf/my_bpf_map id refcnt usercnt locked_vm 32

[PATCH bpf-next v2 11/20] bpf: add task and task/file iterator targets

2020-05-03 Thread Yonghong Song
Only the tasks belonging to "current" pid namespace are enumerated. For task/file target, the bpf program will have access to struct task_struct *task u32 fd struct file *file where fd/file is an open file for the task. Signed-off-by: Yonghong Song --- kernel/bpf/Makefile| 2 +- ker

[PATCH bpf-next v2 18/20] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-05-03 Thread Yonghong Song
Two bpf programs are added in this patch for netlink and ipv6_route target. On my VM, I am able to achieve identical results compared to /proc/net/netlink and /proc/net/ipv6_route. $ cat /proc/net/netlink sk Eth PidGroups Rmem Wmem Dump Locks DropsInode

[PATCH bpf-next v2 17/20] tools/bpftool: add bpf_iter support for bptool

2020-05-03 Thread Yonghong Song
Currently, only one command is supported bpftool iter pin It will pin the trace/iter bpf program in the object file to the where should be on a bpffs mount. For example, $ bpftool iter pin ./bpf_iter_ipv6_route.o \ /sys/fs/bpf/my_route User can then do a `cat` to print out the result

[PATCH v2] stmmac: fix pointer check after utilization in stmmac_interrupt

2020-05-03 Thread Maxim Petrov
The paranoidal pointer check in IRQ handler looks very strange - it really protects us only against bogus drivers which request IRQ line with null pointer dev_id. However, the code fragment is incorrect because the dev pointer is used before the actual check which leads to undefined behavior. Remov

[PATCH bpf-next v2 15/20] bpf: support variable length array in tracing programs

2020-05-03 Thread Yonghong Song
In /proc/net/ipv6_route, we have struct fib6_info { struct fib6_table *fib6_table; ... struct fib6_nh fib6_nh[0]; } struct fib6_nh { struct fib_nh_common nh_common; struct rt6_info **rt6i_pcpu; struct rt6_exception_bucket *rt6i_exception_bucket; }; struct fib_nh_co

[PATCH bpf-next v2 09/20] bpf: add bpf_map iterator

2020-05-03 Thread Yonghong Song
Implement seq_file operations to traverse all maps. Signed-off-by: Yonghong Song --- include/linux/bpf.h | 1 + kernel/bpf/Makefile | 2 +- kernel/bpf/map_iter.c | 107 ++ kernel/bpf/syscall.c | 19 4 files changed, 128 insertions(+), 1

[PATCH bpf-next v2 16/20] tools/libbpf: add bpf_iter support

2020-05-03 Thread Yonghong Song
Two new libbpf APIs are added to support bpf_iter: - bpf_program__attach_iter Given a bpf program and additional parameters, which is none now, returns a bpf_link. - bpf_iter_create syscall level API to create a bpf iterator. The macro BPF_SEQ_PRINTF are also introduced. The format

[PATCH bpf-next v2 06/20] bpf: create anonymous bpf iterator

2020-05-03 Thread Yonghong Song
A new bpf command BPF_ITER_CREATE is added. The anonymous bpf iterator is seq_file based. The seq_file private data are referenced by targets. The bpf_iter infrastructure allocated additional space at seq_file->private before the space used by targets to store some meta data, e.g., prog: p

[PATCH bpf-next v2 13/20] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-03 Thread Yonghong Song
Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/type fields so at least I can get identical results for netlink and ipv6_route targets. For bpf_seq_printf and bpf_seq_write, return value -EOVE

[PATCH bpf-next v2 00/20] bpf: implement bpf iterator for kernel data

2020-05-03 Thread Yonghong Song
Motivation: The current way to dump kernel data structures mostly: 1. /proc system 2. various specific tools like "ss" which requires kernel support. 3. drgn The dropback for the first two is that whenever you want to dump more, you need change the kernel. For example, Martin want

[PATCH bpf-next v2 07/20] bpf: create file bpf iterator

2020-05-03 Thread Yonghong Song
To produce a file bpf iterator, the fd must be corresponding to a link_fd assocciated with a trace/iter program. When the pinned file is opened, a seq_file will be generated. Signed-off-by: Yonghong Song --- include/linux/bpf.h | 2 ++ kernel/bpf/bpf_iter.c | 17 - kernel/bpf/

[PATCH bpf-next v2 05/20] bpf: implement bpf_seq_read() for bpf iterator

2020-05-03 Thread Yonghong Song
bpf iterator uses seq_file to provide a lossless way to transfer data to user space. But we want to call bpf program after all objects have been traversed, and bpf program may write additional data to the seq_file buffer. The current seq_read() does not work for this use case. Besides allowing sto

[PATCH bpf-next v2 03/20] bpf: support bpf tracing/iter programs for BPF_LINK_CREATE

2020-05-03 Thread Yonghong Song
Given a bpf program, the step to create an anonymous bpf iterator is: - create a bpf_iter_link, which combines bpf program and the target. In the future, there could be more information recorded in the link. A link_fd will be returned to the user space. - create an anonymous bpf iterato

[PATCH bpf-next v2 01/20] bpf: implement an interface to register bpf_iter targets

2020-05-03 Thread Yonghong Song
The target can call bpf_iter_reg_target() to register itself. The needed information: target: target name seq_ops: the seq_file operations for the target init_seq_private target callback to initialize seq_priv during file open fini_seq_private target callback to clean u

[PATCH bpf-next v2 04/20] bpf: support bpf tracing/iter programs for BPF_LINK_UPDATE

2020-05-03 Thread Yonghong Song
Added BPF_LINK_UPDATE support for tracing/iter programs. This way, a file based bpf iterator, which holds a reference to the link, can have its bpf program updated without creating new files. Signed-off-by: Yonghong Song --- kernel/bpf/bpf_iter.c | 31 +++ 1 file chan

[PATCH bpf-next v2 02/20] bpf: allow loading of a bpf_iter program

2020-05-03 Thread Yonghong Song
A bpf_iter program is a tracing program with attach type BPF_TRACE_ITER. The load attribute attach_btf_id is used by the verifier against a particular kernel function, which represents a target, e.g., __bpf_iter__bpf_map for target bpf_map which is implemented later. The program return value mus

Re: [PATCH v3] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread Markus Elfring
> … Thus add a call of the function > “nfp_nsp_close” for the completion of the exception handling. I suggest to mention also the addition of a jump target because of a Linux coding style concern. … > +++ b/drivers/net/ethernet/netronome/nfp/abm/main.c … > @@ -300,12 +297,16 @@ nfp_abm_vnic_set_

[PATCH mlx5-next v1 1/4] {IB/net}/mlx5: Simplify don't trap code

2020-05-03 Thread Leon Romanovsky
From: Maor Gottlieb The fs_core already supports creation of rules with multiple actions/destinations. Refactor fs_core to handle the case when don't trap rule is created with destination. Adapt the calling code in the driver. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Zhang Reviewed-by: M

[PATCH rdma-next v1 0/4] Add steering support for default miss

2020-05-03 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v1: * Rebased on latest rdma-next * Removed attr_is_valid() check from flags v0: https://lore.kernel.org/linux-rdma/20200413135220.934007-1-l...@kernel.org - Hi, This code from Naor refacto

[PATCH mlx5-next v1 2/4] net/mlx5: Add support in forward to namespace

2020-05-03 Thread Leon Romanovsky
From: Maor Gottlieb Currently, fs_core supports rule of forward the traffic to continue matching in the next priority, now we add support to forward the traffic matching in the next namespace. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Reviewed-by: Mark Zhang Signed-off-by: Leon Rom

Re: Net: [DSA]: dsa-loop kernel panic

2020-05-03 Thread Allen
There is a DSA master reference counting issue, but with dsa-loop, the DSA master is already properly reference counted thanks to the dev_get_by_name() call, I will keep digging. Thank you Florain. I am not dsa expert, am debugging the call chain. - Allen

Re: [PATCH net-next v4 0/2] provide support for PHY master/slave configuration

2020-05-03 Thread Oleksij Rempel
please ignore it, i send it by accident. On Mon, May 04, 2020 at 06:33:18AM +0200, Oleksij Rempel wrote: > changes v3: > - rename port_mode to master_slave > - move validation code to net/ethtool/linkmodes.c > - add UNSUPPORTED state and avoid sending unsupported fields > - more formatting and n

[PATCH net-next v4 0/2] provide support for PHY master/slave configuration

2020-05-03 Thread Oleksij Rempel
changes v3: - rename port_mode to master_slave - move validation code to net/ethtool/linkmodes.c - add UNSUPPORTED state and avoid sending unsupported fields - more formatting and naming fixes - tja11xx: support only force mode - tja11xx: mark state as unsupported changes v3: - provide separate

[net] tipc: fix partial topology connection closure

2020-05-03 Thread Tuong Lien
When an application connects to the TIPC topology server and subscribes to some services, a new connection is created along with some objects - 'tipc_subscription' to store related data correspondingly... However, there is one omission in the connection handling that when the connection or applicat

[PATCH net] net: dsa: Do not make user port errors fatal

2020-05-03 Thread Florian Fainelli
Prior to 1d27732f411d ("net: dsa: setup and teardown ports"), we would not treat failures to set-up an user port as fatal, but after this commit we would, which is a regression for some systems where interfaces may be declared in the Device Tree, but the underlying hardware may not be present (plug

Re: Net: [DSA]: dsa-loop kernel panic

2020-05-03 Thread Florian Fainelli
On 5/3/2020 2:06 PM, Florian Fainelli wrote: > Le 2020-05-01 à 10:58, Allen a écrit :   It maps to "eth0". Please let me know if you need further details. >>> >>> I suppose I should have been clearer, what network device driver created >>> eth0? >>> >> >>  This was seen on a VM. >> eth

Re: WARNING in hsr_addr_subst_dest

2020-05-03 Thread syzbot
syzbot suspects this bug was fixed by commit: commit 4b793acdca0050739b99ace6a8b9e7f717f57c6b Author: Taehee Yoo Date: Fri Feb 28 18:01:46 2020 + hsr: use netdev_err() instead of WARN_ONCE() bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=130746ffe0 start commit: ea

Re: [RFC v2] current devlink extension plan for NICs

2020-05-03 Thread Samudrala, Sridhar
On 5/1/2020 2:14 AM, Jiri Pirko wrote: Hi all. First, I would like to apologize for very long email. But I think it would be beneficial to the see the whole picture, where we are going. Currently we are working internally on several features with need of extension of the current devlink infr

Re: [PATCH 3/5] sysctl: remove all extern declaration from sysctl.c

2020-05-03 Thread Stephen Rothwell
Hi Christoph, On Fri, 24 Apr 2020 08:43:36 +0200 Christoph Hellwig wrote: > > Extern declarations in .c files are a bad style and can lead to > mismatches. Use existing definitions in headers where they exist, > and otherwise move the external declarations to suitable header > files. > > Signed

max channels for mlx5

2020-05-03 Thread David Ahern
Hi Saeed: When I saw this commit last year: commit 57c7fce14b1ad512a42abe33cb721a2ea3520d4b Author: Fan Li Date: Mon Dec 16 14:46:15 2019 +0200 net/mlx5: Increase the max number of channels to 128 I was expecting to be able to increase the number of channels on larger systems (e.g., 96 c

Re: [PATCH net-next v2 00/11] net/smc: add and delete link processing

2020-05-03 Thread David Miller
From: Karsten Graul Date: Sun, 3 May 2020 14:38:39 +0200 > These patches add the 'add link' and 'delete link' processing as > SMC server and client. This processing allows to establish and > remove links of a link group dynamically. > > v2: Fix mess up with unused static functions. Merge patch

Re: [PATCH net v3] net: macb: fix an issue about leak related system resources

2020-05-03 Thread David Miller
From: Dejin Zheng Date: Sun, 3 May 2020 20:32:26 +0800 > A call of the function macb_init() can fail in the function > fu540_c000_init. The related system resources were not released > then. use devm_platform_ioremap_resource() to replace ioremap() > to fix it. > > Fixes: c218ad559020ff9 ("macb

Re: [PATCH V3 net-next 00/12] Enhance current features in ena driver

2020-05-03 Thread David Miller
From: Date: Sun, 3 May 2020 09:52:09 + > From: Sameeh Jubran > > > Difference from v2: > * dropped patch "net: ena: move llq configuration from ena_probe to > ena_device_init()" > * reworked patch ""net: ena: implement ena_com_get_admin_polling_mode() to > drop the prototype > > Differ

Re: [PATCH] net: usb: qmi_wwan: add support for DW5816e

2020-05-03 Thread David Miller
From: Bjørn Mork Date: Sun, 03 May 2020 09:13:58 +0200 > Matt Jolly writes: > >> Add support for Dell Wireless 5816e to drivers/net/usb/qmi_wwan.c >> >> Signed-off-by: Matt Jolly ... > Looks fine to me. Please add to the stable queue as well, Thanks. > > Acked-by: Bjørn Mork Applied and

Re: [PATCH net-next 1/6] net: dsa: export dsa_slave_dev_check and dsa_slave_to_port

2020-05-03 Thread Florian Fainelli
On 5/3/2020 3:47 PM, Vladimir Oltean wrote: > Hi Florian, > > On Mon, 4 May 2020 at 01:45, Florian Fainelli wrote: >> >> >> >> On 5/3/2020 2:10 PM, Vladimir Oltean wrote: >>> From: Vladimir Oltean >>> >>> To be able to perform mirroring and redirection through tc-flower >>> offloads (the impl

Re: [PATCH net] net_sched: sch_skbprio: add message validation to skbprio_change()

2020-05-03 Thread David Miller
From: Eric Dumazet Date: Sat, 2 May 2020 20:09:25 -0700 > Do not assume the attribute has the right size. > > Fixes: aea5f654e6b7 ("net/sched: add skbprio scheduler") > Signed-off-by: Eric Dumazet > Reported-by: syzbot Applied and queued up for -stable, thanks Eric.

Re: [PATCH net-next 0/5] net_sched: sch_fq: round of optimizations

2020-05-03 Thread David Miller
From: Eric Dumazet Date: Sat, 2 May 2020 19:54:17 -0700 > This series is focused on better layout of struct fq_flow to > reduce number of cache line misses in fq_enqueue() and dequeue operations. > > Eric Dumazet (5): > net_sched: sch_fq: avoid touching f->next from fq_gc() > net_sched: sch

Re: [PATCH net-next 1/6] net: dsa: export dsa_slave_dev_check and dsa_slave_to_port

2020-05-03 Thread Vladimir Oltean
Hi Florian, On Mon, 4 May 2020 at 01:45, Florian Fainelli wrote: > > > > On 5/3/2020 2:10 PM, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > To be able to perform mirroring and redirection through tc-flower > > offloads (the implementation of which is given raw access to the > > flow_c

Re: [PATCH net-next 1/6] net: dsa: export dsa_slave_dev_check and dsa_slave_to_port

2020-05-03 Thread Florian Fainelli
On 5/3/2020 2:10 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > To be able to perform mirroring and redirection through tc-flower > offloads (the implementation of which is given raw access to the > flow_cls_offload structure), switch drivers need to be able to call > these functions o

Re: [PATCH net 2/2] net: mscc: ocelot: ANA_AUTOAGE_AGE_PERIOD holds a value in seconds, not ms

2020-05-03 Thread Florian Fainelli
On 5/3/2020 3:20 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > One may notice that automatically-learnt entries 'never' expire, even > though the bridge configures the address age period at 300 seconds. > > Actually the value written to hardware corresponds to a time interval > 1000

Re: [PATCH net 1/2] net: dsa: ocelot: the MAC table on Felix is twice as large

2020-05-03 Thread Florian Fainelli
On 5/3/2020 3:20 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > When running 'bridge fdb dump' on Felix, sometimes learnt and static MAC > addresses would appear, sometimes they wouldn't. > > Turns out, the MAC table has 4096 entries on VSC7514 (Ocelot) and 8192 > entries on VSC9959 (

[PATCH net 1/2] net: dsa: ocelot: the MAC table on Felix is twice as large

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean When running 'bridge fdb dump' on Felix, sometimes learnt and static MAC addresses would appear, sometimes they wouldn't. Turns out, the MAC table has 4096 entries on VSC7514 (Ocelot) and 8192 entries on VSC9959 (Felix), so the existing code from the Ocelot common library o

[PATCH net 2/2] net: mscc: ocelot: ANA_AUTOAGE_AGE_PERIOD holds a value in seconds, not ms

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean One may notice that automatically-learnt entries 'never' expire, even though the bridge configures the address age period at 300 seconds. Actually the value written to hardware corresponds to a time interval 1000 times higher than intended, i.e. 83 hours. Fixes: a556c76adc

[PATCH net 0/2] FDB fixes for Felix and Ocelot switches

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean This series fixes the following problems: - Dynamically learnt addresses never expiring (neither for Ocelot nor for Felix) - Half of the FDB not visible in 'bridge fdb show' (for Felix only) Vladimir Oltean (2): net: dsa: ocelot: the MAC table on Felix is twice as large

[PATCH v3 net-next 3/4] net: dsa: introduce a dsa_switch_find function

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Somewhat similar to dsa_tree_find, dsa_switch_find returns a dsa_switch structure pointer by searching for its tree index and switch index (the parameters from dsa,member). To be used, for example, by drivers who implement .crosschip_bridge_join and need a reference to the o

[PATCH v3 net-next 1/4] net: bridge: allow enslaving some DSA master network devices

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Commit 8db0a2ee2c63 ("net: bridge: reject DSA-enabled master netdevices as bridge members") added a special check in br_if.c in order to check for a DSA master network device with a tagging protocol configured. This was done because back then, such devices, once enslaved in

[PATCH v3 net-next 4/4] net: dsa: sja1105: implement cross-chip bridging operations

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean sja1105 uses dsa_8021q for DSA tagging, a format which is VLAN at heart and which is compatible with cascading. A complete description of this tagging format is in net/dsa/tag_8021q.c, but a quick summary is that each external-facing port tags incoming frames with a unique p

[PATCH v3 net-next 2/4] net: dsa: permit cross-chip bridging between all trees in the system

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean One way of utilizing DSA is by cascading switches which do not all have compatible taggers. Consider the following real-life topology: +---+ | LS1028A

[PATCH v3 net-next 0/4] Cross-chip bridging for disjoint DSA trees

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean This series adds support for boards where DSA switches of multiple types are cascaded together. Actually this type of setup was brought up before on netdev, and it looks like utilizing disjoint trees is the way to go: https://lkml.org/lkml/2019/7/7/225 The trouble with dis

[PATCH net-next 5/6] net: dsa: sja1105: implement tc-gate using time-triggered virtual links

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Restrict the TTEthernet hardware support on this switch to operate as closely as possible to IEEE 802.1Qci as possible. This means that it can perform PTP-time-based ingress admission control on streams identified by {DMAC, VID, PCP}, which is useful when trying to ensure th

[PATCH net-next 3/6] net: dsa: sja1105: make room for virtual link parsing in flower offload

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Virtual links are a sja1105 hardware concept of executing various flow actions based on a key extracted from the frame's DMAC, VID and PCP. Currently the tc-flower offload code supports only parsing the DMAC if that is the broadcast MAC address, and the VLAN PCP. Extract th

[PATCH net-next 4/6] net: dsa: sja1105: support flow-based redirection via virtual links

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Implement tc-flower offloads for redirect, trap and drop using non-critical virtual links. Commands which were tested to work are: # Send frames received on swp2 with a DA of 42:be:24:9b:76:20 to the # CPU and to swp3. This type of key (DA only) when the port's VLAN

[PATCH net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. Vladimir Oltean (6): net: dsa: export dsa_slave_dev_check and dsa_slave_to_port net: dsa: sja1105: add static tables for virtual links net: dsa: sja1

[PATCH net-next 6/6] docs: net: dsa: sja1105: document intended usage of virtual links

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Add some verbiage describing how the hardware features of the switch are exposed to users through tc-flower. Signed-off-by: Vladimir Oltean --- Changes from RFC: Patch is new. Documentation/networking/dsa/sja1105.rst | 116 +++ 1 file changed, 116 ins

[PATCH net-next 2/6] net: dsa: sja1105: add static tables for virtual links

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean This patch adds the register definitions for the: - VL Lookup Table - VL Policing Table - VL Forwarding Table - VL Forwarding Parameters Table These are needed in order to perform TTEthernet operations: QoS classification, flow-based policing and/or frame redirecting with t

[PATCH net-next 1/6] net: dsa: export dsa_slave_dev_check and dsa_slave_to_port

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean To be able to perform mirroring and redirection through tc-flower offloads (the implementation of which is given raw access to the flow_cls_offload structure), switch drivers need to be able to call these functions on act->dev. Signed-off-by: Vladimir Oltean --- Changes fr

Re: Net: [DSA]: dsa-loop kernel panic

2020-05-03 Thread Florian Fainelli
Le 2020-05-01 à 10:58, Allen a écrit : >>> >>>   It maps to "eth0". Please let me know if you need further details. >> >> I suppose I should have been clearer, what network device driver created >> eth0? >> > >  This was seen on a VM. > eth0 [52:54:00:c1:cd:65]: virtio_net (up) I have reproduced

[PATCH v3] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Thus add a call of the function “nfp_nsp_close” for the completion of the exception handling. Fix

Re: [PATCH v2] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread Markus Elfring
> … Thus add a call of the function > “nfp_nsp_close” for the completion of the exception handling. Thanks for your positive response. I imagined that a small patch series would be more reasonable than this direct change combination. … > +++ b/drivers/net/ethernet/netronome/nfp/abm/main.c … >

Re: [PATCH v6] net: Option to retrieve the pending data from send queue of UDP socket

2020-05-03 Thread Willem de Bruijn
On Sat, May 2, 2020 at 4:29 AM Lese Doru Calin wrote: > > In this year's edition of GSoC, there is a project idea for CRIU to add > support > for checkpoint/restore of cork-ed UDP sockets. But to add it, the kernel API > needs > to be extended. > This is what this patch does. It adds a new comma

[PATCH v2] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Thus add a call of the function “nfp_nsp_close” for the completion of the exception handling. Fix

[RFC net-next] net: phy: at803x: add cable diagnostics support

2020-05-03 Thread Michael Walle
The AR8031/AR8033 and the AR8035 support cable diagnostics. Adding driver support is straightforward, so lets add it. The PHY just do one pair at a time, so we have to start the test four times. The cable_test_get_status() can block and therefore we can just busy polling the test completion and co

[PATCH v2] dt-bindings: net: renesas,ether: Sort compatible string in increasing number of the SoC

2020-05-03 Thread Lad Prabhakar
Sort the items in the compatible string list in increasing number of SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven --- Changes for v2: * Included renesas,ether in subject instead of sh_eth. * Included Reviewed-by tags. Documentation/devicetr

Re: [PATCH net v3] net: macb: fix an issue about leak related system resources

2020-05-03 Thread Nicolas.Ferre
On 03/05/2020 at 14:32, Dejin Zheng wrote: > A call of the function macb_init() can fail in the function > fu540_c000_init. The related system resources were not released > then. use devm_platform_ioremap_resource() to replace ioremap() > to fix it. > > Fixes: c218ad559020ff9 ("macb: Add support f

Re: NET: r8168/r8169 identifying fix

2020-05-03 Thread Lauri Jakku
Hi, On 3.5.2020 11.33, Heiner Kallweit wrote: On 03.05.2020 04:28, Lauri Jakku wrote: Hi, On 3.5.2020 4.34, Lauri Jakku wrote: Hi, On 3.5.2020 3.11, Lauri Jakku wrote: On 3.5.2020 2.15, Heiner Kallweit wrote: On 03.05.2020 00:42, Lauri Jakku wrote: Hi, On 2.5.2020 20.56, Lauri Jakku w

RE: [PATCH 1/4] fs: Implement close-on-fork

2020-05-03 Thread David Laight
From: Karstens, Nate > Sent: 01 May 2020 15:45 > Thanks for the suggestion. I looked into it and noticed that > do_close_on_exec() appears to have some > optimizations as well: > > > set = fdt->close_on_exec[i]; > > if (!set) > > continue; > > If we interleave the close-on-exec and close-on-

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-03 Thread Jamal Hadi Salim
On 2020-04-30 11:53 p.m., Cong Wang wrote: When we tell kernel to dump filters from root (:), those filters on ingress (:) are matched, but their true parents must be dumped as they are. However, kernel dumps just whatever we tell it, that is either : or :: $ nl

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-03 Thread Jamal Hadi Salim
On 2020-05-03 8:02 a.m., Jamal Hadi Salim wrote: On 2020-05-02 10:28 p.m., Cong Wang wrote: On Sat, May 2, 2020 at 2:19 AM Jamal Hadi Salim wrote: On 2020-05-02 4:48 a.m., Jamal Hadi Salim wrote: [..] Note: tc filter show dev dummy0 root should not show that filter. OTOH, tc filter show de

[PATCH net-next v2 03/11] net/smc: final part of add link processing as SMC client

2020-05-03 Thread Karsten Graul
This patch finalizes the ADD_LINK processing of new links. Receive the CONFIRM_LINK request from peer, complete the link initialization, register all used buffers with the IB device and finally send the CONFIRM_LINK response, which completes the ADD_LINK processing. And activate smc_llc_cli_add_lin

[PATCH net-next v2 01/11] net/smc: first part of add link processing as SMC client

2020-05-03 Thread Karsten Graul
First set of functions to process an ADD_LINK LLC request as an SMC client. Find an alternate IB device, determine the new link group type and get the index for the new link. Then ready the link, map the buffers and send an ADD_LINK LLC response. If any error occurs, send a reject LLC message and t

[PATCH net-next v2 02/11] net/smc: rkey processing for a new link as SMC client

2020-05-03 Thread Karsten Graul
Part of the SMC client new link establishment process is the exchange of rkeys for all used buffers. Add new LLC message type ADD_LINK_CONTINUE which is used to exchange rkeys of all current RMB buffers. Add functions to iterate over all used RMB buffers of the link group, and implement the ADD_LIN

[PATCH net-next v2 07/11] net/smc: delete an asymmetric link as SMC server

2020-05-03 Thread Karsten Graul
When a link group moved from asymmetric to symmetric state then the dangling asymmetric link can be deleted. Add smc_llc_find_asym_link() to find the respective link and add smc_llc_delete_asym_link() to delete it. Signed-off-by: Karsten Graul Reviewed-by: Ursula Braun --- net/smc/smc_llc.c | 8

[PATCH net-next v2 10/11] net/smc: delete link processing as SMC server

2020-05-03 Thread Karsten Graul
Add smc_llc_process_srv_delete_link() to process a DELETE_LINK request as SMC server. When the request is to delete ALL links then terminate the whole link group. If not, find the link to delete by its link_id, send the DELETE_LINK request LLC message and wait for the response. No matter if a respo

[PATCH net-next v2 11/11] net/smc: enqueue local LLC messages

2020-05-03 Thread Karsten Graul
As SMC server, when a second link was deleted, trigger the setup of an asymmetric link. Do this by enqueueing a local ADD_LINK message which is processed by the LLC layer as if it were received from peer. Do the same when a new IB port became active and a new link could be created. smc_llc_srv_add_

[PATCH net-next v2 00/11] net/smc: add and delete link processing

2020-05-03 Thread Karsten Graul
These patches add the 'add link' and 'delete link' processing as SMC server and client. This processing allows to establish and remove links of a link group dynamically. v2: Fix mess up with unused static functions. Merge patch 8 into patch 4. Postpone patch 13 to next series. Karsten Graul

[PATCH net-next v2 08/11] net/smc: llc_del_link_work and use the LLC flow for delete link

2020-05-03 Thread Karsten Graul
Introduce a work that is scheduled when a new DELETE_LINK LLC request is received. The work will call either the SMC client or SMC server DELETE_LINK processing. And use the LLC flow framework to process incoming DELETE_LINK LLC messages, scheduling the llc_del_link_work for those events. With thes

[PATCH net-next v2 04/11] net/smc: first part of add link processing as SMC server

2020-05-03 Thread Karsten Graul
First set of functions to process an ADD_LINK LLC request as an SMC server. Find an alternate IB device, determine the new link group type and get the index for the new link. Then initialize the link and send the ADD_LINK LLC message to the peer. Save the contents of the response, ready the link, m

[PATCH net-next v2 05/11] net/smc: rkey processing for a new link as SMC server

2020-05-03 Thread Karsten Graul
Part of SMC server new link establishment is the exchange of rkeys for used buffers. Loop over all used RMB buffers and send ADD_LINK_CONTINUE LLC messages to the peer. Signed-off-by: Karsten Graul Reviewed-by: Ursula Braun --- net/smc/smc_llc.c | 43 ++-

[PATCH net-next v2 09/11] net/smc: delete link processing as SMC client

2020-05-03 Thread Karsten Graul
Add smc_llc_process_cli_delete_link() to process a DELETE_LINK request as SMC client. When the request is to delete ALL links then terminate the whole link group. If not, find the link to delete by its link_id, send the DELETE_LINK response LLC message and then clear the deleted link. Finally deter

[PATCH net-next v2 06/11] net/smc: final part of add link processing as SMC server

2020-05-03 Thread Karsten Graul
This patch finalizes the ADD_LINK processing of new links. Send the CONFIRM_LINK request to the peer, receive the response and set link state to ACTIVE. Signed-off-by: Karsten Graul Reviewed-by: Ursula Braun --- net/smc/smc_llc.c | 29 - 1 file changed, 28 insertions

[PATCH net v3] net: macb: fix an issue about leak related system resources

2020-05-03 Thread Dejin Zheng
A call of the function macb_init() can fail in the function fu540_c000_init. The related system resources were not released then. use devm_platform_ioremap_resource() to replace ioremap() to fix it. Fixes: c218ad559020ff9 ("macb: Add support for SiFive FU540-C000") Cc: Andy Shevchenko Reviewed-by

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-03 Thread Jamal Hadi Salim
On 2020-05-02 10:28 p.m., Cong Wang wrote: On Sat, May 2, 2020 at 2:19 AM Jamal Hadi Salim wrote: On 2020-05-02 4:48 a.m., Jamal Hadi Salim wrote: [..] Note: tc filter show dev dummy0 root should not show that filter. OTOH, tc filter show dev dummy0 parent : should. Hmm, but we use TC

Re: [PATCH] nfp: abm: fix a memory leak bug

2020-05-03 Thread Markus Elfring
… > Fix this issue by adding nfp_nsp_close(nsp) in the error path. How do you think about a wording variant like the following? Subject: [PATCH v2] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac() Change description: … Thus add a call of the function

RE: [PATCH V2 net-next 09/13] net: ena: implement ena_com_get_admin_polling_mode()

2020-05-03 Thread Jubran, Samih
> -Original Message- > From: Jakub Kicinski > Sent: Tuesday, April 28, 2020 10:05 PM > To: Jubran, Samih > Cc: da...@davemloft.net; netdev@vger.kernel.org; Kiyanovski, Arthur > ; Woodhouse, David ; > Machulsky, Zorik ; Matushevsky, Alexander > ; Bshara, Saeed ; Wilson, > Matt ; Liguori

RE: [PATCH V2 net-next 11/13] net: ena: move llq configuration from ena_probe to ena_device_init()

2020-05-03 Thread Jubran, Samih
> -Original Message- > From: Jakub Kicinski > Sent: Tuesday, April 28, 2020 10:46 PM > To: Jubran, Samih > Cc: da...@davemloft.net; netdev@vger.kernel.org; Kiyanovski, Arthur > ; Woodhouse, David ; > Machulsky, Zorik ; Matushevsky, Alexander > ; Bshara, Saeed ; Wilson, > Matt ; Liguori

[PATCH V3 net-next 11/12] net: ena: cosmetic: remove unnecessary spaces and tabs in ena_com.h macros

2020-05-03 Thread sameehj
From: Sameeh Jubran The macros in ena_com.h have inconsistent spaces between the macro name and it's value. This commit sets all the macros to have a single space between the name and value. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena

[PATCH V3 net-next 03/12] net: ena: allow setting the hash function without changing the key

2020-05-03 Thread sameehj
From: Sameeh Jubran Current code does not allow setting the hash function without changing the key. This commit enables it. To achieve this we separate ena_com_get_hash_function() to 2 functions: ena_com_get_hash_function() - which gets only the hash function, and ena_com_get_hash_key() - which

[PATCH V3 net-next 07/12] net: ena: add unmask interrupts statistics to ethtool

2020-05-03 Thread sameehj
From: Sameeh Jubran Add unmask interrupts statistics to ethtool. Signed-off-by: Netanel Belgazal Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +++ drivers/net/ethernet/

[PATCH V3 net-next 01/12] net: ena: avoid unnecessary admin command when RSS function set fails

2020-05-03 Thread sameehj
From: Arthur Kiyanovski Currently when ena_set_hash_function() fails the hash function is restored to the previous value by calling an admin command to get the hash function from the device. In this commit we avoid the admin command, by saving the previous hash function before calling ena_set_ha

[PATCH V3 net-next 12/12] net: ena: cosmetic: extract code to ena_indirection_table_set()

2020-05-03 Thread sameehj
From: Arthur Kiyanovski Extract code to ena_indirection_table_set() to make the code cleaner. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 48 --- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git

[PATCH V3 net-next 06/12] net: ena: remove code that does nothing

2020-05-03 Thread sameehj
From: Sameeh Jubran Both key and func parameters are pointers on the stack. Setting them to NULL does nothing. The original intent was to leave the key and func unset in this case, but for this to happen nothing needs to be done as the calling function ethtool_get_rxfh() already clears key and fu

[PATCH V3 net-next 00/12] Enhance current features in ena driver

2020-05-03 Thread sameehj
From: Sameeh Jubran Difference from v2: * dropped patch "net: ena: move llq configuration from ena_probe to ena_device_init()" * reworked patch ""net: ena: implement ena_com_get_admin_polling_mode() to drop the prototype Difference from v1: * reodered paches #01 and #02. * dropped adding Rx/

[PATCH V3 net-next 05/12] net: ena: changes to RSS hash key allocation

2020-05-03 Thread sameehj
From: Sameeh Jubran This commit contains 2 cosmetic changes: 1. Use ena_com_check_supported_feature_id() in ena_com_hash_key_fill_default_key() instead of rewriting its implementation. This also saves us a superfluous admin command by using the cached value. 2. Change if conditions in

  1   2   >