Re: [PATCH net] mlxsw: spectrum_ptp: Keep unmatched entries in a linked list

2019-08-11 Thread David Miller
From: Ido Schimmel Date: Sun, 11 Aug 2019 10:48:37 +0300 > From: Petr Machata > > To identify timestamps for matching with their packets, Spectrum-1 uses a > five-tuple of (port, direction, domain number, message type, sequence ID). > If there are several clients from the same domain behind a s

Re: [PATCH] caif: no need to check return value of debugfs_create functions

2019-08-11 Thread David Miller
From: Greg Kroah-Hartman Date: Sat, 10 Aug 2019 12:42:43 +0200 > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Richard Fontana > Cc: Steve Winslow

Re: [PATCH] xen-netback: no need to check return value of debugfs_create functions

2019-08-11 Thread David Miller
From: Greg Kroah-Hartman Date: Sat, 10 Aug 2019 12:31:08 +0200 > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Wei Liu > Cc: Paul Durrant > Cc: xe

Re: [PATCH net-next 0/7] net: dsa: mv88e6xxx: prepare Wait Bit operation

2019-08-11 Thread David Miller
From: Vivien Didelot Date: Fri, 9 Aug 2019 18:47:52 -0400 > The Remote Management Interface has its own implementation of a Wait > Bit operation, which requires a bit number and a value to wait for. > > In order to prepare the introduction of this implementation, rework the > code waiting for b

Re: [PATCH net-next] r8169: inline rtl8169_free_rx_databuff

2019-08-11 Thread David Miller
From: Heiner Kallweit Date: Fri, 9 Aug 2019 22:59:07 +0200 > rtl8169_free_rx_databuff is used in only one place, so let's inline it. > We can improve the loop because rtl8169_init_ring zero's RX_databuff > before calling rtl8169_rx_fill, and rtl8169_rx_fill fills > Rx_databuff starting from index

Re: [PATCH net-next v2 0/4] net: phy: realtek: add support for integrated 2.5Gbps PHY in RTL8125

2019-08-11 Thread David Miller
From: Heiner Kallweit Date: Fri, 9 Aug 2019 20:41:58 +0200 > This series adds support for the integrated 2.5Gbps PHY in RTL8125. > First three patches add necessary functionality to phylib. > > Changes in v2: > - added patch 1 > - changed patch 4 to use a fake PHY ID that is injected by the >

Re: [patch net-next] netdevsim: register couple of devlink params

2019-08-11 Thread David Miller
From: Jiri Pirko Date: Fri, 9 Aug 2019 13:05:12 +0200 > From: Jiri Pirko > > Register couple of devlink params, one generic, one driver-specific. > Make the values available over debugfs. > > Example: > $ echo "111" > /sys/bus/netdevsim/new_device > $ devlink dev param > netdevsim/netdevsim11

RE: [PATCH net-next v3 2/2] qed: Add driver API for flashing the config attributes.

2019-08-11 Thread Sudarsana Reddy Kalluru
> -Original Message- > From: Ariel Elior > Sent: Monday, August 5, 2019 8:00 PM > To: Sudarsana Reddy Kalluru ; David Miller > > Cc: netdev@vger.kernel.org; Michal Kalderon > Subject: RE: [PATCH net-next v3 2/2] qed: Add driver API for flashing the > config attributes. > > > From: Sudar

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

2019-08-11 Thread David Miller
From: Hangbin Liu Date: Fri, 9 Aug 2019 08:29:39 +0800 > ibmveth 3003 env3: h_multicast_ctrl rc=4 when adding an entry to the > filter table You need to root cause and fix the reason this message appears so much. Once I let you rate limit the message you will have zero incentive to fix th

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

2019-08-11 Thread David Miller
From: David Ahern Date: Tue, 6 Aug 2019 12:15:17 -0700 > From: David Ahern > > Prior to the commit in the fixes tag, the resource controller in netdevsim > tracked fib entries and rules per network namespace. Restore that behavior. > > Fixes: 5fc494225c1e ("netdevsim: create devlink instance

Re: [PATCH net] ipv4/route: do not check saddr dev if iif is LOOPBACK_IFINDEX

2019-08-11 Thread David Miller
From: David Ahern Date: Thu, 1 Aug 2019 22:16:00 -0600 > On 8/1/19 10:13 PM, Hangbin Liu wrote: >> On Thu, Aug 01, 2019 at 01:51:25PM -0600, David Ahern wrote: >>> On 8/1/19 2:29 AM, Hangbin Liu wrote: Jianlin reported a bug that for IPv4, ip route get from src_addr would fail if src_ad

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

2019-08-11 Thread David Ahern
On 8/11/19 7:34 PM, David Ahern wrote: > On 8/10/19 12:30 AM, Jiri Pirko wrote: >> Could you please write me an example message of add/remove? > > altnames are for existing netdevs, yes? existing netdevs have an id and > a name - 2 existing references for identifying the existing netdev for > whic

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

2019-08-11 Thread David Ahern
On 8/10/19 12:30 AM, Jiri Pirko wrote: > Could you please write me an example message of add/remove? altnames are for existing netdevs, yes? existing netdevs have an id and a name - 2 existing references for identifying the existing netdev for which an altname will be added. Even using the altname

Re: [v4,2/4] tools: bpftool: add net detach command to detach XDP on interface

2019-08-11 Thread Y Song
On Fri, Aug 9, 2019 at 6:35 AM Daniel T. Lee wrote: > > By this commit, using `bpftool net detach`, the attached XDP prog can > be detached. Detaching the BPF prog will be done through libbpf > 'bpf_set_link_xdp_fd' with the progfd set to -1. > > Signed-off-by: Daniel T. Lee > --- > tools/bpf/bp

Re: [v4,1/4] tools: bpftool: add net attach command to attach XDP on interface

2019-08-11 Thread Y Song
On Fri, Aug 9, 2019 at 6:35 AM Daniel T. Lee wrote: > > By this commit, using `bpftool net attach`, user can attach XDP prog on > interface. New type of enum 'net_attach_type' has been made, as stated at > cover-letter, the meaning of 'attach' is, prog will be attached on interface. > > With 'over

Re: [PATCH bpf-next v2 4/4] selftests/bpf: add sockopt clone/inheritance test

2019-08-11 Thread Yonghong Song
On 8/9/19 9:10 AM, Stanislav Fomichev wrote: > Add a test that calls setsockopt on the listener socket which triggers > BPF program. This BPF program writes to the sk storage and sets > clone flag. Make sure that sk storage is cloned for a newly > accepted connection. > > We have two cloned maps

Re: [PATCH bpf-next v2 1/4] bpf: export bpf_map_inc_not_zero

2019-08-11 Thread Yonghong Song
On 8/9/19 9:10 AM, Stanislav Fomichev wrote: > Rename existing bpf_map_inc_not_zero to __bpf_map_inc_not_zero to > indicate that it's caller's responsibility to do proper locking. > Create and export bpf_map_inc_not_zero wrapper that properly > locks map_idr_lock. Will be used in the next commit

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

2019-08-11 Thread Yonghong Song
On 8/9/19 9:10 AM, Stanislav Fomichev wrote: > Add new helper bpf_sk_storage_clone which optionally clones sk storage > and call it from sk_clone_lock. > > Cc: Martin KaFai Lau > Cc: Yonghong Song > Signed-off-by: Stanislav Fomichev Acked-by: Yonghong Song

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

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

Re: pull-request: bpf 2019-08-11

2019-08-11 Thread David Miller
From: Daniel Borkmann Date: Sun, 11 Aug 2019 21:58:34 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) x64 JIT code generation fix for backward-jumps to 1st insn, from Alexei. > > 2) Fix buggy multi-closing of BTF file descriptor in

pull-request: bpf 2019-08-11

2019-08-11 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) x64 JIT code generation fix for backward-jumps to 1st insn, from Alexei. 2) Fix buggy multi-closing of BTF file descriptor in libbpf, from Andrii. 3) Fix libbpf_num_possible_cpus() to make i

Re: [PATCH net-next v2 00/10] drop_monitor: Capture dropped packets and metadata

2019-08-11 Thread David Miller
From: Ido Schimmel Date: Sun, 11 Aug 2019 10:35:45 +0300 > From: Ido Schimmel > > So far drop monitor supported only one mode of operation in which a > summary of recent packet drops is periodically sent to user space as a > netlink event. The event only includes the drop location (program > co

Re: [PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed

2019-08-11 Thread Heiner Kallweit
On 11.08.2019 18:08, Marek Behun wrote: > On Sun, 11 Aug 2019 17:40:01 +0200 > Andrew Lunn wrote: > >> On Sun, Aug 11, 2019 at 05:08:12PM +0200, Marek Behún wrote: >>> The fixed_phy driver does not set the phydev->is_gigabit_capable member >>> when the fixed_phy is gigabit capable. >> >> Neithe

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

2019-08-11 Thread Andrew Lunn
> what if we added a phy_mode member to struct mv88e6xxx_port, and either > set it to PHY_INTERFACE_MODE_NA in mv88e6xxx_setup, or implemented > methods for converting the switch register values to > PHY_INTERFACE_MODE_* values. We should read the switch registers. I think you can set the defaults

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

2019-08-11 Thread Andrew Lunn
> Maybe phylib should retry a number of times - but with read-sensitive > registers, if the read has already completed successfully, and its > just a problem with the FEC MDIO hardware, that could cause issues. Hi Russell At the bus level, MDIO cannot fail. The bits get clocked out, and the bits

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

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

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Marek Behun
On Sun, 11 Aug 2019 18:16:11 +0300 Vladimir Oltean wrote: > The DSA fixed-link port functionality *has* been converted to phylink. > See: > - > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=0e27921816ad9 > - > https://git.kernel.org/pub/scm/linux/kernel/git/davem

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

2019-08-11 Thread Marek Behun
On Sun, 11 Aug 2019 17:31:53 +0200 Andrew Lunn wrote: > On Sun, Aug 11, 2019 at 05:08:11PM +0200, Marek Behún wrote: > > The mv88e6xxx_port_setup_mac looks if one of the {link, speed, duplex} > > parameters is being changed from the current setting, and if not, does > > not do anything. This test

Re: [PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed

2019-08-11 Thread Marek Behun
On Sun, 11 Aug 2019 17:40:01 +0200 Andrew Lunn wrote: > On Sun, Aug 11, 2019 at 05:08:12PM +0200, Marek Behún wrote: > > The fixed_phy driver does not set the phydev->is_gigabit_capable member > > when the fixed_phy is gigabit capable. > > Neither does any other PHY driver. It should be possib

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

2019-08-11 Thread Andrew Lunn
> I think a better question is why is the FEC MDIO controller configured > to emit interrupts anyway (especially since the API built on top does > not benefit in any way from this)? Hubert (copied) sent an interesting > email very recently where he pointed out that this is one of the main > sources

Re: [PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed

2019-08-11 Thread Andrew Lunn
On Sun, Aug 11, 2019 at 05:08:12PM +0200, Marek Behún wrote: > The fixed_phy driver does not set the phydev->is_gigabit_capable member > when the fixed_phy is gigabit capable. Neither does any other PHY driver. It should be possible to tell if a PHY supports 1G by looking at register values. If th

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

2019-08-11 Thread Andrew Lunn
On Sun, Aug 11, 2019 at 05:08:11PM +0200, Marek Behún wrote: > The mv88e6xxx_port_setup_mac looks if one of the {link, speed, duplex} > parameters is being changed from the current setting, and if not, does > not do anything. This test is wrong in some situations: this method also > has the mode ar

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Andrew Lunn
On Sun, Aug 11, 2019 at 04:04:04PM +0200, Marek Behun wrote: > OK guys, something is terribly wrong here. > > I bisected to the commit mentioned (88d6272acaaa), looked around at the > genphy functions, tried adding the link=0 workaround and it did work, > so I though this was the issue. > > What

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Vladimir Oltean
Hi Marek, On Sun, 11 Aug 2019 at 17:06, Marek Behun wrote: > > OK guys, something is terribly wrong here. > > I bisected to the commit mentioned (88d6272acaaa), looked around at the > genphy functions, tried adding the link=0 workaround and it did work, > so I though this was the issue. > > What

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Marek Behun
I have sent two new patches, each fixing one of the bugs that negated each other. Marek

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

2019-08-11 Thread Marek Behún
The mv88e6xxx_port_setup_mac looks if one of the {link, speed, duplex} parameters is being changed from the current setting, and if not, does not do anything. This test is wrong in some situations: this method also has the mode argument, which can also be changed. For example on Turris Omnia, the

[PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed

2019-08-11 Thread Marek Behún
The fixed_phy driver does not set the phydev->is_gigabit_capable member when the fixed_phy is gigabit capable. This in turn causes phy_device.c:genphy_read_status function to return unknown phy parameters (SPEED_UNKNOWN, DUPLEX_UNKNOWN, ...), if the fixed_phy is created with SPEED_1000. Signed-off

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

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

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

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

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Marek Behun
OK guys, something is terribly wrong here. I bisected to the commit mentioned (88d6272acaaa), looked around at the genphy functions, tried adding the link=0 workaround and it did work, so I though this was the issue. What I realized now is that before the commit 88d6272acaaa things worked because

[BUG] fec mdio times out under system stress

2019-08-11 Thread Russell King - ARM Linux admin
Hi Fabio, When I woke up this morning, I found that one of the Hummingboards had gone offline (as in, lost network link) during the night. Investigating, I find that the system had gone into OOM, and at that time, triggered an unrelated: [4111697.698776] fec 2188000.ethernet eth0: MDIO read timeo

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Heiner Kallweit
On 11.08.2019 05:39, Andrew Lunn wrote: > On Sun, Aug 11, 2019 at 05:18:57AM +0200, Marek Behún wrote: >> Commit 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in >> genphy_read_status") broke fixed link DSA port registration in >> dsa_port_fixed_link_register_of: the genphy_read_status does no

Re: [PATCH] xen-netback: no need to check return value of debugfs_create functions

2019-08-11 Thread Wei Liu
On Sat, Aug 10, 2019 at 12:31:08PM +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Wei Liu > Cc: Paul Durrant > Cc:

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

2019-08-11 Thread Paul Blakey
On 8/8/2019 11:53 PM, Pravin Shelar wrote: > On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: >> Offloaded OvS datapath rules are translated one to one to tc rules, >> for example the following simplified OvS rule: >> >> recirc_id(0),in_port(dev1),eth_type(0x0800),ct_state(-trk) >> actions:ct()

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

2019-08-11 Thread Paul Blakey
On 8/8/2019 11:53 PM, Pravin Shelar wrote: > On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: >> Offloaded OvS datapath rules are translated one to one to tc rules, >> for example the following simplified OvS rule: >> >> recirc_id(0),in_port(dev1),eth_type(0x0800),ct_state(-trk) >> actions:ct()

Re: [PATCH net-next v2 1/1] net: dsa: fix fixed-link port registration

2019-08-11 Thread Sergei Shtylyov
Hello! Just noticed a comment typo... On 11.08.2019 6:18, Marek Behún wrote: Commit 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in genphy_read_status") broke fixed link DSA port registration in dsa_port_fixed_link_register_of: the genphy_read_status does not do what it is supposed to

[PATCH net] mlxsw: spectrum_ptp: Keep unmatched entries in a linked list

2019-08-11 Thread Ido Schimmel
From: Petr Machata To identify timestamps for matching with their packets, Spectrum-1 uses a five-tuple of (port, direction, domain number, message type, sequence ID). If there are several clients from the same domain behind a single port sending Delay_Req's, the only thing differentiating these

[PATCH net-next v2 06/10] drop_monitor: Add packet alert mode

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel So far drop monitor supported only one alert mode in which a summary of locations in which packets were recently dropped was sent to user space. This alert mode is sufficient in order to understand that packets were dropped, but lacks information to perform a more detailed ana

[PATCH net-next v2 05/10] drop_monitor: Add alert mode operations

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel The next patch is going to add another alert mode in which the dropped packet is notified to user space, instead of only a summary of recent drops. Abstract the differences between the modes by adding alert mode operations. The operations are selected based on the currently co

[PATCH net-next v2 03/10] drop_monitor: Reset per-CPU data before starting to trace

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel The function reset_per_cpu_data() allocates and prepares a new skb for the summary netlink alert message ('NET_DM_CMD_ALERT'). The new skb is stored in the per-CPU 'data' variable and the old is returned. The function is invoked during module initialization and from the workqu

[PATCH net-next v2 04/10] drop_monitor: Require CAP_NET_ADMIN for drop monitor configuration

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel Currently, the configure command does not do anything but return an error. Subsequent patches will enable the command to change various configuration options such as alert mode and packet truncation. Similar to other netlink-based configuration channels, make sure only users w

[PATCH net-next v2 07/10] drop_monitor: Allow truncation of dropped packets

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel When sending dropped packets to user space it is not always necessary to copy the entire packet as usually only the headers are of interest. Allow user to specify the truncation length and add the original length of the packet as additional metadata to the netlink message. By

[PATCH net-next v2 02/10] drop_monitor: Initialize timer and work item upon tracing enable

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel The timer and work item are currently initialized once during module init, but subsequent patches will need to associate different functions with the work item, based on the configured alert mode. Allow subsequent patches to make that change by initializing and de-initializing

[PATCH net-next v2 00/10] drop_monitor: Capture dropped packets and metadata

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel So far drop monitor supported only one mode of operation in which a summary of recent packet drops is periodically sent to user space as a netlink event. The event only includes the drop location (program counter) and number of drops in the last interval. While this mode of op

[PATCH net-next v2 10/10] drop_monitor: Expose tail drop counter

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel Previous patch made the length of the per-CPU skb drop list configurable. Expose a counter that shows how many packets could not be enqueued to this list. This allows users determine the desired queue length. Signed-off-by: Ido Schimmel --- include/uapi/linux/net_dropmon.h

[PATCH net-next v2 08/10] drop_monitor: Add a command to query current configuration

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel Users should be able to query the current configuration of drop monitor before they start using it. Add a command to query the existing configuration which currently consists of alert mode and packet truncation length. Signed-off-by: Ido Schimmel --- include/uapi/linux/net_d

[PATCH net-next v2 09/10] drop_monitor: Make drop queue length configurable

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel In packet alert mode, each CPU holds a list of dropped skbs that need to be processed in process context and sent to user space. To avoid exhausting the system's memory the maximum length of this queue is currently set to 1000. Allow users to tune the length of this queue acco

[PATCH net-next v2 01/10] drop_monitor: Split tracing enable / disable to different functions

2019-08-11 Thread Ido Schimmel
From: Ido Schimmel Subsequent patches will need to enable / disable tracing based on the configured alerting mode. Reduce the nesting level and prepare for the introduction of this functionality by splitting the tracing enable / disable operations into two different functions. Signed-off-by: Id