[PATCH] rhashtable: Add rht_ptr_rcu and improve rht_ptr

2019-05-28 Thread Herbert Xu
This patch moves common code between rht_ptr and rht_ptr_exclusive into __rht_ptr. It also adds a new helper rht_ptr_rcu exclusively for the RCU case. This way rht_ptr becomes a lock-only construct so we can use the lighter rcu_dereference_protected primitive. Signed-off-by: Herbert Xu --- i

Re: [PATCH net v2] af_key: fix leaks in key_pol_get_resp and dump_sp.

2019-05-28 Thread Steffen Klassert
On Sat, May 25, 2019 at 07:09:35PM +0100, Jeremy Sowden wrote: > In both functions, if pfkey_xfrm_policy2msg failed we leaked the newly > allocated sk_buff. Free it on error. > > Fixes: 55569ce256ce ("Fix conversion between IPSEC_MODE_xxx and > XFRM_MODE_xxx.") > Reported-by: syzbot+4f0529365f7f

use of uninitialized value in mv88e6185_port_link_state

2019-05-28 Thread Rasmus Villemoes
Hi, mv88e6185_port_link_state starts by inspecting state->interface. AFAICT, it can be called from two places: mv88e6xxx_link_state <- dsa_slave_phylink_mac_link_state <- phylink_get_mac_state which does initialize state->interface before passing it, but also from mv88e6xxx_port_setup_mac, which

Re: [PATCH bpf-next] bpftool: auto-complete BTF IDs for btf dump

2019-05-28 Thread Quentin Monnet
2019-05-25 17:01 UTC-0700 ~ Andrii Nakryiko > Auto-complete BTF IDs for `btf dump id` sub-command. List of possible BTF > IDs is scavenged from loaded BPF programs that have associated BTFs, as > there is currently no API in libbpf to fetch list of all BTFs in the > system. > > Suggested-by: Quen

Re: [patch net-next 0/7] expose flash update status to user

2019-05-28 Thread Jiri Pirko
Mon, May 27, 2019 at 08:14:32PM CEST, f.faine...@gmail.com wrote: > > >On 5/23/2019 2:45 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> When user is flashing device using devlink, he currenly does not see any >> information about what is going on, percentages, etc. >> Drivers, for example mlxsw

samples/bpf compilation failures - 5.2.0

2019-05-28 Thread Srinivas Ramana
Hello, I am trying to build samples/bpf in kernel(5.2.0-rc1) but unsuccessful with below errors. Can you help to point what i am missing or if there is some known issue? ==8<=== $ make samples/bpf/ LLC=/local/mnt/workspace/tools/cla

Re: [PATCH net-next] team: add ethtool get_link_ksettings

2019-05-28 Thread Jiri Pirko
Mon, May 27, 2019 at 05:31:10AM CEST, liuhang...@gmail.com wrote: >Like bond, add ethtool get_link_ksettings to show the total speed. > >Signed-off-by: Hangbin Liu >--- > drivers/net/team/team.c | 25 + > 1 file changed, 25 insertions(+) > >diff --git a/drivers/net/team/team

Re: [PATCH bpf-next] bpftool: auto-complete BTF IDs for btf dump

2019-05-28 Thread Daniel Borkmann
On 05/26/2019 02:01 AM, Andrii Nakryiko wrote: > Auto-complete BTF IDs for `btf dump id` sub-command. List of possible BTF > IDs is scavenged from loaded BPF programs that have associated BTFs, as > there is currently no API in libbpf to fetch list of all BTFs in the > system. > > Suggested-by: Qu

Re: [PATCH bpf-next] bpf: check signal validity in nmi for bpf_send_signal() helper

2019-05-28 Thread Daniel Borkmann
On 05/25/2019 08:57 PM, Yonghong Song wrote: > Commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") > introduced bpf_send_signal() helper. If the context is nmi, > the sending signal work needs to be deferred to irq_work. > If the signal is invalid, the error will appear in irq_work > an

Re: [PATCH] [PATCH bpf] style fix in while(!feof()) loop

2019-05-28 Thread Daniel Borkmann
On 05/26/2019 12:32 PM, Chang-Hsien Tsai wrote: > use fgets() as the while loop condition. > > Signed-off-by: Chang-Hsien Tsai Applied, thanks!

Re: [PATCH bpf-next v3 0/3] tools: bpftool: add an option for debug output from libbpf and verifier

2019-05-28 Thread Daniel Borkmann
On 05/24/2019 12:36 PM, Quentin Monnet wrote: > Hi, > This series adds an option to bpftool to make it print additional > information via libbpf and the kernel verifier when attempting to load > programs. > > A new API function is added to libbpf in order to pass the log_level from > bpftool with

Re: [PATCH bpf-next] selftests/bpf: fail test_tunnel.sh if subtests fail

2019-05-28 Thread Daniel Borkmann
On 05/25/2019 12:28 AM, Stanislav Fomichev wrote: > Right now test_tunnel.sh always exits with success even if some > of the subtests fail. Since the output is very verbose, it's > hard to spot the issues with subtests. Let's fail the script > if any subtest fails. > > Signed-off-by: Stanislav Fom

[PATCH net] net: phylink: ensure consistent phy interface mode

2019-05-28 Thread Russell King
Ensure that we supply the same phy interface mode to mac_link_down() as we did for the corresponding mac_link_up() call. This ensures that MAC drivers that use the phy interface mode in these methods can depend on mac_link_down() always corresponding to a mac_link_up() call for the same interface

Re: [PATCH v2] samples: bpf: fix style in bpf_load

2019-05-28 Thread Daniel Borkmann
On 05/23/2019 09:24 AM, Daniel T. Lee wrote: > This commit fixes style problem in samples/bpf/bpf_load.c > > Styles that have been changed are: > - Magic string use of 'DEBUGFS' > - Useless zero initialization of a global variable > - Minor style fix with whitespace > > Signed-off-by: Daniel T

[PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-28 Thread Russell King
Some boards do not have the PHY firmware programmed in the 3310's flash, which leads to the PHY not working as expected. Warn the user when the PHY fails to boot the firmware and refuse to initialise. Signed-off-by: Russell King --- I think this patch needs testing with the Marvell 88x2110 PHY b

[PATCH net-next 0/5] phylink/sfp updates

2019-05-28 Thread Russell King - ARM Linux admin
Hi, This is a series of updates to phylink and sfp: - Remove an unused net device argument from the phylink MII ioctl emulation code. - add support for using interrupts when using a GPIO for link status tracking, rather than polling it at one second intervals. This reduces the need to wak

[PATCH net-next 2/5] net: phylink: support for link gpio interrupt

2019-05-28 Thread Russell King
Add support for using GPIO interrupts with a fixed-link GPIO rather than polling the GPIO every second and invoking the phylink resolution. This avoids unnecessary calls to mac_config(). Reviewed-by: Florian Fainelli Signed-off-by: Russell King --- drivers/net/phy/phylink.c | 36 ++

[PATCH net-next 1/5] net: phylink: remove netdev from phylink mii ioctl emulation

2019-05-28 Thread Russell King
The netdev used in the phylink ioctl emulation is never used, so let's remove it. Signed-off-by: Russell King --- drivers/net/phy/phylink.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 9044b95d2afe..2

[PATCH net-next 3/5] net: phy: allow Clause 45 access via mii ioctl

2019-05-28 Thread Russell King
Allow userspace to generate Clause 45 MII access cycles via phylib. This is useful for tools such as mii-diag to be able to inspect Clause 45 PHYs. Reviewed-by: Florian Fainelli Signed-off-by: Russell King --- drivers/net/phy/phy.c | 33 - 1 file changed, 24 inse

[PATCH net-next 4/5] net: sfp: add mandatory attach/detach methods for sfp buses

2019-05-28 Thread Russell King
Add attach and detach methods for SFP buses, which will allow us to get rid of the netdev storage in sfp-bus. Signed-off-by: Russell King --- drivers/net/phy/phylink.c | 16 drivers/net/phy/sfp-bus.c | 4 ++-- include/linux/sfp.h | 6 ++ 3 files changed, 24 insertion

[PATCH net-next 5/5] net: sfp: remove sfp-bus use of netdevs

2019-05-28 Thread Russell King
The sfp-bus code now no longer has any use for the network device structure, so remove its use. Signed-off-by: Russell King --- drivers/net/phy/phylink.c | 3 +-- drivers/net/phy/sfp-bus.c | 10 +++--- include/linux/sfp.h | 6 ++ 3 files changed, 6 insertions(+), 13 deletions(-)

[PATCH v3 0/4] net: phy: dp83867: add some fixes

2019-05-28 Thread Max Uvarov
v3: use phy_modify_mmd() v2: fix minor comments by Heiner Kallweit and Florian Fainelli Max Uvarov (4): net: phy: dp83867: fix speed 10 in sgmii mode net: phy: dp83867: increase SGMII autoneg timer duration net: phy: dp83867: do not call config_init twice net: phy: dp83867: Set up RGMII TX

[PATCH v3 1/4] net: phy: dp83867: fix speed 10 in sgmii mode

2019-05-28 Thread Max Uvarov
For supporting 10Mps speed in SGMII mode DP83867_10M_SGMII_RATE_ADAPT bit of DP83867_10M_SGMII_CFG register has to be cleared by software. That does not affect speeds 100 and 1000 so can be done on init. Signed-off-by: Max Uvarov Cc: Heiner Kallweit Reviewed-by: Florian Fainelli --- drivers/ne

[PATCH v3 3/4] net: phy: dp83867: do not call config_init twice

2019-05-28 Thread Max Uvarov
Phy state machine calls _config_init just after reset. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 14e9e8a94639..1ec48ecf4133 100644 --- a/drivers/net/phy/d

[PATCH v3 4/4] net: phy: dp83867: Set up RGMII TX delay

2019-05-28 Thread Max Uvarov
PHY_INTERFACE_MODE_RGMII_RXID is less then TXID so code to set tx delay is never called. Fixes: 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy") Signed-off-by: Max Uvarov Cc: Florian Fainelli --- drivers/net/phy/dp83867.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --g

[PATCH v3 2/4] net: phy: dp83867: increase SGMII autoneg timer duration

2019-05-28 Thread Max Uvarov
After reset SGMII Autoneg timer is set to 2us (bits 6 and 5 are 01). That is not enough to finalize autonegatiation on some devices. Increase this timer duration to maximum supported 16ms. Signed-off-by: Max Uvarov Cc: Heiner Kallweit Reviewed-by: Florian Fainelli --- drivers/net/phy/dp83867.c

Re: [PATCH net-next] team: add ethtool get_link_ksettings

2019-05-28 Thread Hangbin Liu
On Tue, May 28, 2019 at 11:08:23AM +0200, Jiri Pirko wrote: > >+static int team_ethtool_get_link_ksettings(struct net_device *dev, > >+ struct ethtool_link_ksettings *cmd) > >+{ > >+struct team *team= netdev_priv(dev); > >+unsigned long speed = 0; > >+

Re: [PATCH net-next 2/5] net: phylink: support for link gpio interrupt

2019-05-28 Thread Russell King - ARM Linux admin
Hi David, I was intending to add a note to this patch indicating that it depends on "net: phylink: ensure consistent phy interface mode" but failed to do before sending it out - sorry! If you'd prefer a patch that doesn't depend on that, please ask. The only difference is the first two lines of

Re: netdev_alloc_skb is failing for 16k length

2019-05-28 Thread Arun Kumar Neelakantam
On 5/27/2019 8:29 PM, Stephen Hemminger wrote: On Mon, 27 May 2019 12:21:51 +0530 Arun Kumar Neelakantam wrote: Hi team, we are using "skb = netdev_alloc_skb(NULL, len);" which is getting failed sometimes for len = 16k. I suspect mostly system memory got fragmented and hence atomic memory al

Re: Bug or mis configuration for mlx5e lag and multipath

2019-05-28 Thread Roi Dayan
On 24/05/2019 04:02, wenxu wrote: > Hi, > > I can get the right log from demsg > >  mlx5_core :81:00.0: modify lag map port 1:1 port 2:2 > > > I debug with the driver, I find the rule be add on mlx_pf0vf0 and the peer > one pf1, > > So I think the esw0 and esw1 both have the rule. > >

Re: [PATCH net-next] team: add ethtool get_link_ksettings

2019-05-28 Thread Jiri Pirko
Tue, May 28, 2019 at 12:02:11PM CEST, liuhang...@gmail.com wrote: >On Tue, May 28, 2019 at 11:08:23AM +0200, Jiri Pirko wrote: >> >+static int team_ethtool_get_link_ksettings(struct net_device *dev, >> >+ struct ethtool_link_ksettings *cmd) >> >+{ >> >+ struct

Re: [patch net-next 0/7] expose flash update status to user

2019-05-28 Thread Jiri Pirko
Thu, May 23, 2019 at 08:37:28PM CEST, sae...@mellanox.com wrote: >On Thu, 2019-05-23 at 11:45 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> When user is flashing device using devlink, he currenly does not see >> any >> information about what is going on, percentages, etc. >> Drivers, for exa

Re: CFP: 4th RDMA Mini-Summit at LPC 2019

2019-05-28 Thread Leon Romanovsky
REMINDER On Tue, May 14, 2019 at 03:23:21PM +0300, Leon Romanovsky wrote: > This is a call for proposals for the 4th RDMA mini-summit at the Linux > Plumbers Conference in Lisbon, Portugal, which will be happening on > September 9-11h, 2019. > > We are looking for topics with focus on active audie

[patch net-next v2 4/7] devlink: allow driver to update progress of flash update

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Introduce a function to be called from drivers during flash. It sends notification to userspace about flash update progress. Signed-off-by: Jiri Pirko --- include/net/devlink.h| 8 +++ include/uapi/linux/devlink.h | 5 ++ net/core/devlink.c | 102

[patch net-next v2 1/7] mlxsw: Move firmware flash implementation to devlink

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c| 15 ++ drivers/net/ethernet/mellanox/mlxsw/core.h| 3 ++ .../net

[patch net-next v2 5/7] mlxfw: Introduce status_notify op and call it to notify about the status

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Add new op status_notify which is called to update the user about flashing status. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 4 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 24 +++ 2 files changed, 28 insertions(+)

[patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- v1->v2: - added debugfs toggle to enable/disable flash status notifications --- drivers/net/netdevsim/dev.c | 44 +++ drivers/net/netdevsim/netdevsim.h | 1 + 2 files changed, 45 insertions(+) diff --git a/driver

[patch net-next v2 3/7] mlxfw: Propagate error messages through extack

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Currently the error messages are printed to dmesg. Propagate them also to directly to user doing the flashing through extack. Signed-off-by: Jiri Pirko --- v1->v2: - dropped "is which" from errmsg. --- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++-- .../net/ethernet/m

[patch net-next v2 2/7] mlx5: Move firmware flash implementation to devlink

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 35 ---

[patch net-next v2 0/7] expose flash update status to user

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko When user is flashing device using devlink, he currenly does not see any information about what is going on, percentages, etc. Drivers, for example mlxsw and mlx5, have notion about the progress and what is happening. This patchset exposes this progress information to userspace.

[patch net-next v2 6/7] mlxsw: Implement flash update status notifications

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Implement mlxfw status_notify op by passing notification down to devlink. Also notify about flash update begin and end. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff -

[patch net-next v2 1/3] header update

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/devlink.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 3b6a9e6be3ac..6544824a0b97 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux/de

[patch net-next v2 3/3] devlink: implement flash status monitoring

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Listen to status notifications coming from kernel during flashing and put them on stdout to inform user about the status. Signed-off-by: Jiri Pirko --- v1->v2: - fixed endless loop bug in case of no notifications --- devlink/devlink.c | 209

[patch net-next v2 2/3] devlink: implement flash update status monitoring

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Kernel sends notifications about flash update status, so implement these messages for monitoring. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/devlink/devlink.c b/devlink/devlin

[RFC PATCH net-next 09/12] mlxsw: reg: Add new trap action

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Subsequent patches will add discard traps support in mlxsw. The driver cannot configure such traps with a normal trap action, but need to use exception trap action, which also increments an error counter. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- drivers/net/ethe

[RFC PATCH net-next 07/12] mlxsw: pci: Query and store PCIe bandwidth during init

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel A subsequent patch will need to set the CPU policer for dropped packets to 80% of available PCIe bandwidth. Query and store and PCIe bandwidth, so that it can be used by the switch driver later on. For I2C bus we simply return 0 as currently there is no use case for which it i

[RFC PATCH net-next 06/12] Documentation: Add description of netdevsim traps

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Signed-off-by: Ido Schimmel --- .../networking/devlink-trap-netdevsim.rst | 20 +++ Documentation/networking/devlink-trap.rst | 11 ++ Documentation/networking/index.rst| 1 + drivers/net/netdevsim/dev.c | 3 +++

[RFC PATCH net-next 00/12] Add drop monitor for offloaded data paths

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Users have several ways to debug the kernel and understand why a packet was dropped. For example, using "drop monitor" and "perf". Both utilities trace kfree_skb(), which is the function called when a packet is freed as part of a failure. The information provided by these tools

[RFC PATCH net-next 02/12] devlink: Add packet trap infrastructure

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Add the basic packet trap infrastructure that allows device drivers to register their supported packet traps and trap groups with devlink. Each driver is expected to provide basic information about each supported trap, such as name and ID, but also the supported metadata types

[RFC PATCH net-next 10/12] mlxsw: Add layer 2 discard trap IDs

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Add the trap IDs used to report layer 2 drops. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/trap.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/trap.h b/drivers/net/ethernet/mella

[RFC PATCH net-next 11/12] mlxsw: Add trap group for layer 2 discards

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Discard trap groups are defined in a different enum so that they could all share the same policer ID: MLXSW_REG_HTGT_TRAP_GROUP_MAX + 1. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 8 1 file changed, 8 insertions

[RFC PATCH net-next 08/12] mlxsw: core: Add API to set trap action

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Up until now the action of a trap was never changed during its lifetime. This is going to change by subsequent patches that will allow devlink to control the action of certain traps. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/co

[RFC PATCH net-next 04/12] Documentation: Add devlink-trap documentation

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Add initial documentation of the devlink-trap mechanism, explaining the background, motivation and the semantics of the interface. Signed-off-by: Ido Schimmel --- Documentation/networking/devlink-trap.rst | 189 ++ Documentation/networking/index.rst

[RFC PATCH net-next 05/12] netdevsim: Add devlink-trap support

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Have netdevsim register its trap groups and traps with devlink during initialization and periodically report trapped packets to devlink core. Since netdevsim is not a real device, the trapped packets are emulated using a workqueue that periodically reports a UDP packet with a

[RFC PATCH net-next 01/12] devlink: Create helper to fill port type information

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel The function that fills port attributes in a netlink message fills the port type attributes together with other attributes such as the device handle. The port type attributes will also need to be filled for trapped packets by a subsequent patch. Prevent code duplication and c

[RFC PATCH net-next 03/12] devlink: Add generic packet traps and groups

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Add generic packet traps and groups that can report dropped packets as well as exceptions such as TTL error. Signed-off-by: Ido Schimmel --- include/net/devlink.h | 46 +++ net/core/devlink.c| 14 + 2 files changed, 60

[RFC PATCH net-next 12/12] mlxsw: spectrum: Add devlink-trap support

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Register supported packet traps (layer 2 drops only, currently) and associated trap group with devlink during driver initialization. The code is placed in a new file (spectrum_trap.c) to which the existing packet traps will be moved to once they are exposed via devlink. The am

[RFC PATCH iproute2-next 1/5] Update kernel headers

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Only including this patch so that people could easily apply the series. I'm aware David takes care of syncing the kernel headers. Signed-off-by: Ido Schimmel --- include/uapi/linux/devlink.h | 68 1 file changed, 68 insertions(+) diff --

[RFC PATCH iproute2-next 3/5] devlink: Add devlink trap set and show commands

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel The trap set command allows the user to set the action and reporting state of an individual trap. Example: # devlink trap set netdevsim/netdevsim10 trap blackhole_route_drop action trap report true The trap show command allows the user to get the current status of an individ

[RFC PATCH iproute2-next 4/5] devlink: Add devlink trap group set and show commands

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel These commands are similar to the trap set and show commands, but operate on a trap group and not individual traps. Example: # devlink trap group set netdevsim/netdevsim10 group l3_drops action trap report true # devlink -jps trap group show netdevsim/netdevsim10 group l3_dro

[RFC PATCH iproute2-next 2/5] devlink: Increase number of supported options

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel Currently, the number of supported options is capped at 32 which is a problem given we are about to add a few more and go over the limit. Increase the limit to 64 options. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- devlink/devlink.c | 24

[RFC PATCH iproute2-next 0/5] Add devlink-trap support

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel This patchset adds devlink-trap support in iproute2. Patch #1 is just for convenience, so that people do not need to pull the kernel headers themselves. Will be dropped for non-RFC version. Patch #2 increases the number of options devlink can handle. Patches #3-#5 gradually

[RFC PATCH iproute2-next 5/5] devlink: Add devlink trap monitor support

2019-05-28 Thread Ido Schimmel
From: Ido Schimmel According to the reporting state of individual traps, a notification is sent to user space about each trapped packet. Allow the user to monitor such events by having iproute2 subscribe to the 'DEVLINK_GENL_MCGRP_TRAP_NAME' group. An error is not returned in case subscription fa

Re: [PATCH net-next 3/5] net: phy: allow Clause 45 access via mii ioctl

2019-05-28 Thread Vladimir Oltean
On Tue, 28 May 2019 at 12:58, Russell King wrote: > > Allow userspace to generate Clause 45 MII access cycles via phylib. > This is useful for tools such as mii-diag to be able to inspect Clause > 45 PHYs. > > Reviewed-by: Florian Fainelli > Signed-off-by: Russell King > --- > drivers/net/phy/p

Re: [PATCH net-next 1/3] net: phy: export phy_queue_state_machine

2019-05-28 Thread Russell King - ARM Linux admin
On Mon, May 27, 2019 at 08:28:04PM +0200, Heiner Kallweit wrote: > We face the issue that link change interrupt and link status may be > reported by different layers. As a result the link change interrupt I'd describe this as "different PHY layers" to make it clear that we're talking about the dif

Re: [PATCH net-next 2/3] net: phy: add callback for custom interrupt handler to struct phy_driver

2019-05-28 Thread Russell King - ARM Linux admin
On Mon, May 27, 2019 at 08:28:48PM +0200, Heiner Kallweit wrote: > The phylib interrupt handler handles link change events only currently. > However PHY drivers may want to use other interrupt sources too, > e.g. to report temperature monitoring events. Therefore add a callback > to struct phy_driv

Re: [PATCH net-next 3/3] net: phy: move handling latched link-down to phylib state machine

2019-05-28 Thread Russell King - ARM Linux admin
On Mon, May 27, 2019 at 08:29:45PM +0200, Heiner Kallweit wrote: > Especially with fibre links there may be very short link drops. And if > interrupt handling is slow we may miss such a link drop. To deal with > this we remove the double link status read from the generic link status > read function

Re: [PATCH net] net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports

2019-05-28 Thread Andrew Lunn
> My hardware has the CPU port on 9, and it is SGMII. The existing working > devicetree setup I used is: > >port@9 { > reg = <9>; > label = "cpu"; > ethernet = <ð0>; >

Re: [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource

2019-05-28 Thread Andrew Lunn
> >> /* Built-in 10/100 Ethernet MAC interfaces */ > >>+static struct resource fsg_eth_npeb_resources[] = { > >>+ { > >>+ .start = IXP4XX_EthB_BASE_PHYS, > >>+ .end= IXP4XX_EthB_BASE_PHYS + 0x0fff, > > > >Hi Linus > > > >It is a long time since i did reso

Re: [PATCH net-next 3/5] net: phy: allow Clause 45 access via mii ioctl

2019-05-28 Thread Russell King - ARM Linux admin
On Tue, May 28, 2019 at 03:54:31PM +0300, Vladimir Oltean wrote: > On Tue, 28 May 2019 at 12:58, Russell King wrote: > > > > Allow userspace to generate Clause 45 MII access cycles via phylib. > > This is useful for tools such as mii-diag to be able to inspect Clause > > 45 PHYs. > > > > Reviewed-

Re: [PATCH net-next 11/11] inet: frags: rework rhashtable dismantle

2019-05-28 Thread Eric Dumazet
On Mon, May 27, 2019 at 11:34 PM Herbert Xu wrote: > > Hi Eric: > > Eric Dumazet wrote: > > > > +void fqdir_exit(struct fqdir *fqdir) > > +{ > > + fqdir->high_thresh = 0; /* prevent creation of new frags */ > > + > > + /* paired with READ_ONCE() in inet_frag_kill() : > > +* We

Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Eric Dumazet
On 5/27/19 8:49 PM, brakmo wrote: > Create new macro BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() to be used by > __cgroup_bpf_run_filter_skb for EGRESS BPF progs so BPF programs can > request cwr for TCP packets. > ... > +#define BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY(array, ctx, func)

Re: [PATCH] netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression

2019-05-28 Thread Nicolas Dichtel
Le 24/05/2019 à 11:22, Pablo Neira Ayuso a écrit : > On Mon, May 20, 2019 at 10:35:07AM +0200, Nicolas Dichtel wrote: >> Le 06/05/2019 à 15:16, Pablo Neira Ayuso a écrit : >>> On Mon, May 06, 2019 at 10:49:52AM +0200, Nicolas Dichtel wrote: >> [snip] Is it possible to queue this for stable? >>

Re: [PATCH V3 net-next 2/6] net: Introduce a new MII time stamping interface.

2019-05-28 Thread Andrew Lunn
On Mon, May 27, 2019 at 10:17:50PM -0700, Richard Cochran wrote: > On Wed, May 22, 2019 at 02:58:23AM +0200, Andrew Lunn wrote: > > > -static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) > > > +static int dp83640_hwtstamp(struct mii_timestamper *mii_ts, struct ifreq > > > *if

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-28 Thread Maxime Chevallier
Hello Russell, On Tue, 28 May 2019 10:34:42 +0100 Russell King wrote: >Some boards do not have the PHY firmware programmed in the 3310's flash, >which leads to the PHY not working as expected. Warn the user when the >PHY fails to boot the firmware and refuse to initialise. > >Signed-off-by: Rus

Re: [PATCH net-next 0/6] add TFO backup key

2019-05-28 Thread Jason Baron
On 5/24/19 7:17 PM, Yuchung Cheng wrote: > On Thu, May 23, 2019 at 4:31 PM Yuchung Cheng wrote: >> >> On Thu, May 23, 2019 at 12:14 PM David Miller wrote: >>> >>> From: Jason Baron >>> Date: Wed, 22 May 2019 16:39:32 -0400 >>> Christoph, Igor, and I have worked on an API that facilitates TF

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 10:34:42AM +0100, Russell King wrote: > Some boards do not have the PHY firmware programmed in the 3310's flash, > which leads to the PHY not working as expected. Warn the user when the > PHY fails to boot the firmware and refuse to initialise. > > Signed-off-by: Russell K

Re: [PATCH net-next 1/5] net: phylink: remove netdev from phylink mii ioctl emulation

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 10:57:18AM +0100, Russell King wrote: > The netdev used in the phylink ioctl emulation is never used, so let's > remove it. > > Signed-off-by: Russell King Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 4/5] net: sfp: add mandatory attach/detach methods for sfp buses

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 10:57:34AM +0100, Russell King wrote: > Add attach and detach methods for SFP buses, which will allow us to get > rid of the netdev storage in sfp-bus. > > Signed-off-by: Russell King Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 5/5] net: sfp: remove sfp-bus use of netdevs

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 10:57:39AM +0100, Russell King wrote: > The sfp-bus code now no longer has any use for the network device > structure, so remove its use. > > Signed-off-by: Russell King Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 3/5] net: phy: allow Clause 45 access via mii ioctl

2019-05-28 Thread Andrew Lunn
> > Hi Russell, > > > > I find the SIOCGMIIREG/SIOCGMIIPHY ioctls useful for C45 just as much > > as they are for C22, but I think the way they work is a big hack and > > for that reason they're less than useful when you need them most. > > These ioctls work by hijacking the MDIO bus driver of a P

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-28 Thread Russell King - ARM Linux admin
On Tue, May 28, 2019 at 10:34:42AM +0100, Russell King wrote: > Some boards do not have the PHY firmware programmed in the 3310's flash, > which leads to the PHY not working as expected. Warn the user when the > PHY fails to boot the firmware and refuse to initialise. > > Signed-off-by: Russell K

Re: [PATCH 03/11] net: phy: Check against net_device being NULL

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 12:21:59AM +0300, Ioana Ciornei wrote: > In general, we don't want MAC drivers calling phy_attach_direct with the > net_device being NULL. Add checks against this in all the functions > calling it: phy_attach() and phy_connect_direct(). > > Signed-off-by: Ioana Ciornei > S

Re: [PATCH 03/11] net: phy: Check against net_device being NULL

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 12:21:59AM +0300, Ioana Ciornei wrote: > In general, we don't want MAC drivers calling phy_attach_direct with the > net_device being NULL. Add checks against this in all the functions > calling it: phy_attach() and phy_connect_direct(). > > Signed-off-by: Ioana Ciornei > S

Re: [RFC] vsock: proposal to support multiple transports at runtime

2019-05-28 Thread Jorgen Hansen
> On Thu, May 23, 2019 at 04:37:03PM +0100, Stefan Hajnoczi wrote: > > On Tue, May 14, 2019 at 10:15:43AM +0200, Stefano Garzarella wrote: > > > Hi guys, > > > I'm currently interested on implement a multi-transport support for VSOCK > > > in > > > order to handle nested VMs. Thanks for picking t

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-28 Thread Andrew Lunn
> One question: are we happy with failing the probe like this, or would it > be better to allow the probe to suceed? > > As has been pointed out in the C45 MII access patch, we need the PHY > to bind to the network driver for the MII bus to be accessible to > userspace, so if we're going to have u

Fw: [Bug 203743] New: Networking goes down when running Docker and receiving fragmented IPv4 packets

2019-05-28 Thread Stephen Hemminger
Begin forwarded message: Date: Tue, 28 May 2019 15:49:52 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 203743] New: Networking goes down when running Docker and receiving fragmented IPv4 packets https://bugzilla.kernel.org/show_bug.cgi?id=203743

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-28 Thread Russell King - ARM Linux admin
On Tue, May 28, 2019 at 06:11:39PM +0200, Andrew Lunn wrote: > > One question: are we happy with failing the probe like this, or would it > > be better to allow the probe to suceed? > > > > As has been pointed out in the C45 MII access patch, we need the PHY > > to bind to the network driver for t

Re: [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-28 Thread Edward Cree
On 24/05/2019 18:44, Jakub Kicinski wrote: > On Fri, 24 May 2019 18:27:39 +0100, Edward Cree wrote: >> On 24/05/2019 18:03, Jakub Kicinski wrote: >>> Simplest would be to keep a list of offloaders per action, but maybe >>> something more clever would appear as one rummages through the code. >> Pr

Re: [PATCH bpf-next] bpftool: auto-complete BTF IDs for btf dump

2019-05-28 Thread Andrii Nakryiko
On Tue, May 28, 2019 at 2:24 AM Daniel Borkmann wrote: > > On 05/26/2019 02:01 AM, Andrii Nakryiko wrote: > > Auto-complete BTF IDs for `btf dump id` sub-command. List of possible BTF > > IDs is scavenged from loaded BPF programs that have associated BTFs, as > > there is currently no API in libbp

[PATCH net-next] r8169: remove 1000/Half from supported modes

2019-05-28 Thread Heiner Kallweit
MAC on the GBit versions supports 1000/Full only, however the PHY partially claims to support 1000/Half. So let's explicitly remove this mode. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/n

Re: [PATCH net-next 0/6] add TFO backup key

2019-05-28 Thread Yuchung Cheng
On Tue, May 28, 2019 at 7:37 AM Jason Baron wrote: > > On 5/24/19 7:17 PM, Yuchung Cheng wrote: > > On Thu, May 23, 2019 at 4:31 PM Yuchung Cheng wrote: > >> > >> On Thu, May 23, 2019 at 12:14 PM David Miller wrote: > >>> > >>> From: Jason Baron > >>> Date: Wed, 22 May 2019 16:39:32 -0400 > >>>

[RFC][PATCH kernel_bpf] honor CAP_NET_ADMIN for BPF_PROG_LOAD

2019-05-28 Thread Andreas Steinmetz
[sorry for crossposting but this affects both lists] BPF_PROG_TYPE_SCHED_CLS and BPF_PROG_TYPE_XDP should be allowed for CAP_NET_ADMIN capability. Nearly everything one can do with these program types can be done some other way with CAP_NET_ADMIN capability (e.g. NFQUEUE), but only slower. This c

Re: [RFC net-next 1/1] net: sched: protect against loops in TC filter hooks

2019-05-28 Thread John Hurley
On Fri, May 24, 2019 at 7:32 PM Daniel Borkmann wrote: > > On 05/24/2019 06:05 PM, John Hurley wrote: > > TC hooks allow the application of filters and actions to packets at both > > ingress and egress of the network stack. It is possible, with poor > > configuration, that this can produce loops w

[PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-05-28 Thread Kevin 'ldir' Darbyshire-Bryant
ctinfo is a new tc filter action module. It is designed to restore information contained in firewall conntrack marks to other packet fields and is typically used on packet ingress paths. At present it has two independent sub-functions or operating modes, DSCP restoration mode & skb mark restorati

Re: [PATCH bpf-next 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-05-28 Thread Björn Töpel
On Wed, 22 May 2019 at 20:32, Jakub Kicinski wrote: > [...] > > You should be able to just call install with the original flags, and > install handler should do the right maths again to direct it either to > drv or generic, no? > On a related note: I ran the test_offload.py test (thanks for point

Re: [PATCH v3 3/4] net: phy: dp83867: do not call config_init twice

2019-05-28 Thread Florian Fainelli
On 5/28/19 3:00 AM, Max Uvarov wrote: > Phy state machine calls _config_init just after > reset. > > Signed-off-by: Max Uvarov Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v3 4/4] net: phy: dp83867: Set up RGMII TX delay

2019-05-28 Thread Florian Fainelli
On 5/28/19 3:00 AM, Max Uvarov wrote: > PHY_INTERFACE_MODE_RGMII_RXID is less then TXID > so code to set tx delay is never called. > Fixes: 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy") There is no need to put a newline, the Fixes: tag is just like any other tag. > > Signed-off-by: Max

RE: [PATCH 07/11] net: phylink: Add PHYLINK_DEV operation type

2019-05-28 Thread Ioana Ciornei
> Subject: Re: [PATCH 07/11] net: phylink: Add PHYLINK_DEV operation type > > > > On 5/27/2019 2:22 PM, Ioana Ciornei wrote: > > In the PHYLINK_DEV operation type, the PHYLINK infrastructure can work > > without an attached net_device. For printing usecases, instead, a > > struct device * should

Re: [PATCH] net: stmmac: Do not output error on deferred probe

2019-05-28 Thread Andrew Lunn
On Mon, May 27, 2019 at 12:52:51PM +0200, Thierry Reding wrote: > From: Thierry Reding > > If the subdriver defers probe, do not show an error message. It's > perfectly fine for this error to occur since the driver will get another > chance to probe after some time and will usually succeed after

  1   2   3   >