[PATCH net-next 09/12] net: qede: Implement ndo_tx_timeout

2020-05-06 Thread Igor Russkikh
From: Denis Bolotin Upon tx timeout detection we do disable carrier and print TX queue info on TX timeout. We then raise hw error condition and trigger service task to handle this. This handler will capture extra debug info and then optionally trigger recovery procedure to try restore function.

[PATCH net-next 01/12] net: qed: adding hw_err states and handling

2020-05-06 Thread Igor Russkikh
Here we introduce qed device error tracking flags and error types. qed_hw_err_notify is an entrace point to report errors. It'll notify higher level drivers (qede/qedr/etc) to handle and recover the error. List of posible errors comes from hardware interfaces, but could be extended in future. Si

[PATCH net-next 08/12] net: qede: optional hw recovery procedure

2020-05-06 Thread Igor Russkikh
Driver has an ability to initiate a recovery process as a reaction to detected errors. But the codepath (recovery_process) was disabled and never active. Here we add ethtool private flag to allow user have the recovery procedure activated. We still do not enable this by default though, since in s

[PATCH net-next] net: lantiq: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/lantiq_xrx200.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/lant

[PATCH v4 0/5] net: macb: Wake-on-Lan magic packet fixes and GEM handling

2020-05-06 Thread nicolas.ferre
From: Nicolas Ferre Hi, Here is a split series to fix WoL magic-packet on the current macb driver. Only fixes in this one based on current net/master. Best regards, Nicolas Changes in v4: - Pure bug fix series for 'net'. GEM addition and MACB update removed: will be sent later. Changes in

[PATCH v4 4/5] net: macb: fix macb_suspend() by removing call to netif_carrier_off()

2020-05-06 Thread nicolas.ferre
From: Nicolas Ferre As we now use the phylink call to phylink_stop() in the non-WoL path, there is no need for this call to netif_carrier_off() anymore. It can disturb the underlying phylink FSM. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Nicolas Ferre Reviewed-by: Flo

[PATCH v4 5/5] net: macb: fix call to pm_runtime in the suspend/resume functions

2020-05-06 Thread nicolas.ferre
From: Nicolas Ferre The calls to pm_runtime_force_suspend/resume() functions are only relevant if the device is not configured to act as a WoL wakeup source. Add the device_may_wakeup() test before calling them. Fixes: 3e2a5e153906 ("net: macb: add wake-on-lan support via magic packet") Signed-o

[PATCH v4 3/5] net: macb: fix macb_get/set_wol() when moving to phylink

2020-05-06 Thread nicolas.ferre
From: Nicolas Ferre Keep previous function goals and integrate phylink actions to them. phylink_ethtool_get_wol() is not enough to figure out if Ethernet driver supports Wake-on-Lan. Initialization of "supported" and "wolopts" members is done in phylink function, no need to keep them in calling

[PATCH v4 1/5] net: macb: fix wakeup test in runtime suspend/resume routines

2020-05-06 Thread nicolas.ferre
From: Nicolas Ferre Use the proper struct device pointer to check if the wakeup flag and wakeup source are positioned. Use the one passed by function call which is equivalent to &bp->dev->dev.parent. It's preventing the trigger of a spurious interrupt in case the Wake-on-Lan feature is used. Fi

[PATCH v4 2/5] net: macb: mark device wake capable when "magic-packet" property present

2020-05-06 Thread nicolas.ferre
From: Nicolas Ferre Change the way the "magic-packet" DT property is handled in the macb_probe() function, matching DT binding documentation. Now we mark the device as "wakeup capable" instead of calling the device_init_wakeup() function that would enable the wakeup source. For Ethernet WoL, ena

Re: [RFC PATCH bpf-next 04/13] xsk: introduce AF_XDP buffer allocation API

2020-05-06 Thread Björn Töpel
On 2020-05-06 11:51, Maxim Mikityanskiy wrote: On 2020-05-04 14:37, Björn Töpel wrote: [] @@ -389,6 +390,11 @@ static void __xdp_return(void *data, struct xdp_mem_info *mem, bool napi_direct,   xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params);   xa->zc_alloc->free

Re: [PATCH net,v2] net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE

2020-05-06 Thread Jiri Pirko
Wed, May 06, 2020 at 01:33:27PM CEST, ec...@solarflare.com wrote: >On 06/05/2020 00:29, Jakub Kicinski wrote: >> IIRC we went from the pure bitfield implementation (which was my >> preference) to one where 0 means disabled. >> >> Unfortunately we ended up with a convoluted API where drivers have to

[PATCH net,v3] net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE

2020-05-06 Thread Pablo Neira Ayuso
This patch adds FLOW_ACTION_HW_STATS_DONT_CARE which tells the driver that the frontend does not need counters, this hw stats type request never fails. The FLOW_ACTION_HW_STATS_DISABLED type explicitly requests the driver to disable the stats, however, if the driver cannot disable counters, it bail

Re: performance bug in virtio net xdp

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 10:37:57AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 6 May 2020 04:08:27 -0400 > "Michael S. Tsirkin" wrote: > > > So for mergeable bufs, we use ewma machinery to guess the correct buffer > > size. If we don't guess correctly, XDP has to do aggressive copies. > > > >

Re: performance bug in virtio net xdp

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:37:41PM +0800, Jason Wang wrote: > > On 2020/5/6 下午4:08, Michael S. Tsirkin wrote: > > So for mergeable bufs, we use ewma machinery to guess the correct buffer > > size. If we don't guess correctly, XDP has to do aggressive copies. > > > > Problem is, xdp paths do not u

Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:21:15PM +0800, Jason Wang wrote: > > On 2020/5/6 下午3:37, Michael S. Tsirkin wrote: > > On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: > > > We should not exclude headroom and tailroom when XDP is set. So this > > > patch fixes this by initializing the truesi

[PATCH net-next] net: moxa: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/moxa/moxart_ether.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethern

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-06 Thread Souptick Joarder
On Wed, May 6, 2020 at 3:36 PM Jan Kara wrote: > > On Wed 06-05-20 02:06:56, Souptick Joarder wrote: > > On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: > > > > > > On 2020-05-05 12:14, Souptick Joarder wrote: > > > > Currently {get|pin}_user_pages_fast() have 3 return value 0, -errno > > > >

[PATCH net-next] net: cpmac: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/ti/cpmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpmac.c

Re: [net-next PATCH v2 0/3] Introduce new APIs to support phylink and phy layers

2020-05-06 Thread Calvin Johnson
Hi Rafael, On Wed, Apr 29, 2020 at 12:26:12PM +0200, Rafael J. Wysocki wrote: > On Wed, Apr 29, 2020 at 7:38 AM Calvin Johnson > wrote: > > > > > So, yes, there's another driver using it, but the ACPI folk probably > > > never got a look-in on that instance. Even if they had been copied, > > >

[PATCH bpf-next 04/17] inet: Extract helper for selecting socket from reuseport group

2020-05-06 Thread Jakub Sitnicki
Prepare for calling into reuseport from __inet_lookup_listener as well. Signed-off-by: Jakub Sitnicki --- net/ipv4/inet_hashtables.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 2b

Re: [v4,iproute2-next 1/2] iproute2-next:tc:action: add a gate control action

2020-05-06 Thread Davide Caratti
On Wed, 2020-05-06 at 16:40 +0800, Po Liu wrote: > Introduce a ingress frame gate control flow action. [...] hello Po Liu, [...] > +create_entry: > + e = create_gate_entry(gate_state, interval, > + ipv, maxoctets); > +

[PATCH bpf-next 01/17] flow_dissector: Extract attach/detach/query helpers

2020-05-06 Thread Jakub Sitnicki
Move generic parts of callbacks for querying, attaching, and detaching a single BPF program for reuse by other BPF program types. Subsequent patch makes use of the extracted routines. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- include/linux/bpf.h | 8 + net/core/fil

[PATCH bpf-next 03/17] inet: Store layer 4 protocol in inet_hashinfo

2020-05-06 Thread Jakub Sitnicki
Make it possible to identify the protocol of sockets stored in hashinfo without looking up a socket. Subsequent patches make use the new field at the socket lookup time to ensure that BPF program selects only sockets with matching protocol. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki

[PATCH bpf-next 00/17] Run a BPF program on socket lookup

2020-05-06 Thread Jakub Sitnicki
Overview This series proposes a new BPF program type named BPF_PROG_TYPE_SK_LOOKUP, or BPF sk_lookup for short. BPF sk_lookup program runs when transport layer is looking up a socket for a received packet. When called, sk_lookup program can select a socket that will receive the packet.

[PATCH bpf-next 12/17] udp6: Run SK_LOOKUP BPF program on socket lookup

2020-05-06 Thread Jakub Sitnicki
Same as for udp4, let BPF program override the socket lookup result, by selecting a receiving socket of its choice or failing the lookup, if no connected UDP socket matched packet 4-tuple. Suggested-by: Marek Majkowski Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- net/ipv6/udp.c

[PATCH bpf-next 02/17] bpf: Introduce SK_LOOKUP program type with a dedicated attach point

2020-05-06 Thread Jakub Sitnicki
Add a new program type BPF_PROG_TYPE_SK_LOOKUP and a dedicated attach type called BPF_SK_LOOKUP. The new program kind is to be invoked by the transport layer when looking up a socket for a received packet. When called, SK_LOOKUP program can select a socket that will receive the packet. This serves

[PATCH bpf-next 09/17] udp: Extract helper for selecting socket from reuseport group

2020-05-06 Thread Jakub Sitnicki
Prepare for calling into reuseport from __udp4_lib_lookup as well. Signed-off-by: Jakub Sitnicki --- net/ipv4/udp.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ce96b1746ddf..d4842f29294a 100644 ---

[PATCH net-next] net: 7990: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/amd/7990.c | 2 +- drivers/net/ethernet/amd/7990.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) di

[PATCH bpf-next 14/17] libbpf: Add support for SK_LOOKUP program type

2020-05-06 Thread Jakub Sitnicki
Make libbpf aware of the newly added program type, and assign it a section name. Signed-off-by: Jakub Sitnicki --- tools/lib/bpf/libbpf.c| 3 +++ tools/lib/bpf/libbpf.h| 2 ++ tools/lib/bpf/libbpf.map | 2 ++ tools/lib/bpf/libbpf_probes.c | 1 + 4 files changed, 8 insertions

[PATCH bpf-next 10/17] udp: Run SK_LOOKUP BPF program on socket lookup

2020-05-06 Thread Jakub Sitnicki
Following INET/TCP socket lookup changes, modify UDP socket lookup to let BPF program select a receiving socket before searching for a socket by destination address and port as usual. Lookup of connected sockets that match packet 4-tuple is unaffected by this change. BPF program runs, and potentia

[PATCH bpf-next 17/17] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-05-06 Thread Jakub Sitnicki
Add tests to test_progs that exercise: - attaching/detaching/querying sk_lookup program, - overriding socket lookup result for TCP/UDP with BPF sk_lookup by a) selecting a socket fetched from a SOCKMAP, or b) failing the lookup with no match. Tests cover two special cases: - selecting a

[PATCH bpf-next 16/17] selftests/bpf: Rename test_sk_lookup_kern.c to test_ref_track_kern.c

2020-05-06 Thread Jakub Sitnicki
Name the BPF C file after the test case that uses it. This frees up "test_sk_lookup" namespace for BPF sk_lookup program tests introduced by the following patch. Signed-off-by: Jakub Sitnicki --- tools/testing/selftests/bpf/prog_tests/reference_tracking.c | 2 +- .../bpf/progs/{test_sk_look

[PATCH bpf-next 13/17] bpf: Sync linux/bpf.h to tools/

2020-05-06 Thread Jakub Sitnicki
Newly added program, context type and helper is used by tests in a subsequent patch. Synchronize the header file. Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki --- tools/include/uapi/linux/bpf.h | 53 ++ 1 file changed, 53 insertions(+) diff --git a/to

[PATCH bpf-next 05/17] inet: Run SK_LOOKUP BPF program on socket lookup

2020-05-06 Thread Jakub Sitnicki
Run a BPF program before looking up a listening socket on the receive path. Program selects a listening socket to yield as result of socket lookup by calling bpf_sk_assign() helper and returning BPF_REDIRECT code. Alternatively, program can also fail the lookup by returning with BPF_DROP, or let t

[PATCH bpf-next 11/17] udp6: Extract helper for selecting socket from reuseport group

2020-05-06 Thread Jakub Sitnicki
Prepare for calling into reuseport from __udp6_lib_lookup as well. Signed-off-by: Jakub Sitnicki --- net/ipv6/udp.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index f7866fded418..ee2073329d25 100644

[PATCH bpf-next 15/17] selftests/bpf: Add verifier tests for bpf_sk_lookup context access

2020-05-06 Thread Jakub Sitnicki
Exercise verifier access checks for bpf_sk_lookup context fields. Signed-off-by: Jakub Sitnicki --- .../selftests/bpf/verifier/ctx_sk_lookup.c| 696 ++ 1 file changed, 696 insertions(+) create mode 100644 tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c diff --git a/too

[PATCH bpf-next 08/17] udp: Store layer 4 protocol in udp_table

2020-05-06 Thread Jakub Sitnicki
Because UDP and UDP-Lite share code, we pass the L4 protocol identifier alongside the UDP socket table to functions which need to distinguishing between the two protocol. Put the protocol identifier in the UDP table itself, so that the protocol is known to any function in the call chain that opera

[PATCH bpf-next 06/17] inet6: Extract helper for selecting socket from reuseport group

2020-05-06 Thread Jakub Sitnicki
Prepare for calling into reuseport from inet6_lookup_listener as well. Signed-off-by: Jakub Sitnicki --- net/ipv6/inet6_hashtables.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c inde

[PATCH bpf-next 07/17] inet6: Run SK_LOOKUP BPF program on socket lookup

2020-05-06 Thread Jakub Sitnicki
Following ipv4 stack changes, run a BPF program attached to netns before looking up a listening socket. Program can return a listening socket to use as result of socket lookup, fail the lookup, or take no action. Suggested-by: Marek Majkowski Reviewed-by: Lorenz Bauer Signed-off-by: Jakub Sitnic

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-06 Thread Jan Kara
On Wed 06-05-20 17:51:39, Souptick Joarder wrote: > On Wed, May 6, 2020 at 3:36 PM Jan Kara wrote: > > > > On Wed 06-05-20 02:06:56, Souptick Joarder wrote: > > > On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: > > > > > > > > On 2020-05-05 12:14, Souptick Joarder wrote: > > > > > Currently {g

Re: Re: Re: Re: Re: [PATCH net v2 0/2] Revert the 'socket_alloc' life cycle change

2020-05-06 Thread SeongJae Park
TL; DR: It was not kernel's fault, but the benchmark program. So, the problem is reproducible using the lebench[1] only. I carefully read it's code again. Before running the problem occurred "poll big" sub test, lebench executes "context switch" sub test. For the test, it sets the cpu affinity[

Re: [PATCH bpf-next 02/17] bpf: Introduce SK_LOOKUP program type with a dedicated attach point

2020-05-06 Thread Lorenz Bauer
On Wed, 6 May 2020 at 13:55, Jakub Sitnicki wrote: > > Add a new program type BPF_PROG_TYPE_SK_LOOKUP and a dedicated attach type > called BPF_SK_LOOKUP. The new program kind is to be invoked by the > transport layer when looking up a socket for a received packet. > > When called, SK_LOOKUP progra

Re: [RFC net-next] net: phy: at803x: add cable diagnostics support

2020-05-06 Thread Matthias May
On 03/05/2020 20:15, Michael Walle wrote: > The AR8031/AR8033 and the AR8035 support cable diagnostics. Adding > driver support is straightforward, so lets add it. > > The PHY just do one pair at a time, so we have to start the test four > times. The cable_test_get_status() can block and therefore

[RFCv2 0/9] bpf: Add d_path helper

2020-05-06 Thread Jiri Olsa
hi, adding d_path helper to return full path for 'path' object. I originally added and used 'file_path' helper, which did the same, but used 'struct file' object. Then realized that file_path is just a wrapper for d_path, so we'd cover more calling sites if we add d_path helper and allowed resolvi

[PATCH 3/9] bpf: Add bpfwl tool to construct bpf whitelists

2020-05-06 Thread Jiri Olsa
This tool takes vmlinux object and whitelist directory on input and produces C source object with BPF whitelist data. The vmlinux object needs to have a BTF information compiled in. The whitelist directory is expected to contain files with helper names, where each file contains list of functions/

[PATCH 2/9] bpf: Add d_path whitelist

2020-05-06 Thread Jiri Olsa
Adding whitelist for d_path helper under: kernel/bpf/helpers-whitelist/d_path Currently it's just list of test functions, which will be replaced by list promised by Brendan ;-) Signed-off-by: Jiri Olsa --- kernel/bpf/helpers-whitelist/d_path | 8 1 file changed, 8 insertions(+) crea

[PATCH 4/9] bpf: Allow nested BTF object to be refferenced by BTF object + offset

2020-05-06 Thread Jiri Olsa
Adding btf_struct_address function that takes 2 BTF objects and offset as arguments and checks wether object A is nested in object B on given offset. This function is be used when checking the helper function PTR_TO_BTF_ID arguments. If the argument has an offset value, the btf_struct_address will

[PATCH 9/9] selftests/bpf: Add verifier test for d_path helper

2020-05-06 Thread Jiri Olsa
Adding verifier test for attaching tracing program and calling d_path helper from within and testing that it's allowed for dentry_open function and denied for 'd_path' function with appropriate error. Signed-off-by: Jiri Olsa --- tools/testing/selftests/bpf/test_verifier.c | 13 ++- tools/

[PATCH 6/9] bpf: Compile bpfwl tool at kernel compilation start

2020-05-06 Thread Jiri Olsa
The bpfwl tool will be used during the vmlinux linking, so it's necessary it's ready. Signed-off-by: Jiri Olsa --- Makefile | 21 + tools/Makefile | 3 +++ tools/bpf/Makefile | 5 - 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Makefile b

[PATCH 8/9] selftests/bpf: Add test for d_path helper

2020-05-06 Thread Jiri Olsa
Adding test for d_path helper which is pretty much copied from Wenbo Zhang's test for bpf_get_fd_path, which never made it in. I've failed so far to compile the test with kernel header, so for now adding 'struct file' with f_path member that has same offset as kernel's file object. Original-patc

[PATCH 1/9] bpf: Add d_path helper

2020-05-06 Thread Jiri Olsa
Adding d_path helper function that returns full path for give 'struct path' object, which needs to be the kernel BTF 'path' object. The helper calls directly d_path function. Updating also bpf.h tools uapi header and adding 'path' to bpf_helpers_doc.py script. Signed-off-by: Jiri Olsa --- incl

[PATCH 7/9] bpf: Compile the BTF id whitelist data in vmlinux

2020-05-06 Thread Jiri Olsa
Squeezing in the BTF id whitelist data into vmlinux object with BTF section compiled in, with following steps: - generate whitelist data with bpfwl $ bpfwl .tmp_vmlinux.btf kernel/bpf/helpers-whitelist > ${whitelist}.c - compile whitelist.c $ gcc -c -o ${whitelist}.o ${whitelist}.c

[PATCH 5/9] bpf: Add support to check on BTF id whitelist for d_path helper

2020-05-06 Thread Jiri Olsa
The BPF helper whitelist checking works as follows: - helper's whitelist is defined as list of functions in file: kernel/bpf/helpers-whitelist/helper - at vmlinux linking time, the bpfwl tool reads the whitelist and translates functions into BTF IDs, which are compiled as followin

[PATCH] iwlwifi: mvm: Remove unused inline function iwl_mvm_tid_to_ac_queue

2020-05-06 Thread YueHaibing
commit cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model") left behind this, remove it. Signed-off-by: YueHaibing --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireles

Re: [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags

2020-05-06 Thread Luciano Coelho
On Tue, 2020-05-05 at 20:19 -0700, Joe Perches wrote: > On Wed, 2020-05-06 at 11:07 +0800, Samuel Zou wrote: > > This silences the following coccinelle warning: > > > > "WARNING: sum of probable bitmasks, consider |" > > I suggest instead ignoring bad and irrelevant warnings. > > PREFIX_LEN is 3

Re: [PATCH bpf-next 02/17] bpf: Introduce SK_LOOKUP program type with a dedicated attach point

2020-05-06 Thread Jakub Sitnicki
On Wed, May 06, 2020 at 03:16 PM CEST, Lorenz Bauer wrote: > On Wed, 6 May 2020 at 13:55, Jakub Sitnicki wrote: [...] >> @@ -4012,4 +4051,18 @@ struct bpf_pidns_info { >> __u32 pid; >> __u32 tgid; >> }; >> + >> +/* User accessible data for SK_LOOKUP programs. Add new fields at t

[PATCH net] net: macsec: fix rtnl locking issue

2020-05-06 Thread Antoine Tenart
netdev_update_features() must be called with the rtnl lock taken. Not doing so triggers a warning, as ASSERT_RTNL() is used in __netdev_update_features(), the first function called by netdev_update_features(). Fix this. Fixes: c850240b6c41 ("net: macsec: report real_dev features when HW offloading

[PATCH v2] bpf, i386: remove unneeded conversion to bool

2020-05-06 Thread Jason Yan
The '==' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning: arch/x86/net/bpf_jit_comp32.c:1478:50-55: WARNING: conversion to bool not needed here arch/x86/net/bpf_jit_comp32.c:1479:50-55: WARNING: conversion to bool not needed here Signed-

Re: [PATCH v2] bpf, i386: remove unneeded conversion to bool

2020-05-06 Thread hpa
On May 6, 2020 7:03:52 AM PDT, Jason Yan wrote: >The '==' expression itself is bool, no need to convert it to bool >again. >This fixes the following coccicheck warning: > >arch/x86/net/bpf_jit_comp32.c:1478:50-55: WARNING: conversion to bool >not needed here >arch/x86/net/bpf_jit_comp32.c:1479:50-

Re: Re: Re: Re: Re: [PATCH net v2 0/2] Revert the 'socket_alloc' life cycle change

2020-05-06 Thread Paul E. McKenney
On Wed, May 06, 2020 at 02:59:26PM +0200, SeongJae Park wrote: > TL; DR: It was not kernel's fault, but the benchmark program. > > So, the problem is reproducible using the lebench[1] only. I carefully read > it's code again. > > Before running the problem occurred "poll big" sub test, lebench e

[PATCH net-next] Revert "crypto: chelsio - Inline single pdu only"

2020-05-06 Thread Ayush Sawal
This reverts commit 27c6feb0fb33a665a746346e76714826a5be5d10. For ipsec offload the chelsio's ethernet driver expects a single mtu sized packet. But when ipsec traffic is running using iperf, most of the packets in that traffic are gso packets(large sized skbs) because GSO is enabled by default i

[PATCH net-next v3 2/3] net: phy: bcm54140: use phy_package_shared

2020-05-06 Thread Michael Walle
Use the new phy_package_shared common storage to ease the package initialization and to access the global registers. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/bcm54140.c | 57 -- 1 file changed, 1

[PATCH net-next v3 0/3] add phy shared storage

2020-05-06 Thread Michael Walle
Introduce the concept of a shared PHY storage which can be used by some QSGMII PHYs to ease initialization and access to global per-package registers. Changes since v2: - restore page to standard after reading the base address in the mscc driver, thanks Antoine. Changes since v1: - fix typos

[PATCH net-next v3 1/3] net: phy: add concept of shared storage for PHYs

2020-05-06 Thread Michael Walle
There are packages which contain multiple PHY devices, eg. a quad PHY transceiver. Provide functions to allocate and free shared storage. Usually, a quad PHY contains global registers, which don't belong to any PHY. Provide convenience functions to access these registers. Signed-off-by: Michael W

[PATCH net-next v3 3/3] net: phy: mscc: use phy_package_shared

2020-05-06 Thread Michael Walle
Use the new phy_package_shared common storage to ease the package initialization and to access the global registers. Signed-off-by: Michael Walle Tested-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/mscc/mscc.h | 1 - drivers/net/phy/msc

Re: [PATCH net-next v6 1/2] ethtool: provide UAPI for PHY master/slave configuration.

2020-05-06 Thread Andrew Lunn
On Tue, May 05, 2020 at 08:35:05AM +0200, Oleksij Rempel wrote: > This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of > auto-negotiation support, we needed to be able to configure the > MASTER-SLAVE role of the port manually or from an application in user > space. > > The same

Re: [PATCH net-next v6 2/2] net: phy: tja11xx: add support for master-slave configuration

2020-05-06 Thread Andrew Lunn
On Tue, May 05, 2020 at 08:35:06AM +0200, Oleksij Rempel wrote: > The TJA11xx PHYs have a vendor specific Master/Slave configuration bit, > which is not compatible with IEEE 803.2-2018 spec for 100Base-T1 > devices. So, provide a custom config_ange call back to solve this > problem. > > Signed-off

Re: [PATCH v1] dt-bindings: net: nxp,tja11xx: rework validation support

2020-05-06 Thread Andrew Lunn
> > Hi Oleksij > > > > reg is normally 0 to 31, since that is the address range for MDIO. > > Did you use 14 here because of what strapping allows? > > Yes. Only BITs 1:3 are configurable. BIT(0) is always 0 for the PHY0 and 1 > for the PHY1 O.K. good. > > > +required: > > > + - compatible >

Re: [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags

2020-05-06 Thread Joe Perches
On Wed, 2020-05-06 at 16:51 +0300, Luciano Coelho wrote: > On Tue, 2020-05-05 at 20:19 -0700, Joe Perches wrote: > > On Wed, 2020-05-06 at 11:07 +0800, Samuel Zou wrote: > > > This silences the following coccinelle warning: > > > > > > "WARNING: sum of probable bitmasks, consider |" > > > > I sug

Re: Re: Re: Re: Re: Re: [PATCH net v2 0/2] Revert the 'socket_alloc' life cycle change

2020-05-06 Thread SeongJae Park
On Wed, 6 May 2020 07:41:51 -0700 "Paul E. McKenney" wrote: > On Wed, May 06, 2020 at 02:59:26PM +0200, SeongJae Park wrote: > > TL; DR: It was not kernel's fault, but the benchmark program. > > > > So, the problem is reproducible using the lebench[1] only. I carefully read > > it's code again.

Re: [v4,iproute2-next 1/2] iproute2-next:tc:action: add a gate control action

2020-05-06 Thread Stephen Hemminger
On Wed, 6 May 2020 16:40:19 +0800 Po Liu wrote: > } else if (matches(*argv, "base-time") == 0) { > + NEXT_ARG(); > + if (get_u64(&base_time, *argv, 10)) { > + invalidarg = "base-time"; > +

[PATCH 66/91] perf pmu: Add perf_pmu__find_by_type helper

2020-05-06 Thread Arnaldo Carvalho de Melo
From: Stephane Eranian This is used by libpfm4 during event parsing to locate the pmu for an event. Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Alexey Budankov Cc: Andi Kleen Cc: Andrii Na

[PATCH 64/91] perf doc: Pass ASCIIDOC_EXTRA as an argument

2020-05-06 Thread Arnaldo Carvalho de Melo
From: Ian Rogers commit e9cfa47e687d ("perf doc: allow ASCIIDOC_EXTRA to be an argument") allowed ASCIIDOC_EXTRA to be passed as an option to the Documentation Makefile. This change passes ASCIIDOC_EXTRA, set by detected features or command line options, prior to doing a Documentation build. This

[PATCH 65/91] tools feature: Add support for detecting libpfm4

2020-05-06 Thread Arnaldo Carvalho de Melo
From: Stephane Eranian libpfm4 provides an alternate command line encoding of perf events. Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Alexey Budankov Cc: Andi Kleen Cc: Andrii Nakryiko C

Re: linux-next boot error: WARNING: suspicious RCU usage in ipmr_get_table

2020-05-06 Thread Amol Grover
On Tue, Apr 28, 2020 at 09:56:59AM -0400, Qian Cai wrote: > > > > On Apr 28, 2020, at 4:57 AM, Dmitry Vyukov wrote: > >> net/ipv4/ipmr.c:136 RCU-list traversed in non-reader section!! > > https://lore.kernel.org/netdev/20200222063835.14328-2-frextr...@gmail.com/ > > Never been picked up for a

[net-next PATCH] net: hsr: fix incorrect type usage for protocol variable

2020-05-06 Thread Murali Karicheri
Fix following sparse checker warning:- net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different base types) net/hsr/hsr_slave.c:38:18:expected unsigned short [unsigned] [usertype] protocol net/hsr/hsr_slave.c:38:18:got restricted __be16 [usertype] h_proto net/hsr/hsr_s

[PATCH net-next 0/2] hsr: hsr code refactoring

2020-05-06 Thread Taehee Yoo
There are some unnecessary routine in the hsr module. This patch removes these routines. The first patch removes incorrect comment. The second patch removes unnecessary WARN_ONCE() macro. Taehee Yoo (2): hsr: remove incorrect comment hsr: remove WARN_ONCE() in hsr_fill_frame_info() net/hsr/

[PATCH net-next 1/2] hsr: remove incorrect comment

2020-05-06 Thread Taehee Yoo
The hsr_netdev_notify() deals with hsr master notification event because of debugfs. So, comment for hsr_netdev_notify() is not correct. Signed-off-by: Taehee Yoo --- net/hsr/hsr_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c in

[PATCH net-next 2/2] hsr: remove WARN_ONCE() in hsr_fill_frame_info()

2020-05-06 Thread Taehee Yoo
When VLAN frame is being sent, hsr calls WARN_ONCE() because hsr doesn't support VLAN. But using WARN_ONCE() is overdoing. Using netdev_warn_once() is enough. Signed-off-by: Taehee Yoo --- net/hsr/hsr_forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/hsr/hsr_forwa

Re: [PATCH] bpf: Tweak BPF jump table optimizations for objtool compatibility

2020-05-06 Thread Josh Poimboeuf
On Tue, May 05, 2020 at 04:59:39PM -0700, Alexei Starovoitov wrote: > As far as workaround I prefer the following: > From 94bbc27c5a70d78846a5cb675df4cf8732883564 Mon Sep 17 00:00:00 2001 > From: Alexei Starovoitov > Date: Tue, 5 May 2020 16:52:41 -0700 > Subject: [PATCH] bpf,objtool: tweak interp

Re: [PATCH v3 net-next 1/6] net: dsa: introduce a dsa_port_from_netdev public helper

2020-05-06 Thread Vivien Didelot
On Tue, 5 May 2020 22:20:52 +0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > As its implementation shows, this is synonimous with calling > dsa_slave_dev_check followed by dsa_slave_to_port, so it is quite simple > already and provides functionality which is already there. > > However

Re: [PATCH rdma-next] RDMA: Allow ib_client's to fail when add() is called

2020-05-06 Thread Jason Gunthorpe
On Tue, Apr 21, 2020 at 08:24:40PM +0300, Leon Romanovsky wrote: > From: Jason Gunthorpe > > When a client is added it isn't allowed to fail, but all the client's have > various failure paths within their add routines. > > This creates the very fringe condition where the client was added, failed

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-06 Thread Souptick Joarder
On Wed, May 6, 2020 at 6:29 PM Jan Kara wrote: > > On Wed 06-05-20 17:51:39, Souptick Joarder wrote: > > On Wed, May 6, 2020 at 3:36 PM Jan Kara wrote: > > > > > > On Wed 06-05-20 02:06:56, Souptick Joarder wrote: > > > > On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: > > > > > > > > > > On

[net-next RFC PATCH 06/13] net: hsr: some renaming to introduce PRP driver support

2020-05-06 Thread Murali Karicheri
This is a preparatory patch to introduce PRP device support. PRP device is very much similar to HSR in terms of device creation/removal, packet handling, etc. So this patch rename the functions that can be reused for PRP with a hsr_prp prefix. Common definitions and structure types are prefixed as

[net-next RFC PATCH 09/13] net: hsr: move re-usable code for PRP to hsr_prp_netlink.c

2020-05-06 Thread Murali Karicheri
Before introducing PRP netlink code, move the re-usable code to a common hsr_prp_netlink.c. Signed-off-by: Murali Karicheri --- net/hsr-prp/Makefile | 2 +- net/hsr-prp/hsr_netlink.c | 337 +-- net/hsr-prp/hsr_prp_netlink.c | 367 +++

[net-next RFC PATCH 12/13] net: prp: add packet handling support

2020-05-06 Thread Murali Karicheri
DAN-P (Dual Attached Nodes PRP) nodes are expected to receive traditional IP packets as well as PRP (Parallel Redundancy Protocol) tagged (trailer) packets. This is because PRP network can have traditional devices such as bridges/swiches or PC attached to it and should be able to communicate. This

[net-next RFC PATCH 00/13] net: hsr: Add PRP driver

2020-05-06 Thread Murali Karicheri
This RFC series add support for Parallel Redundancy Protocol (PRP) as defined in IEC-62439-3 in the kernel networking subsystem. PRP Uses a Redundancy Control Trailer (RCT) the format of which is similar to HSR Tag. This is used for implementing redundancy. RCT consists of 6 bytes similar to HSR t

[net-next RFC PATCH 13/13] net: prp: enhance debugfs to display PRP specific info in node table

2020-05-06 Thread Murali Karicheri
Print PRP specific information from node table as part of debugfs node table display Signed-off-by: Murali Karicheri --- net/hsr-prp/hsr_prp_debugfs.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net/hsr-prp/hsr_prp_debugfs.c b/net/hsr-prp/hsr_prp_debugfs

[net-next RFC PATCH 11/13] net: prp: add supervision frame generation and handling support

2020-05-06 Thread Murali Karicheri
Add support for sending and handling supervision frames. For PRP, supervision frame format is similar to HSR version 0, but have a PRP Redunancy Control Trailor (RCT) added. Signed-off-by: Murali Karicheri --- net/hsr-prp/hsr_prp_device.c | 50 --- net/hsr-prp/hs

[net-next RFC PATCH 08/13] net: hsr: migrate HSR netlink socket code to use new common API

2020-05-06 Thread Murali Karicheri
Migrate the existing netlink socket code to the use the new common API. Signed-off-by: Murali Karicheri --- net/hsr-prp/hsr_netlink.c | 123 +++--- net/hsr-prp/hsr_netlink.h | 2 +- 2 files changed, 64 insertions(+), 61 deletions(-) diff --git a/net/hsr-prp/hsr

[net-next RFC PATCH 07/13] net: hsr: introduce common uapi include/definitions for HSR and PRP

2020-05-06 Thread Murali Karicheri
There are many commonalities between HSR and PRP protocols except for the fact that HSR uses Tag as a prefix vs RCT (Redundancy Control Trail) as a trailer for PRP. Few of the commonalities to name are:- both uses a pair of Ethernet interfaces, can be set up the same way from user space using ip li

[net-next RFC PATCH 04/13] net: hsr: rename hsr variable inside struct hsr_port to priv

2020-05-06 Thread Murali Karicheri
The struct hsr_port has a variable pointing to the private struct of the driver. This should have been named priv instead of hsr to be clean. This would be needed as it is planned to re-use the code for prp and then priv variable is more appropriate than hsr. So fix it by search and replace of all

[net-next RFC PATCH 01/13] net: hsr: Re-use Kconfig option to support PRP

2020-05-06 Thread Murali Karicheri
PRP, Parallel Redundancy Protocol is another redundancy protocol defined by IEC62439-3 similar to HSR. PRP uses a RCT, Redundancy Control Trailer appended to the end of a Ethernet frame to implement redundancy. There are many similarities between these protocols so that existing code for HSR can be

[net-next RFC PATCH 05/13] net: hsr: rename hsr_port_get_hsr() to hsr_prp_get_port()

2020-05-06 Thread Murali Karicheri
hsr_port_get_hsr() actually gets port struct ptr from the priv. So rename it to reflect the same. hsr_prp prefix is chosen as this can be re-used for PRP driver as well. Signed-off-by: Murali Karicheri --- net/hsr-prp/hsr_netlink.c | 12 ++-- net/hsr-prp/hsr_prp_device.c | 14

[net-next RFC PATCH 03/13] net: hsr: rename files to introduce PRP support

2020-05-06 Thread Murali Karicheri
As PRP implementation expect to re-use code from HSR driver, rename the existing files that can be re-used with a hsr_prp prefix. Signed-off-by: Murali Karicheri --- net/hsr-prp/Makefile | 11 ++- net/hsr-prp/hsr_netlink.c | 6 +++--

[net-next RFC PATCH 10/13] net: hsr: add netlink socket interface for PRP

2020-05-06 Thread Murali Karicheri
Similar to HSR, add a netlink socket interface code re-using the common functions from hsr_prp_netlink.c. Use wrapper functions for hsr_dev_setup() and prp_dev_setup() to setup HSR/PRP interface by calling common hsr_prp_dev_setup(). Signed-off-by: Murali Karicheri --- net/hsr-prp/Makefile

[net-next RFC PATCH 02/13] net: hsr: rename hsr directory to hsr-prp to introduce PRP

2020-05-06 Thread Murali Karicheri
As prp driver is expected to re-use code from HSR driver, rename the directory to net/hsr-prp as a preparatory step. Signed-off-by: Murali Karicheri --- MAINTAINERS | 2 +- net/Kconfig | 2 +- net/Makefile| 2 +- net/{hsr =>

[net-next RFC PATCH 0/2] iproute2: Add PRP support

2020-05-06 Thread Murali Karicheri
This is the RFC patch series to add prp link type in iproute2. This is dependent on the kernel patch series with subject line "[net-next RFC PATCH 00/13] net: hsr: Add PRP driver Murali Karicheri (2): add support for PRP similar to HSR prp: update man page for PRP include/uapi/linux/if_lin

[net-next RFC PATCH 2/2] prp: update man page for PRP

2020-05-06 Thread Murali Karicheri
This update man page for PRP support Signed-off-by: Murali Karicheri --- man/man8/ip-link.8.in | 29 + 1 file changed, 29 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index 939e2ad49f4e..56d95a79eac5 100644 --- a/man/man8/ip-link.8.in +++

<    1   2   3   4   5   >