[PATCH net-next 11/18] mlxsw: spectrum_router: Add GRE tunnel support for Spectrum-2

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Spectrum-2 GRE tunnel implementation requires a specific underlay RIF that points to the virtual router used for forwarding the encapsulated packet. Add Spectrum-2 specific loopback router interface creation methods which may create or reuse the dedicated underlay RIF. Signed-of

[PATCH net-next 10/18] mlxsw: spectrum_router: Update tunnel decap properties

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Spectrum-2 requires to specify the egress RIF when setting tunnel decap properties. Add a method for accessing the underlay RIF index and then use it when setting decap properties. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/

[PATCH net-next 18/18] selftests: forwarding: Add IP-in-IP GRE hierarchical topology with keys test

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, where an ikey/okey pair is set. This test is based on hierarchical topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/forwar

[PATCH net-next 12/18] selftests: forwarding: Add IP tunneling lib

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a library with helper functions, to be used in testing IP-in-IP and GRE tunnels, both in flat and in hierarchical topologies. The topologies used in this library cover the three scenarios of tunnels - a tunel with no bound device, a tunnel with bound device in the same VRF and

[PATCH net-next 16/18] selftests: forwarding: Add IP-in-IP GRE hierarchical topology test

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, based on hierarchical topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/ipip_hier_gre.sh | 63

[PATCH net-next 17/18] selftests: forwarding: Add IP-in-IP GRE hierarchical topology with key test

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, where a key is set. This test is based on hierarchical topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/forwarding/ipip_hi

[PATCH net-next 15/18] selftests: forwarding: Add IP-in-IP GRE flat topology with keys test

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, where an ikey/okey pair is set. This test is based on flat topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/forwarding/ipi

[PATCH net-next 00/18] mlxsw: spectrum_router: Add GRE tunnel support for Spectrum-2

2019-01-19 Thread Ido Schimmel
Nir says: In Spectrum-2, HW implementation of layer 3 tunnels differs from Spectrum-1 when it comes to the underlay routing table selection. Spectrum-2 uses a dedicated RIF that points to the virtual router used for forwarding the encapsulated packets, while Spectrum-1 explicitly specifies the vir

[PATCH net-next 02/18] mlxsw: reg: Add underlay egress RIF field in RTDP register

2019-01-19 Thread Ido Schimmel
In Spectrum-2 we need to specify the underlay egress router interface when performing IP-in-IP and NVE packet decapsulation in the underlay router. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 7 +++ 1 file changed, 7 insertions(+) d

[PATCH net-next 05/18] mlxsw: spectrum_router: Adjust loopback RIF configuration

2019-01-19 Thread Ido Schimmel
From: Nir Dotan In Spectrum-2, the underlay routing table is pointed by an underlay router interface in contrary to Spectrum where only an underlay virtual router should be set. That makes the underlay virtual router field in RITR reserved for Spectrum-2. Change loopback RIF creation function to

[PATCH net-next 14/18] selftests: forwarding: Add IP-in-IP GRE flat topology with key test

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, where a key is set. This test is based on flat topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/forwarding/ipip_flat_gre_k

[PATCH net-next 04/18] mlxsw: spectrum: Set RIF ops per ASIC type

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Set RIF ops array as member of mlxsw_sp in order to control which RIF operations callbacks are called per ASIC type. This is needed to control per ASIC handling of loopback RIF configurations. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel ---

[PATCH net-next 09/18] mlxsw: spectrum_router: Support RIF without device

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Spectrum-2 underlay RIF is merely an auxiliary RIF that points to the virtual router used for encapsulated packets lookup. It exists only when its overlay RIF exists but may be shared with other overlay RIFs. Hence it is undesired to mark any device as related to it. Therefore al

[PATCH net-next 13/18] selftests: forwarding: Add IP-in-IP GRE flat topology test

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, based on flat topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/ipip_flat_gre.sh | 63

[PATCH net-next 08/18] mlxsw: spectrum_router: Change mlxsw_sp_ipip_lb_ul_vr_id()

2019-01-19 Thread Ido Schimmel
From: Nir Dotan For the sake of Spectrum-2 GRE support, as ul_vr_id field is reserved for Spectrum-2, Change mlxsw_sp_ipip_lb_ul_vr_id() implementation not to use the reserved field. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mella

[PATCH net-next 07/18] mlxsw: spectrum_router: Add underlay RIF ID support

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Spectrum-2 GRE tunnels underlay should be given not only the virtual router information for an encapsulated packet lookup, but also an underlay RIF object which belongs to a virtual router. Therefore add ul_rif_id field in struct mlxsw_sp_rif_ipip_lb, to be used later in Spectrum

[PATCH net-next 01/18] mlxsw: reg: Add fields to RITR - Router Interface Table Register

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Add fields relevant for Spectrum-2 Loopback IPinIP router interface creation. Add additional Loopback RIF protocol value - Generic, used for creation of an explicit underlay RIF, and also add a field named underlay_rif used for specifying the underlay RIF of a tunnel. Signed-off-

[PATCH net-next 03/18] mlxsw: spectrum_router: Split RIF ops array for Spectrum-2 support

2019-01-19 Thread Ido Schimmel
From: Nir Dotan Split RIF ops array for Spectrum-1 and Spectrum-2 callbacks in order to support different sets of operations for loopback RIF handling, as underlying implementation differs between the ASICs. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .

[PATCH net-next 06/18] mlxsw: spectrum_router: Mark RIF index as taken before creation

2019-01-19 Thread Ido Schimmel
From: Nir Dotan The presence of an allocated RIF in mlxsw_sp->router->rifs[rif_index] marks that rif_index as taken. Set the marking of a taken RIF to happen before calling ops->create in order to allow creation of a GRE underlay RIF, which may be allocated and created as part of an overlay RIF c

linux-next: Fixes tag needs some work in the net tree

2019-01-19 Thread Stephen Rothwell
Hi all, In commit 25f2d0e7791e ("net/mlx5e: Fix cb_ident duplicate in indirect block register") Fixes tag Fixes: f5bc2c5de101 ("net/mlx5e: Support TC indirect block notifications has these problem(s): - Subject has leading but no trailing parentheses - Subject has leading but no trail

Re: [PATCH net-next 09/14] net: bridge: Propagate MC addresses with VID through switchdev

2019-01-19 Thread Florian Fainelli
On 1/19/2019 5:55 AM, Ido Schimmel wrote: > On Fri, Jan 18, 2019 at 01:48:56PM -0800, Florian Fainelli wrote: >> On 1/18/19 3:41 AM, Ido Schimmel wrote: >>> On Thu, Jan 17, 2019 at 11:17:57AM -0800, Florian Fainelli wrote: On 1/17/19 6:05 AM, Ido Schimmel wrote: > On Wed, Jan 16, 2019 a

Re: pull-request: bpf 2019-01-20

2019-01-19 Thread David Miller
From: Daniel Borkmann Date: Sun, 20 Jan 2019 01:33:34 +0100 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix a out-of-bounds access in __bpf_redirect_no_mac, from Willem. > > 2) Fix bpf_setsockopt to reset sock dst on SO_MARK changes,

pull-request: bpf 2019-01-20

2019-01-19 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a out-of-bounds access in __bpf_redirect_no_mac, from Willem. 2) Fix bpf_setsockopt to reset sock dst on SO_MARK changes, from Peter. 3) Fix map in map masking to prevent out-of-bounds a

Re: [PATCH net] bpf: in __bpf_redirect_no_mac pull mac only if present

2019-01-19 Thread Daniel Borkmann
On 01/16/2019 02:19 AM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Syzkaller was able to construct a packet of negative length by > redirecting from bpf_prog_test_run_skb with BPF_PROG_TYPE_LWT_XMIT: > > BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:345 > [inline

Re: [PATCH net-next v2 0/8] r8169: series with smaller improvements

2019-01-19 Thread David Miller
From: Heiner Kallweit Date: Sat, 19 Jan 2019 22:01:57 +0100 > Series with smaller improvements. > > v2: > - fixed a small copy & paste error in patch 4 Series applied, thanks Heiner.

Re: [PATCH v2] virtio_net: bulk free tx skbs

2019-01-19 Thread David Miller
From: "Michael S. Tsirkin" Date: Thu, 17 Jan 2019 23:20:07 -0500 > Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is > safe to call in a non-napi context as long as the napi_budget flag is > correct. > > Signed-off-by: Michael S. Tsirkin Applied, thanks.

Re: [Patch net-next] net_sched: add performance counters for basic filter

2019-01-19 Thread David Miller
From: Cong Wang Date: Thu, 17 Jan 2019 17:14:01 -0800 > Similar to u32 filter, it is useful to know how many times > we reach each basic filter and how many times we pass the > ematch attached to it. > > Sample output: > > filter protocol arp pref 49152 basic chain 0 > filter protocol arp pref

Re: [PATCH net-next 0/4] net: phy: improve starting PHY

2019-01-19 Thread Florian Fainelli
Hi Heiner, On January 19, 2019 3:27:29 AM PST, Heiner Kallweit wrote: >This patch series improves few aspects of starting the PHY. This looks good as usual, just one minor comment in patch 4. Thanks! > >Heiner Kallweit (4): > net: phy: start state machine in phy_start only > net: phy: warn i

Re: [PATCH net-next 4/4] net: phy: change phy_start_interrupts to phy_request_interrupt

2019-01-19 Thread Florian Fainelli
On January 19, 2019 3:30:05 AM PST, Heiner Kallweit wrote: >Now that we enable the interrupts in phy_start() we don't have to do it >before. Therefore remove enabling interrupts from >phy_start_interrupts() >and rename this function to reflect the changed functionality. > >Signed-off-by: Heine

Re: [PATCH v2 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-19 Thread Alexei Starovoitov
On 1/19/19 10:56 AM, Jakub Kicinski wrote: > On Thu, 17 Jan 2019 22:50:53 -0800, Alexei Starovoitov wrote: >> Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands >> and for map_update() helper function. >> In all these cases take a lock of existing element (which was provided >

[PATCH net-next v2 8/8] r8169: factor out getting ether_clk

2019-01-19 Thread Heiner Kallweit
rtl_init_one() is complex enough, so we better factor out getting the ether_clk. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 53 +++- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/driv

[PATCH net-next v2 7/8] r8169: replace mii_bus member with phy_device member in struct rtl8169_private

2019-01-19 Thread Heiner Kallweit
Accessing the phy_device indirectly via the netdevice causes few issues: - Accessing the phy_device when it's not attached may cause a NPE. - If we have to access the phy_device when it's not attached we have to use mdiobus_get_phy() to get a reference to the phy_device. Therefore store a phy_de

[PATCH net-next v2 6/8] r8169: reset chip synchronously in __rtl8169_resume

2019-01-19 Thread Heiner Kallweit
Triggering an asynchronous reset is problematic for the following reasons, therefore reset the chip synchronously. - The reset routine resets registers and parameters behind our back what may collide with code executed after triggering the reset. - __rtl8169_resume() is called as part of pm_run

[PATCH net-next v2 5/8] r8169: add helpers for locking / unlocking the config registers

2019-01-19 Thread Heiner Kallweit
Add helpers for locking / unlocking the config registers. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 34 ++-- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realte

[PATCH net-next v2 1/8] r8169: remove rtl_get_events

2019-01-19 Thread Heiner Kallweit
This helper is used only once, so remove it. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index abb94c543..b2e30e302 1

[PATCH net-next v2 4/8] r8169: improve rtl_pcie_state_l2l3_enable

2019-01-19 Thread Heiner Kallweit
All calls to this function have the enable parameter set to false. So we can replace the function with a disable-only version. v2: - fixed copy & paste error Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 28 ++-- 1 file changed, 10 insertions(

[PATCH net-next v2 3/8] r8169: initialize task workqueue only once

2019-01-19 Thread Heiner Kallweit
It's sufficient to initialize the workqueue once, therefore remove the additional initialization whenever rtl_open() is called. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/rea

[PATCH net-next v2 2/8] r8169: remove unneeded call in pcierr

2019-01-19 Thread Heiner Kallweit
rtl8169_hw_reset() is called as part of the reset routine which is scheduled in the line after. So we can remove the call to rtl8169_hw_reset() here. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH net-next v2 0/8] r8169: series with smaller improvements

2019-01-19 Thread Heiner Kallweit
Series with smaller improvements. v2: - fixed a small copy & paste error in patch 4 Heiner Kallweit (8): r8169: remove rtl_get_events r8169: remove unneeded call in pcierr r8169: initialize task workqueue only once r8169: improve rtl_pcie_state_l2l3_enable r8169: add helpers for locking

[PATCH net-next 4/8] r8169: improve rtl_pcie_state_l2l3_enable

2019-01-19 Thread Heiner Kallweit
All calls to this function have the enable parameter set to false. So we can replace the function with a disable-only version. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/dri

[PATCH net-next 5/8] r8169: add helpers for locking / unlocking the config registers

2019-01-19 Thread Heiner Kallweit
Add helpers for locking / unlocking the config registers. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 34 ++-- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realte

[PATCH net-next 2/8] r8169: remove unneeded call in pcierr

2019-01-19 Thread Heiner Kallweit
rtl8169_hw_reset() is called as part of the reset routine which is scheduled in the line after. So we can remove the call to rtl8169_hw_reset() here. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH net-next 8/8] r8169: factor out getting ether_clk

2019-01-19 Thread Heiner Kallweit
rtl_init_one() is complex enough, so we better factor out getting the ether_clk. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 53 +++- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/driv

[PATCH net-next 7/8] r8169: replace mii_bus member with phy_device member in struct rtl8169_private

2019-01-19 Thread Heiner Kallweit
Accessing the phy_device indirectly via the netdevice causes few issues: - Accessing the phy_device when it's not attached may cause a NPE. - If we have to access the phy_device when it's not attached we have to use mdiobus_get_phy() to get a reference to the phy_device. Therefore store a phy_de

[PATCH net-next 3/8] r8169: initialize task workqueue only once

2019-01-19 Thread Heiner Kallweit
It's sufficient to initialize the workqueue once, therefore remove the additional initialization whenever rtl_open() is called. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/rea

[PATCH net-next 6/8] r8169: reset chip synchronously in __rtl8169_resume

2019-01-19 Thread Heiner Kallweit
Triggering an asynchronous reset is problematic for the following reasons, therefore reset the chip synchronously. - The reset routine resets registers and parameters behind our back what may collide with code executed after triggering the reset. - __rtl8169_resume() is called as part of pm_run

[PATCH net-next 1/8] r8169: remove rtl_get_events

2019-01-19 Thread Heiner Kallweit
This helper is used only once, so remove it. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index abb94c543..b2e30e302 1

[PATCH net-next 0/8] r8169: series with smaller improvements

2019-01-19 Thread Heiner Kallweit
Series with smaller improvements. Heiner Kallweit (8): r8169: remove rtl_get_events r8169: remove unneeded call in pcierr r8169: initialize task workqueue only once r8169: improve rtl_pcie_state_l2l3_enable r8169: add helpers for locking / unlocking the config registers r8169: reset ch

arp -a equivalent

2019-01-19 Thread Siniša Bandin
Hello! There is one thing I am missing from old "arp" command: "arp -a" used to give both symbolic name and numeric address (if resolver is working, of course). Now, with "ip neigh" I can get only one at the time, so I have to issue two commands if I want to check if for eg. a host is alive

Re: [PATCH v4 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2019-01-19 Thread Marcel Holtmann
Hi Rajat, > If the platform provides it, use the reset gpio to reset the BT > chip (requested by the HCI core if needed). This has been found helpful > on some of Intel bluetooth controllers where the firmware gets stuck and > the only way out is a hard reset pin provided by the platform. > > Sig

Re: [PATCH v4 2/5] usb: assign ACPI companions for embedded USB devices

2019-01-19 Thread Marcel Holtmann
Hi Rajat, > USB devices permanently connected to USB ports may be described in ACPI > tables and share ACPI devices with ports they are connected to. See [1] > for details. > > This will allow us to describe sideband resources for devices, such as, > for example, hard reset line for BT USB contro

Re: [PATCH v4 1/5] usb: split code locating ACPI companion into port and device

2019-01-19 Thread Marcel Holtmann
Hi Rajat, > In preparation for handling embedded USB devices let's split > usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and > usb_acpi_find_companion_for_port(). > > Signed-off-by: Dmitry Torokhov > Signed-off-by: Rajat Jain > Acked-by: Greg Kroah-Hartman > Tested-by: Su

Re: [PATCH v4 3/5] Bluetooth: Reset Bluetooth chip after multiple command timeouts

2019-01-19 Thread Marcel Holtmann
Hi Rajat, > Add a quirk and a hook to allow the HCI core to reset the BT chip > if needed (after a number of timed out commands). Use that new hook to > initiate BT chip reset if the controller fails to respond to certain > number of commands (currently 5) including the HCI reset commands. > This

Re: [PATCH v4 4/5] Bluetooth: btusb: Collect the common Intel assignments together

2019-01-19 Thread Marcel Holtmann
Hi Rajat, > The BTUSB_INTEL and BTUSB_INTEL_NEW have common functions & quirks are > assigned to hdev structure. Lets collect them together instead of > repeating them in different code branches. > > Signed-off-by: Rajat Jain > --- > v4: same as v1 > v3: same as v1 > v2: same as v1 > > drivers/

Re: [PATCH v2 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-19 Thread Jakub Kicinski
On Thu, 17 Jan 2019 22:50:53 -0800, Alexei Starovoitov wrote: > Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands > and for map_update() helper function. > In all these cases take a lock of existing element (which was provided > in BTF description) before copying (in or out)

Re: [PATCH RFC 1/4] include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR

2019-01-19 Thread Miguel Ojeda
Hi Michael, On Wed, Jan 9, 2019 at 3:50 PM Michael S. Tsirkin wrote: > > On Wed, Jan 09, 2019 at 11:35:52AM +0100, Miguel Ojeda wrote: > > Note it would be nice to separate the patch into two (one for the > > comments, another for OPTIMIZER_HIDE_VAR), and also possibly another > > for barrier_dat

Re: [PATCH v2 net-next] net: sock: do not set sk_cookie in sk_clone_lock()

2019-01-19 Thread David Miller
From: Yafang Shao Date: Fri, 18 Jan 2019 13:00:51 +0800 > The only call site of sk_clone_lock is in inet_csk_clone_lock, > and sk_cookie will be set there. > So we don't need to set sk_cookie in sk_clone_lock(). > > Reviewed-by: Eric Dumazet > Signed-off-by: Yafang Shao Applied.

Re: [PATCH net-next] net: usb: rtl8150: remove set but not used variable 'rx_stat'

2019-01-19 Thread David Miller
From: YueHaibing Date: Fri, 18 Jan 2019 02:06:49 + > From: Yue Haibing > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/usb/rtl8150.c: In function 'read_bulk_callback': > drivers/net/usb/rtl8150.c:391:6: warning: > variable 'rx_stat' set but not used [-Wunused-but-set-va

Re: [PATCH net-next] isdn: remove unneeded semicolon

2019-01-19 Thread David Miller
From: YueHaibing Date: Fri, 18 Jan 2019 11:05:11 +0800 > remove unneeded semicolon > > Signed-off-by: YueHaibing Applied.

Re: [PATCH net-next v2 0/2] dpaa2-eth: add debugfs statistics

2019-01-19 Thread David Miller
From: Ioana Ciornei Date: Fri, 18 Jan 2019 16:15:58 + > This patch set exports detailed driver counters through debugfs. > Counters which are already available through ethtool are now > presented in a structured manner (per-core, per-FQ and > per-channel) in debugfs. > > The first patch is c

Re: [PATCH] Compiler Attributes: move kernel-only attributes into __KERNEL__

2019-01-19 Thread Miguel Ojeda
Hi Greg, Nick, Xiaozhou, On Thu, Dec 6, 2018 at 1:50 PM Greg KH wrote: > > If something is fixed in Linus's tree for this, I want to take it into > the 4.19-stable tree as well. This ended up in Linus' tree before the holidays, i.e. 4.20 has it, see commit 71391bdd2e9a ("include/linux/compiler_t

Re: [PATCH net-next v2 00/14] net: use strict checks in doit handlers

2019-01-19 Thread David Miller
From: Jakub Kicinski Date: Fri, 18 Jan 2019 10:46:12 -0800 > This series extends strict argument checking to doit handlers > of the GET* nature. This is a bit tricky since strict checking > flag has already been released.. > > iproute2 did not have a release with strick checks enabled, > and it

[PATCH bpf-next v5 09/12] nfp: bpf: split up the skip flag

2019-01-19 Thread Jakub Kicinski
We fail program loading if jump lands on a skipped instruction. This is for historical reasons, it used to be that we only skipped instructions optimized out based on prior context, and therefore the optimization would be buggy if we jumped directly to such instruction (because the context would be

[PATCH bpf-next v5 12/12] nfp: bpf: support removing dead code

2019-01-19 Thread Jakub Kicinski
Add a verifier callback to the nfp JIT to remove the instructions the verifier deemed to be dead. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/main.h | 6 - .../net/ethernet/netronome/nfp/bpf/offload.c | 5 .../net/ethernet/net

[PATCH bpf-next v5 07/12] bpf: notify offload JITs about optimizations

2019-01-19 Thread Jakub Kicinski
Let offload JITs know when instructions are replaced and optimized out, so they can update their state appropriately. The optimizations are best effort, if JIT returns an error from any callback verifier will stop notifying it as state may now be out of sync, but the verifier continues making prog

[PATCH bpf-next v5 10/12] nfp: bpf: save original program length

2019-01-19 Thread Jakub Kicinski
Instead of passing env->prog->len around, and trying to adjust for optimized out instructions just save the initial number of instructions in struct nfp_prog. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 4 ++-- drivers/net/et

[PATCH bpf-next v5 11/12] nfp: bpf: support optimizing dead branches

2019-01-19 Thread Jakub Kicinski
Verifier will now optimize out branches to dead code, implement the replace_insn callback to take advantage of that optimization. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/main.h | 14 .../net/ethernet/netronome/nfp/bpf/offload

[PATCH bpf-next v5 08/12] nfp: bpf: don't use instruction number for jump target

2019-01-19 Thread Jakub Kicinski
Instruction number is meaningless at code gen phase. The target of the instruction is overwritten by nfp_fixup_branches(). The convention is to put the raw offset in target address as a place holder. See cmp_* functions. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/n

[PATCH bpf-next v5 04/12] bpf: verifier: remove unconditional branches by 0

2019-01-19 Thread Jakub Kicinski
Unconditional branches by 0 instructions are basically noops but they can result from earlier optimizations, e.g. a conditional jumps which would never be taken or a conditional jump around dead code. Remove those branches. v0.2: - s/opt_remove_dead_branches/opt_remove_nops/ (Jiong). Signed-off

[PATCH bpf-next v4 00/12] bpf: dead code elimination

2019-01-19 Thread Jakub Kicinski
Hi! This set adds support for complete removal of dead code. Patch 3 contains all the code removal logic, patches 2 and 4 additionally optimize branches around and to dead code. Patches 6 and 7 allow offload JITs to take advantage of the optimization. After a few small clean ups (8, 9, 10) nfp

[PATCH bpf-next v5 02/12] bpf: verifier: hard wire branches to dead code

2019-01-19 Thread Jakub Kicinski
Loading programs with dead code becomes more and more common, as people begin to patch constants at load time. Turn conditional jumps to unconditional ones, to avoid potential branch misprediction penalty. This optimization is enabled for privileged users only. For branches which just fall throug

[PATCH bpf-next v5 05/12] selftests: bpf: add tests for dead code removal

2019-01-19 Thread Jakub Kicinski
Add tests for newly added dead code elimination. Both verifier and BTF tests are added. BTF test infrastructure has to be extended to be able to account for line info which is eliminated during dead code removal. Signed-off-by: Jakub Kicinski Acked-by: Yonghong Song --- tools/testing/selftest

[PATCH bpf-next v5 06/12] bpf: verifier: record original instruction index

2019-01-19 Thread Jakub Kicinski
The communication between the verifier and advanced JITs is based on instruction indexes. We have to keep them stable throughout the optimizations otherwise referring to a particular instruction gets messy quickly. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- include/linux/bpf

[PATCH bpf-next v5 01/12] bpf: change parameters of call/branch offset adjustment

2019-01-19 Thread Jakub Kicinski
In preparation for code removal change parameters to branch and call adjustment functions to be more universal. The current parameters assume we are patching a single instruction with a longer set. A diagram may help reading the change, this is for the patch single case, patching instruction 1 wi

[PATCH bpf-next v5 03/12] bpf: verifier: remove dead code

2019-01-19 Thread Jakub Kicinski
Instead of overwriting dead code with jmp -1 instructions remove it completely for root. Adjust verifier state and line info appropriately. v2: - adjust func_info (Alexei); - make sure first instruction retains line info (Alexei). v4: (Yonghong) - remove unnecessary if (!insn to remove) checks

Re: [PATCH net-next] virtio-net: per-queue RPS config

2019-01-19 Thread David Miller
From: Willem de Bruijn Date: Thu, 17 Jan 2019 20:08:53 -0500 > From: Willem de Bruijn > > On multiqueue network devices, RPS maps are configured independently > for each receive queue through /sys/class/net/$DEV/queues/rx-*. > > On virtio-net currently all packets use the map from rx-0, becaus

Re: [PATCH net v2] net: phy: phy driver features are mandatory

2019-01-19 Thread David Miller
From: Camelia Groza Date: Thu, 17 Jan 2019 14:22:36 +0200 > Since phy driver features became a link_mode bitmap, phy drivers that > don't have a list of features configured will cause the kernel to crash > when probed. > > Prevent the phy driver from registering if the features field is missing.

Re: [PATCH v2] isdn: avm: Fix string plus integer warning from Clang

2019-01-19 Thread David Miller
From: Nathan Chancellor Date: Wed, 9 Jan 2019 22:41:08 -0700 > A recent commit in Clang expanded the -Wstring-plus-int warning, showing > some odd behavior in this file. > > drivers/isdn/hardware/avm/b1.c:426:30: warning: adding 'int' to a string does > not append to the string [-Wstring-plus-

Re: [PATCH v2] sch_api: Change signature of qdisc_tree_reduce_backlog() to use ints

2019-01-19 Thread David Miller
From: Toke Høiland-Jørgensen Date: Wed, 9 Jan 2019 17:10:57 +0100 > There are now several places where qdisc_tree_reduce_backlog() is called > with a negative number of packets (to signal an increase in number of > packets in the queue). Rather than rely on overflow behaviour, change the > funct

[RFC v4 11/19] batman-adv: Add gateway mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh/soft-interface can optimize the handling of DHCP packets. Instead of flooding them through the whole mesh, it can be forwarded as unicast to a specific gateway server. The originator which injects the packets in the mesh has to select (based on sel_class thresholds) a responsible gateway s

[RFC v4 04/19] batman-adv: Prepare framework for vlan genl config

2019-01-19 Thread Sven Eckelmann
The batman-adv configuration interface was implemented solely using sysfs. This approach was condemned by non-batadv developers as "huge mistake". Instead a netlink/genl based implementation was suggested. Beside the mesh/soft-interface specific configuration, the VLANs on top of the mesh/soft-int

[RFC v4 17/19] batman-adv: Add elp_interval hardif genl configuration

2019-01-19 Thread Sven Eckelmann
The ELP packets are transmitted every elp_interval milliseconds on an slave/hard-interface. This value can be changed using the configuration interface. The BATADV_CMD_SET_HARDIF/BATADV_CMD_GET_HARDIF commands allow to set/get the configuration of this feature using the u32 BATADV_ATTR_ELP_INTERVA

[RFC v4 01/19] batman-adv: Move common genl doit code pre/post hooks

2019-01-19 Thread Sven Eckelmann
The commit ff4c92d85c6f ("genetlink: introduce pre_doit/post_doit hooks") intoduced a mechanism to run specific code for doit hooks before/after the hooks are run. Since all doit hooks are requiring the batadv softif, it should be retrieved/freed in these helpers to simplify the code. Signed-off-b

[RFC v4 07/19] batman-adv: Add bonding mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can use multiple slave/hard-interface ports at the same time to transport the traffic to other nodes. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the BATADV_ATTR_BONDING_ENABLED attribute. Setting the u8 to zero w

[RFC v4 14/19] batman-adv: Add multicast_mode mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can optimize the flooding of multicast packets based on the content of the global translation tables. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the BATADV_ATTR_MULTICAST_MODE_ENABLED attribute. Setting the u8 to

[RFC v4 02/19] batman-adv: Prepare framework for mesh genl config

2019-01-19 Thread Sven Eckelmann
The batman-adv configuration interface was implemented solely using sysfs. This approach was condemned by non-batadv developers as "huge mistake". Instead a netlink/genl based implementation was suggested. The main objects for this configuration is the mesh/soft-interface object. Its actual object

[RFC v4 08/19] batman-adv: Add bridge_loop_avoidance mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can try to detect loops in the same mesh caused by (indirectly) bridged mesh/soft-interfaces of different nodes. Some of the loops can also be resolved without breaking the mesh. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feat

[RFC v4 00/19] batman-adv: netlink restructuring, part 2

2019-01-19 Thread Sven Eckelmann
Hi, Jiri Pirko called the batman-adv configuration interface a while back "a huge mistake" [1] and suggested genl as alternative. The first reimplementation [2] (based on the team/devlink design) was rejected. This second implementation is now using a nl80211-like design. The objects which can now

[RFC v4 10/19] batman-adv: Add fragmentation mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can fragment unicast packets when the packet size exceeds the outgoing slave/hard-interface MTU. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the BATADV_ATTR_FRAGMENTATION_ENABLED attribute. Setting the u8 to zero

[RFC v4 03/19] batman-adv: Prepare framework for hardif genl config

2019-01-19 Thread Sven Eckelmann
The batman-adv configuration interface was implemented solely using sysfs. This approach was condemned by non-batadv developers as "huge mistake". Instead a netlink/genl based implementation was suggested. Beside the mesh/soft-interface specific configuration, the slave/hard-interface have B.A.T.M

[RFC v4 06/19] batman-adv: Add ap_isolation mesh/vlan genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can drop messages between clients to implement a mesh-wide AP isolation. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH and BATADV_CMD_SET_VLAN/BATADV_CMD_GET_VLAN commands allow to set/get the configuration of this feature using the BATADV_ATTR_AP_ISOLATION_ENABLED attribute. Sett

[RFC v4 09/19] batman-adv: Add distributed_arp_table mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can use a distributed hash table to answer ARP requests without flooding the request through the whole mesh. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED attribute. Set

[RFC v4 05/19] batman-adv: Add aggregated_ogms mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can delay OGM messages to aggregate different ogms together in a single OGM packet. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the BATADV_ATTR_AGGREGATED_OGMS_ENABLED attribute. Setting the u8 to zero will disabl

[RFC v4 16/19] batman-adv: Add orig_interval mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The OGM packets are transmitted every orig_interval milliseconds. This value can be changed using the configuration interface. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the u32 BATADV_ATTR_ORIG_INTERVAL attribute. Signed-off-by:

[RFC v4 18/19] batman-adv: Add throughput_override hardif genl configuration

2019-01-19 Thread Sven Eckelmann
The B.A.T.M.A.N. V implementation tries to estimate the link throughput of an interface to an originator using different automatic methods. It is still possible to overwrite it the link throughput for all reachable originators via this interface. The BATADV_CMD_SET_HARDIF/BATADV_CMD_GET_HARDIF com

[RFC v4 15/19] batman-adv: Add network_coding mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The mesh interface can use (in an homogeneous mesh) network coding, a mechanism that aims to increase the overall network throughput by fusing multiple packets in one transmission. The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the BAT

[RFC v4 13/19] batman-adv: Add log_level mesh genl configuration

2019-01-19 Thread Sven Eckelmann
In contrast to other modules, batman-adv allows to set the debug message verbosity per mesh/soft-interface and not per module (via modparam). The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the configuration of this feature using the u32 (bitmask) BATADV_ATTR_LOG_LEVEL attrib

[RFC v4 12/19] batman-adv: Add hop_penalty mesh genl configuration

2019-01-19 Thread Sven Eckelmann
The TQ (B.A.T.M.A.N. IV) and throughput values (B.A.T.M.A.N. V) are reduced when they are forwarded. One of the reductions is the penalty for traversing an additional hop. This hop_penalty (0-255) defines the percentage of reduction (0-100%). The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands al

[RFC v4 19/19] batman-adv: Trigger genl notification on sysfs config change

2019-01-19 Thread Sven Eckelmann
The generic netlink code is expected to trigger notification messages when configuration might have been changed. But the configuration of batman-adv is most of the time still done using sysfs. So the sysfs interface should also trigger the corresponding netlink messages via the "config" multicast

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-19 Thread Russell King - ARM Linux admin
On Fri, Jan 18, 2019 at 11:53:25AM -0800, Andy Lutomirski wrote: > On Fri, Jan 18, 2019 at 11:33 AM Arnd Bergmann wrote: > > > > On Fri, Jan 18, 2019 at 7:50 PM Andy Lutomirski wrote: > > > On Fri, Jan 18, 2019 at 8:25 AM Arnd Bergmann wrote: > > > > - Once we get to 512, we clash with the x32 n

  1   2   >