Re: [PATCH net-next 2/5] net/mlx5e: Make the log friendly when decapsulation offload not supported

2019-02-22 Thread Tonghao Zhang
On Fri, Feb 22, 2019 at 5:07 PM Or Gerlitz wrote: > > On Fri, Feb 22, 2019 at 9:49 AM Tonghao Zhang > wrote: > > > > On Fri, Feb 22, 2019 at 12:32 AM Or Gerlitz wrote: > > > > > > On Thu, Feb 21, 2019 at 3:42 PM wrote: > > > > > > > > From: Tonghao Zhang > > > > > > > > If we try to offload d

Re: [PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-22 Thread Martin Lau
On Sat, Feb 23, 2019 at 02:14:26AM +0100, Daniel Borkmann wrote: > On 02/23/2019 02:06 AM, brakmo wrote: > > This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce > > "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to > > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > >

[PATCH net-next v2 0/3] ipv4/v6: icmp: small cleanup and update

2019-02-22 Thread Kefeng Wang
v2: - Add cover letter and user proper patch subject-prefix suggested-by Eric Dumazet This patch series contains some small cleanup and update, 1) use icmp/v6_sk_exit when icmp_sk_init fails instead of open-code 2) use new percpu allocation interface for the ipv6.icmp_sk Kefeng Wang (3): ipv4:

[PATCH net-next v2 2/3] ipv6: icmp: use icmpv6_sk_exit()

2019-02-22 Thread Kefeng Wang
Simply use icmpv6_sk_exit() when inet_ctl_sock_create() fail in icmpv6_sk_init(). Signed-off-by: Kefeng Wang --- net/ipv6/icmp.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index bbcdfd299692..af520014def5 1006

[PATCH net-next v2 1/3] ipv4: icmp: use icmp_sk_exit()

2019-02-22 Thread Kefeng Wang
Simply use icmp_sk_exit() when inet_ctl_sock_create() fail in icmp_sk_init(). Signed-off-by: Kefeng Wang --- net/ipv4/icmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 065997f414e6..364cfe5e414b 100644 --- a/net/ipv4/icmp.c +++

[PATCH net-next v2 3/3] ipv6: icmp: use percpu allocation

2019-02-22 Thread Kefeng Wang
Use percpu allocation for the ipv6.icmp_sk. Signed-off-by: Kefeng Wang --- include/net/netns/ipv6.h | 2 +- net/ipv6/icmp.c | 11 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index ef1ed529f33c..b028a1dc1

[PATCH] tools: testing: selftests: Remove duplicate headers

2019-02-22 Thread Souptick Joarder
Remove duplicate headers which are included twice. Signed-off-by: Sabyasachi Gupta Signed-off-by: Souptick Joarder --- tools/testing/selftests/gpio/gpio-mockup-chardev.c | 1 - tools/testing/selftests/net/udpgso.c| 1 - tools/testing/selftests/powerpc/pmu/ebb/fo

[PATCH v2 4/6] sched_domain: Annotate RCU pointers properly

2019-02-22 Thread Joel Fernandes (Google)
The scheduler uses RCU API in various places to access sched_domain pointers. These cause sparse errors as below. Many new errors show up because of an annotation check I added to rcu_assign_pointer(). Let us annotate the pointers correctly which also will help sparse catch any potential future bu

[PATCH v2 5/6] rcuwait: Annotate task_struct with __rcu

2019-02-22 Thread Joel Fernandes (Google)
This suppresses sparse error generated due to the recently added rcu_assign_pointer sparse check. percpu-rwsem.c:162:9: sparse: error: incompatible types in comparison expression exit.c:316:16: sparse: error: incompatible types in comparison expression Signed-off-by: Joel Fernandes (Google) ---

[PATCH v2 3/6] sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu

2019-02-22 Thread Joel Fernandes (Google)
Recently I added an RCU annotation check to rcu_assign_pointer(). All pointers assigned to RCU protected data are to be annotated with __rcu inorder to be able to use rcu_assign_pointer() similar to checks in other RCU APIs. This resulted in a sparse error: kernel//sched/cpufreq.c:41:9: sparse: er

[PATCH v2 6/6] sched: Annotate perf_domain pointer with __rcu

2019-02-22 Thread Joel Fernandes (Google)
This fixes the following sparse errors in sched/fair.c: fair.c:6506:14: error: incompatible types in comparison expression fair.c:8642:21: error: incompatible types in comparison expression Using __rcu will also help sparse catch any future bugs. Signed-off-by: Joel Fernandes (Google) --- kern

[PATCH v2 0/6] RCU fixes for rcu_assign_pointer() usage

2019-02-22 Thread Joel Fernandes (Google)
These patches fix various sparse errors found as a result of the recent check to add rcu_check_sparse() to rcu_assign_pointer(). The errors in some cases seem to either missing API usage, or missing annotations. The annotations added in the series can also help avoid future incorrect usages and bu

[PATCH v2 2/6] ixgbe: Fix incorrect RCU API usage

2019-02-22 Thread Joel Fernandes (Google)
Recently, I added an RCU annotation check in rcu_assign_pointer. This caused a sparse error to be reported by the ixgbe driver. Further looking, it seems the adapter->xdp_prog pointer is not annotated with __rcu. Annonating it fixed the error, but caused a bunch of other warnings. This patch trie

[PATCH v2 1/6] net: rtnetlink: Fix incorrect RCU API usage

2019-02-22 Thread Joel Fernandes (Google)
rtnl_register_internal() and rtnl_unregister_all tries to directly dereference an RCU protected pointed outside RCU read side section. While this is Ok to do since a lock is held, let us use the correct API to avoid programmer bugs in the future. This also fixes sparse warnings arising from not us

RE: [PATCH 3/3] net: ethernet: add support for high speed mac and usxgmii pcs

2019-02-22 Thread Parshuram Raju Thombare
>> if (macb_is_gem(bp)) { >> -linkmode_copy(phydev->supported, PHY_GBIT_FEATURES); >> -if (bp->caps & MACB_CAPS_TWO_PT_FIVE_GIG_SPEED) >> - > linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, >> - phydev->supported); >> +

RE: [PATCH 2/3] net: ethernet: add c45 PHY support in MDIO read/write functions.

2019-02-22 Thread Parshuram Raju Thombare
Regards, Parshuram Thombare >-Original Message- >From: Andrew Lunn >Sent: Saturday, February 23, 2019 3:12 AM >To: Parshuram Raju Thombare >Cc: nicolas.fe...@microchip.com; da...@davemloft.net; >netdev@vger.kernel.org; f.faine...@gmail.com; hkallwe...@gmail.com; linux- >ker...@vger.ke

RE: [PATCH 1/3] net: ethernet: add support for PCS and 2.5G speed

2019-02-22 Thread Parshuram Raju Thombare
>> /* mask with MAC supported features */ >> -if (macb_is_gem(bp) && bp->caps & >MACB_CAPS_GIGABIT_MODE_AVAILABLE) >> -phy_set_max_speed(phydev, SPEED_1000); >> -else >> -phy_set_max_speed(phydev, SPEED_100); >> +if (macb_is_gem(bp)) { >> +linkmo

Re: [PATCH net-next] net: dsa: add missing of_node_put

2019-02-22 Thread Himadri Pandya
On 22/02/19 8:06 PM, Andrew Lunn wrote: On Fri, Feb 22, 2019 at 04:48:18PM +0530, Himadri Pandya wrote: Decrement the reference count on port while returning out of the loop. Issue identified by Coccinelle. You and Wen Yang are both fixing the same issue. Maybe you can coordinate? Sure. -

[PATCH] ila: Fix uninitialised return value in ila_xlat_nl_cmd_flush

2019-02-22 Thread Herbert Xu
On Sat, Feb 23, 2019 at 07:27:47AM +0300, Dan Carpenter wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master > head: db0342b20f32f584aedff27c9c09e0a4bbe5beff > commit: 6c4128f658571b2dc7e01058ad09a8e947bc0159 [25/27] rhashtable: Remove > obsolete rha

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Masami Hiramatsu
On Fri, 22 Feb 2019 15:56:20 -0800 Alexei Starovoitov wrote: > On Fri, Feb 22, 2019 at 03:16:35PM -0800, Linus Torvalds wrote: > > > > So a kernel pointer value of 0x12345678 could be a value kernel > > pointer pointing to some random kmalloc'ed kernel memory, and a user > > pointer value of 0x1

Re: pull-request: bpf 2019-02-23

2019-02-22 Thread David Miller
From: Daniel Borkmann Date: Sat, 23 Feb 2019 01:36:25 +0100 > Please consider pulling these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git Pulled, thanks Daniel.

Re: [PATCH bpf-next 4/4] tools/bpftool: recognize bpf_prog_info runtime and runcnt

2019-02-22 Thread Andrii Nakryiko
On Fri, Feb 22, 2019 at 3:37 PM Alexei Starovoitov wrote: > > $ bpftool p s > 1: kprobe tag a56587d488d216c9 gpl runtime 79786 runcnt 8 > loaded_at 2019-02-22T12:22:51-0800 uid 0 > xlated 352B not jited memlock 4096B > > $ bpftool --json --pretty p s > [{ > "id": 1, >

Re: [PATCH net-next] route: Add a new fib_multipath_hash_policy base on cpu id for tunnel packet

2019-02-22 Thread David Ahern
On 2/21/19 10:52 PM, we...@ucloud.cn wrote: > From: wenxu > > Current fib_multipath_hash_policy can make hash based on the L3 or > L4. But it only work on the outer IP. So a specific tunnel always > has the same hash value. But a specific tunnel may contain so many > inner connection. However the

Re: [PATCH v2 bpf-next 0/9] bpf: Network Resource Manager (NRM)

2019-02-22 Thread David Ahern
On 2/22/19 8:06 PM, brakmo wrote: > Network Resource Manager is a framework for limiting the bandwidth used > by v2 cgroups. It consists of 4 BPF helpers and a sample BPF program to > limit egress bandwdith as well as a sample user program and script to > simplify NRM testing. 'resource manager' i

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Steven Rostedt
On Fri, 22 Feb 2019 18:28:53 -0800 Alexei Starovoitov wrote: > First we introduce bpf_probe_kernel_read and bpf_probe_user_read and > introduce clang/gcc tooling to catch the mistakes. > Going over this 400+ places and manually grepping kernel sources > for __user keyword is not a great proposal

Re: [PATCH net-next v3] ip_tunnel: Add dst_cache support in lwtunnel_state of ip tunnel

2019-02-22 Thread David Ahern
On 2/22/19 7:32 PM, we...@ucloud.cn wrote: > diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c > index 0b17175..f6301af 100644 > --- a/net/core/lwtunnel.c > +++ b/net/core/lwtunnel.c > @@ -123,17 +123,18 @@ int lwtunnel_build_state(u16 encap_type, > rcu_read_lock(); > ops = rcu_der

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Linus Torvalds
On Fri, Feb 22, 2019 at 6:29 PM Alexei Starovoitov wrote: > > imo this kernel release should finish as-is and in the next cycle we can > change probe_kernel_read() to reject user address [..] Absolutely. Nothing is going to change right now for 5.0, which is imminent. It's really a "long-term we

Re: [PATCH bpf-next 1/4] bpf: enable program stats

2019-02-22 Thread Alexei Starovoitov
On Sat, Feb 23, 2019 at 02:06:56AM +0100, Daniel Borkmann wrote: > > In general, having some stats and timing info would be useful, but I > guess people might want to customize it in future even more specifically > beyond number of runs + time it takes. One thing that would be super > useful is to

[PATCH] net: phy: realtek: Dummy IRQ calls for RTL8366RB

2019-02-22 Thread Linus Walleij
This fixes a regression introduced by commit 0d2e778e38e0ddffab4bb2b0e9ed2ad5165c4bf7 "net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt". This assumes that a PHY cannot trigger interrupt unless it has .config_intr() or .ack_interrupt() implemented. A later patch m

Re: [PATCH bpf-next 1/4] bpf: enable program stats

2019-02-22 Thread Alexei Starovoitov
On Sat, Feb 23, 2019 at 12:34:38AM +, Roman Gushchin wrote: > On Fri, Feb 22, 2019 at 03:36:41PM -0800, Alexei Starovoitov wrote: > > JITed BPF programs are indistinguishable from kernel functions, but unlike > > kernel code BPF code can be changed often. > > Typical approach of "perf record" +

Re: [PATCH bpf-next 1/4] bpf: enable program stats

2019-02-22 Thread Alexei Starovoitov
On Fri, Feb 22, 2019 at 04:05:55PM -0800, Eric Dumazet wrote: > > > On 02/22/2019 03:36 PM, Alexei Starovoitov wrote: > > > > > +static void bpf_prog_get_stats(const struct bpf_prog *prog, > > + struct bpf_prog_stats *stats) > > +{ > > + u64 nsecs = 0, cnt = 0; > > +

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Alexei Starovoitov
On Fri, Feb 22, 2019 at 04:08:59PM -0800, Linus Torvalds wrote: > On Fri, Feb 22, 2019 at 3:56 PM Alexei Starovoitov > wrote: > > > > It will preserve existing bpf_probe_read() behavior on x86. > > ... but that's the worst possible situation. > > It appears that people haven't understood that ke

Re: [PATCH v4 net-next 5/5] net: dsa: microchip: add port_cleanup function

2019-02-22 Thread Florian Fainelli
Le 2/22/19 à 4:36 PM, tristram...@microchip.com a écrit : > From: Tristram Ha > > Add port_cleanup function to reset some device variables when the port is > disabled. Add a mutex to make sure changing those variables is > thread-safe. > > Signed-off-by: Tristram Ha Reviewed-by: Florian Faine

Re: [PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-22 Thread Daniel Borkmann
On 02/23/2019 02:06 AM, brakmo wrote: > This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce > "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > be attached to the ingress and egress path. The helper is needed > because

[PATCH v2 bpf-next 3/9] bpf: Test bpf_tcp_enter_cwr in test_verifier

2019-02-22 Thread brakmo
This test ensures the verifier has checked the arg1 of BPF_FUNC_tcp_enter_cwr is of ARG_PTR_TO_TCP_SOCK type. Signed-off-by: Martin KaFai Lau Signed-off-by: Lawrence Brakmo --- tools/testing/selftests/bpf/verifier/sock.c | 33 + 1 file changed, 33 insertions(+) diff --git a

Re: [PATCH bpf-next 1/4] bpf: enable program stats

2019-02-22 Thread Daniel Borkmann
On 02/23/2019 01:34 AM, Roman Gushchin wrote: > On Fri, Feb 22, 2019 at 03:36:41PM -0800, Alexei Starovoitov wrote: >> JITed BPF programs are indistinguishable from kernel functions, but unlike >> kernel code BPF code can be changed often. >> Typical approach of "perf record" + "perf report" profil

[PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-22 Thread brakmo
This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can be attached to the ingress and egress path. The helper is needed because his type of bpf_prog cannot modify the skb dire

[PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-22 Thread brakmo
From: Martin KaFai Lau This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr "int bpf_tcp_enter_cwr(struct bpf_tcp_sock *tp)". It is added to BPF_PROG_TYPE_CGROUP_SKB which can be attached to the egress path where the bpf prog is called by ip_finish_output() or ip6_finish_output(). The verifie

[PATCH v2 bpf-next 6/9] bpf: sync bpf.h to tools and update bpf_helpers.h

2019-02-22 Thread brakmo
This patch syncs the uapi bpf.h to tools/ and also updates bpf_herlpers.h in tools/ Signed-off-by: Lawrence Brakmo --- tools/include/uapi/linux/bpf.h| 27 ++- tools/testing/selftests/bpf/bpf_helpers.h | 6 + 2 files changed, 32 insertions(+), 1 deletion(-) d

[PATCH v2 bpf-next 1/9] bpf: Remove const from get_func_proto

2019-02-22 Thread brakmo
From: Martin KaFai Lau The next patch needs to set a bit in "prog" in cg_skb_func_proto(). Hence, the "const struct bpf_prog *" as a second argument will not work. This patch removes the "const" from get_func_proto and makes the needed changes to all get_func_proto implementations to avoid comp

[PATCH v2 bpf-next 5/9] bpf: Add bpf helper bpf_tcp_check_probe_timer

2019-02-22 Thread brakmo
This patch adds a new bpf helper BPF_FUNC_tcp_check_probe_timer "int bpf_check_tcp_probe_timer(struct tcp_bpf_sock *tp, u32 when_us)". It is added to BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can be attached to the ingress and egress path. To ensure it is only called from BPF_CGROUP_

[PATCH v2 bpf-next 8/9] bpf: User program for testing NRM

2019-02-22 Thread brakmo
The program nrm creates a cgroup and attaches a BPF program to the cgroup for testing NRM for egress traffic. One still needs to create network traffic. This can be done through netesto, netperf or iperf3. A follow-up patch contains a script to create traffic. USAGE: nrm [-d] [-l] [-n ] [-r ] [-s]

[PATCH v2 bpf-next 7/9] bpf: Sample NRM BPF program to limit egress bw

2019-02-22 Thread brakmo
A cgroup skb BPF program to limit cgroup output bandwidth. It uses a modified virtual token bucket queue to limit average egress bandwidth. The implementation uses credits instead of tokens. Negative credits imply that queueing would have happened (this is a virtual queue, so no queueing is done by

[PATCH v2 bpf-next 9/9] bpf: NRM test script

2019-02-22 Thread brakmo
Script for testing NRM (Network Resource Manager) framework. It creates a cgroup to use for testing and load a BPF program to limit egress bandwidht. It then uses iperf3 or netperf to create loads. The output is the goodput in Mbps (unless -D is used). It can work on a single host using loopback o

[PATCH v2 bpf-next 0/9] bpf: Network Resource Manager (NRM)

2019-02-22 Thread brakmo
Network Resource Manager is a framework for limiting the bandwidth used by v2 cgroups. It consists of 4 BPF helpers and a sample BPF program to limit egress bandwdith as well as a sample user program and script to simplify NRM testing. The sample NRM BPF program is not meant to be production quali

Re: [PATCH v4 net-next 4/5] net: dsa: microchip: remove unnecessary include headers

2019-02-22 Thread Florian Fainelli
Le 2/22/19 à 4:36 PM, tristram...@microchip.com a écrit : > From: Tristram Ha > > Remove unnecessary header include. > > Signed-off-by: Tristram Ha > Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 net-next 3/5] net: dsa: microchip: get port link status

2019-02-22 Thread Florian Fainelli
Le 2/22/19 à 4:36 PM, tristram...@microchip.com a écrit : > From: Tristram Ha > > Get port link status to know whether to read MIB counters when the link > is going down. > > Signed-off-by: Tristram Ha > Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: INFO: task hung in rtnetlink_rcv_msg

2019-02-22 Thread Daniel Borkmann
On 02/22/2019 10:45 PM, Jakub Kicinski wrote: > On Fri, 22 Feb 2019 12:14:57 -0800, Joe Perches wrote: >> On Fri, 2019-02-22 at 12:01 -0800, Jakub Kicinski wrote: >>> Hi! >>> >>> Seems like something funny is going on with get_maintainer.pl since XDP >>> entry got added. We seem to have been CCed

Re: [PATCH v4 net-next 2/5] net: dsa: microchip: add MIB counter reading support

2019-02-22 Thread Florian Fainelli
Le 2/22/19 à 4:36 PM, tristram...@microchip.com a écrit : > From: Tristram Ha > > Add background MIB counter reading support. > > Port MIB counters should only be read when there is link. Otherwise it is > a waste of time as hardware never increases those counters. There are > exceptions as so

Re: [PATCH net-next v2] route: Add a new fib_multipath_hash_policy base on cpu id for tunnel packet

2019-02-22 Thread wenxu
On 2019/2/23 上午12:08, Nikolay Aleksandrov wrote: > On 22/02/2019 14:50, wenxu wrote: >> On 2019/2/22 下午6:26, Nikolay Aleksandrov wrote: >>> On 22/02/2019 11:20, we...@ucloud.cn wrote: From: wenxu Current fib_multipath_hash_policy can make hash based on the L3 or L4. But it only

Re: [PATCH 1/3] bpf: add helper to check for a valid SYN cookie

2019-02-22 Thread Martin Lau
On Fri, Feb 22, 2019 at 09:50:55AM +, Lorenz Bauer wrote: > Using bpf_sk_lookup_tcp it's possible to ascertain whether a packet belongs > to a known connection. However, there is one corner case: no sockets are > created if SYN cookies are active. This means that the final ACK in the > 3WHS is

[PATCH v4 net-next 0/4] net: dsa: microchip: add MIB counters support

2019-02-22 Thread Tristram.Ha
From: Tristram Ha This series of patches is to modify the KSZ9477 DSA driver to read MIB counters periodically to avoid overflow. The MIB counters should be read only when there is link. Otherwise it is a waste of time as hardware never increases the counters. Functions are added to check the

[PATCH v4 net-next 5/5] net: dsa: microchip: add port_cleanup function

2019-02-22 Thread Tristram.Ha
From: Tristram Ha Add port_cleanup function to reset some device variables when the port is disabled. Add a mutex to make sure changing those variables is thread-safe. Signed-off-by: Tristram Ha --- drivers/net/dsa/microchip/ksz9477.c| 6 ++ drivers/net/dsa/microchip/ksz_common.c | 2

[PATCH v4 net-next 1/5] net: dsa: microchip: prepare PHY for proper advertisement

2019-02-22 Thread Tristram.Ha
From: Tristram Ha Prepare PHY for proper advertisement as sometimes the PHY in the switch has its own problems even though it may share the PHY id from regular PHY but the fixes in the PHY driver do not apply. Signed-off-by: Tristram Ha Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli -

[PATCH v4 net-next 4/5] net: dsa: microchip: remove unnecessary include headers

2019-02-22 Thread Tristram.Ha
From: Tristram Ha Remove unnecessary header include. Signed-off-by: Tristram Ha Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz9477.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index 1b8267c..b1b

[PATCH v4 net-next 3/5] net: dsa: microchip: get port link status

2019-02-22 Thread Tristram.Ha
From: Tristram Ha Get port link status to know whether to read MIB counters when the link is going down. Signed-off-by: Tristram Ha Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz9477.c| 1 + drivers/net/dsa/microchip/ksz_common.c | 14 ++ drivers/net/dsa/microchip

[PATCH v4 net-next 2/5] net: dsa: microchip: add MIB counter reading support

2019-02-22 Thread Tristram.Ha
From: Tristram Ha Add background MIB counter reading support. Port MIB counters should only be read when there is link. Otherwise it is a waste of time as hardware never increases those counters. There are exceptions as some switches keep track of dropped counts no matter what. Signed-off-by:

pull-request: bpf 2019-02-23

2019-02-22 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a bug in BPF's LPM deletion logic to match correct prefix length, from Alban. 2) Fix AF_XDP teardown by not destroying umem prematurely as it is still needed till all outstanding sk

Re: [PATCH bpf-next 1/4] bpf: enable program stats

2019-02-22 Thread Roman Gushchin
On Fri, Feb 22, 2019 at 03:36:41PM -0800, Alexei Starovoitov wrote: > JITed BPF programs are indistinguishable from kernel functions, but unlike > kernel code BPF code can be changed often. > Typical approach of "perf record" + "perf report" profiling and tunning of > kernel code works just as well

[PATCH net-next v3] ip_tunnel: Add dst_cache support in lwtunnel_state of ip tunnel

2019-02-22 Thread wenxu
From: wenxu The lwtunnel_state is not init the dst_cache Which make the ip_md_tunnel_xmit can't use the dst_cache. It will lookup route table every packets. Signed-off-by: wenxu --- net/core/lwtunnel.c | 3 ++- net/ipv4/ip_tunnel_core.c | 20 2 files changed, 22 ins

Re: [PATCH V2 6/8] dt-bindings: net: stmmac: add syscfg clock property

2019-02-22 Thread Rob Herring
On Fri, 22 Feb 2019 09:28:07 +0100, Christophe Roullier wrote: > Need syscfg clock for MCU family in case bootloader does not > activate it. > > Signed-off-by: Christophe Roullier > --- > Documentation/devicetree/bindings/net/stm32-dwmac.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletio

Re: [PATCH V2 3/8] dt-bindings: net: stmmac: add phys config properties

2019-02-22 Thread Rob Herring
On Fri, Feb 22, 2019 at 09:28:04AM +0100, Christophe Roullier wrote: > Add properties to support all Phy config > PHY_MODE (MII,GMII, RMII, RGMII) and in normal, PHY wo crystal (25Mhz), > PHY wo crystal (50Mhz), No 125Mhz from PHY config. > > Signed-off-by: Christophe Roullier > --- > Docu

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Nadav Amit
> On Feb 22, 2019, at 3:59 PM, Andy Lutomirski wrote: > > On Fri, Feb 22, 2019 at 3:02 PM Jann Horn wrote: >> On Fri, Feb 22, 2019 at 11:39 PM Nadav Amit wrote: On Feb 22, 2019, at 2:21 PM, Nadav Amit wrote: > On Feb 22, 2019, at 2:17 PM, Jann Horn wrote: > > On Fri, F

Re: [PATCH net 0/4] udp: a few fixes

2019-02-22 Thread David Miller
From: Paolo Abeni Date: Thu, 21 Feb 2019 17:43:56 +0100 > This series includes some UDP-related fixlet. All this stuff has been > pointed out by the sparse tool. The first two patches are just annotation > related, while the last 2 cover some very unlikely races. Series applied and queued up for

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Linus Torvalds
On Fri, Feb 22, 2019 at 3:56 PM Alexei Starovoitov wrote: > > It will preserve existing bpf_probe_read() behavior on x86. ... but that's the worst possible situation. It appears that people haven't understood that kernel and user addresses are distinct, and may have written programs that are fun

Re: [PATCH bpf-next 1/4] bpf: enable program stats

2019-02-22 Thread Eric Dumazet
On 02/22/2019 03:36 PM, Alexei Starovoitov wrote: > > +static void bpf_prog_get_stats(const struct bpf_prog *prog, > +struct bpf_prog_stats *stats) > +{ > + u64 nsecs = 0, cnt = 0; > + int cpu; > + > + for_each_possible_cpu(cpu) { > + nsecs

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Alexei Starovoitov
On Fri, Feb 22, 2019 at 03:59:30PM -0800, Andy Lutomirski wrote: > > > > A relatively simple approach might be to teach BPF not to run kprobe > > programs and such in contexts where current->mm isn't the active mm? > > Maybe using nmi_uaccess_okay(), or something like that? It looks like > > perf_c

[PATCH net-next 3/8] net: dsa: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
Following patches will change the way we communicate setting a port's attribute and use notifiers towards that goal. Prepare DSA to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET from both atomic and process context and use a small helper to translate the event notifier into s

[PATCH net-next 6/8] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
Following patches will change the way we communicate setting a port's attribute and use a blocking notifier to perform those tasks. Prepare ethsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing swdev_port_attr_set() call. Signed-o

[PATCH net-next 8/8] net: Remove switchdev_ops

2019-02-22 Thread Florian Fainelli
Now that we have converted all possible callers to using a switchdev notifier for attributes we do not have a need for implementing switchdev_ops anymore, and this can be removed from all drivers the net_device structure. Signed-off-by: Florian Fainelli --- .../net/ethernet/mellanox/mlxsw/spectr

[PATCH net-next 1/8] switchdev: Add SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
In preparation for allowing switchdev enabled drivers to veto specific attribute settings from within the context of the caller, introduce a new switchdev notifier type for port attributes. Suggested-by: Ido Schimmel Signed-off-by: Florian Fainelli --- include/net/switchdev.h | 27 +++

[PATCH net-next 4/8] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
Following patches will change the way we communicate setting a port's attribute and use a notifier to perform those tasks. Prepare mlxsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and utilize the switchdev_handle_port_attr_set() to handle stacking of devices. Signed-of

[PATCH 1/8] switchdev: Add SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
In preparation for allowing switchdev enabled drivers to veto specific attribute settings from within the context of the caller, introduce a new switchdev notifier type for port attributes. Suggested-by: Ido Schimmel Signed-off-by: Florian Fainelli --- include/net/switchdev.h | 27 +++

[PATCH net-next 0/8] net: Remove switchdev_ops

2019-02-22 Thread Florian Fainelli
Hi all, This patch series completes the removal of the switchdev_ops by converting switchdev_port_attr_set() to use either the blocking (process) or non-blocking (atomic) notifier since we typically need to deal with both depending on where in the bridge code we get called from. This was tested w

[PATCH net-next 5/8] net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
Following patches will change the way we communicate setting a port's attribute and use notifiers to perform those tasks. Ocelot does not currently have an atomic notifier registered for switchdev events, so we need to register one in order to deal with atomic context SWITCHDEV_PORT_ATTR_SET event

[PATCH net-next 7/8] net: switchdev: Replace port attr set SDO with a notification

2019-02-22 Thread Florian Fainelli
Drop switchdev_ops.switchdev_port_attr_set. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_attr_notify() that sends the switchdev notifications SWITCHDEV_PORT_ATTR_SET and takes care, depend

[PATCH net-next 2/8] rocker: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-22 Thread Florian Fainelli
Following patches will change the way we communicate setting a port's attribute and use notifiers towards that goal. Prepare rocker to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET from both atomic and process context and use a small helper to translate the event notifier int

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Andy Lutomirski
On Fri, Feb 22, 2019 at 3:02 PM Jann Horn wrote: > > On Fri, Feb 22, 2019 at 11:39 PM Nadav Amit wrote: > > > On Feb 22, 2019, at 2:21 PM, Nadav Amit wrote: > > > > > >> On Feb 22, 2019, at 2:17 PM, Jann Horn wrote: > > >> > > >> On Fri, Feb 22, 2019 at 11:08 PM Nadav Amit wrote: > > On F

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Alexei Starovoitov
On Fri, Feb 22, 2019 at 03:16:35PM -0800, Linus Torvalds wrote: > > So a kernel pointer value of 0x12345678 could be a value kernel > pointer pointing to some random kmalloc'ed kernel memory, and a user > pointer value of 0x12345678 could be a valid _user_ pointer pointing > to some user mapping.

Re: [PATCH net v2] af_packet: fix raw sockets over 6in4 tunnel

2019-02-22 Thread Willem de Bruijn
On Fri, Feb 22, 2019 at 2:50 PM David Miller wrote: > > From: Willem de Bruijn > Date: Wed, 20 Feb 2019 13:39:23 -0500 > > > On Mon, Feb 18, 2019 at 1:50 PM Sasha Levin wrote: > >> Should this go to -stable as well? The patch it fixes is in 4.20. > > > > I believe so. It was also backported to 4

[PATCH net-next v2 4/7] net: phy: marvell10g: Use a #define for 88X3310 family id

2019-02-22 Thread Maxime Chevallier
The PHY ID corresponding to the 88X3310 is also used for other PHYs in the same family, such as the 88E2010. Use a #define for the PHY id, that ignores the last nibble. Signed-off-by: Maxime Chevallier --- drivers/net/phy/marvell10g.c | 4 ++-- include/linux/marvell_phy.h | 1 + 2 files changed

[PATCH net-next v2 7/7] net: phy: marvell10g: add support for the 88x2110 PHY

2019-02-22 Thread Maxime Chevallier
This patch adds support for the 88x2110 PHY, which is similar to the already supported 88x3310 PHY without the SFP interface. It supports 10/100/1000BASET along with 2.5GBASET, 5GBASET and 10GBASET, with the same interface modes that are used by the 3310. This PHY don't have the same issue as the

[PATCH net-next v2 0/7] net: phy: marvell10g: Add 2.5GBaseT support

2019-02-22 Thread Maxime Chevallier
This series adds the missing bits necessary to fully support 2.5GBaseT in the Marvell Alaska PHYs. The main points for that support are : - Making use of the .get_features call, recently introduced by Heiner and Andrew, that allows having a fully populated list of supported modes, includin

[PATCH net-next v2 5/7] net: phy: marvell10g: Force reading of 2.5/5G

2019-02-22 Thread Maxime Chevallier
As per 802.3bz, if bit 14 of (1.11) "PMA Extended Abilities" indicates whether or not we should read register (1.21) "2.52/5G PMA Extended Abilities", which contains information on the support of 2.5GBASET and 5GBASET. After testing on several variants of PHYS of this family, it appears that bit 1

[PATCH net-next v2 2/7] net: phy: marvell10g: Use linkmode_set_bit helper instead of __set_bit

2019-02-22 Thread Maxime Chevallier
Cosmetic patch making use of helpers dedicated to linkmodes handling. Signed-off-by: Maxime Chevallier --- drivers/net/phy/marvell10g.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 89920b10d75b..821ef1b2

[PATCH net-next v2 1/7] net: phy: marvell10g: Use get_features to get the PHY abilities

2019-02-22 Thread Maxime Chevallier
The Alaska family of 10G PHYs has more abilities than the ones listed in PHY_10GBIT_FULL_FEATURES, the exact list depending on the model. Make use of the newly introduced .get_features call to build this list, using genphy_c45_pma_read_abilities to build the list of supported linkmodes, and adding

[PATCH net-next v2 6/7] net: mvpp2: Add 2.5GBaseT support

2019-02-22 Thread Maxime Chevallier
The PPv2 controller is able to support 2.5G speeds, allowing to use 2.5GBASET in conjunction with PHYs that use 2500BASEX as their MII interface when using this mode. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 + 1 file chan

[PATCH net-next v2 3/7] net: phy: marvell10g: Use 2500BASEX when using 2.5GBASET

2019-02-22 Thread Maxime Chevallier
The Marvell Alaska family of PHYs supports 2.5GBaseT and 5GBaseT modes, as defined in the 802.3bz specification. Upon establishing a 2.5GBASET link, the PHY will reconfigure it's MII interface to 2500BASEX. At 5G, the PHY will reconfigure it's interface to 5GBASE-R, but this mode isn't supported

Re: [PATCH net-next v3 4/4] dt-bindings: net: freescale: enetc: Add connection bindings for ENETC ethernet nodes

2019-02-22 Thread Rob Herring
On Fri, Feb 22, 2019 at 05:04:19PM +0200, Claudiu Manoil wrote: > Define connection bindings (external PHY connections and internal links) > for the ENETC on-chip ethernet controllers. > > Signed-off-by: Claudiu Manoil > --- > v3 - added this patch to the set > > .../devicetree/bindings/net/fsl

[PATCH bpf-next 0/4] bpf: per program stats

2019-02-22 Thread Alexei Starovoitov
Introduce per program stats to monitor the usage BPF Alexei Starovoitov (4): bpf: enable program stats bpf: expose program stats via bpf_prog_info tools/bpf: sync bpf.h into tools tools/bpftool: recognize bpf_prog_info runtime and runcnt include/linux/bpf.h | 7

[PATCH bpf-next 3/4] tools/bpf: sync bpf.h into tools

2019-02-22 Thread Alexei Starovoitov
sync bpf.h into tools directory Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index bcdd2474eee7..d2cb85d85b39 100644 --- a/tools/include/uapi/linux/bpf.h

[PATCH bpf-next 4/4] tools/bpftool: recognize bpf_prog_info runtime and runcnt

2019-02-22 Thread Alexei Starovoitov
$ bpftool p s 1: kprobe tag a56587d488d216c9 gpl runtime 79786 runcnt 8 loaded_at 2019-02-22T12:22:51-0800 uid 0 xlated 352B not jited memlock 4096B $ bpftool --json --pretty p s [{ "id": 1, "type": "kprobe", "tag": "a56587d488d216c9", "gpl_comp

Re: [PATCH] mdio_bus: Fix use-after-free on device_register fails

2019-02-22 Thread David Miller
From: Yue Haibing Date: Thu, 21 Feb 2019 22:42:01 +0800 > From: YueHaibing > > KASAN has found use-after-free in fixed_mdio_bus_init, > commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call > put_device on device_register() failure") call put_device() > while device_register() fails,give up th

Re: [PATCH] isdn_common: Mark expected switch fall-throughs

2019-02-22 Thread Gustavo A. R. Silva
On 2/22/19 1:50 PM, David Miller wrote: >> >> This patch is part of the ongoing efforts to enable >> -Wimplicit-fallthrough. >> >> Signed-off-by: Gustavo A. R. Silva > > Applied. > Thanks, Dave. I wonder if you can take this one too: https://lore.kernel.org/lkml/20190129180612.GA28650@emb

Re: [PATCH net-next v4 0/2] net: phy: at803x: Update delays for RGMII modes

2019-02-22 Thread David Miller
From: Vinod Koul Date: Thu, 21 Feb 2019 15:53:13 +0530 > Peter[1] reported that patch cd28d1d6e52e: ("net: phy: at803x: Disable > phy delay for RGMII mode") caused regression on am335x-evmsk board. > This board expects the Phy delay to be enabled but specified RGMII mode > which refers to delays

Re: [PATCH] Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255

2019-02-22 Thread Kalash Nainwal
On Fri, Feb 22, 2019 at 3:22 PM David Miller wrote: > > From: Kalash Nainwal > Date: Wed, 20 Feb 2019 16:23:04 -0800 > > > Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 to > > keep legacy software happy. This is similar to what was done for > > ipv4 in commit 709772e6e065 ("net: Fix

Re: [Patch net-next] net_sched: initialize net pointer inside tcf_exts_init()

2019-02-22 Thread David Miller
From: Cong Wang Date: Wed, 20 Feb 2019 21:37:42 -0800 > For tcindex filter, it is too late to initialize the > net pointer in tcf_exts_validate(), as tcf_exts_get_net() > requires a non-NULL net pointer. We can just move its > initialization into tcf_exts_init(), which just requires > an addition

Re: [tipc-discussion][net v2 1/1] tipc: fix race condition causing hung sendto

2019-02-22 Thread David Miller
From: Tung Nguyen Date: Thu, 21 Feb 2019 10:31:21 +0700 > When sending multicast messages via blocking socket, This patch does not apply cleanly to net, please respin: [davem@localhost net]$ git am --signoff tipc-discussion-net-v2-1-1-tipc-fix-race-condition-causing-hung-sendto.patch Applying

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-22 Thread Linus Torvalds
On Fri, Feb 22, 2019 at 2:51 PM Alexei Starovoitov wrote: > > That's all fine. I'm missing rationale for making probe_kernel_read() > fail on user addresses. Because it already WON'T WORK in general! > What is fundamentally wrong with a function probe_any_address_read() ? What part of "the same

Re: [PATCH] Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255

2019-02-22 Thread David Miller
From: Kalash Nainwal Date: Wed, 20 Feb 2019 16:23:04 -0800 > Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 to > keep legacy software happy. This is similar to what was done for > ipv4 in commit 709772e6e065 ("net: Fix routing tables with > id > 255 for legacy software"). > > Signed-

  1   2   3   4   >