[PATCH net-next] bna: Mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/net/ethernet/brocade/bna/bfa_ioc.c:790:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/ethernet/brocade/

Re: [PATCH bpf-next v2] bpf: btf: add btf documentation

2019-01-22 Thread Alexei Starovoitov
On Fri, Jan 18, 2019 at 2:00 PM Yonghong Song wrote: > > This patch added documentation for BTF (BPF Debug Format). > The document is placed under linux:Documentation/bpf directory. > > Signed-off-by: Yonghong Song > --- > Documentation/bpf/btf.rst | 870 >

Re: [PATCH bpf-next v5 0/9] tools: bpftool: add probes for system and device

2019-01-22 Thread Alexei Starovoitov
On Tue, Jan 22, 2019 at 10:39 PM Alexei Starovoitov wrote: > > On Thu, Jan 17, 2019 at 7:28 AM Quentin Monnet > wrote: > > > > > > If the user does not have root privileges (or more precisely, the > > CAP_SYS_ADMIN capability) detection will be erroneous for most > > parameters. Therefore, forbid

[PATCH net-next] intel: Mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/net/ethernet/intel/igb/e1000_82575.c:636:6: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/ethernet/intel/

RE: [PATCH net-next] broadcom: Mark expected switch fall-throughs

2019-01-22 Thread Sudarsana Reddy Kalluru
-Original Message- From: Gustavo A. R. Silva [mailto:gust...@embeddedor.com] Sent: 23 January 2019 13:11 To: Ariel Elior ; Sudarsana Kalluru ; everest-linux...@cavium.com; David S. Miller ; Siva Reddy Kallam ; Prashant Sreedharan ; Michael Chan Cc: netdev@vger.kernel.org; linux-ker...@

[PATCH net-next] broadcom: Mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c:6336:6: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/ethernet/b

[PATCH net-next] net: 3c509: mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/net/ethernet/3com/3c509.c:1265:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/ethernet/3com/3c509.c:127

general protection fault in rxrpc_connect_call

2019-01-22 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:787a3b432276 Merge branch 'for-linus' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=104f80c0c0 kernel config: https://syzkaller.appspot.com/x/.config?x=505743eba4e4f68 das

Re: [PATCH net-next] 9p: mark expected switch fall-through

2019-01-22 Thread Gustavo A. R. Silva
On 1/23/19 1:23 AM, Dominique Martinet wrote: > Gustavo A. R. Silva wrote on Wed, Jan 23, 2019: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> This patch fixes the following warning: >> >> net/9p/trans_xen.c:514:6: warning

Re: [PATCH net-next] 9p: mark expected switch fall-through

2019-01-22 Thread Dominique Martinet
Gustavo A. R. Silva wrote on Wed, Jan 23, 2019: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > This patch fixes the following warning: > > net/9p/trans_xen.c:514:6: warning: this statement may fall through > [-Wimplicit-fallth

[PATCH net-next] Bluetooth: Mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=] net/bluetooth/l2cap_core.c:4223:6: warning:

Re: [PATCH] PCI / ACPI: Don't clear pme_poll on device that has unreliable ACPI wake

2019-01-22 Thread Kai Heng Feng
> On Jan 23, 2019, at 7:51 AM, Bjorn Helgaas wrote: > > On Tue, Jan 22, 2019 at 02:45:44PM +0800, Kai-Heng Feng wrote: >> There are some e1000e devices can only be woken up from D3 one time, by >> plugging ethernet cable. Subsequent cable plugging does set PME bit >> correctly, but it still do

[PATCH net-next] 9p: mark expected switch fall-through

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: net/9p/trans_xen.c:514:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Warning level 3 was used: -Wimplicit-fallthrough=3 T

Re: Regression: mv88e6xxx packet loss after 4.18's PHYLINK merge

2019-01-22 Thread Samu Nuutamo
On Wed, Jan 23, 2019 at 03:10:32AM +0100, Andrew Lunn wrote: > > Hi Andrew, > > > > I tested the patch and it has an issue that prevents the carrier from > > turning > > on. I think it's caused by the change from using link_state to > > phy->phy_state, > > as later in the same function the link_

[PATCH net-next] tipc: mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: net/tipc/link.c:1125:6: warning: this statement may fall through [-Wimplicit-fallthrough=] net/tipc/socket.c:736:6: warning: this statement may fa

[PATCH][next] cfg80211: mark expected switch fall-throughs

2019-01-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: net/wireless/wext-compat.c:1327:6: warning: this statement may fall through [-Wimplicit-fallthrough=] net/wireless/wext-compat.c:1341:6: warning:

Re: [PATCH net-next] remove TWKilled counter

2019-01-22 Thread Cong Wang
On Mon, Jan 21, 2019 at 3:14 PM peng yu wrote: > > Hello, I think the snmp.h didn't try to keep user-space compatibility, > so we could delete LINUX_MIB_TIMEWAITKILLED counter. Do I > misunderstand anything? I don't know. Maybe user-space doesn't need these definitions at all, as like nstat can

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

2019-01-22 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-22 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 12/12] nfp: bpf: support removing dead code

2019-01-22 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-22 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-22 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 03/12] bpf: verifier: remove dead code

2019-01-22 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

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

2019-01-22 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 05/12] selftests: bpf: add tests for dead code removal

2019-01-22 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 01/12] bpf: change parameters of call/branch offset adjustment

2019-01-22 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 00/12] bpf: dead code elimination

2019-01-22 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 04/12] bpf: verifier: remove unconditional branches by 0

2019-01-22 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 v5 02/12] bpf: verifier: hard wire branches to dead code

2019-01-22 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 06/12] bpf: verifier: record original instruction index

2019-01-22 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 iproute2] tc: add performance counters for basic filter

2019-01-22 Thread Cong Wang
Sample output: filter protocol arp pref 49152 basic chain 0 filter protocol arp pref 49152 basic chain 0 handle 0x1 (rule hit 3 success 3) action order 1: gact action pass random type none pass val 0 index 1 ref 1 bind 1 installed 81 sec used 4 sec Action statistics: Sent 12

Re: [PATCH bpf-next v5 0/9] tools: bpftool: add probes for system and device

2019-01-22 Thread Alexei Starovoitov
On Thu, Jan 17, 2019 at 7:28 AM Quentin Monnet wrote: > > > If the user does not have root privileges (or more precisely, the > CAP_SYS_ADMIN capability) detection will be erroneous for most > parameters. Therefore, forbid non-root users to run the command. > > v5: > - Move exported symbols to a n

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

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 22, 2019 at 02:42:26PM -0800, Dmitry Torokhov wrote: > On Tue, Jan 22, 2019 at 2:29 PM Rajat Jain wrote: > > > > Hi Marcel, > > > > On Sat, Jan 19, 2019 at 11:51 AM Marcel Holtmann > > wrote: > > > > > > Hi Rajat, > > > > > > > In preparation for handling embedded USB devices let's s

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

2019-01-22 Thread Heiner Kallweit
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. v2: - improve warning to clearly state that we fall back to polling Signed-off-by: Heiner

[PATCH net-next v3 3/4] net: phy: start interrupts in phy_start

2019-01-22 Thread Heiner Kallweit
Interrupts don't have to be enabled before calling phy_start(). Therefore let's enable them in phy_start(). In a subsequent step we'll remove enabling interrupts from phy_connect_direct(). Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 34 ++ 1 file ch

[PATCH net-next v3 2/4] net: phy: warn if phy_start is called from invalid state

2019-01-22 Thread Heiner Kallweit
phy_start() should be called from states PHY_READY or PHY_HALTED only. Check for this to detect misbehaving drivers. Also the state machine should be started only when being called from one of the valid states. Some more background: For all invalid states phy_start() basically was a no-op. All it

[PATCH net-next v3 1/4] net: phy: start state machine in phy_start only

2019-01-22 Thread Heiner Kallweit
The state machine is a no-op before phy_start() has been called. Therefore let's enable it in phy_start() only. In phy_start() let's call phy_start_machine() instead of phy_trigger_machine(). phy_start_machine is an alias for phy_trigger_machine but it makes clearer that we start the state machine

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

2019-01-22 Thread Heiner Kallweit
This patch series improves few aspects of starting the PHY. v2: - improve a warning in patch 4 v3: - extend commit message for patch 2 Heiner Kallweit (4): net: phy: start state machine in phy_start only net: phy: warn if phy_start is called from invalid state net: phy: start interrupts in

[PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()

2019-01-22 Thread Wei Yongjun
In case of error, the function devm_clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/stmicro/stmmac

Re: [PATCH net-next] net: phy: fix issue with loading PHY driver w/o initramfs

2019-01-22 Thread Heiner Kallweit
On 22.01.2019 23:45, David Miller wrote: > From: Heiner Kallweit > Date: Sat, 19 Jan 2019 10:30:21 +0100 > >> It was reported that on a system with nfsboot and w/o initramfs network >> fails because trying to load the PHY driver returns -ENOENT. Reason was >> that due to missing initramfs the mod

[PATCH v3 bpf-next 9/9] selftests/bpf: test for BPF_F_LOCK

2019-01-22 Thread Alexei Starovoitov
Add C based test that runs 4 bpf programs in parallel that update the same hash and array maps. And another 2 threads that read from these two maps via lookup(key, value, BPF_F_LOCK) api to make sure the user space sees consistent value in both hash and array elements while user space races with ke

[PATCH v3 bpf-next 7/9] tools/bpf: sync uapi/bpf.h

2019-01-22 Thread Alexei Starovoitov
add BPF_F_LOCK definition to tools/include/uapi/linux/bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 30f9dfd40f13..c23eaa284a45 100644 --- a/tools

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

2019-01-22 Thread Alexei Starovoitov
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) the rest of map value. Implementation details that are part of uapi:

[PATCH v3 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-22 Thread Alexei Starovoitov
Introduce 'struct bpf_spin_lock' and bpf_spin_lock/unlock() helpers to let bpf program serialize access to other variables. Example: struct hash_elem { int cnt; struct bpf_spin_lock lock; }; struct hash_elem * val = bpf_map_lookup_elem(&hash_map, &key); if (val) { bpf_spin_lock(&val->l

[PATCH v3 bpf-next 0/9] introduce bpf_spin_lock

2019-01-22 Thread Alexei Starovoitov
Many algorithms need to read and modify several variables atomically. Until now it was hard to impossible to implement such algorithms in BPF. Hence introduce support for bpf_spin_lock. The api consists of 'struct bpf_spin_lock' that should be placed inside hash/array/cgroup_local_storage element

[PATCH v3 bpf-next 5/9] selftests/bpf: add bpf_spin_lock C test

2019-01-22 Thread Alexei Starovoitov
add bpf_spin_lock C based test that requires latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_helpers.h| 4 + tools/testing/selftests/bpf/test_progs.c | 43 +++- tools/testing/

[PATCH v3 bpf-next 8/9] libbpf: introduce bpf_map_lookup_elem_flags()

2019-01-22 Thread Alexei Starovoitov
Introduce int bpf_map_lookup_elem_flags(int fd, const void *key, void *value, __u64 flags) helper to lookup array/hash/cgroup_local_storage elements with BPF_F_LOCK flag. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 13 + tools/lib/bpf/bpf.h | 2 ++ tools/li

[PATCH v3 bpf-next 2/9] bpf: add support for bpf_spin_lock to cgroup local storage

2019-01-22 Thread Alexei Starovoitov
Allow 'struct bpf_spin_lock' to reside inside cgroup local storage. Signed-off-by: Alexei Starovoitov --- kernel/bpf/local_storage.c | 2 ++ kernel/bpf/syscall.c | 3 ++- kernel/bpf/verifier.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/local_stora

[PATCH v3 bpf-next 3/9] tools/bpf: sync include/uapi/linux/bpf.h

2019-01-22 Thread Alexei Starovoitov
sync bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 91c43884f295..30f9dfd40f13 100644 --- a/tools/include/uapi/linux/bpf.h +

[PATCH v3 bpf-next 4/9] selftests/bpf: add bpf_spin_lock tests

2019-01-22 Thread Alexei Starovoitov
add bpf_spin_lock tests to test_verifier.c that don't require latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 459 +++- 1 file changed, 458 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test

[PATCH net-next 5/5] ip6tlvs: API to set and remove individual TLVs from DO or HBH EH

2019-01-22 Thread Tom Herbert
Add functions and socket options that allows setting and removing of individual TLVs from Hop-by-Hop, Destination, or Routing Header Destination options that are set in txoptions of a socket. When an individual TLV optiosn is set it is merge into the existing options at the position in the list des

[PATCH net-next 2/5] exthdrs: Registration of TLV handlers and parameters

2019-01-22 Thread Tom Herbert
Define a table that contains 256 entries, one for each TLV. Each entry points to a structure that contains parameters and handler functions for receiving and transmitting TLVs. The receive and transmit properties can be managed independently. TLV transmit properties include a description of limits

[PATCH net-next 3/5] ip6tlvs: Add netlink interface

2019-01-22 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. --- include/uapi/linux/in6.h | 32 + net/ipv6/exthdrs_options.c | 292 +++

[PATCH net-next 4/5] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-01-22 Thread Tom Herbert
Validate Destination and Hop-by-Hop options. This uses the information in the TLV parameters table to validate various aspects of both individual TLVs as well as a list of TLVs in an EH. There are two levels of validation that can be performed: simple checks and deep checks. Simple checks validate

[PATCH net-next 1/5] exthdrs: Create exthdrs_options.c

2019-01-22 Thread Tom Herbert
Create exthdrs_options.c to hold code related to Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. --- include/net/ipv6.h | 8 ++ net/ipv6/Makefile | 2 +- net/ipv6/exthdrs.c | 342

[PATCH net-next 0/5] ipv6: Rework ext. headers infrastructure

2019-01-22 Thread Tom Herbert
This patch set implements an infrastructure to allow fine grained control over IPv6 Destination and Hop-by-Hop TLV options. This includes being able to registers handlers for receiving options as well as a set of parameters that sets permissions for who may send a TLV option and the preferred forma

Re: [Patch iproute2] tc: add hit counter for matchall

2019-01-22 Thread Cong Wang
On Mon, Jan 21, 2019 at 8:35 AM David Ahern wrote: > > On 1/17/19 2:18 PM, Cong Wang wrote: > > Cc: Martin Olsson > > Cc: Jamal Hadi Salim > > Cc: Jiri Pirko > > Cc: David Ahern > > Signed-off-by: Cong Wang > > --- > > tc/f_matchall.c | 14 ++ > > 1 file changed, 14 insertions(+)

Re: [PATCH net-next 1/1] bnx2x: Bump up driver version to 1.713.36

2019-01-22 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Tue, 22 Jan 2019 03:05:20 -0800 > Recently, there were bunch of fixes to bnx2x driver, the code is now > aligned to out-of-box driver version 1.713.36. This patch updates > bnx2x driver version to 1.713.36. > > Signed-off-by: Sudarsana Reddy Kalluru > Signed-

Re: [PATCH] devlink: Use DIV_ROUND_UP_ULL in DEVLINK_HEALTH_SIZE_TO_BUFFERS

2019-01-22 Thread David Miller
From: Nathan Chancellor Date: Mon, 21 Jan 2019 21:23:01 -0700 > When building this code on a 32-bit platform such as ARM, there is a > link time error (lld error shown, happpens with ld.bfd too): > > ld.lld: error: undefined symbol: __aeabi_uldivmod referenced by devlink.c

Re: [PATCH net-next] net: phy: Fixup GPLv2 SPDX tags based on license text

2019-01-22 Thread David Miller
From: Andrew Lunn Date: Mon, 21 Jan 2019 19:10:19 +0100 > A few PHY drivers have the GPLv2 license text. They then either have > a MODULE_LICENSE() of GPLv2+, or an SPDX tag of GPLv2+. > > Since the license text is much easier to understand than either the > SPDX tag or the MODULE_LICENSE, use i

Re: [PATCH] net: phy: Fixup GPLv2+ SPDX tags based on license text

2019-01-22 Thread David Miller
From: Andrew Lunn Date: Mon, 21 Jan 2019 19:08:49 +0100 > A few PHY drivers have the GPLv2+ license text. They then either have > a MODULE_LICENSE() of GPLv2 only, or an SPDX tag of GPLv2 only. > > Since the license text is much easier to understand than either the > SPDX tag or the MODULE_LICEN

Re: [PATCH net-next 0/2] SPDX tags for PHY and MDIO drivers

2019-01-22 Thread David Miller
From: Andrew Lunn Date: Mon, 21 Jan 2019 19:05:49 +0100 > This patchset adds SPDX tags to files where the license information is > clear and consistent. It also removes redundent license text when an > SPDX header is present. Series applied, thanks.

Re: [PATCH] net: fec: get regulator optional

2019-01-22 Thread David Miller
From: Stefan Agner Date: Mon, 21 Jan 2019 15:58:47 +0100 > According to the device tree binding the phy-supply property is > optional. Use the regulator_get_optional API accordingly. The > code already handles NULL just fine. > > This gets rid of the following warning: > fec 2188000.ethernet:

Re: [PATCH] net/ipv6: lower the level of "link is not ready" messages

2019-01-22 Thread David Miller
From: Lubomir Rintel Date: Mon, 21 Jan 2019 14:54:20 +0100 > This message gets logged far too often for how interesting is it. > > Most distributions nowadays configure NetworkManager to use randomly > generated MAC addresses for Wi-Fi network scans. The interfaces end up > being periodically br

Re: [PATCH net-next] cxgb4/cxgb4vf: Link management changes

2019-01-22 Thread David Miller
From: Vishal Kulkarni Date: Mon, 21 Jan 2019 17:12:11 +0530 > 1) Speed should be supported by Physical Port Capabilities. > 2) report Forward Error Correction mode which are available. > 3) Added few comments. > > Signed-off-by: Casey Leedom > Signed-off-by: Vishal Kulkarni > Signed-off-by: Ar

Re: [PATCH net-next 0/4] selftests: forwarding: Add tests for VXLAN routing

2019-01-22 Thread David Miller
From: Ido Schimmel Date: Mon, 21 Jan 2019 13:22:51 + > VXLAN routing allows hosts in different overlay networks (i.e., > different VNIs) to communicate with one another. > > Two popular routing models are asymmetric and symmetric routing. > > In asymmetric routing the ingress VTEP routes th

[PATCH v2 bpf] bpf: sock recvbuff must be limited by rmem_max in bpf_setsockopt()

2019-01-22 Thread Yafang Shao
When sock recvbuff is set by bpf_setsockopt(), the value must by limited by rmem_max. It is the same with sendbuff. Fixes: 8c4b4c7e9ff0 ("bpf: Add setsockopt helper function to bpf") Acked-by: Martin KaFai Lau Acked-by: Lawrence Brakmo Signed-off-by: Yafang Shao --- net/core/filter.c | 2 ++ 1

Re: [PATCH] ath: move spin_lock_bh to spin_lock in tasklet

2019-01-22 Thread Kalle Valo
姜智伟 writes: > Will do, thanks! Also don't send HTML mail :) Maillists drop those automatically. -- Kalle Valo

Re: [v3, 0/6] External trigger stamp fifo support for ptp_qoriq

2019-01-22 Thread David Miller
From: Yangbo Lu Date: Mon, 21 Jan 2019 18:41:37 +0800 > This patch-set is to add external trigger stamp fifo support by a new > binding "fsl,extts-fifo", and to add fiper pulse loopback support which > is very useful for validating trigger without external hardware. > Also fixed issues in interru

Re: [PATCH net-next] devlink: Add missing check of nlmsg_put

2019-01-22 Thread David Miller
From: YueHaibing Date: Mon, 21 Jan 2019 09:34:53 + > nlmsg_put may fail, this fix add a check of its return value. > > Signed-off-by: YueHaibing Applied.

Re: [PATCH iproute2-next v2] devlink: Add health command support

2019-01-22 Thread David Ahern
On 1/20/19 2:27 AM, Aya Levin wrote: > diff --git a/devlink/devlink.c b/devlink/devlink.c > index 3651e90c1159..9fc19668ccd0 100644 > --- a/devlink/devlink.c > +++ b/devlink/devlink.c > @@ -1,4 +1,5 @@ > /* > + * extra newline > * devlink.c Devlink tool > * > * This program is

Re: [PATCH v3 0/5] net: Add support for Qualcomm ethqos

2019-01-22 Thread David Miller
From: Vinod Koul Date: Mon, 21 Jan 2019 14:43:13 +0530 > Some Qualcomm SoCs sport a ethqos controller which use DW ip, so add > the glue driver which uses stmmac driver along with DT bindings for > this device. > > This controller supports rgmii mode and doesn't work with existing > phy drivers

[PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO.

2019-01-22 Thread Mao Wenan
When udp4_gro_receive() get one packet that uh->check=0, skb_gro_checksum_validate_zero_check() will set the skb->ip_summed = CHECKSUM_UNNECESSARY; skb->csum_level = 0; Then udp_gro_receive() will flush the packet which is not CHECKSUM_PARTIAL, It is not our expect, because check=0 in udp header i

Re: [PATCH bpf-next] bpf: sock recvbuff must be limited by rmem_max in bpf_setsockopt()

2019-01-22 Thread 基础平台部
> On 23 Jan 2019, at 1:42 AM, Martin Lau wrote: > > On Sat, Jan 19, 2019 at 02:20:30PM +0800, Yafang Shao wrote: >> When sock recvbuff is set by bpf_setsockopt(), the value must by limited >> by rmem_max. >> It is the same with sendbuff. >> >> Signed-off-by: Yafang Shao > For bug fixes, pleas

Re: [PATCH net-next v1] l2tp: fix reading optional fields

2019-01-22 Thread Eric Dumazet
On 01/22/2019 06:30 PM, Jacob Wen wrote: > Use pskb_may_pull() to make sure the optional fields are in skb linear > parts. > > Signed-off-by: Jacob Wen > --- > v1: fix warning: ISO C90 forbids mixed declarations and code > --- > net/l2tp/l2tp_core.c | 12 +++- > 1 file changed, 11 ins

Re: [PATCH net-next v2 1/4] net: phy: start state machine in phy_start only

2019-01-22 Thread S-k, Shyam-sundar
Hi Heiner On 1/23/2019 12:39 AM, Heiner Kallweit wrote: > On 22.01.2019 15:46, Lendacky, Thomas wrote: >> On 1/21/19 12:36 PM, Heiner Kallweit wrote: >>> On 21.01.2019 17:35, Andrew Lunn wrote: On Sun, Jan 20, 2019 at 10:01:15AM +0100, Heiner Kallweit wrote: > The state machine is a no-op

Re: [PATCH net-next 2/4] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-01-22 Thread Eric Dumazet
On 01/22/2019 06:13 PM, Tom Herbert wrote: > On Tue, Jan 22, 2019 at 5:13 PM Peter Oskolkov wrote: >> >> On Tue, Jan 22, 2019 at 5:04 PM Tom Herbert wrote: >>> >>> On Tue, Jan 22, 2019 at 4:53 PM Peter Oskolkov wrote: On Tue, Jan 22, 2019 at 4:37 PM Tom Herbert wrote: > > O

[PATCH net-next v1] l2tp: fix reading optional fields

2019-01-22 Thread Jacob Wen
Use pskb_may_pull() to make sure the optional fields are in skb linear parts. Signed-off-by: Jacob Wen --- v1: fix warning: ISO C90 forbids mixed declarations and code --- net/l2tp/l2tp_core.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/l2tp/l2tp_core.c b

[PATCH stable 4.4 07/11] ip: add helpers to process in-order fragments faster.

2019-01-22 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit 353c9cb360874e737fb000545f783df756c06f9a ] This patch introduces several helper functions/macros that will be used in the follow-up patch. No runtime changes yet. The new logic (fully implemented in the second patch) is as follows: * Nodes in the rb-tree

[PATCH stable 4.4 01/11] net: speed up skb_rbtree_purge()

2019-01-22 Thread Mao Wenan
From: Eric Dumazet [ Upstream commit 7c90584c66cc4b033a3b684b0e0950f79e7b7166 ] As measured in my prior patch ("sch_netem: faster rb tree removal"), rbtree_postorder_for_each_entry_safe() is nice looking but much slower than using rb_next() directly, except when tree is small enough to fit in CP

[PATCH stable 4.4 03/11] net: modify skb_rbtree_purge to return the truesize of all purged skbs.

2019-01-22 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit 385114dec8a49b5e5945e77ba7de6356106713f4 ] Tested: see the next patch is the series. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: Eric Dumazet Cc: Florian Westphal Signed-off-by: David S. Miller Signed-off-by: Mao Wenan ---

[PATCH stable 4.4 00/11] fix FragmentSmack in stable branch (CVE-2018-5391)

2019-01-22 Thread Mao Wenan
There is one CVE: CVE-2018-5391 kernel: IP fragments with random offsets allow a remote denial of service (FragmentSmack), A fix is a merge commit in the Linux kernel tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c30f1fc041b74ecdb072dd44f858750414b8b19f con

[PATCH stable 4.4 04/11] inet: frags: get rif of inet_frag_evicting()

2019-01-22 Thread Mao Wenan
From: Eric Dumazet [ Upstream commit 399d1404be660d355192ff4df5ccc3f4159ec1e4 ] This refactors ip_expire() since one indentation level is removed. Note: in the future, we should try hard to avoid the skb_clone() since this is a serious performance cost. Under DDOS, the ICMP message wont be sent

[PATCH stable 4.4 10/11] ip: frags: fix crash in ip_do_fragment()

2019-01-22 Thread Mao Wenan
From: Taehee Yoo [ Upstream commit 5d407b071dc369c26a38398326ee2be53651cfe4 ] A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union me

[PATCH stable 4.4 02/11] ip: discard IPv4 datagrams with overlapping segments.

2019-01-22 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit 7969e5c40dfd04799d4341f1b7cd266b6e47f227 ] This behavior is required in IPv6, and there is little need to tolerate overlapping fragments in IPv4. This change simplifies the code and eliminates potential DDoS attack vectors. Tested: ran ip_defrag selftest (

[PATCH stable 4.4 11/11] ipv4: frags: precedence bug in ip_expire()

2019-01-22 Thread Mao Wenan
From: Dan Carpenter [ Upstream commit 70837ffe3085c9a91488b52ca13ac84424da1042 ] We accidentally removed the parentheses here, but they are required because '!' has higher precedence than '&'. Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.") Signed-off-by: Dan Carpenter Signed-off-b

[PATCH stable 4.4 06/11] ipv6: defrag: drop non-last frags smaller than min mtu

2019-01-22 Thread Mao Wenan
From: Florian Westphal [ Upstream commit 0ed4229b08c13c84a3c301a08defdc9e7f4467e6 ] don't bother with pathological cases, they only waste cycles. IPv6 requires a minimum MTU of 1280 so we should never see fragments smaller than this (except last frag). v3: don't use awkward "-offset + len" v2:

[PATCH stable 4.4 08/11] ip: process in-order fragments efficiently

2019-01-22 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit a4fd284a1f8fd4b6c59aa59db2185b1e17c5c11c ] This patch changes the runtime behavior of IP defrag queue: incoming in-order fragments are added to the end of the current list/"run" of in-order fragments at the tail. On some workloads, UDP stream performance i

[PATCH stable 4.4 09/11] net: ipv4: do not handle duplicate fragments as overlapping

2019-01-22 Thread Mao Wenan
From: Michal Kubecek [ Upstream commit ade446403bfb79d3528d56071a84b15351a139ad ] Since commit 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.") IPv4 reassembly code drops the whole queue whenever an overlapping fragment is received. However, the test is written in a way whi

[PATCH stable 4.4 05/11] ip: use rb trees for IP frag queue.

2019-01-22 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit fa0f527358bd900ef92f925878ed6bfbd51305cc ] Similar to TCP OOO RX queue, it makes sense to use rb trees to store IP fragments, so that OOO fragments are inserted faster. Tested: - a follow-up patch contains a rather comprehensive ip defrag self-test (fun

Re: [PATCH net-next 2/4] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-01-22 Thread Tom Herbert
On Tue, Jan 22, 2019 at 5:13 PM Peter Oskolkov wrote: > > On Tue, Jan 22, 2019 at 5:04 PM Tom Herbert wrote: > > > > On Tue, Jan 22, 2019 at 4:53 PM Peter Oskolkov wrote: > > > > > > On Tue, Jan 22, 2019 at 4:37 PM Tom Herbert wrote: > > > > > > > > On Tue, Jan 22, 2019 at 10:03 AM Peter Oskolk

Re: Regression: mv88e6xxx packet loss after 4.18's PHYLINK merge

2019-01-22 Thread Andrew Lunn
> Hi Andrew, > > I tested the patch and it has an issue that prevents the carrier from turning > on. I think it's caused by the change from using link_state to phy->phy_state, > as later in the same function the link_state attributes are read when > deciding if the carrier needs to be turned on.

Re: stable backport for the BPF speculation series?

2019-01-22 Thread Daniel Borkmann
On 01/22/2019 05:44 PM, David Miller wrote: > From: Jann Horn > Date: Tue, 22 Jan 2019 15:36:54 +0100 > >> On Thu, Jan 3, 2019 at 1:08 AM Alexei Starovoitov >> wrote: >>> On Thu, Jan 03, 2019 at 12:58:26AM +0100, Daniel Borkmann wrote: This set fixes an out of bounds case under speculative

Re: [PATCH] net: altera_tse: fix connect_local_phy error path

2019-01-22 Thread David Miller
From: Atsushi Nemoto Date: Mon, 21 Jan 2019 17:26:41 +0900 > The connect_local_phy should return NULL (not negative errno) on > error, since its caller expects it. > > Signed-off-by: Atsushi Nemoto Applied.

Re: [v2] net: dpaa2: improve PTP Kconfig option

2019-01-22 Thread David Miller
From: Yangbo Lu Date: Mon, 21 Jan 2019 14:26:37 +0800 > Converted to use "imply" instead of "select" for PTP_1588_CLOCK > driver selecting. This could break the hard dependency between > the PTP clock subsystem and ethernet drivers. > This patch also set "default y" for dpaa2 ptp driver building

Re: [PATCH net-next 1/1] net: stmmac: implement the SIOCGHWTSTAMP ioctl

2019-01-22 Thread David Miller
From: Artem Panfilov Date: Sun, 20 Jan 2019 19:05:15 +0300 > This patch adds support for the SIOCGHWTSTAMP ioctl which enables user > processes to read the current hwtstamp_config settings > non-destructively. > > Signed-off-by: Artem Panfilov Applied, thanks.

Re: [PATCH net-next 0/3] qed*: Error recovery process

2019-01-22 Thread David Miller
From: Michal Kalderon Date: Sun, 20 Jan 2019 11:36:36 +0200 > Parity errors might happen in the device's memories due to momentary bit > flips which are caused by radiation. > Errors that are not correctable initiate a process kill event, which blocks > the device access towards the host and the

Re: [PATCH net v2] net/ipv6: don't return positive numbers when nothing was dumped

2019-01-22 Thread David Miller
From: Jakub Kicinski Date: Tue, 22 Jan 2019 14:47:19 -0800 > in6_dump_addrs() returns a positive 1 if there was nothing to dump. > This return value can not be passed as return from inet6_dump_addr() > as is, because it will confuse rtnetlink, resulting in NLMSG_DONE > never getting set: > > $ i

Re: [PATCH net-next v2 0/4] bridge: implement Multicast Router Discovery (RFC4286)

2019-01-22 Thread David Miller
From: Linus Lüssing Date: Mon, 21 Jan 2019 07:26:24 +0100 > This patchset adds initial Multicast Router Discovery support to > the Linux bridge (RFC4286). With MRD it is possible to detect multicast > routers and mark bridge ports and forward multicast packets to such routers > accordingly. > >

Re: [PATCH net-next 2/4] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-01-22 Thread Peter Oskolkov
On Tue, Jan 22, 2019 at 5:04 PM Tom Herbert wrote: > > On Tue, Jan 22, 2019 at 4:53 PM Peter Oskolkov wrote: > > > > On Tue, Jan 22, 2019 at 4:37 PM Tom Herbert wrote: > > > > > > On Tue, Jan 22, 2019 at 10:03 AM Peter Oskolkov wrote: > > > > > > > > Currently, IPv6 defragmentation code drops n

  1   2   3   4   >