[PATCH bpf-next] libbpf: add a bunch of attribute getters/setters for map definitions

2020-06-20 Thread Andrii Nakryiko
Add a bunch of getter for various aspects of BPF map. Some of these attribute (e.g., key_size, value_size, type, etc) are available right now in struct bpf_map_def, but this patch adds getter allowing to fetch them individually. bpf_map_def approach isn't very scalable, when ABI stability requireme

Re: [PATCH net-next v2 0/4] Marvell mvpp2 improvements

2020-06-20 Thread David Miller
From: Russell King - ARM Linux admin Date: Sat, 20 Jun 2020 10:20:47 +0100 > This series primarily cleans up mvpp2, but also fixes a left-over from > 91a208f2185a ("net: phylink: propagate resolved link config via > mac_link_up()"). > > Patch 1 introduces some port helpers: > mvpp2_port_suppor

Re: [PATCH] net Add MODULE_DESCRIPTION entries to network modules

2020-06-20 Thread David Miller
From: Rob Gill Date: Sat, 20 Jun 2020 02:08:25 + > The user tool modinfo is used to get information on kernel modules, including > a > description where it is available. > > This patch adds a brief MODULE_DESCRIPTION to the following modules: > > 9p > drop_monitor > esp4_offload > esp6_off

Re: [PATCH net] rxrpc: Fix notification call on completion of discarded calls

2020-06-20 Thread David Miller
From: David Howells Date: Fri, 19 Jun 2020 23:38:16 +0100 > When preallocated service calls are being discarded, they're passed to > ->discard_new_call() to have the caller clean up any attached higher-layer > preallocated pieces before being marked completed. However, the act of > marking them

Re: pull-request: ieee802154 for net 2020-06-19

2020-06-20 Thread David Miller
From: Stefan Schmidt Date: Fri, 19 Jun 2020 22:14:59 +0200 > An update from ieee802154 for your *net* tree. > > Just two small maintenance fixes to update references to the new project > homepage. Applied, thanks.

Re: [PATCH] [net/sched] Remove redundant skb null check

2020-06-20 Thread David Miller
From: Gaurav Singh Date: Fri, 19 Jun 2020 15:24:13 -0400 > Remove the redundant null check for skb. > > Signed-off-by: Gaurav Singh Applied to net-next.

Re: [PATCH bpf] libbpf: forward-declare bpf_stats_type for systems with outdated UAPI headers

2020-06-20 Thread Song Liu
On Sat, Jun 20, 2020 at 8:12 PM Andrii Nakryiko wrote: > > Systems that doesn't yet have the very latest linux/bpf.h header, enum > bpf_stats_type will be undefined, causing compilation warnings. Prevents this > by forward-declaring enum. > > Fixes: 0bee106716cf ("libbpf: Add support for command B

[PATCH bpf] libbpf: forward-declare bpf_stats_type for systems with outdated UAPI headers

2020-06-20 Thread Andrii Nakryiko
Systems that doesn't yet have the very latest linux/bpf.h header, enum bpf_stats_type will be undefined, causing compilation warnings. Prevents this by forward-declaring enum. Fixes: 0bee106716cf ("libbpf: Add support for command BPF_ENABLE_STATS") Signed-off-by: Andrii Nakryiko --- tools/lib/bp

Re: [PATCH v9 bpf-next 2/3] libbpf: add support for command BPF_ENABLE_STATS

2020-06-20 Thread Andrii Nakryiko
On Mon, May 4, 2020 at 10:47 AM Song Liu wrote: > > > > > On May 2, 2020, at 1:00 PM, Alexei Starovoitov > > wrote: > > > > On Thu, Apr 30, 2020 at 12:15 AM Song Liu wrote: > >> > >> bpf_enable_stats() is added to enable given stats. > >> > >> Signed-off-by: Song Liu > > ... > >> diff --git a/

[PATCH 2/3] net: core: correct trivial kernel-doc inconsistencies

2020-06-20 Thread Colton Lewis
Silence documentation build warnings by correcting kernel-doc comments. ./include/linux/netdevice.h:2138: warning: Function parameter or member 'napi_defer_hard_irqs' not described in 'net_device' Signed-off-by: Colton Lewis --- include/linux/netdevice.h | 1 + 1 file changed, 1 insertion(+)

[PATCH 3/3] net: phylink: correct trivial kernel-doc inconsistencies

2020-06-20 Thread Colton Lewis
Silence documentation build warnings by correcting kernel-doc comments. In the case of pcs_{config,an_restart,link_up}, change the declaration to a normal function since these only there for documentation anyway. ./include/linux/phylink.h:74: warning: Function parameter or member 'poll_fixed_stat

Patch to correct kernel-doc comments in networking subsystem

2020-06-20 Thread Colton Lewis
This patch was sent to Dave last week, but I fear it may have been ignored because I forgot to set the subject line. Please accept or comment on this patch.

[PATCH 1/3] net: core: correct trivial kernel-doc inconsistencies

2020-06-20 Thread Colton Lewis
Silence documentation build warnings by correcting kernel-doc comments. ./net/core/dev.c:7913: warning: Function parameter or member 'dev' not described in 'netdev_get_xmit_slave' Signed-off-by: Colton Lewis --- net/core/dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/core/dev.c

Re: [PATCH net-next 0/2] tcp: remove two indirect calls from xmit path

2020-06-20 Thread David Miller
From: Eric Dumazet Date: Fri, 19 Jun 2020 12:12:33 -0700 > __tcp_transmit_skb() does two indirect calls per packet, lets get rid > of them. Series applied, thanks.

Re: [PATCH net 0/3] net: ethtool: netdev_features_strings[] cleanup

2020-06-20 Thread David Miller
Please submit this again, I have two copies in my inbox and I have no idea what is different between them. Also, in some of your patches you cut the Fixes: tag into mutliple lines please do not do that. The Fixes: tag line should be one single line no matter how long it is. Thank you.

Re: sock diag uAPI and MPTCP

2020-06-20 Thread David Miller
From: Paolo Abeni Date: Fri, 19 Jun 2020 12:54:40 +0200 > IPPROTO_MPTCP value (0x106) can't be represented using the current sock > diag uAPI, as the 'sdiag_protocol' field is 8 bits wide. > > To implement diag support for MPTCP socket, we will likely need a > 'inet_diag_req_v3' with a wider 'sd

Re: [PATCHv2 net] tc-testing: update geneve options match in tunnel_key unit tests

2020-06-20 Thread David Miller
From: Hangbin Liu Date: Fri, 19 Jun 2020 11:24:45 +0800 > Since iproute2 commit f72c3ad00f3b ("tc: m_tunnel_key: add options > support for vxlan"), the geneve opt output use key word "geneve_opts" > instead of "geneve_opt". To make compatibility for both old and new > iproute2, let's accept both

Re: [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect()

2020-06-20 Thread David Miller
From: rentao.b...@gmail.com Date: Thu, 18 Jun 2020 15:04:44 -0700 > From: Tao Ren > > Replace assignment "=" with OR "|=" for "phy->dev_flags" so "dev_flags" > configured in phy probe() function can be preserved. > > The idea is similar to commit e7312efbd5de ("net: phy: modify assignment > to

Re: [PATCH net] r8169: fix firmware not resetting tp->ocp_base

2020-06-20 Thread David Miller
From: Heiner Kallweit Date: Thu, 18 Jun 2020 23:25:50 +0200 > Typically the firmware takes care that tp->ocp_base is reset to its > default value. That's not the case (at least) for RTL8117. > As a result subsequent PHY access reads/writes the wrong page and > the link is broken. Fix this be rese

Re: [net-next PATCH] net: Avoid overwriting valid skb->napi_id

2020-06-20 Thread David Miller
From: Amritha Nambiar Date: Thu, 18 Jun 2020 14:22:15 -0700 > This will be useful to allow busy poll for tunneled traffic. In case of > busy poll for sessions over tunnels, the underlying physical device's > queues need to be polled. > > Tunnels schedule NAPI either via netif_rx() for backlog qu

Re: [PATCH] [net/sched]: Remove redundant condition in qdisc_graft

2020-06-20 Thread David Miller
From: Gaurav Singh Date: Thu, 18 Jun 2020 16:36:31 -0400 > parent cannot be NULL here since its in the else part > of the if (parent == NULL) condition. Remove the extra > check on parent pointer. > > Signed-off-by: Gaurav Singh Applied to net-next, thanks.

Re: [PATCH net] ibmvnic: continue to init in CRQ reset returns H_CLOSED

2020-06-20 Thread David Miller
From: Dany Madden Date: Thu, 18 Jun 2020 15:24:13 -0400 > Continue the reset path when partner adapter is not ready or H_CLOSED is > returned from reset crq. This patch allows the CRQ init to proceed to > establish a valid CRQ for traffic to flow after reset. > > Signed-off-by: Dany Madden App

Re: [PATCH net] ionic: tame the watchdog timer on reconfig

2020-06-20 Thread David Miller
From: Shannon Nelson Date: Thu, 18 Jun 2020 10:29:04 -0700 > Even with moving netif_tx_disable() to an earlier point when > taking down the queues for a reconfiguration, we still end > up with the occasional netdev watchdog Tx Timeout complaint. > The old method of using netif_trans_update() work

Re: [PATCH net-next 00/12] Ocelot/Felix driver cleanup

2020-06-20 Thread David Miller
From: Vladimir Oltean Date: Sat, 20 Jun 2020 18:43:35 +0300 > From: Vladimir Oltean > > Some of the code in the mscc felix and ocelot drivers was added while in > a bit of a hurry. Let's take a moment and put things in relative order. > > First 3 patches are sparse warning fixes. > > Patches

Re: [net-next,v1,0/5] Strict mode for VRF

2020-06-20 Thread David Miller
From: David Ahern Date: Sat, 20 Jun 2020 16:32:53 -0700 > On 6/19/20 3:54 PM, Andrea Mayer wrote: >> This patch set adds the new "strict mode" functionality to the Virtual >> Routing and Forwarding infrastructure (VRF). Hereafter we discuss the >> requirements and the main features of the "strict

Re: [net-next,v1,0/5] Strict mode for VRF

2020-06-20 Thread David Ahern
On 6/19/20 3:54 PM, Andrea Mayer wrote: > This patch set adds the new "strict mode" functionality to the Virtual > Routing and Forwarding infrastructure (VRF). Hereafter we discuss the > requirements and the main features of the "strict mode" for VRF. > For the set: Acked-by: David Ahern

[PATCH bpf v2] restore behaviour of CAP_SYS_ADMIN allowing the loading of networking bpf programs

2020-06-20 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This is a fix for a regression introduced in 5.8-rc1 by: commit 2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366 'bpf: Implement CAP_BPF' Before the above commit it was possible to load network bpf programs with just the CAP_SYS_ADMIN privilege. The Android bpfloader happe

[BISECTED REGRESSION] ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

2020-06-20 Thread Roman Mamedov
On Sat, 4 Apr 2020 12:18:38 +0800 Qiujun Huang wrote: > In ath9k_hif_usb_rx_cb interface number is assumed to be 0. > usb_ifnum_to_if(urb->dev, 0) > But it isn't always true. > > The case reported by syzbot: > https://lore.kernel.org/linux-usb/666c9c05a1c05...@google.com > usb 2-1:

[PATCH net-next 3/7] r8169: remove no longer needed checks for device being runtime-active

2020-06-20 Thread Heiner Kallweit
Because the netdevice is marked as detached now when parent is not accessible we can remove quite some checks. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 54 +++ 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/drivers/net/eth

[PATCH net-next 7/7] r8169: improve rtl8169_runtime_resume

2020-06-20 Thread Heiner Kallweit
Simplify rtl8169_runtime_resume() by calling rtl8169_resume(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek

[PATCH net-next 5/7] r8169: use RTNL to protect critical sections

2020-06-20 Thread Heiner Kallweit
Most relevant ops (open, close, ethtool ops) are protected with RTNL lock by net core. Make sure that such ops can't be interrupted by e.g. (runtime-)suspending by taking the RTNL lock in suspend ops and the PCI error handler. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169

[PATCH net-next 6/7] r8169: remove driver-specific mutex

2020-06-20 Thread Heiner Kallweit
Now that the critical sections are protected with RTNL lock, we don't need a separate mutex any longer. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 45 --- 1 file changed, 45 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main

[PATCH net-next 1/7] net: core: try to runtime-resume detached device in __dev_open

2020-06-20 Thread Heiner Kallweit
A netdevice may be marked as detached because the parent is runtime-suspended and not accessible whilst interface or link is down. An example are PCI network devices that go into PCI D3hot, see e.g. __igc_shutdown() or rtl8169_net_suspend(). If netdevice is down and marked as detached we can only o

[PATCH net-next 4/7] r8169: add rtl8169_up

2020-06-20 Thread Heiner Kallweit
Factor out bringing device up to a new function rtl8169_up(), similar to rtl8169_down() for bringing the device down. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 48 --- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/drivers

[PATCH net-next 2/7] r8169: mark device as not present when in PCI D3

2020-06-20 Thread Heiner Kallweit
Mark the netdevice as detached whenever we go into PCI D3hot. This allows to remove some checks e.g. from ethtool ops because dev_ethtool() checks for netif_device_present() in the beginning. In this context move waking up the queue out of rtl_reset_work() because in cases where netif_device_attac

[PATCH net-next 0/7] r8169: mark device as detached in PCI D3 and improve locking

2020-06-20 Thread Heiner Kallweit
Mark the netdevice as detached whenever parent is in PCI D3hot and not accessible. This mainly applies to runtime-suspend state. In addition take RTNL lock in suspend calls, this allows to remove the driver-specific mutex and improve PM callbacks in general. Heiner Kallweit (7): net: core: try t

[PATCH] net/9p: Validate current->sighand in client.c

2020-06-20 Thread Alexander Kapshuk
Use (un)lock_task_sighand instead of spin_lock_irqsave and spin_unlock_irqrestore to ensure current->sighand is a valid pointer as suggested in the email referenced below. Signed-off-by: Alexander Kapshuk Link: https://lore.kernel.org/lkml/20200618190807.GA20699@nautica/ --- net/9p/client.c | 18

[PATCH v2] dsa: Allow forwarding of redirected IGMP traffic

2020-06-20 Thread Daniel Mack
The driver for Marvell switches puts all ports in IGMP snooping mode which results in all IGMP/MLD frames that ingress on the ports to be forwarded to the CPU only. The bridge code in the kernel can then interpret these frames and act upon them, for instance by updating the mdb in the switch to re

[PATCH 1/2] dt-bindings: net: dwmac-meson: Add a compatible string for G12A onwards

2020-06-20 Thread Martin Blumenstingl
Amlogic Meson G12A, G12B and SM1 have the same (at least as far as we know at the time of writing) PRG_ETHERNET glue register implementation. This implementation however is slightly different from AXG as it now has an undocument "auto cali idx val" register in PRG_ETH1[17:16] which seems to be rela

[PATCH 2/2] net: stmmac: dwmac-meson8b: add a compatible string for G12A SoCs

2020-06-20 Thread Martin Blumenstingl
Amlogic Meson G12A, G12B and SM1 have the same (at least as far as we know at the time of writing) PRG_ETHERNET glue register implementation. This implementation however is slightly different from AXG as it now has an undocument "auto cali idx val" register in PRG_ETH1[17:16] which seems to be rela

[PATCH 0/2] prepare dwmac-meson8b for G12A specific initialization

2020-06-20 Thread Martin Blumenstingl
Some users are reporting that RGMII (and sometimes also RMII) Ethernet is not working for them on G12A/G12B/SM1 boards. Upon closer inspection of the vendor code for these SoCs new register bits are found. It's not clear yet how these registers work. Add a new compatible string as the first prepar

Re: [PATCH] dsa: Allow forwarding of redirected IGMP traffic

2020-06-20 Thread Andrew Lunn
On Sat, Jun 20, 2020 at 08:17:14PM +0200, Daniel Mack wrote: > The driver for Marvell switches puts all ports in IGMP snooping mode > which results in all IGMP/MLD frames that ingress on the ports to be > forwarded to the CPU only. > > The bridge code in the kernel can then interpret these frames

Re: [PATCH/RFC 3/5] ravb: Add support for explicit internal clock delay configuration

2020-06-20 Thread Sergei Shtylyov
On 06/19/2020 10:15 PM, Geert Uytterhoeven wrote: > Some EtherAVB variants support internal clock delay configuration, which > can add larger delays than the delays that are typically supported by > the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" > properties). > > Historically, t

Re: net/mlx5e: bind() always returns EINVAL with XDP_ZEROCOPY

2020-06-20 Thread Jonathan Lemon
On Sat, Jun 20, 2020 at 12:42:36PM +0200, Kal Cutter Conley wrote: > On Thu, Jun 18, 2020 at 5:23 PM Jonathan Lemon > wrote: > > > > On Sun, Jun 14, 2020 at 10:55:30AM +0200, Kal Cutter Conley wrote: > > > Hi Saeed, > > > Thanks for explaining the reasoning behind the special mlx5 queue > > > num

Re: mlx5e uplink hairpin forwarding

2020-06-20 Thread Eli Cohen
On Sat, Jun 20, 2020 at 08:02:19PM +0800, Tonghao Zhang wrote: > Hi Eli > > I review your patches and try to test it. > $ tc filter add dev enp130s0f0 protocol ip prio 1 root flower dst_ip > 11.12.13.14 skip_sw action mirred egress redirect dev enp130s0f1 > or > $ tc filter add dev enp130s0f0 pr

Re: [PATCH/RFC 2/5] ravb: Split delay handling in parsing and applying

2020-06-20 Thread Sergei Shtylyov
On 06/19/2020 10:15 PM, Geert Uytterhoeven wrote: > Currently, full delay handling is done in both the probe and resume > paths. Split it in two parts, so the resume path doesn't have to redo > the parsing part over and over again. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shty

Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-20 Thread Linus Torvalds
On Sat, Jun 20, 2020 at 12:57 AM Alexey Dobriyan wrote: > > > If you want to build the kernel with C++, you'd be a lot better off just > > doing > > > >/* C++ braindamage */ > >#define this __this > >#define new __new > > > > and deal with that instead. > > Can't do this because of pl

Re: [PATCH/RFC 1/5] dt-bindings: net: renesas,ravb: Document internal clock delay properties

2020-06-20 Thread Sergei Shtylyov
Hello! On 06/19/2020 10:15 PM, Geert Uytterhoeven wrote: > Some EtherAVB variants support internal clock delay configuration, which > can add larger delays than the delays that are typically supported by > the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" > properties). > > Add pro

[PATCH] dsa: Allow forwarding of redirected IGMP traffic

2020-06-20 Thread Daniel Mack
The driver for Marvell switches puts all ports in IGMP snooping mode which results in all IGMP/MLD frames that ingress on the ports to be forwarded to the CPU only. The bridge code in the kernel can then interpret these frames and act upon them, for instance by updating the mdb in the switch to re

Re: Question on DSA switches, IGMP forwarding and switchdev

2020-06-20 Thread Daniel Mack
On 6/20/20 4:35 PM, Andrew Lunn wrote: >> So yes, we can read the code here, but I'm wondering which packet types >> would then get this flag set, and which won't. Because in case of >> IGMP/MLD, the packets are in fact forwarded, but the meaning of the flag >> in skb is to prevent the skb from bei

Re: DCCP Bug report

2020-06-20 Thread Dan Carpenter
This one is already publicly known because syzbot discovered it last November. I have added netdev to the CC list. Unfortunately, DCCP seems orphaned. https://lore.kernel.org/lkml/20191121201433.GD617@kadam/ regards, dan carpenter On Fri, Jun 19, 2020 at 05:59:58PM -0300, Leonardo Almiñana wro

[PATCH net-next 2/3] net: dsa: sja1105: make config table operation structures constant

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean The per-chip instantiations of struct sja1105_table_ops and struct sja1105_dynamic_table_ops can be made constant, so do that. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 4 ++-- drivers/net/dsa/sja1105/sja1105_dynamic_config.h |

[PATCH net-next 3/3] net: dsa: sja1105: make the instantiations of struct sja1105_info constant

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Since struct sja1105_private only holds a const pointer to one of these structures based on device tree compatible string, the structures themselves can be made const. Also add an empty line between each structure definition, to appease checkpatch. Signed-off-by: Vladimir

[PATCH net-next 1/3] net: dsa: sja1105: remove empty structures from config table ops

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Sparse is complaining and giving the following warning message: 'Using plain integer as NULL pointer'. This is not what's going on, instead {0} is used as a zero initializer for the structure members, to indicate that the particular chip revision does not support those part

[PATCH net-next 0/3] Cosmetic cleanup in SJA1105 DSA driver

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean This removes the sparse warnings from the sja1105 driver and makes some structures constant. Vladimir Oltean (3): net: dsa: sja1105: remove empty structures from config table ops net: dsa: sja1105: make config table operation structures constant net: dsa: sja1105: mak

[Resend PATCH net] bridge: uapi: mrp: Fix MRP_PORT_ROLE

2020-06-20 Thread Horatiu Vultur
Currently the MRP_PORT_ROLE_NONE has the value 0x2 but this is in conflict with the IEC 62439-2 standard. The standard defines the following port roles: primary (0x0), secondary(0x1), interconnect(0x2). Therefore remove the port role none. Fixes: 4714d13791f831 ("bridge: uapi: mrp: Add mrp attribu

Re: [PATCH net-next 5/5] net: dsa: felix: use the Lynx PCS helpers

2020-06-20 Thread kernel test robot
Hi Ioana, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Ioana-Ciornei/net-phy-add-Lynx-PCS-MDIO-module/20200618-201314 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git cb8e59cc8

[PATCH v2 net-next 1/2] devlink: Add support for board.serial_number to info_get cb.

2020-06-20 Thread Vasundhara Volam
Board serial number is a serial number, often available in PCI *Vital Product Data*. Also, update devlink-info.rst documentation file. Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Reviewed-by: Michael Chan Reviewed-by: Jiri Pirko --- v2: Modify board_serial_number to boa

[PATCH v2 net-next 0/2] devlink: Add board.serial_number field to info_get cb.

2020-06-20 Thread Vasundhara Volam
This patchset adds support for board.serial_number to devlink info_get cb and also use it in bnxt_en driver. Sample output: $ devlink dev info pci/:af:00.1 pci/:af:00.1: driver bnxt_en serial_number 00-10-18-FF-FE-AD-1A-00 board.serial_number 433551F+17230 versions: fixe

[PATCH v2 net-next 2/2] bnxt_en: Add board.serial_number field to info_get cb

2020-06-20 Thread Vasundhara Volam
Add board.serial_number field info to info_get cb via devlink, if driver can fetch the information from the device. Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Reviewed-by: Michael Chan --- v2: Combine 2 lines as column limit is increased to 100 now. --- drivers/net/ethe

Re: [PATCH net-next 2/2] bnxt_en: Add board_serial_number field to info_get cb

2020-06-20 Thread Vasundhara Volam
On Sat, Jun 20, 2020 at 6:37 PM Jiri Pirko wrote: > > Sat, Jun 20, 2020 at 10:15:47AM CEST, vasundhara-v.vo...@broadcom.com wrote: > >Add board_serial_number field info to info_get cb via devlink, > >if driver can fetch the information from the device. > > > >Cc: Jiri Pirko > >Cc: Jakub Kicinski

Re: [PATCH net-next 0/2] devlink: Add board_serial_number field to info_get cb.

2020-06-20 Thread Vasundhara Volam
On Sat, Jun 20, 2020 at 5:39 PM Jiri Pirko wrote: > > Sat, Jun 20, 2020 at 10:15:45AM CEST, vasundhara-v.vo...@broadcom.com wrote: > >This patchset adds support for board_serial_number to devlink info_get > >cb and also use it in bnxt_en driver. > > > >Sample output: > > > >$ devlink dev info pci/

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-20 Thread Roman Gushchin
On Sat, Jun 20, 2020 at 03:52:49PM +0800, Zefan Li wrote: > 在 2020/6/20 11:31, Cong Wang 写道: > > On Fri, Jun 19, 2020 at 5:51 PM Zefan Li wrote: > >> > >> 在 2020/6/20 8:45, Zefan Li 写道: > >>> On 2020/6/20 3:51, Cong Wang wrote: > On Thu, Jun 18, 2020 at 11:40 PM Zefan Li wrote: > > > >>>

Re: [PATCH net-next v1 5/5] hinic: add support to get eeprom information

2020-06-20 Thread Andrew Lunn
> +static int hinic_get_module_eeprom(struct net_device *netdev, > +struct ethtool_eeprom *ee, u8 *data) > +{ > + struct hinic_dev *nic_dev = netdev_priv(netdev); > + u8 sfp_data[STD_SFP_INFO_MAX_SIZE]; sfp_data will contain whatever is on the stack. > +

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-20 Thread Roman Gushchin
On Fri, Jun 19, 2020 at 08:00:41PM -0700, Cong Wang wrote: > On Fri, Jun 19, 2020 at 6:14 PM Roman Gushchin wrote: > > > > On Sat, Jun 20, 2020 at 09:00:40AM +0800, Zefan Li wrote: > > > I think so, though I'm not familiar with the bfp cgroup code. > > > > > > > If so, we might wanna fix it in a d

Re: [PATCH v2 00/16] Remove uninitialized_var() macro

2020-06-20 Thread Kees Cook
On Sat, Jun 20, 2020 at 09:03:34AM +0200, Sedat Dilek wrote: > On Sat, Jun 20, 2020 at 5:30 AM Kees Cook wrote: > > > > v2: > > - more special-cased fixes > > - add reviews > > v1: > > https://lore.kernel.org/lkml/20200603233203.1695403-1-keesc...@chromium.org > > > > Using uninitialized_var() is

[PATCH net-next 09/12] net: mscc: ocelot: move net_device related functions to ocelot_net.c

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean The ocelot hardware library shouldn't contain too much net_device specific code, since it is shared with DSA which abstracts that structure away. So much as much of this code as possible into the mscc_ocelot driver and outside of the common library. We're making an exceptio

[PATCH net-next 08/12] net: mscc: ocelot: move ocelot_regs.c into ocelot_vsc7514.c

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean ocelot_regs.c actually shouldn't be part of the common library. It describes the register map of the VSC7514 switch. The way ocelot switches work, they'll have highly optimized register maps, so another SoC will likely have the same registers but laid out completely differen

[PATCH net-next 10/12] net: mscc: ocelot: rename ocelot_ace.{c,h} to ocelot_vcap.{c,h}

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Access Control Lists (and their respective Access Control Entries) are specifically entries in the VCAP IS2, the security enforcement block, according to the documentation. Let's rename the files that deal with generic operations on the VCAP TCAM, so that VCAP IS1 and ES0 c

[PATCH net-next 00/12] Ocelot/Felix driver cleanup

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Some of the code in the mscc felix and ocelot drivers was added while in a bit of a hurry. Let's take a moment and put things in relative order. First 3 patches are sparse warning fixes. Patches 4-9 perform some further splitting between mscc_felix, mscc_ocelot, and the co

[PATCH net-next 11/12] net: mscc: ocelot: generalize the "ACE/ACL" names

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Access Control Lists (and their respective Access Control Entries) are specifically entries in the VCAP IS2, the security enforcement block, according to the documentation. Let's rename the structures and functions to something more generic, so that VCAP IS1 structures (whic

[PATCH net-next 06/12] net: mscc: ocelot: convert MSCC_OCELOT_SWITCH into a library

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Hide the CONFIG_MSCC_OCELOT_SWITCH option from users. It is meant to be only a hardware library which is selected by the drivers that use it (ocelot, felix). Since it is "selected" from Kconfig, all its dependencies are manually transferred to the driver that selects it. Th

[PATCH net-next 01/12] net: dsa: felix: make vcap is2 keys and actions static

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Get rid of some sparse warnings. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/felix_vsc9959.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 1dd9e3

[PATCH net-next 12/12] net: mscc: ocelot: unexpose ocelot_vcap_policer_{add,del}

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Remove the function prototypes from ocelot_police.h and make these functions static. We need to move them above their callers. Note that moving the implementations to ocelot_police.c is not trivially possible due to dependency on is2_entry_set() which is static to ocelot_vca

[PATCH net-next 04/12] net: mscc: ocelot: rename ocelot_board.c to ocelot_vsc7514.c

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean To follow the model of felix and seville where we have one platform-specific file, rename this file to the actual SoC it serves. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/mscc/Makefile | 2 +- drivers/net/ethernet/mscc/{ocelot_boa

[PATCH net-next 05/12] net: mscc: ocelot: rename module to mscc_ocelot

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean mscc_ocelot is a slightly better name for a module than ocelot_board or ocelot_vsc7514 is, so let's use that. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/mscc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/m

[PATCH net-next 07/12] net: mscc: ocelot: rename MSCC_OCELOT_SWITCH_OCELOT to MSCC_OCELOT_SWITCH

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Putting 'ocelot' in the config's name twice just to say that 'it's the ocelot driver running on the ocelot SoC' is a bit confusing. Instead, it's just the ocelot driver. Now that we've renamed the previous symbol that was holding the MSCC_OCELOT_SWITCH_OCELOT into *_LIB (bec

[PATCH net-next 03/12] net: mscc: ocelot: access EtherType using __be16

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean Get rid of sparse "cast to restricted __be16" warnings. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/mscc/ocelot_ace.c| 4 ++-- drivers/net/ethernet/mscc/ocelot_flower.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/et

[PATCH net-next 02/12] net: mscc: ocelot: use plain int when interacting with TCAM tables

2020-06-20 Thread Vladimir Oltean
From: Vladimir Oltean sparse is rightfully complaining about the fact that: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 26 | __builtin_constant_p((l) > (h)), (l) > (h), 0))) |^ note: in expansion of macro ‘GENMASK_INPUT_CH

Re: [PATCH net v3] net: phy: smsc: fix printing too many logs

2020-06-20 Thread Andrew Lunn
On Sat, Jun 20, 2020 at 10:55:34PM +0800, Dejin Zheng wrote: > Commit 7ae7ad2f11ef47 ("net: phy: smsc: use phy_read_poll_timeout() > to simplify the code") will print a lot of logs as follows when Ethernet > cable is not connected: > > [4.473105] SMSC LAN8710/LAN8720 2188000.ethernet-1:00: >

Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support

2020-06-20 Thread Andrew Lunn
On Fri, Jun 19, 2020 at 02:22:58PM +0200, Antoine Tenart wrote: > To get and set the PHC time, a GPIO has to be used and changes are only > retrieved or committed when on a rising edge. The same GPIO is shared by > all PHYs, so the granularity of the lock protecting it has to be > different from th

[PATCH bpf-next v5 1/3] sock: move sock_valbool_flag to header

2020-06-20 Thread Dmitry Yakunin
This is preparation for usage in bpf_setsockopt. Signed-off-by: Dmitry Yakunin Acked-by: Martin KaFai Lau --- include/net/sock.h | 9 + net/core/sock.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index c53cc42.

[PATCH bpf-next v5 2/3] tcp: expose tcp_sock_set_keepidle_locked

2020-06-20 Thread Dmitry Yakunin
This is preparation for usage in bpf_setsockopt. v2: - remove redundant EXPORT_SYMBOL (Alexei Starovoitov) Signed-off-by: Dmitry Yakunin --- include/linux/tcp.h | 1 + net/ipv4/tcp.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/tcp.h b/include/

[PATCH bpf-next v5 3/3] bpf: add SO_KEEPALIVE and related options to bpf_setsockopt

2020-06-20 Thread Dmitry Yakunin
This patch adds support of SO_KEEPALIVE flag and TCP related options to bpf_setsockopt() routine. This is helpful if we want to enable or tune TCP keepalive for applications which don't do it in the userspace code. v3: - update kernel-doc in uapi (Nikita Vetoshkin ) v4: - update kernel-doc in

Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support

2020-06-20 Thread Andrew Lunn
> + /* Retrieve the shared load/save GPIO. Request it as non exclusive as > + * the same GPIO can be requested by all the PHYs of the same package. > + * Ths GPIO must be used with the phc_lock taken (the lock is shared > + * between all PHYs). > + */ > + vsc8531->load_s

Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support

2020-06-20 Thread Andrew Lunn
> + /* Retrieve the shared load/save GPIO. Request it as non exclusive as > + * the same GPIO can be requested by all the PHYs of the same package. > + * Ths GPIO must be used with the phc_lock taken (the lock is shared This Andrew

Re: [PATCH net-next v3 5/8] net: phy: mscc: 1588 block initialization

2020-06-20 Thread Andrew Lunn
On Fri, Jun 19, 2020 at 02:22:57PM +0200, Antoine Tenart wrote: > From: Quentin Schulz > > This patch adds the first parts of the 1588 support in the MSCC PHY, > with registers definition and the 1588 block initialization. > > Those PHYs are distributed in hardware packages containing multiple >

Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support

2020-06-20 Thread Richard Cochran
On Fri, Jun 19, 2020 at 02:22:58PM +0200, Antoine Tenart wrote: > +static void vsc85xx_dequeue_skb(struct vsc85xx_ptp *ptp) > +{ > + struct skb_shared_hwtstamps shhwtstamps; > + struct vsc85xx_ts_fifo fifo; > + struct sk_buff *skb; > + u8 skb_sig[16], *p; > + int i, len; > +

[PATCH net v3] net: phy: smsc: fix printing too many logs

2020-06-20 Thread Dejin Zheng
Commit 7ae7ad2f11ef47 ("net: phy: smsc: use phy_read_poll_timeout() to simplify the code") will print a lot of logs as follows when Ethernet cable is not connected: [4.473105] SMSC LAN8710/LAN8720 2188000.ethernet-1:00: lan87xx_read_status failed: -110 When wait 640 ms for check ENERGYON bit

Re: [PATCH net-next v3 3/8] net: phy: mscc: remove the TR CLK disable magic value

2020-06-20 Thread Andrew Lunn
On Fri, Jun 19, 2020 at 02:22:55PM +0200, Antoine Tenart wrote: > From: Quentin Schulz > > This patch adds a define for the 0x8000 magic value used to perform > enable/disable actions on the "token ring clock". The patch is only > cosmetic. I assume this is not 802.5 Token Ring? > > Signed-off

Re: [PATCH net-next v3 2/8] net: phy: mscc: fix copyright and author information in MACsec

2020-06-20 Thread Andrew Lunn
On Fri, Jun 19, 2020 at 02:22:54PM +0200, Antoine Tenart wrote: > All headers in the MSCC PHY driver have been copied and pasted from the > original mscc.c file. However the information is not necessarily > correct, as in the MACsec support. Fix this. > > Signed-off-by: Antoine Tenart Reviewed-b

Re: [PATCH net-next v3 1/8] net: phy: add support for a common probe between shared PHYs

2020-06-20 Thread Andrew Lunn
On Fri, Jun 19, 2020 at 02:22:53PM +0200, Antoine Tenart wrote: > Shared PHYs (PHYs in the same hardware package) may have shared > registers and their drivers would usually need to share information. > There is currently a way to have a shared (part of the) init, by using > phy_package_init_once()

Re: [PATCH/RFC 1/5] dt-bindings: net: renesas,ravb: Document internal clock delay properties

2020-06-20 Thread Andrew Lunn
On Sat, Jun 20, 2020 at 07:47:16AM +0200, Oleksij Rempel wrote: > Hi Geert, > > Am 19.06.20 um 21:15 schrieb Geert Uytterhoeven: > > Some EtherAVB variants support internal clock delay configuration, which > > can add larger delays than the delays that are typically supported by > > the PHY (using

Re: Question on DSA switches, IGMP forwarding and switchdev

2020-06-20 Thread Andrew Lunn
> So yes, we can read the code here, but I'm wondering which packet types > would then get this flag set, and which won't. Because in case of > IGMP/MLD, the packets are in fact forwarded, but the meaning of the flag > in skb is to prevent the skb from being forwarded further, which seems > wrong i

Re: [net-next 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-06-20 Thread Vadym Kochan
Hi Jiri, Ido, On Mon, Jun 01, 2020 at 08:24:17AM +0200, Jiri Pirko wrote: > Sat, May 30, 2020 at 05:54:29PM CEST, ido...@idosch.org wrote: > >On Sat, May 30, 2020 at 05:52:31PM +0300, Vadym Kochan wrote: > > [...] > > > >> > WARNING: do not add new typedefs > >> > #1064: FILE: drivers/net/ether

Re: [PATCH net-next 2/2] bnxt_en: Add board_serial_number field to info_get cb

2020-06-20 Thread Jiri Pirko
Sat, Jun 20, 2020 at 10:15:47AM CEST, vasundhara-v.vo...@broadcom.com wrote: >Add board_serial_number field info to info_get cb via devlink, >if driver can fetch the information from the device. > >Cc: Jiri Pirko >Cc: Jakub Kicinski >Signed-off-by: Vasundhara Volam >Reviewed-by: Michael Chan >-

Re: [PATCH net-next 1/2] devlink: Add support for board_serial_number to info_get cb.

2020-06-20 Thread Jiri Pirko
Sat, Jun 20, 2020 at 10:15:46AM CEST, vasundhara-v.vo...@broadcom.com wrote: >Board serial number is a serial number, often available in PCI >*Vital Product Data*. > >Also, update devlink-info.rst documentation file. > >Cc: Jiri Pirko >Cc: Jakub Kicinski >Signed-off-by: Vasundhara Volam >Reviewe

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-20 Thread Vadym Kochan
Hi Ido, On Wed, Jun 03, 2020 at 12:23:58PM +0300, Ido Schimmel wrote: > On Mon, Jun 01, 2020 at 01:50:13PM +0300, Vadym Kochan wrote: > > Hi Ido, > > > > On Sat, May 30, 2020 at 06:48:01PM +0300, Ido Schimmel wrote: > > > On Thu, May 28, 2020 at 06:12:40PM +0300, Vadym Kochan wrote: > > > > > >

Re: [PATCH net-next 0/2] devlink: Add board_serial_number field to info_get cb.

2020-06-20 Thread Jiri Pirko
Sat, Jun 20, 2020 at 10:15:45AM CEST, vasundhara-v.vo...@broadcom.com wrote: >This patchset adds support for board_serial_number to devlink info_get >cb and also use it in bnxt_en driver. > >Sample output: > >$ devlink dev info pci/:af:00.1 >pci/:af:00.1: > driver bnxt_en > serial_number

mlx5e uplink hairpin forwarding

2020-06-20 Thread Tonghao Zhang
Hi Eli I review your patches and try to test it. $ tc filter add dev enp130s0f0 protocol ip prio 1 root flower dst_ip 11.12.13.14 skip_sw action mirred egress redirect dev enp130s0f1 or $ tc filter add dev enp130s0f0 protocol ip prio 1 parent : flower dst_ip 11.12.13.14 skip_sw action mirred

  1   2   >