Re: [PATCH net] nfp: flower: fix ABI mismatch between driver and firmware

2020-09-02 Thread Simon Horman
On Wed, Sep 02, 2020 at 04:00:54PM -0700, David Miller wrote: > From: Simon Horman > Date: Wed, 2 Sep 2020 17:04:58 +0200 > > > From: Louis Peens > > > > Fix an issue where the driver wrongly detected ipv6 neighbour updates > > from the NFP as corrupt. Add a reserved field on the kernel side s

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Adam Rudziński
W dniu 2020-09-03 o 04:13, Florian Fainelli pisze: On 9/2/2020 3:20 PM, Andrew Lunn wrote: +    priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); +    if (IS_ERR(priv->clk)) +    return PTR_ERR(priv->clk); + +    /* To get there, the mdiobus registration logic already enab

Re: [PATCH net-next 2/2] ionic: add devlink firmware update

2020-09-02 Thread Jiri Pirko
Wed, Sep 02, 2020 at 09:57:17PM CEST, snel...@pensando.io wrote: >Add support for firmware update through the devlink interface. >This update copies the firmware object into the device, asks >the current firmware to install it, then asks the firmware to >set the device to use the new firmware on th

Re: [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command

2020-09-02 Thread Jiri Pirko
Wed, Sep 02, 2020 at 05:30:25PM CEST, k...@kernel.org wrote: >On Wed, 2 Sep 2020 11:46:27 +0200 Jiri Pirko wrote: >> >? Do we need such change there too or keep it as is, each action by itself >> >and return what was performed ? >> >> Well, I don't know. User asks for X, X should be performed, n

Re: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-09-02 Thread Jiri Pirko
Wed, Sep 02, 2020 at 05:23:58PM CEST, k...@kernel.org wrote: >On Wed, 2 Sep 2020 10:00:11 +0200 Jiri Pirko wrote: I didn't quite get the fact that you want to not show controller ID on the local port, initially. >>> Mainly to not_break current users. >> >> You don't have to tak

Re: [PATCH] libbpf: Remove arch-specific include path in Makefile

2020-09-02 Thread Naveen N. Rao
Daniel Borkmann wrote: On 9/2/20 10:58 PM, Andrii Nakryiko wrote: On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao wrote: Ubuntu mainline builds for ppc64le are failing with the below error (*): CALL/home/kernel/COD/linux/scripts/atomic/check-atomics.sh DESCEND bpf/resolve_btfids

Re: [RFC PATCH] libbpf: Support setting map max_entries at runtime

2020-09-02 Thread Andrii Nakryiko
On Mon, Aug 31, 2020 at 4:03 PM Barret Rhoden wrote: > > The max_entries for a BPF map may depend on runtime parameters. > Currently, we need to know the maximum value at BPF compile time. For > instance, if you want an array map with NR_CPUS entries, you would hard > code your architecture's lar

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-02 Thread Cong Wang
Hello, Kehuan Can you test the attached one-line fix? I think we are overthinking, probably all we need here is a busy wait. Thanks. diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d60e7c39d60c..fc1bacdb102b 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_gen

RE: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-02 Thread John Fastabend
John Fastabend wrote: > Lukas Wunner wrote: > > Commit e687ad60af09 ("netfilter: add netfilter ingress hook after > > handle_ing() under unique static key") introduced the ability to > > classify packets on ingress. > > > > Support the same on egress. This allows filtering locally generated > > t

Re: [PATCH bpf-next v3 5/8] bpftool: support dumping metadata

2020-09-02 Thread Andrii Nakryiko
On Fri, Aug 28, 2020 at 12:37 PM Stanislav Fomichev wrote: > > From: YiFei Zhu > > Added a flag "--metadata" to `bpftool prog list` to dump the metadata > contents. For some formatting some BTF code is put directly in the > metadata dumping. Sanity checks on the map and the kind of the btf_type >

[PATCH net-next 1/3] net: phy: Support enabling clocks prior to bus probe

2020-09-02 Thread Florian Fainelli
Some Ethernet PHYs may require that their clock, which typically drives their logic to respond to reads on the MDIO bus be enabled before issusing a MDIO bus scan. We have a chicken and egg problem though which is that we cannot enable a given Ethernet PHY's device clock until we have a phy_device

[PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Florian Fainelli
The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 18 +- 1

[PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe

2020-09-02 Thread Florian Fainelli
Hi all, This patch series takes care of enabling the Ethernet PHY clocks in DT-based systems (we have no way to do it for ACPI, and ACPI would likely keep all of this hardware enabled anyway). Please test on your respective platforms, mine still seems to have a race condition that I am tracking d

[PATCH net-next 2/3] net: phy: mdio-bcm-unimac: Enable GPHY resources during bus reset

2020-09-02 Thread Florian Fainelli
The UniMAC MDIO bus controller allows the interfacing with various internal Broadcom STB Gigabit PHYs which do require two things: - they require that a digital clock be enabled for their MDIO interface to work at all - they require that at least one MDIO transaction goes through their interf

Re: [PATCH net-next v2 3/3] net: dp83869: Add speed optimization feature

2020-09-02 Thread kernel test robot
dc1a9bf2c8169d9f607502162af1858a73a18cb8 config: i386-randconfig-m021-20200902 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot smatch warnings: drivers/net/phy/dp83869.c:669 dp83869_config_init() warn

Re: [PATCH v3] staging: qlge: fix build breakage with dumping enabled

2020-09-02 Thread Benjamin Poirier
On 2020-09-02 22:00 +0800, Coiby Xu wrote: > This fixes commit 0107635e15ac > ("staging: qlge: replace pr_err with netdev_err") which introduced an > build breakage of missing `struct ql_adapter *qdev` for some functions > and a warning of type mismatch with dumping enabled, i.e., > > $ make CFLAG

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Cong Wang
On Wed, Sep 2, 2020 at 7:22 PM Yunsheng Lin wrote: > > On 2020/9/3 9:48, Cong Wang wrote: > > On Wed, Sep 2, 2020 at 6:22 PM Yunsheng Lin wrote: > >> > >> On 2020/9/3 8:35, Cong Wang wrote: > >>> On Tue, Sep 1, 2020 at 11:35 PM Yunsheng Lin > >>> wrote: > > On 2020/9/2 12:41, Cong Wan

Re: [PATCH bpf 1/2] bpf: do not use bucket_lock for hashmap iterator

2020-09-02 Thread Yonghong Song
On 9/2/20 6:25 PM, Andrii Nakryiko wrote: On Wed, Sep 2, 2020 at 4:56 PM Yonghong Song wrote: Currently, for hashmap, the bpf iterator will grab a bucket lock, a spinlock, before traversing the elements in the bucket. This can ensure all bpf visted elements are valid. But this mechanism may

Re: [PATCH bpf-next v3 3/8] libbpf: Add BPF_PROG_BIND_MAP syscall and use it on .metadata section

2020-09-02 Thread Andrii Nakryiko
On Fri, Aug 28, 2020 at 12:37 PM Stanislav Fomichev wrote: > > From: YiFei Zhu > > The patch adds a simple wrapper bpf_prog_bind_map around the syscall. > And when using libbpf to load a program, it will probe the kernel for > the support of this syscall, and scan for the .metadata ELF section >

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Yunsheng Lin
On 2020/9/3 9:48, Cong Wang wrote: > On Wed, Sep 2, 2020 at 6:22 PM Yunsheng Lin wrote: >> >> On 2020/9/3 8:35, Cong Wang wrote: >>> On Tue, Sep 1, 2020 at 11:35 PM Yunsheng Lin wrote: On 2020/9/2 12:41, Cong Wang wrote: > On Tue, Sep 1, 2020 at 6:42 PM Yunsheng Lin > wrote: >

Re: [PATCH bpf-next v3 2/8] bpf: Add BPF_PROG_BIND_MAP syscall

2020-09-02 Thread Andrii Nakryiko
On Fri, Aug 28, 2020 at 12:37 PM Stanislav Fomichev wrote: > > From: YiFei Zhu > > This syscall binds a map to a program. -EEXIST if the map is > already bound to the program. > > Cc: YiFei Zhu > Signed-off-by: YiFei Zhu > Signed-off-by: Stanislav Fomichev > --- > include/uapi/linux/bpf.h

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Florian Fainelli
On 9/2/2020 3:20 PM, Andrew Lunn wrote: + priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); + if (IS_ERR(priv->clk)) + return PTR_ERR(priv->clk); + + /* To get there, the mdiobus registration logic already enabled our +* clock otherwise we

Re: [PATCH net-next v2 3/3] net: dp83869: Add speed optimization feature

2020-09-02 Thread Jakub Kicinski
On Wed, 2 Sep 2020 15:34:44 -0500 Dan Murphy wrote: > Set the speed optimization bit on the DP83869 PHY. > > Speed optimization, also known as link downshift, enables fallback to 100M > operation after multiple consecutive failed attempts at Gigabit link > establishment. Such a case could occur if

[PATCH net-next] net: tighten the definition of interface statistics

2020-09-02 Thread Jakub Kicinski
This patch is born out of an investigation into which IEEE statistics correspond to which struct rtnl_link_stats64 members. Turns out that there seems to be reasonable consensus on the matter, among many drivers. To save others the time (and it took more time than I'm comfortable admitting) I'm add

Re: [PATCH net-next] net: dsa: bcm_sf2: Ensure that MDIO diversion is used

2020-09-02 Thread Florian Fainelli
On 9/2/2020 6:13 PM, Andrew Lunn wrote: On Wed, Sep 02, 2020 at 02:03:27PM -0700, Florian Fainelli wrote: Registering our slave MDIO bus outside of the OF infrastructure is necessary in order to avoid creating double references of the same Device Tree nodes, however it is not sufficient to gu

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Cong Wang
On Wed, Sep 2, 2020 at 6:22 PM Yunsheng Lin wrote: > > On 2020/9/3 8:35, Cong Wang wrote: > > On Tue, Sep 1, 2020 at 11:35 PM Yunsheng Lin wrote: > >> > >> On 2020/9/2 12:41, Cong Wang wrote: > >>> On Tue, Sep 1, 2020 at 6:42 PM Yunsheng Lin > >>> wrote: > > On 2020/9/2 2:24, Cong Wan

Re: [PATCH net-next 6/7] net: mvpp2: ptp: add interrupt handling

2020-09-02 Thread Andrew Lunn
> +static void mvpp2_isr_handle_ptp_queue(struct mvpp2_port *port, int nq) > +{ > + void __iomem *ptp_q; > + u32 r0, r1, r2; > + > + ptp_q = port->priv->iface_base + MVPP22_PTP_BASE(port->gop_id); > + if (nq) > + ptp_q += MVPP22_PTP_TX_Q1_R0 - MVPP22_PTP_TX_Q0_R0; > + >

Re: [RFC net-next] udp: add a GSO type for UDPv6

2020-09-02 Thread tanhuazhong
On 2020/9/3 6:43, David Miller wrote: From: Huazhong Tan Date: Wed, 2 Sep 2020 20:15:11 +0800 In some cases, for UDP GSO, UDPv4 and UDPv6 need to be handled separately, for example, checksum offload, so add new GSO type SKB_GSO_UDPV6_L4 for UDPv6, and the old SKB_GSO_UDP_L4 stands for UDPv4

Re: [PATCH bpf 1/2] bpf: do not use bucket_lock for hashmap iterator

2020-09-02 Thread Andrii Nakryiko
On Wed, Sep 2, 2020 at 4:56 PM Yonghong Song wrote: > > Currently, for hashmap, the bpf iterator will grab a bucket lock, a > spinlock, before traversing the elements in the bucket. This can ensure > all bpf visted elements are valid. But this mechanism may cause > deadlock if update/deletion happ

Re: [RFC net-next] udp: add a GSO type for UDPv6

2020-09-02 Thread tanhuazhong
On 2020/9/2 22:33, Willem de Bruijn wrote: On Wed, Sep 2, 2020 at 2:18 PM Huazhong Tan wrote: In some cases, for UDP GSO, UDPv4 and UDPv6 need to be handled separately, for example, checksum offload, so add new GSO type SKB_GSO_UDPV6_L4 for UDPv6, and the old SKB_GSO_UDP_L4 stands for UDPv4

Re: [PATCH net-next 3/7] net: mvpp2: check first level interrupt status registers

2020-09-02 Thread Andrew Lunn
On Wed, Sep 02, 2020 at 05:11:46PM +0100, Russell King wrote: > Check the first level interrupt status registers to determine how to > further process the port interrupt. We will need this to know whether > to invoke the link status processing and/or the PTP processing for > both XLG and GMAC. As

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Yunsheng Lin
On 2020/9/3 8:35, Cong Wang wrote: > On Tue, Sep 1, 2020 at 11:35 PM Yunsheng Lin wrote: >> >> On 2020/9/2 12:41, Cong Wang wrote: >>> On Tue, Sep 1, 2020 at 6:42 PM Yunsheng Lin wrote: On 2020/9/2 2:24, Cong Wang wrote: > On Mon, Aug 31, 2020 at 5:59 PM Yunsheng Lin > wrote:

Re: [PATCH net-next 2/7] net: mvpp2: rename mis-named "link status" interrupt

2020-09-02 Thread Andrew Lunn
On Wed, Sep 02, 2020 at 05:11:41PM +0100, Russell King wrote: > The link interrupt is used for way more than just the link status; it > comes from a collection of units to do with the port. The Marvell > documentation describes the interrupt as "GOP port X interrupt". > > Since we are adding PTP s

Re: [PATCH net-next 1/7] net: mvpp2: restructure "link status" interrupt handling

2020-09-02 Thread Andrew Lunn
On Wed, Sep 02, 2020 at 05:11:35PM +0100, Russell King wrote: > The "link status" interrupt is used for more than just link status. > Restructure mvpp2_link_status_isr() so we can add additional handling. > > Signed-off-by: Russell King I don't particularly know this code, so it would be good to

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Yunsheng Lin
On 2020/9/2 17:20, Eric Dumazet wrote: > > > On 9/2/20 1:14 AM, Yunsheng Lin wrote: >> On 2020/9/2 15:32, Eric Dumazet wrote: >>> >>> >>> On 9/1/20 11:34 PM, Yunsheng Lin wrote: >>> I am not familiar with TCQ_F_CAN_BYPASS. From my understanding, the problem is that there is no orde

Re: [PATCH net-next] net: dsa: bcm_sf2: Ensure that MDIO diversion is used

2020-09-02 Thread Andrew Lunn
On Wed, Sep 02, 2020 at 02:03:27PM -0700, Florian Fainelli wrote: > Registering our slave MDIO bus outside of the OF infrastructure is > necessary in order to avoid creating double references of the same > Device Tree nodes, however it is not sufficient to guarantee that the > MDIO bus diversion is

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Cong Wang
On Tue, Sep 1, 2020 at 11:35 PM Yunsheng Lin wrote: > > On 2020/9/2 12:41, Cong Wang wrote: > > On Tue, Sep 1, 2020 at 6:42 PM Yunsheng Lin wrote: > >> > >> On 2020/9/2 2:24, Cong Wang wrote: > >>> On Mon, Aug 31, 2020 at 5:59 PM Yunsheng Lin > >>> wrote: > > Currently there is concur

[PATCH net v2] drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices

2020-09-02 Thread Xie He
PVC devices are virtual devices in this driver stacked on top of the actual HDLC device. They are the devices normal users would use. PVC devices have two types: normal PVC devices and Ethernet-emulating PVC devices. When transmitting data with PVC devices, the ndo_start_xmit function will prepend

[PATCH bpf 1/2] bpf: do not use bucket_lock for hashmap iterator

2020-09-02 Thread Yonghong Song
Currently, for hashmap, the bpf iterator will grab a bucket lock, a spinlock, before traversing the elements in the bucket. This can ensure all bpf visted elements are valid. But this mechanism may cause deadlock if update/deletion happens to the same bucket of the visited map in the program. For e

[PATCH bpf 0/2] bpf: do not use bucket_lock for hashmap iterator

2020-09-02 Thread Yonghong Song
Currently, the bpf hashmap iterator takes a bucket_lock, a spin_lock, before visiting each element in the bucket. This will cause a deadlock if a map update/delete operates on an element with the same bucket id of the visited map. To avoid the deadlock, let us just use rcu_read_lock instead of buc

[PATCH bpf 2/2] selftests/bpf: add bpf_{update,delete}_map_elem in hashmap iter program

2020-09-02 Thread Yonghong Song
Added bpf_{updata,delete}_map_elem to the very map element the iter program is visiting. Due to rcu protection, the visited map elements, although stale, should still contain correct values. $ ./test_progs -n 4/18 #4/18 bpf_hash_map:OK #4 bpf_iter:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED

Re: [PATCH net-next] net: dsa: bcm_sf2: Ensure that MDIO diversion is used

2020-09-02 Thread kernel test robot
Hi Florian, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-dsa-bcm_sf2-Ensure-that-MDIO-diversion-is-used/20200903-050536 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/

Re: [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 23:17:46 +0300 > i. e. this doesn't exclude IPv6 or makes it worse for it, on the > contrary the ops needed to > implement MLDv2 state transitions are in this set, they just need to > be extended for v6. > The new br_ip src group field contains also

Re: [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 23:08:40 +0300 > Once all the infra (with fast-path) for IGMPv3 is in, MLDv2 should > be a much easier change, but I must admit given the amount of work > this required I haven't yet looked into MLDv2 in details. The > majority of the changes would

Re: [PATCH net-next] Sysctl parameter to disable TCP RST packet to unknown socket

2020-09-02 Thread David Miller
From: Mihail Milev Date: Wed, 2 Sep 2020 21:56:56 +0200 > What? > > Create a new sysctl parameter called tcp_disable_rst_unkn_socket, > which by default is set to 0 - "disabled". When this parameter is > set to 1 - "enabled", it suppresses sending a TCP RST packet as a > response to received TC

Re: [PATCH net] net: dp83867: Fix WoL SecureOn password

2020-09-02 Thread David Miller
From: Dan Murphy Date: Wed, 2 Sep 2020 14:27:04 -0500 > Fix the registers being written to as the values were being over written > when writing the same registers. > > Fixes: caabee5b53f5 ("net: phy: dp83867: support Wake on LAN") > Signed-off-by: Dan Murphy Applied and queued up for -stable,

Re: [PATCH net-next v2 4/9] gve: Add support for dma_mask register

2020-09-02 Thread David Miller
From: David Awogbemila Date: Wed, 2 Sep 2020 11:42:37 -0700 > I don't think there is a specific 24-bit device in mind here, only > that we have seen 32-bit addressing use cases where the guest ran out > of SWIOTLB space and restricting to GFP_DMA32 helped.. so we thought > it would be natural for

Re: [PATCH net] nfp: flower: fix ABI mismatch between driver and firmware

2020-09-02 Thread David Miller
From: Simon Horman Date: Wed, 2 Sep 2020 17:04:58 +0200 > From: Louis Peens > > Fix an issue where the driver wrongly detected ipv6 neighbour updates > from the NFP as corrupt. Add a reserved field on the kernel side so > it is similar to the ipv4 version of the struct and has space for the >

Re: [PATCH net-next 1/5] sfc: add and use efx_tx_send_pending in tx.c

2020-09-02 Thread David Miller
From: Edward Cree Date: Wed, 2 Sep 2020 15:35:53 +0100 > + tx_queue->xmit_more_available = true; I don't understand why you're setting xmit_more_available unconditionally to true now instead of setting it to 'xmit_more' as seen by this transmit attempt. Why would you want to signal that xmi

Re: [PATCH v2] tipc: fix shutdown() of connectionless socket

2020-09-02 Thread David Miller
From: Tetsuo Handa Date: Wed, 2 Sep 2020 22:44:16 +0900 > syzbot is reporting hung task at nbd_ioctl() [1], for there are two > problems regarding TIPC's connectionless socket's shutdown() operation. ... > One problem is that wait_for_completion() from flush_workqueue() from > nbd_start_device_i

Re: [PATCH v2 net-next 0/6] ionic: struct cleanups

2020-09-02 Thread David Miller
From: Shannon Nelson Date: Tue, 1 Sep 2020 11:20:18 -0700 > This patchset has a few changes for better cacheline use, > to cleanup a page handling API, and to streamline the > Adminq/Notifyq queue handling. Lastly, we also have a couple > of fixes pointed out by the friendly kernel test robot.

Re: [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy

2020-09-02 Thread David Miller
From: Ido Schimmel Date: Wed, 2 Sep 2020 16:16:59 +0300 > From: Ido Schimmel > > Cited commit added the possible value of '2', but it cannot be set. Fix > it by adjusting the maximum value to '2'. This is consistent with the > corresponding IPv4 sysctl. > > Before: > > # sysctl -w net.ipv6.f

Re: [RFC net-next] udp: add a GSO type for UDPv6

2020-09-02 Thread David Miller
From: Huazhong Tan Date: Wed, 2 Sep 2020 20:15:11 +0800 > In some cases, for UDP GSO, UDPv4 and UDPv6 need to be handled > separately, for example, checksum offload, so add new GSO type > SKB_GSO_UDPV6_L4 for UDPv6, and the old SKB_GSO_UDP_L4 stands > for UDPv4. > > Signed-off-by: Huazhong Tan

Re: [PATCH net] drivers/net/wan/hdlc: Change the default of hard_header_len to 0

2020-09-02 Thread David Miller
From: Xie He Date: Wed, 2 Sep 2020 05:07:06 -0700 > Change the default value of hard_header_len in hdlc.c from 16 to 0. > > Currently there are 6 HDLC protocol drivers, among them: > > hdlc_raw_eth, hdlc_cisco, hdlc_ppp, hdlc_x25 set hard_header_len when > attaching the protocol, overriding th

Re: [PATCH net] net: gemini: Fix another missing clk_disable_unprepare() in probe

2020-09-02 Thread David Miller
From: Dan Carpenter Date: Wed, 2 Sep 2020 14:56:31 +0300 > We recently added some calls to clk_disable_unprepare() but we missed > the last error path if register_netdev() fails. > > I made a couple cleanups so we avoid mistakes like this in the future. > First I reversed the "if (!ret)" conditi

Re: [PATCH net-next 0/1] Support for VLAN interface over HSR/PRP

2020-09-02 Thread Murali Karicheri
All, On 9/2/20 12:14 PM, Murali Karicheri wrote: All, On 9/1/20 3:54 PM, Murali Karicheri wrote: This series add support for creating VLAN interface over HSR or PRP interface. Typically industrial networks uses VLAN in deployment and this capability is needed to support these networks. This i

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Andrew Lunn
> + priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); > + if (IS_ERR(priv->clk)) > + return PTR_ERR(priv->clk); > + > + /* To get there, the mdiobus registration logic already enabled our > + * clock otherwise we would not have probed this device since we

Re: [RFC net-next 1/2] net: phy: Support enabling clocks prior to bus probe

2020-09-02 Thread Andrew Lunn
Hi Florian > Some Ethernet PHYs may require that their clock, which typically drives > their logic to respond to reads on the MDIO bus be enabled before > issusing a MDIO bus scan. issuing > > We have a chicken and egg problem though which is that we cannot enable > a given Ethernet PHY's devic

Re: [PATCH net-next 4/5] ibmvnic: Reporting device ACL settings through sysfs

2020-09-02 Thread Sukadev Bhattiprolu
Thomas Falcon [tlfal...@linux.ibm.com] wrote: > Access Control Lists can be defined for each IBM VNIC > adapter at time of creation. MAC address and VLAN ID's > may be specified, as well as a Port VLAN ID (PVID). > These may all be requested though read-only sysfs files: > mac_acl, vlan_acl, and pv

Re: [PATCH] libbpf: Remove arch-specific include path in Makefile

2020-09-02 Thread Daniel Borkmann
On 9/2/20 10:58 PM, Andrii Nakryiko wrote: On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao wrote: Ubuntu mainline builds for ppc64le are failing with the below error (*): CALL/home/kernel/COD/linux/scripts/atomic/check-atomics.sh DESCEND bpf/resolve_btfids Auto-detecting system

Re: [PATCH bpf-next] xsk: fix use-after-free in failed shared_umem bind

2020-09-02 Thread Daniel Borkmann
On 9/2/20 9:36 AM, Magnus Karlsson wrote: Fix use-after-free when a shared umem bind fails. The code incorrectly tried to free the allocated buffer pool both in the bind code and then later also when the socket was released. Fix this by setting the buffer pool pointer to NULL after the bind code

Re: [RFC net-next 1/2] net: phy: Support enabling clocks prior to bus probe

2020-09-02 Thread Florian Fainelli
On 9/2/2020 2:33 PM, Florian Fainelli wrote: Some Ethernet PHYs may require that their clock, which typically drives their logic to respond to reads on the MDIO bus be enabled before issusing a MDIO bus scan. We have a chicken and egg problem though which is that we cannot enable a given Ethe

Re: [PATCH 22/28] sgiseeq: convert from dma_cache_sync to dma_sync_single_for_device

2020-09-02 Thread Thomas Bogendoerfer
On Tue, Sep 01, 2020 at 07:38:10PM +0200, Thomas Bogendoerfer wrote: > On Tue, Sep 01, 2020 at 07:16:27PM +0200, Christoph Hellwig wrote: > > Well, if IP22 doesn't speculate (which I'm pretty sure is the case), > > dma_sync_single_for_cpu should indeeed be a no-op. But then there > > also shouldn'

Re: [PATCH bpf-next v3 4/8] libbpf: implement bpf_prog_find_metadata

2020-09-02 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Wed, Sep 02, 2020 at 11:43:26AM +0200, Toke Høiland-Jørgensen wrote: >> > >> > I don't feel great about this libbpf api. bpftool already does >> > bpf_obj_get_info_by_fd() for progs and for maps. >> > This extra step and extra set of syscalls is redundant wor

[RFC net-next 0/2] net: phy: Support enabling clocks prior to bus probe

2020-09-02 Thread Florian Fainelli
Hi all, This patch series takes care of enabling the Ethernet PHY clocks in DT-based systems (we have no way to do it for ACPI, and ACPI would likely keep all of this hardware enabled anyway). Please test on your respective platforms, mine still seems to have a race condition that I am tracking d

[RFC net-next 1/2] net: phy: Support enabling clocks prior to bus probe

2020-09-02 Thread Florian Fainelli
Some Ethernet PHYs may require that their clock, which typically drives their logic to respond to reads on the MDIO bus be enabled before issusing a MDIO bus scan. We have a chicken and egg problem though which is that we cannot enable a given Ethernet PHY's device clock until we have a phy_device

[RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Florian Fainelli
The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 29 +

Re: [PATCH net-next] Sysctl parameter to disable TCP RST packet to unknown socket

2020-09-02 Thread Eric Dumazet
On 9/2/20 12:56 PM, Mihail Milev wrote: > What? > > Create a new sysctl parameter called tcp_disable_rst_unkn_socket, > which by default is set to 0 - "disabled". When this parameter is > set to 1 - "enabled", it suppresses sending a TCP RST packet as a > response to received TCP packets destin

Re: [PATCH net-next] selftests: mptcp: fix typo in mptcp_connect usage

2020-09-02 Thread David Miller
From: Davide Caratti Date: Wed, 2 Sep 2020 13:44:24 +0200 > in mptcp_connect, 's' selects IPPROTO_MPTCP / IPPROTO_TCP as the value of > 'protocol' in socket(), and 'm' switches between different send / receive > modes. Fix die_usage(): swap 'm' and 's' and add missing 'sendfile' mode. > > Signe

[PATCH net] drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices

2020-09-02 Thread Xie He
PVC devices are virtual devices in this driver stacked on top of the actual HDLC device. They are the devices normal users would use. PVC devices have two types: normal PVC devices and Ethernet-emulated PVC devices. When transmitting data with PVC devices, the ndo_start_xmit function will prepend

Re: [PATCH bpf-next v3 4/8] libbpf: implement bpf_prog_find_metadata

2020-09-02 Thread Alexei Starovoitov
On Wed, Sep 02, 2020 at 11:43:26AM +0200, Toke Høiland-Jørgensen wrote: > > > > I don't feel great about this libbpf api. bpftool already does > > bpf_obj_get_info_by_fd() for progs and for maps. > > This extra step and extra set of syscalls is redundant work. > > I think it's better to be done as

[PATCH net-next] net: dsa: bcm_sf2: Ensure that MDIO diversion is used

2020-09-02 Thread Florian Fainelli
Registering our slave MDIO bus outside of the OF infrastructure is necessary in order to avoid creating double references of the same Device Tree nodes, however it is not sufficient to guarantee that the MDIO bus diversion is used because of_phy_connect() will still resolve to a valid PHY phandle a

Re: [PATCH] libbpf: Remove arch-specific include path in Makefile

2020-09-02 Thread Andrii Nakryiko
On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao wrote: > > Ubuntu mainline builds for ppc64le are failing with the below error (*): > CALL/home/kernel/COD/linux/scripts/atomic/check-atomics.sh > DESCEND bpf/resolve_btfids > > Auto-detecting system features: > ...

Re: [PATCH net v6 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-02 Thread Vadym Kochan
Sorry, I mistakenly used "net" instead of "net-next" as label. On Wed, Sep 02, 2020 at 06:04:36PM +0300, Vadym Kochan wrote: > Marvell Prestera 98DX3255 integrates up to 24 ports of 1GbE with 8 > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > wireless SMB deployment. > > Pre

[PATCH net-next v2 2/3] net: phy: dp83869: support Wake on LAN

2020-09-02 Thread Dan Murphy
This adds WoL support on TI DP83869 for magic, magic secure, unicast and broadcast. Signed-off-by: Dan Murphy --- drivers/net/phy/dp83869.c | 128 ++ 1 file changed, 128 insertions(+) diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c index 48

[PATCH net-next v2 3/3] net: dp83869: Add speed optimization feature

2020-09-02 Thread Dan Murphy
Set the speed optimization bit on the DP83869 PHY. Speed optimization, also known as link downshift, enables fallback to 100M operation after multiple consecutive failed attempts at Gigabit link establishment. Such a case could occur if cabling with only four wires (two twisted pairs) were connect

[PATCH net-next v2 1/3] net: dp83869: Add ability to advertise Fiber connection

2020-09-02 Thread Dan Murphy
Add the ability to advertise the Fiber connection if the strap or the op-mode is configured for 100Base-FX. Auto negotiation is not supported on this PHY when in fiber mode. Signed-off-by: Dan Murphy --- drivers/net/phy/dp83869.c | 36 1 file changed, 36 ins

Re: [PATCHv3 net-next] dropwatch: Support monitoring of dropped frames

2020-09-02 Thread Eric Dumazet
On 9/2/20 10:16 AM, izabela.bakoll...@gmail.com wrote: > From: Izabela Bakollari > > Dropwatch is a utility that monitors dropped frames by having userspace > record them over the dropwatch protocol over a file. This augument > allows live monitoring of dropped frames using tools like tcpdump.

[PATCH net-next v2 0/3] DP83869 Feature additions

2020-09-02 Thread Dan Murphy
Hello Adding features to the DP83869 PHY. These features are also supported in other TI PHYs like the DP83867 and DP83822. Fiber Advertisement: (This is v2 fixing the return of phy_modify) The DP83869 supports a 100Base-FX connection. When this mode is selected the driver needs to advertise that

[PATCH v7 bpf-next 4/7] bpf, x64: rework pro/epilogue and tailcall handling in JIT

2020-09-02 Thread Maciej Fijalkowski
This commit serves two things: 1) it optimizes BPF prologue/epilogue generation 2) it makes possible to have tailcalls within BPF subprogram Both points are related to each other since without 1), 2) could not be achieved. In [1], Alexei says: "The prologue will look like: nop5 xor eax,eax  // tw

Re: [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread Nikolay Aleksandrov
On 9/2/20 11:08 PM, Nikolay Aleksandrov wrote: On 9/2/20 10:58 PM, David Miller wrote: From: Nikolay Aleksandrov Date: Wed,  2 Sep 2020 14:25:14 +0300 Here're the sets that will come next (in order):   - Fast path patch-set which adds support for (S, G) mdb entries needed     for IGMPv3 forwa

[PATCH v7 bpf-next 7/7] selftests: bpf: add dummy prog for bpf2bpf with tailcall

2020-09-02 Thread Maciej Fijalkowski
Introduce 6th test to taicalls kselftest that checks if tailcall can be correctly executed from the BPF subprogram. Signed-off-by: Maciej Fijalkowski --- .../selftests/bpf/prog_tests/tailcalls.c | 85 +++ tools/testing/selftests/bpf/progs/tailcall6.c | 38 + 2 files

[PATCH v7 bpf-next 2/7] bpf: propagate poke descriptors to subprograms

2020-09-02 Thread Maciej Fijalkowski
Previously, there was no need for poke descriptors being present in subprogram's bpf_prog_aux struct since tailcalls were simply not allowed in them. Each subprog is JITed independently so in order to enable JITing subprograms that use tailcalls, do the following: - in fixup_bpf_calls() store the

[PATCH v7 bpf-next 0/7] bpf: tailcalls in BPF subprograms

2020-09-02 Thread Maciej Fijalkowski
v6->v7: - Limit the caller's stack depth down to 256 so that at worst case of tailcall/bpf2bpf combination the stack size will not exceed 8k (Alexei) v5->v6: - propagate only those poke descriptors that individual subprogram is actually using (Daniel) - drop the cumbersome check if poke desc g

[PATCH v7 bpf-next 3/7] bpf: rename poke descriptor's 'ip' member to 'tailcall_target'

2020-09-02 Thread Maciej Fijalkowski
Reflect the actual purpose of poke->ip and rename it to poke->tailcall_target so that it will not the be confused with another poke target that will be introduced in next commit. While at it, do the same thing with poke->ip_stable - rename it to poke->tailcall_target_stable. Signed-off-by: Maciej

[PATCH v7 bpf-next 1/7] bpf, x64: use %rcx instead of %rax for tail call retpolines

2020-09-02 Thread Maciej Fijalkowski
Currently, %rax is used to store the jump target when BPF program is emitting the retpoline instructions that are handling the indirect tailcall. There is a plan to use %rax for different purpose, which is storing the tail call counter. In order to preserve this value across the tailcalls, adjust

[PATCH v7 bpf-next 5/7] bpf: limit caller's stack depth 256 for subprogs with tailcalls

2020-09-02 Thread Maciej Fijalkowski
Protect against potential stack overflow that might happen when bpf2bpf calls get combined with tailcalls. Limit the caller's stack depth for such case down to 256 so that the worst case scenario would result in 8k stack size (32 which is tailcall limit * 256 = 8k). Suggested-by: Alexei Starovoito

[PATCH v7 bpf-next 6/7] bpf: allow for tailcalls in BPF subprograms for x64 JIT

2020-09-02 Thread Maciej Fijalkowski
Relax verifier's restriction that was meant to forbid tailcall usage when subprog count was higher than 1. Also, do not max out the stack depth of program that utilizes tailcalls. Signed-off-by: Maciej Fijalkowski --- kernel/bpf/verifier.c | 4 1 file changed, 4 insertions(+) diff --git a

Re: [PATCH net] net: dp83867: Fix WoL SecureOn password

2020-09-02 Thread Florian Fainelli
On 9/2/2020 12:27 PM, Dan Murphy wrote: Fix the registers being written to as the values were being over written when writing the same registers. Fixes: caabee5b53f5 ("net: phy: dp83867: support Wake on LAN") Signed-off-by: Dan Murphy Reviewed-by: Florian Fainelli -- Florian

RE: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-09-02 Thread Parav Pandit
> From: Parav Pandit > Sent: Wednesday, September 2, 2020 9:49 PM > > Hi Jakub, > > > From: Jakub Kicinski > > Sent: Wednesday, September 2, 2020 8:54 PM > > > > On Wed, 2 Sep 2020 10:00:11 +0200 Jiri Pirko wrote: > > >>> I didn't quite get the fact that you want to not show controller > > >>

Re: [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread Nikolay Aleksandrov
On 9/2/20 10:58 PM, David Miller wrote: From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 14:25:14 +0300 Here're the sets that will come next (in order): - Fast path patch-set which adds support for (S, G) mdb entries needed for IGMPv3 forwarding, entry add source (kernel, user-space etc)

Re: [PATCH v6 bpf-next 0/6] bpf: tailcalls in BPF subprograms

2020-09-02 Thread Maciej Fijalkowski
On Tue, Sep 01, 2020 at 09:24:12AM -0700, Alexei Starovoitov wrote: [...] > > > > diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c > > > > index 880f283adb66..56b38536b1dd 100644 > > > > --- a/arch/x86/net/bpf_jit_comp.c > > > > +++ b/arch/x86/net/bpf_jit_comp.c > > > > @@ -

[PATCH net-next] Sysctl parameter to disable TCP RST packet to unknown socket

2020-09-02 Thread Mihail Milev
What? Create a new sysctl parameter called tcp_disable_rst_unkn_socket, which by default is set to 0 - "disabled". When this parameter is set to 1 - "enabled", it suppresses sending a TCP RST packet as a response to received TCP packets destined for a socket, which is unknown to the kernel. Impor

Re: [PATCH v2 bpf-next 14/14] selftests/bpf: convert cls_redirect selftest to use __noinline

2020-09-02 Thread Andrii Nakryiko
On Tue, Sep 1, 2020 at 10:46 PM Alexei Starovoitov wrote: > > On Mon, Aug 31, 2020 at 06:50:03PM -0700, Andrii Nakryiko wrote: > > -static bool ipv4_is_fragment(const struct iphdr *ip) > > +static __noinline bool ipv4_is_fragment(const struct iphdr *ip) > > { > > uint16_t frag_off = ip->fra

Re: [PATCH net] net: dp83867: Fix WoL SecureOn password

2020-09-02 Thread Andrew Lunn
On Wed, Sep 02, 2020 at 02:27:04PM -0500, Dan Murphy wrote: > Fix the registers being written to as the values were being over written > when writing the same registers. > > Fixes: caabee5b53f5 ("net: phy: dp83867: support Wake on LAN") > Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn

Re: [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 14:25:14 +0300 > Here're the sets that will come next (in order): > - Fast path patch-set which adds support for (S, G) mdb entries needed >for IGMPv3 forwarding, entry add source (kernel, user-space etc) >needed for IGMPv3 entry managemen

Re: [PATCH v2 bpf-next 12/14] selftests/bpf: convert pyperf, strobemeta, and l4lb_noinline to __noinline

2020-09-02 Thread Andrii Nakryiko
On Tue, Sep 1, 2020 at 10:45 PM Alexei Starovoitov wrote: > > On Mon, Aug 31, 2020 at 06:50:01PM -0700, Andrii Nakryiko wrote: > > diff --git a/tools/testing/selftests/bpf/progs/pyperf.h > > b/tools/testing/selftests/bpf/progs/pyperf.h > > index cc615b82b56e..13998aee887f 100644 > > --- a/tools/t

[PATCH net-next 0/2] ionic: add devlink dev flash support

2020-09-02 Thread Shannon Nelson
Add support for using devlink's dev flash facility to update the firmware on an ionic device. This is a simple model of pushing the firmware file to the NIC, asking the NIC to unpack and install the file into the device, and then activating it for the next boot. If any of these steps fail, the wh

[PATCH net-next 2/2] ionic: add devlink firmware update

2020-09-02 Thread Shannon Nelson
Add support for firmware update through the devlink interface. This update copies the firmware object into the device, asks the current firmware to install it, then asks the firmware to set the device to use the new firmware on the next boot-up. The install and activate steps are launched as async

Re: [PATCH v2 bpf-next 07/14] selftests/bpf: add selftest for multi-prog sections and bpf-to-bpf calls

2020-09-02 Thread Andrii Nakryiko
On Tue, Sep 1, 2020 at 10:41 PM Alexei Starovoitov wrote: > > On Mon, Aug 31, 2020 at 06:49:56PM -0700, Andrii Nakryiko wrote: > > + > > +__noinline int sub1(int x) > > +{ > > + return x + 1; > > +} > > + > > +static __noinline int sub5(int v); > > + > > +__noinline int sub2(int y) > > +{ > >

  1   2   3   >