Re: [PATCH rdma-next v3 0/3] ODP support for mlx5 DC QPs

2019-08-28 Thread Leon Romanovsky
On Tue, Aug 27, 2019 at 12:51:40PM -0300, Jason Gunthorpe wrote: > On Mon, Aug 19, 2019 at 03:08:12PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog > > v3: > > * Rewrote patches to expose through DEVX without need to change mlx5-abi.h > > at all. > > v2: > > https:

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

2019-08-28 Thread Jiri Pirko
Tue, Aug 27, 2019 at 05:14:49PM CEST, ro...@cumulusnetworks.com wrote: >On Tue, Aug 27, 2019 at 2:35 AM Jiri Pirko wrote: >> >> Tue, Aug 27, 2019 at 10:22:42AM CEST, da...@davemloft.net wrote: >> >From: Jiri Pirko >> >Date: Tue, 27 Aug 2019 09:08:08 +0200 >> > >> >> Okay, so if I understand corre

Re: [PATCH bpf-next] bpf, capabilities: introduce CAP_BPF

2019-08-28 Thread Peter Zijlstra
On Tue, Aug 27, 2019 at 04:01:08PM -0700, Andy Lutomirski wrote: > > Tracing: > > > > CAP_BPF and perf_paranoid_tracepoint_raw() (which is > > kernel.perf_event_paranoid == -1) > > are necessary to: That's not tracing, that's perf. > > +bool cap_bpf_tracing(void) > > +{ > > + return capab

[RFCv2 bpf-next 01/12] flow_dissector: Extract attach/detach/query helpers

2019-08-28 Thread Jakub Sitnicki
Move generic parts of callbacks for querying, attaching, and detaching a single BPF program for reuse by other BPF program types. Subsequent patch makes use of the extracted routines. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- include/linux/bpf.h | 8 + net/core/fil

[RFCv2 bpf-next 02/12] bpf: Introduce inet_lookup program type for redirecting socket lookup

2019-08-28 Thread Jakub Sitnicki
Add a new program type for redirecting the listening/bound socket lookup from BPF. The program attaches to a network namespace. It is allowed to select a socket from a SOCKARRAY, which will be used as a result of socket lookup. This provides a mechanism for programming the mapping between local (a

[RFCv2 bpf-next 09/12] udp6: Run inet_lookup bpf program on socket lookup

2019-08-28 Thread Jakub Sitnicki
Same as for udp, split the socket lookup into two phases and let the BPF inet_lookup program select the receiving socket. Suggested-by: Marek Majkowski Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- net/ipv6/udp.c | 42 ++ 1 file changed, 30

[RFCv2 bpf-next 08/12] udp: Run inet_lookup bpf program on socket lookup

2019-08-28 Thread Jakub Sitnicki
Following the TCP socket lookup changes, allow selecting the receiving socket from BPF before searching for bound socket by destination address and port. As connected and bound but non-connected socket lookup currently happens in one step, we split the lookup in two phases to run BPF only after a

[RFCv2 bpf-next 00/12] Programming socket lookup with BPF

2019-08-28 Thread Jakub Sitnicki
This patch set adds a mechanism for programming mappings between the local addresses and listening/receiving sockets with BPF. It introduces a new per-netns BPF program type, called inet_lookup, which runs during the socket lookup. The program is allowed to select a listening/receiving socket from

[RFCv2 bpf-next 05/12] udp: Store layer 4 protocol in udp_table

2019-08-28 Thread Jakub Sitnicki
Because UDP and UDP-Lite share code we have to pass the L4 protocol identifier alongside the socket table to down call sites where distinguishing between the two is needed. There is currently only one such call site, which by itself is not reason enough for the change. However, subsequent patches

[RFCv2 bpf-next 12/12] bpf: Test redirecting listening/receiving socket lookup

2019-08-28 Thread Jakub Sitnicki
Check that steering the packets targeted at a local (address, port) that is different than the server's bind() address with a BPF inet_lookup program works as expected for TCP or UDP over either IPv4 or IPv6. Make sure that it is possible to redirect IPv4 packets to IPv6 sockets that are not V6-onl

[RFCv2 bpf-next 03/12] bpf: Add verifier tests for inet_lookup context access

2019-08-28 Thread Jakub Sitnicki
Exercise verifier access checks for bpf_inet_lookup context object fields. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- .../selftests/bpf/verifier/ctx_inet_lookup.c | 696 ++ 1 file changed, 696 insertions(+) create mode 100644 tools/testing/selftests/bpf/verifi

[RFCv2 bpf-next 07/12] inet6: Run inet_lookup bpf program on socket lookup

2019-08-28 Thread Jakub Sitnicki
Following the ipv4 changes, run a BPF program attached to netns in context of which we're doing the socket lookup so that it can redirect the skb to a socket of its choice. The program runs before the listening socket lookup. Suggested-by: Marek Majkowski Reviewed-by: Lorenz Bauer Signed-off-by:

[RFCv2 bpf-next 10/12] bpf: Sync linux/bpf.h to tools/

2019-08-28 Thread Jakub Sitnicki
Newly added program, context type and helper is used by tests in a subsequent patch. Synchronize the header file. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- tools/include/uapi/linux/bpf.h | 58 +- 1 file changed, 57 insertions(+), 1 deletion(-)

[RFCv2 bpf-next 06/12] inet: Run inet_lookup bpf program on socket lookup

2019-08-28 Thread Jakub Sitnicki
Run a BPF program before looking up the listening socket. The program can redirect the skb to a listening socket of its choice, providing it calls bpf_redirect_lookup() helper and returns BPF_REDIRECT. This lets the user-space program mappings between packet 4-tuple and listening sockets. With the

[RFCv2 bpf-next 11/12] libbpf: Add support for inet_lookup program type

2019-08-28 Thread Jakub Sitnicki
Make libbpf aware of the newly added program type. Reserve a section name for it. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- tools/lib/bpf/libbpf.c| 4 tools/lib/bpf/libbpf.h| 2 ++ tools/lib/bpf/libbpf.map | 2 ++ tools/lib/bpf/libbpf_probes.c | 1 +

[RFCv2 bpf-next 04/12] inet: Store layer 4 protocol in inet_hashinfo

2019-08-28 Thread Jakub Sitnicki
Make it possible to identify the protocol of the sockets stored in hashinfo without looking up one. Subsequent patches make use the new field at the socket lookup time to enforce that the BPF program selects only sockets with matching protocol. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitn

RE: [PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support

2019-08-28 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: Andrew Lunn > Sent: Wednesday, August 28, 2019 2:22 AM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; da...@davemloft.net; Ioana Ciornei > > Subject: Re: [PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support > > On Tue, Aug 27, 2019 at 05:15

Re: [PATCH net-next v4 3/3] dt-bindings: net: ethernet: Update mt7622 docs and dts to reflect the new phylink API

2019-08-28 Thread Matthias Brugger
Hi David, On 25/08/2019 19:43, René van Dorst wrote: > This patch the removes the recently added mediatek,physpeed property. > Use the fixed-link property speed = <2500> to set the phy in 2.5Gbit. > See mt7622-bananapi-bpi-r64.dts for a working example. > > Signed-off-by: René van Dorst > -- > v

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

2019-08-28 Thread Jiri Pirko
Tue, Aug 06, 2019 at 09:15:17PM CEST, dsah...@kernel.org wrote: >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 behavior. David, please help me understand. If the counters are per-d

Re: [PATCH bpf-next] bpf, capabilities: introduce CAP_BPF

2019-08-28 Thread kbuild test robot
Hi Alexei, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Alexei-Starovoitov/bpf-capabilities-introduce-CAP_BPF/20190828-142441 base: https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf

multipath tcp MIB counter placement - share with tcp or extra?

2019-08-28 Thread Florian Westphal
Hi Eric, The out-of-tree multipath TCP stack adds a few MIB counters to track (and debug) MTPCP behaviour. Examples: SNMP_MIB_ITEM("MPCapableSYNRX", MPTCP_MIB_MPCAPABLEPASSIVE), SNMP_MIB_ITEM("MPCapableSYNTX", MPTCP_MIB_MPCAPABLEACTIVE), [..] SNMP_MIB_ITEM("MPTCPRetrans",

Re: [PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support

2019-08-28 Thread Andrew Lunn
> Clearing the ASYM_PAUSE flag only means we tell the firmware we want > both Rx and Tx pause to be enabled in the beginning. User can still set > an asymmetric config (i.e. only Rx pause or only Tx pause to be enabled) > if needed. > > The truth table is like this: > > PAUSE | ASYM_PAUSE | Rx pa

Re: [PATCH net-next v3 05/10] net: sched: add API for registering unlocked offload block callbacks

2019-08-28 Thread tanhuazhong
On 2019/8/26 21:45, Vlad Buslov wrote: Extend struct flow_block_offload with "unlocked_driver_cb" flag to allow registering and unregistering block hardware offload callbacks that do not require caller to hold rtnl lock. Extend tcf_block with additional lockeddevcnt counter that is incremented

Re: multipath tcp MIB counter placement - share with tcp or extra?

2019-08-28 Thread Eric Dumazet
On 8/28/19 1:43 PM, Florian Westphal wrote: > Hi Eric, > > The out-of-tree multipath TCP stack adds a few MIB counters to track > (and debug) MTPCP behaviour. Examples: > > SNMP_MIB_ITEM("MPCapableSYNRX", MPTCP_MIB_MPCAPABLEPASSIVE), > SNMP_MIB_ITEM("MPCapableSYNTX", MPTCP_MIB

Re: multipath tcp MIB counter placement - share with tcp or extra?

2019-08-28 Thread Florian Westphal
Eric Dumazet wrote: > > Let me know -- I can go with a separate MIB, its no problem, I just want > > to avoid going down the wrong path. > > There are about 40 counters. > > Space for that will be per netns : num_possible_cpus * 40 * 8 bytes > > The cost of folding all the values will make nst

Re: [PATCH REPOST 1/2] can: flexcan: fix deadlock when using self wakeup

2019-08-28 Thread Sean Nyekjaer
On 20/08/2019 13.55, Sean Nyekjaer wrote: I have added some more debug, same test setup: https://gist.github.com/sknsean/81208714de23aa3639d3e31dccb2f3e0 root@iwg26:~# systemctl suspend ... https://gist.github.com/sknsean/2a786f1543305056d4de03d387872403 /Sean Any luck reproducing this?

RE: [PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support

2019-08-28 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: Andrew Lunn > Sent: Wednesday, August 28, 2019 2:53 PM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; da...@davemloft.net; Ioana Ciornei > > Subject: Re: [PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support > > > Clearing the ASYM_PAUSE fla

[PATCH net-next v3 2/3] dpaa2-eth: Use stored link settings

2019-08-28 Thread Ioana Radulescu
Whenever a link state change occurs, we get notified and save the new link settings in the device's private data. In ethtool get_link_ksettings, use the stored state instead of interrogating the firmware each time. Signed-off-by: Ioana Radulescu Reviewed-by: Andrew Lunn --- v2: split from main p

[PATCH net-next v3 1/3] dpaa2-eth: Remove support for changing link settings

2019-08-28 Thread Ioana Radulescu
We only support fixed-link for now, so there is no point in offering users the option to change link settings via ethtool. Functionally there is no change, since firmware prevents us from changing link parameters anyway. Signed-off-by: Ioana Radulescu Reviewed-by: Andrew Lunn --- v2: new patch

[PATCH net-next v3 3/3] dpaa2-eth: Add pause frame support

2019-08-28 Thread Ioana Radulescu
Starting with firmware version MC10.18.0, we have support for L2 flow control. Asymmetrical configuration (Rx or Tx only) is supported, but not pause frame autonegotioation. Pause frame configuration is done via ethtool. By default, we start with flow control enabled on both Rx and Tx. Changes are

Re: [PATCH net-next v3 05/10] net: sched: add API for registering unlocked offload block callbacks

2019-08-28 Thread Vlad Buslov
On Wed 28 Aug 2019 at 14:53, tanhuazhong wrote: > On 2019/8/26 21:45, Vlad Buslov wrote: >> Extend struct flow_block_offload with "unlocked_driver_cb" flag to allow >> registering and unregistering block hardware offload callbacks that do not >> require caller to hold rtnl lock. Extend tcf_block w

[PATCH net 0/3] Fix issues in tc-taprio and tc-cbs

2019-08-28 Thread Vladimir Oltean
This series fixes one panic and one WARN_ON found in the tc-taprio qdisc, while trying to apply it: - On an interface which is not multi-queue - On an interface which has no carrier The tc-cbs was also visually found to suffer of the same issue as tc-taprio, and the fix was only compile-tested in

[PATCH net 3/3] net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate

2019-08-28 Thread Vladimir Oltean
The discussion to be made is absolutely the same as in the case of previous patch ("taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte"). Nothing is lost when setting a default. Cc: Leandro Dorileo Fixes: e0a7683d30e9 ("net/sched: cbs: fix port_rate miscalculation") Signed-off

[PATCH net 2/3] taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte

2019-08-28 Thread Vladimir Oltean
The taprio budget needs to be adapted at runtime according to interface link speed. But that handling is problematic. For one thing, installing a qdisc on an interface that doesn't have carrier is not illegal. But taprio prints the following stack trace: [ 31.851373] [ cut here ]---

[PATCH net 1/3] taprio: Fix kernel panic in taprio_destroy

2019-08-28 Thread Vladimir Oltean
taprio_init may fail earlier than this line: list_add(&q->taprio_list, &taprio_list); i.e. due to the net device not being multi queue. Attempting to remove q from the global taprio_list when it is not part of it will result in a kernel panic. Fix it by iterating through the list and re

[RFC PATCH 0/1] Fix PHYLINK handling of ethtool ksettings with no PHY

2019-08-28 Thread Vladimir Oltean
Logically speaking, this patch pertains to the "Fix issues in tc-taprio and tc-cbs" series at: https://patchwork.ozlabs.org/project/netdev/list/?series=127821&state=* The reason why I did not submit this patch together with those is that I don't know whether the error condition can happen in curre

[RFC PATCH 1/1] phylink: Set speed to SPEED_UNKNOWN when there is no PHY connected

2019-08-28 Thread Vladimir Oltean
phylink_ethtool_ksettings_get can be called while the interface may not even be up, which should not be a problem. But there are drivers (e.g. gianfar) which connect to the PHY in .ndo_open and disconnect in .ndo_close. While odd, to my knowledge this is again not illegal and there may be more that

Re: [PATCH rdma-next v3 0/3] ODP support for mlx5 DC QPs

2019-08-28 Thread Jason Gunthorpe
On Wed, Aug 28, 2019 at 10:06:20AM +0300, Leon Romanovsky wrote: > On Tue, Aug 27, 2019 at 12:51:40PM -0300, Jason Gunthorpe wrote: > > On Mon, Aug 19, 2019 at 03:08:12PM +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > Changelog > > > v3: > > > * Rewrote patches to expose t

Re: [RFC PATCH 1/2] gianfar: convert to phylink

2019-08-28 Thread Vladimir Oltean
Hi Arseny, On Sat, 24 Aug 2019 at 18:21, Vladimir Oltean wrote: > > Hi Arseny. > > On Tue, 30 Jul 2019 at 17:40, Arseny Solokha wrote: > > > > > Hi Arseny, > > > > > > Nice project! > > > > Vladimir, Russell, thanks for your review. I'm on vacation now, so won't > > fully > > address your comme

[PATCH net-next 1/4] mlxsw: Remove 56G speed support

2019-08-28 Thread Ido Schimmel
From: Amit Cohen Commit 275e928f1911 ("mlxsw: spectrum: Prevent force of 56G") prevented the driver from setting a speed of 56G when auto-negotiation is off. This is the only speed supported by mlxsw that cannot be set when auto-negotiation is off, which makes it difficult to write generic tests.

[PATCH net-next 0/4] mlxsw: Various updates

2019-08-28 Thread Ido Schimmel
From: Ido Schimmel Patch #1 from Amit removes 56G speed support. The reasons for this are detailed in the commit message. Patch #2 from Shalom ensures that the hardware does not auto negotiate the number of used lanes. For example, if a four lane port supports 100G over both two and four lanes,

[PATCH net-next 4/4] mlxsw: spectrum_ptp: Add counters for GC events

2019-08-28 Thread Ido Schimmel
From: Petr Machata On Spectrum-1, timestamped PTP packets and the corresponding timestamps need to be kept in caches until both are available, at which point they are matched up and packets forwarded as appropriate. However, not all packets will ever see their timestamp, and not all timestamps wi

[PATCH net-next 3/4] mlxsw: Bump firmware version to 13.2000.1886

2019-08-28 Thread Ido Schimmel
From: Ido Schimmel The new version supports extended error reporting from firmware via a new TLV in the EMAD packet. Similar to netlink extended ack. It also fixes an issue in the PCI code that can result in false AER errors under high Tx rate. Signed-off-by: Ido Schimmel --- drivers/net/ethe

[PATCH net-next 2/4] mlxsw: spectrum: Prevent auto negotiation on number of lanes

2019-08-28 Thread Ido Schimmel
From: Shalom Toledo After 50G-1-lane and 100G-2-lanes link modes were introduced, the driver is facing situations in which the hardware auto negotiates not only on speed and type, but also on number of lanes. Prevent auto negotiation on number of lanes by allowing only port speeds that can be su

RE: [Intel-wired-lan] [PATCH] i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask

2019-08-28 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Stefan Assmann > Sent: Wednesday, August 21, 2019 7:09 AM > To: intel-wired-...@lists.osuosl.org > Cc: netdev@vger.kernel.org; da...@davemloft.net; sassm...@kpanic.de > Subject: [Intel-wi

[PATCH net-next] net: dsa: mv88e6xxx: get serdes lane after lock

2019-08-28 Thread Vivien Didelot
This is a follow-up patch for commit 17deaf5cb37a ("net: dsa: mv88e6xxx: create serdes_get_lane chip operation"). The .serdes_get_lane implementations access the CMODE of a port, even though it is cached at the moment, it is safer to call them after the mutex is locked, not before. At the same ti

[PATCH net-next] net: dsa: mv88e6xxx: keep CMODE writable code private

2019-08-28 Thread Vivien Didelot
This is a follow-up patch for commit 7a3007d22e8d ("net: dsa: mv88e6xxx: fully support SERDES on Topaz family"). Since .port_set_cmode is only called from mv88e6xxx_port_setup_mac and mv88e6xxx_phylink_mac_config, it is fine to keep this "make writable" code private to the mv88e6341_port_set_cmode

Re: [PATCH net 1/3] taprio: Fix kernel panic in taprio_destroy

2019-08-28 Thread Vinicius Costa Gomes
Hi, Vladimir Oltean writes: > taprio_init may fail earlier than this line: > > list_add(&q->taprio_list, &taprio_list); > > i.e. due to the net device not being multi queue. Good catch. > > Attempting to remove q from the global taprio_list when it is not part > of it will result in a ke

[PATCH net-next 0/2] Fixes for unlocked cls hardware offload API refactoring

2019-08-28 Thread Vlad Buslov
Two fixes for my "Refactor cls hardware offload API to support rtnl-independent drivers" series. Vlad Buslov (2): net: sched: cls_matchall: cleanup flow_action before deallocating net/mlx5e: Move local var definition into ifdef block drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6

[PATCH net-next 2/2] net/mlx5e: Move local var definition into ifdef block

2019-08-28 Thread Vlad Buslov
New local variable "struct flow_block_offload *f" was added to mlx5e_setup_tc() in recent rtnl lock removal patches. The variable is used in code that is only compiled when CONFIG_MLX5_ESWITCH is enabled. This results compilation warning about unused variable when CONFIG_MLX5_ESWITCH is not set. Mo

[PATCH net-next 1/2] net: sched: cls_matchall: cleanup flow_action before deallocating

2019-08-28 Thread Vlad Buslov
Recent rtnl lock removal patch changed flow_action infra to require proper cleanup besides simple memory deallocation. However, matchall classifier was not updated to call tc_cleanup_flow_action(). Add proper cleanup to mall_replace_hw_filter() and mall_reoffload(). Fixes: 5a6ff4b13d59 ("net: sche

Re: [PATCH net 2/3] taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte

2019-08-28 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > The taprio budget needs to be adapted at runtime according to interface > link speed. But that handling is problematic. > > For one thing, installing a qdisc on an interface that doesn't have > carrier is not illegal. But taprio prints the following stack trace: > > [

Re: [PATCH net 3/3] net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate

2019-08-28 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > The discussion to be made is absolutely the same as in the case of > previous patch ("taprio: Set default link speed to 10 Mbps in > taprio_set_picos_per_byte"). Nothing is lost when setting a default. > > Cc: Leandro Dorileo > Fixes: e0a7683d30e9 ("net/sched: cbs: fix

Re: [PATCH net-next] net: dsa: mv88e6xxx: keep CMODE writable code private

2019-08-28 Thread Marek Behún
On Wed, 28 Aug 2019 12:26:59 -0400 Vivien Didelot wrote: > This is a follow-up patch for commit 7a3007d22e8d ("net: dsa: > mv88e6xxx: fully support SERDES on Topaz family"). > > Since .port_set_cmode is only called from mv88e6xxx_port_setup_mac and > mv88e6xxx_phylink_mac_config, it is fine to k

Re: [PATCH net-next] net: dsa: mv88e6xxx: get serdes lane after lock

2019-08-28 Thread Marek Behún
On Wed, 28 Aug 2019 12:26:11 -0400 Vivien Didelot wrote: > This is a follow-up patch for commit 17deaf5cb37a ("net: dsa: > mv88e6xxx: create serdes_get_lane chip operation"). > > The .serdes_get_lane implementations access the CMODE of a port, > even though it is cached at the moment, it is safe

Re: [PATCH net-next] net: dsa: mv88e6xxx: get serdes lane after lock

2019-08-28 Thread Andrew Lunn
On Wed, Aug 28, 2019 at 12:26:11PM -0400, Vivien Didelot wrote: > This is a follow-up patch for commit 17deaf5cb37a ("net: dsa: > mv88e6xxx: create serdes_get_lane chip operation"). > > The .serdes_get_lane implementations access the CMODE of a port, > even though it is cached at the moment, it is

Re: [PATCH net 1/3] taprio: Fix kernel panic in taprio_destroy

2019-08-28 Thread Vladimir Oltean
Hi Vinicius, On Wed, 28 Aug 2019 at 19:31, Vinicius Costa Gomes wrote: > > Hi, > > Vladimir Oltean writes: > > > taprio_init may fail earlier than this line: > > > > list_add(&q->taprio_list, &taprio_list); > > > > i.e. due to the net device not being multi queue. > > Good catch. > > > > >

Re: [PATCH net-next] net: dsa: mv88e6xxx: keep CMODE writable code private

2019-08-28 Thread Andrew Lunn
On Wed, Aug 28, 2019 at 12:26:59PM -0400, Vivien Didelot wrote: > This is a follow-up patch for commit 7a3007d22e8d ("net: dsa: > mv88e6xxx: fully support SERDES on Topaz family"). > > Since .port_set_cmode is only called from mv88e6xxx_port_setup_mac and > mv88e6xxx_phylink_mac_config, it is fine

Re: [RFC PATCH 1/1] phylink: Set speed to SPEED_UNKNOWN when there is no PHY connected

2019-08-28 Thread Russell King - ARM Linux admin
On Wed, Aug 28, 2019 at 05:58:02PM +0300, Vladimir Oltean wrote: > phylink_ethtool_ksettings_get can be called while the interface may not > even be up, which should not be a problem. But there are drivers (e.g. > gianfar) which connect to the PHY in .ndo_open and disconnect in > .ndo_close. While

[PATCH net v1] net/sched: cbs: Fix not adding cbs instance to list

2019-08-28 Thread Vinicius Costa Gomes
When removing a cbs instance when offloading is enabled, the crash below can be observed. Also, the current code doesn't handle correctly the case when offload is disabled without removing the qdisc: if the link speed changes the credit calculations will be wrong. The solution for both issues is t

Re: [PATCH v2] riscv: add support for SECCOMP and SECCOMP_FILTER

2019-08-28 Thread Kees Cook
On Fri, Aug 23, 2019 at 05:30:53PM -0700, Paul Walmsley wrote: > On Thu, 22 Aug 2019, David Abdurachmanov wrote: > > > There is one failing kernel selftest: global.user_notification_signal > > Is this the only failing test? Or are the rest of the selftests skipped > when this test fails, and no

Re: [PATCH net 1/3] taprio: Fix kernel panic in taprio_destroy

2019-08-28 Thread Vinicius Costa Gomes
Vladimir Oltean writes: >> Personally, I would do things differently, I am thinking: adding the >> taprio instance earlier to the list in taprio_init(), and keeping >> taprio_destroy() the way it is now. But take this more as a suggestion >> :-) >> > > While I don't strongly oppose your proposal

[PATCH] igb: add rx drop enable attribute

2019-08-28 Thread Robert Beckett
To allow userland to enable or disable dropping packets when descriptor ring is exhausted, add an adapter rx_drop_en attribute. This can be used in conjunction with flow control to mitigate packet storms (e.g. due to network loop or DoS) by forcing the network adapter to send pause frames whenever

Re: [PATCH] igb: add rx drop enable attribute

2019-08-28 Thread Alexander Duyck
On Wed, Aug 28, 2019 at 10:40 AM Robert Beckett wrote: > > To allow userland to enable or disable dropping packets when descriptor > ring is exhausted, add an adapter rx_drop_en attribute. > > This can be used in conjunction with flow control to mitigate packet storms > (e.g. due to network loop o

[PATCH net-next] net: dsa: mv88e6xxx: fix freeing unused SERDES IRQ

2019-08-28 Thread Vivien Didelot
Now mv88e6xxx does not enable its ports at setup itself and let the DSA core handle this, unused ports are disabled without being powered on first. While that is expected, the SERDES powering code was assuming that a port was already set up before powering it down, resulting in freeing an unused IR

[net-next v2 1/8] net/mlx5e: ethtool, Fix a typo in WOL function names

2019-08-28 Thread Saeed Mahameed
From: Erez Alfasi Fix a typo in 'mlx5e_refomrat_wol_mode_mlx5_to_linux' and 'mlx5e_refomrat_wol_mode_linux_to_mlx5' function names: "refomrat" -> "reformat". Fixes: 928cfe8745a6 ("net/mlx5e: Wake On LAN support") Signed-off-by: Erez Alfasi Signed-off-by: Saeed Mahameed --- drivers/net/etherne

[net-next v2 2/8] net/mlx5e: Expose new function for TIS destroy loop

2019-08-28 Thread Saeed Mahameed
From: Tariq Toukan For better modularity and code sharing. Function internal change to be introduced in the next patches. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c |

[net-next v2 5/8] net/mlx5e: Change function's position to a more fitting file

2019-08-28 Thread Saeed Mahameed
From: Aya Levin Move function which indicates whether tunnel inner flow table is supported from en.h to en_fs.c. It fits better right after tunnel protocol rules definitions. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/ml

[net-next v2 6/8] net/mlx5e: Support RSS for IP-in-IP and IPv6 tunneled packets

2019-08-28 Thread Saeed Mahameed
From: Aya Levin Add support for inner header RSS on IP-in-IP and IPv6 tunneled packets. Add rules to the steering table regarding outer IP header, with IPv4/6->IP-in-IP. Tunneled packets with protocol numbers: 0x4 (IP-in-IP) and 0x29 (IPv6) are RSS-ed on the inner IP header. Separate FW dependen

[pull request][net-next v2 0/8] Mellanox, mlx5 updates 2019-08-22

2019-08-28 Thread Saeed Mahameed
This series provides some misc updates to mlx5 driver. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts with a merge of mlx5-next branch, to resolve and avoid dependency with rdma tree. v2: - Change statistic

[net-next v2 3/8] net/mlx5e: Support LAG TX port affinity distribution

2019-08-28 Thread Saeed Mahameed
From: Maxim Mikityanskiy When the VF LAG is in use, round-robin the TX affinity of channels among the different ports, if supported by the firmware. Create a set of TISes per port, while doing round-robin of the channels over the different sets. Let all SQs of a channel share the same set of TISe

[net-next v2 4/8] net/mlx5e: Add device out of buffer counter

2019-08-28 Thread Saeed Mahameed
From: Moshe Shemesh Added the following packets drop counter: Device out of buffer - counts packets which were dropped due to full device internal receive queue. This counter will be shown on ethtool as a new counter called dev_out_of_buffer. The counter is read from FW by command QUERY_VNIC_ENV.

[net-next v2 8/8] net/mlx5e: Support TSO and TX checksum offloads for IP-in-IP tunnels

2019-08-28 Thread Saeed Mahameed
From: Marina Varshaver Add TX offloads support for IP-in-IP tunneled packets by reporting the needed netdev features. Signed-off-by: Marina Varshaver Signed-off-by: Avihu Hagag Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 ++

[net-next v2 7/8] net/mlx5e: Improve stateless offload capability check

2019-08-28 Thread Saeed Mahameed
From: Marina Varshaver Use generic function for checking tunnel stateless offload capability instead of separate macros. Signed-off-by: Marina Varshaver Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 3 +++ drivers/net/ethernet/me

Re: [bpf-next] bpf: fix error check in bpf_tcp_gen_syncookie

2019-08-28 Thread Song Liu
On Tue, Aug 27, 2019 at 4:46 PM Petar Penkov wrote: > > From: Petar Penkov > > If a SYN cookie is not issued by tcp_v#_gen_syncookie, then the return > value will be exactly 0, rather than <= 0. Let's change the check to > reflect that, especially since mss is an unsigned value and cannot be > ne

Re: [PATCH net-next v4 3/3] dt-bindings: net: ethernet: Update mt7622 docs and dts to reflect the new phylink API

2019-08-28 Thread David Miller
From: Matthias Brugger Date: Wed, 28 Aug 2019 11:29:45 +0200 > Thanks for taking this patch. For the next time, please make sure that dts[i] > patches are independent from the binding description, as dts[i] should go > through my tree. No problem for this round, just saying for the future. That'

Re: [PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support

2019-08-28 Thread David Miller
From: Andrew Lunn Date: Wed, 28 Aug 2019 13:52:50 +0200 >> Clearing the ASYM_PAUSE flag only means we tell the firmware we want >> both Rx and Tx pause to be enabled in the beginning. User can still set >> an asymmetric config (i.e. only Rx pause or only Tx pause to be enabled) >> if needed. >>

[PATCH net-next v2 0/9] r8169: add support for RTL8125

2019-08-28 Thread Heiner Kallweit
This series adds support for the 2.5Gbps chip RTl8125. It can be found on PCIe network cards, and on an increasing number of consumer gaming mainboards. Series is partially based on the r8125 vendor driver. Tested with a Delock 89531 PCIe card against a Netgear GS110MX Multi-Gig switch. Firmware is

Re: [RFC bpf-next 0/5] Convert iproute2 to use libbpf (WIP)

2019-08-28 Thread Andrii Nakryiko
On Fri, Aug 23, 2019 at 3:27 AM Jesper Dangaard Brouer wrote: > > On Wed, 21 Aug 2019 13:30:09 -0700 > Andrii Nakryiko wrote: > > > On Tue, Aug 20, 2019 at 4:47 AM Toke Høiland-Jørgensen > > wrote: > > > > > > iproute2 uses its own bpf loader to load eBPF programs, which has > > > evolved separ

[PATCH net-next v2 6/9] r8169: don't use bit LastFrag in tx descriptor after send

2019-08-28 Thread Heiner Kallweit
On RTL8125 this bit is always cleared after send. Therefore check for tx_skb->skb being set what is functionally equivalent. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realt

[PATCH net-next v2 8/9] r8169: add RTL8125 PHY initialization

2019-08-28 Thread Heiner Kallweit
This patch adds PHY initialization magic copied from the r8125 vendor driver. In addition it supports loading the firmware for chip version RTL_GIGA_MAC_VER_61. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 130 +- 1 file changed, 127 insertio

[PATCH net-next v2 1/9] r8169: change interrupt mask type to u32

2019-08-28 Thread Heiner Kallweit
RTL8125 uses a 32 bit interrupt mask even though only bits in the lower 16 bits are used. Change interrupt mask size to u32 to be prepared and reintroduce helper rtl_get_events. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 16 +++- 1 file changed, 11

[PATCH net-next v2 2/9] r8169: restrict rtl_is_8168evl_up to RTL8168 chip versions

2019-08-28 Thread Heiner Kallweit
Extend helper rtl_is_8168evl_up to properly work once we add mac version numbers >51 for RTL8125. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/driver

[PATCH net-next v2 5/9] r8169: read common register for PCI commit

2019-08-28 Thread Heiner Kallweit
RTL8125 uses a different register number for IntrMask. To net have side effects by reading a random register let's use a register that is the same on all supported chip families. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH net-next v2 9/9] r8169: add support for EEE on RTL8125

2019-08-28 Thread Heiner Kallweit
This adds EEE support for RTL8125 based on the vendor driver. Supported is EEE for 100Mbps and 1Gbps. Realtek recommended to not yet enable EEE for 2.5Gbps due to potential compatibility issues. Also ethtool doesn't support yet controlling EEE for 2.5Gbps and 5Gbps. Signed-off-by: Heiner Kallweit

[PATCH net-next v2 3/9] r8169: factor out reading MAC address from registers

2019-08-28 Thread Heiner Kallweit
For RTL8125 we will have to read the MAC address also from another register range, therefore create a small helper. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next v2 4/9] r8169: move disabling interrupt coalescing to RTL8169/RTL8168 init

2019-08-28 Thread Heiner Kallweit
RTL8125 doesn't support the same coalescing registers, therefore move this initialization to the 8168/6169-specific init. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH net-next v2 7/9] r8169: add support for RTL8125

2019-08-28 Thread Heiner Kallweit
This adds support for 2.5Gbps chip RTL8125, it's partially based on the r8125 vendor driver. Tested with a Delock 89531 PCIe card against a Netgear GS110MX Multi-Gig switch. Firmware isn't strictly needed, but on some systems there may be compatibility issues w/o firmware. Firmware has been submitt

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-28 Thread Carlos Antonio Neira Bustos
Yonghong, Thanks for the pointer, I fixed this bug, but I found another one that's triggered now the test program I included in tools/testing/selftests/bpf/test_pidns. It's seemed that fname was not correctly setup when passing it to filename_lookup. This is fixed now and I'm doing some more t

Re: [RFC bpf-next 0/5] Convert iproute2 to use libbpf (WIP)

2019-08-28 Thread Andrii Nakryiko
On Fri, Aug 23, 2019 at 4:29 AM Toke Høiland-Jørgensen wrote: > > [ ... snip ...] > > > E.g., today's API is essentially three steps: > > > > 1. open and parse ELF: collect relos, programs, map definitions > > 2. load: create maps from collected defs, do program/global data/CO-RE > > relocs, load

[PATCH 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-08-28 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each of them doesn't have any option to achieve this. The commit adds feature to specify destination address range with CIDR. -d : ($DEST_IP) des

[PATCH 1/3] samples: pktgen: make variable consistent with option

2019-08-28 Thread Daniel T. Lee
This commit changes variable names that can cause confusion. For example, variable DST_MIN is quite confusing since the keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. On the following commit, 'dst_min' will be used to set destination IP, and the existing variable name DST_MIN s

[PATCH 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-08-28 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee --- samples/pktgen/functions.sh | 134 +

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-28 Thread Yonghong Song
On 8/28/19 1:39 PM, Carlos Antonio Neira Bustos wrote: > Yonghong, > > Thanks for the pointer, I fixed this bug, but I found another one that's > triggered > now the test program I included in tools/testing/selftests/bpf/test_pidns. > It's seemed that fname was not correctly setup when passing

[PATCH bpf-next 01/10] bpf: introduce __MAX_BPF_PROG_TYPE and __MAX_BPF_MAP_TYPE enum values

2019-08-28 Thread Julia Kartseva
Similar to __MAX_BPF_ATTACH_TYPE identifying the number of elements in bpf_attach_type enum, add tailing enum values __MAX_BPF_PROG_TYPE and __MAX_BPF_MAP_TYPE to simplify e.g. iteration over enums values in the case when new values are added. Signed-off-by: Julia Kartseva --- include/uapi/linux

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-28 Thread Carlos Antonio Neira Bustos
Thanks, I'll work on the net/netif_receive_skb selftest using this helper. I hope I could complete this work this week. Bests. On Wed, Aug 28, 2019 at 08:53:25PM +, Yonghong Song wrote: > > > On 8/28/19 1:39 PM, Carlos Antonio Neira Bustos wrote: > > Yonghong, > > > > Thanks for the pointe

[PATCH bpf-next 07/10] selftests/bpf: extend test_section_names with type_(from|to)_str

2019-08-28 Thread Julia Kartseva
Test bpf enum stringification helpers: libbpf_(prog|map|attach)_type_(from|to)_str Signed-off-by: Julia Kartseva --- .../selftests/bpf/test_section_names.c| 149 +- 1 file changed, 147 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/test_section_na

[PATCH bpf-next 08/10] selftests/bpf: rename test_section_names to test_section_and_type_names

2019-08-28 Thread Julia Kartseva
Change the test name after extending it with enum stringification helpers. Signed-off-by: Julia Kartseva --- tools/testing/selftests/bpf/Makefile | 2 +- .../bpf/test_section_and_type_names.c | 378 ++ .../selftests/bpf/test_section_names.c| 378 ---

[PATCH bpf-next 10/10] tools/bpftool: use libbpf_attach_type_to_str helper

2019-08-28 Thread Julia Kartseva
Replace lookup in `attach_type_strings` with libbpf_attach_type_to_str helper for cgroup (cgroup.c) and non-cgroup (prog.c) attach types. Signed-off-by: Julia Kartseva --- tools/bpf/bpftool/cgroup.c | 60 +- tools/bpf/bpftool/prog.c | 20 +++-- 2 fil

[PATCH bpf-next 02/10] tools/bpf: sync bpf.h to tools/

2019-08-28 Thread Julia Kartseva
Introduce __MAX_BPF_MAP_TYPE and __MAX_BPF_MAP_TYPE enum values. Signed-off-by: Julia Kartseva --- tools/include/uapi/linux/bpf.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 5d2fb183ee2d..9b681bb82211 100644 ---

  1   2   >