Re: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-13 Thread Allan W. Nielsen
> > -Original Message- > > From: Allan W. Nielsen > > Sent: Tuesday, August 13, 2019 2:16 PM > > To: Y.b. Lu > > Cc: netdev@vger.kernel.org; David S . Miller ; > > Alexandre Belloni ; Microchip Linux Driver > > Support > > Subject: Re: [PATCH 3/3] ocelot_ace: fix action of trap > > > >

pull-request: can-next 2019-08-14

2019-08-13 Thread Marc Kleine-Budde
Hello David, this is a pull request for net-next/master consisting of 41 patches. The first two patches are for the kvaser_pciefd driver: Christer Beskow removes unnecessary code in the kvaser_pciefd_pwm_stop() function, YueHaibing removes the unused including of . In the next patch YueHaibing a

Re: [patch net-next v2 1/2] netdevsim: implement support for devlink region and snapshots

2019-08-13 Thread Jiri Pirko
Wed, Aug 14, 2019 at 12:08:29AM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 13 Aug 2019 16:48:42 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Implement dummy region of size 32K and allow user to create snapshots >> or random data using debugfs file trigger. >> >> Signed-off-by: Jiri

[net PATCH] net: tls, fix sk_write_space NULL write when tx disabled

2019-08-13 Thread John Fastabend
The ctx->sk_write_space pointer is only set when TLS tx mode is enabled. When running without TX mode its a null pointer but we still set the sk sk_write_space pointer on close(). Fix the close path to only overwrite sk->sk_write_space when the current pointer is to the tls_write_space function in

[PATCH v2 bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-13 Thread Andrii Nakryiko
Currently libbpf version is specified in 2 places: libbpf.map and Makefile. They easily get out of sync and it's very easy to update one, but forget to update another one. In addition, Github projection of libbpf has to maintain its own version which has to be remembered to be kept in sync manually

RE: [v2, 4/4] ocelot: add VCAP IS2 rule to trap PTP Ethernet frames

2019-08-13 Thread Y.b. Lu
Hi Allan, > -Original Message- > From: Allan W . Nielsen > Sent: Tuesday, August 13, 2019 2:25 PM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; David S . Miller ; > Alexandre Belloni ; Microchip Linux Driver > Support > Subject: Re: [v2, 4/4] ocelot: add VCAP IS2 rule to trap PTP Ethernet

Re: [PATCH bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-13 Thread Andrii Nakryiko
On Tue, Aug 13, 2019 at 5:51 PM Jakub Kicinski wrote: > > On Tue, 13 Aug 2019 16:24:08 -0700, Andrii Nakryiko wrote: > > diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile > > index 9312066a1ae3..d9afc8509725 100644 > > --- a/tools/lib/bpf/Makefile > > +++ b/tools/lib/bpf/Makefile > > @@

Re: [PATCH bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-13 Thread Andrii Nakryiko
On Tue, Aug 13, 2019 at 5:28 PM Andrey Ignatov wrote: > > Andrii Nakryiko [Tue, 2019-08-13 16:24 -0700]: > > Currently libbpf version is specified in 2 places: libbpf.map and > > Makefile. They easily get out of sync and it's very easy to update one, > > but forget to update another one. In addit

RE: [v2, 3/4] ocelot_ace: fix action of trap

2019-08-13 Thread Y.b. Lu
Hi Allan, > -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Allan W . Nielsen > Sent: Tuesday, August 13, 2019 2:30 PM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; David S . Miller ; > Alexandre Belloni ; Microchip Linux Driver > Support > Subject: Re: [v2, 3/4] oc

RE: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-13 Thread Y.b. Lu
Hi Andrew and Allan, > -Original Message- > From: Andrew Lunn > Sent: Tuesday, August 13, 2019 9:43 PM > To: Y.b. Lu > Cc: Allan W. Nielsen ; netdev@vger.kernel.org; > David S . Miller ; Alexandre Belloni > ; Microchip Linux Driver Support > > Subject: Re: [PATCH 3/3] ocelot_ace: fix ac

RE: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-13 Thread Y.b. Lu
Hi Allan, > -Original Message- > From: Allan W. Nielsen > Sent: Tuesday, August 13, 2019 2:16 PM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; David S . Miller ; > Alexandre Belloni ; Microchip Linux Driver > Support > Subject: Re: [PATCH 3/3] ocelot_ace: fix action of trap > > The 08/13

Re: [PATCH] sctp: fix memleak in sctp_send_reset_streams

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 22:05:50 +0800, zhengbin wrote: > If the stream outq is not empty, need to kfree nstr_list. > > Fixes: d570a59c5b5f ("sctp: only allow the out stream reset when the stream > outq is empty") > Reported-by: Hulk Robot > Signed-off-by: zhengbin Applied, thank you!

Re: [PATCH net] netlink: Fix nlmsg_parse as a wrapper for strict message parsing

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 13:07:07 -0700, David Ahern wrote: > From: David Ahern > > Eric reported a syzbot warning: > > BUG: KMSAN: uninit-value in nh_valid_get_del_req+0x6f1/0x8c0 > net/ipv4/nexthop.c:1510 > CPU: 0 PID: 11812 Comm: syz-executor444 Not tainted 5.3.0-rc3+ #17 > Hardware name: Google

Re: [PATCH net v2] ibmveth: Convert multicast list size for little-endian system

2019-08-13 Thread Hangbin Liu
On Mon, Aug 12, 2019 at 04:13:06PM -0500, Thomas Falcon wrote: > The ibm,mac-address-filters property defines the maximum number of > addresses the hypervisor's multicast filter list can support. It is > encoded as a big-endian integer in the OF device tree, but the virtual > ethernet driver does n

Re: [PATCH net] net: phy: consider AN_RESTART status when reading link status

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 21:20:02 +0200, Heiner Kallweit wrote: > After configuring and restarting aneg we immediately try to read the > link status. On some systems the PHY may not yet have cleared the > "aneg complete" and "link up" bits, resulting in a false link-up > signal. See [0] for a report. >

Re: [PATCH net-next v7 5/6] flow_offload: support get multi-subsystem block

2019-08-13 Thread wenxu
On 8/12/2019 10:11 PM, Vlad Buslov wrote: > >> +static void flow_block_ing_cmd(struct net_device *dev, >> + flow_indr_block_bind_cb_t *cb, >> + void *cb_priv, >> + enum flow_block_command command) >> +{ >> +struct f

Re: [PATCH net v2] ibmveth: Convert multicast list size for little-endian system

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 16:13:06 -0500, Thomas Falcon wrote: > The ibm,mac-address-filters property defines the maximum number of > addresses the hypervisor's multicast filter list can support. It is > encoded as a big-endian integer in the OF device tree, but the virtual > ethernet driver does not con

[PATCH AUTOSEL 4.9 09/33] st_nci_hci_connectivity_event_received: null check the allocation

2019-08-13 Thread Sasha Levin
From: Navid Emamdoost [ Upstream commit 3008e06fdf0973770370f97d5f1fba3701d8281d ] devm_kzalloc may fail and return NULL. So the null check is needed. Signed-off-by: Navid Emamdoost Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/nfc/st-nci/se.c | 2 ++ 1 file changed,

Re: [PATCH net] s390/qeth: serialize cmd reply with concurrent timeout

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 16:44:35 +0200, Julian Wiedmann wrote: > Callbacks for a cmd reply run outside the protection of card->lock, to > allow for additional cmds to be issued & enqueued in parallel. > > When qeth_send_control_data() bails out for a cmd without having > received a reply (eg. due to t

Re: [PATCH net] sctp: fix the transport error_count check

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 13:27:34 -0300, Marcelo Ricardo Leitner wrote: > On Mon, Aug 12, 2019 at 08:49:12PM +0800, Xin Long wrote: > > As the annotation says in sctp_do_8_2_transport_strike(): > > > > "If the transport error count is greater than the pf_retrans > >threshold, and less than pathma

[PATCH AUTOSEL 4.14 05/44] netfilter: ebtables: fix a memory leak bug in compat

2019-08-13 Thread Sasha Levin
From: Wenwen Wang [ Upstream commit 15a78ba1844a8e052c1226f930133de4cef4e7ad ] In compat_do_replace(), a temporary buffer is allocated through vmalloc() to hold entries copied from the user space. The buffer address is firstly saved to 'newinfo->entries', and later on assigned to 'entries_tmp'.

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-13 Thread Alexei Starovoitov
On Tue, Aug 13, 2019 at 02:09:18PM +0100, Quentin Monnet wrote: > This series adds a "bpftool map count" subcommand to count the number of > entries present in a BPF map. This results from a customer request for a > tool to count the number of entries in BPF maps used in production (for > example,

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-13 Thread Alexei Starovoitov
On Tue, Aug 13, 2019 at 09:05:44PM +0900, Toshiaki Makita wrote: > This is a rough PoC for an idea to offload TC flower to XDP. ... > xdp_flow TCovs kmod > > 4.0 Mpps 1.1 Mpps 1.1 Mpps Is xdp_flow limited to 4 Mpps due to veth or something else? > > So

Re: [PATCH 00/17] Netfilter/IPVS updates for net-next

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 20:36:44 +0200, Pablo Neira Ayuso wrote: > Hi, > > The following patchset contains Netfilter/IPVS updates for net-next: > > 1) Rename mss field to mss_option field in synproxy, from Fernando Mancera. > > 2) Use SYSCTL_{ZERO,ONE} definitions in conntrack, from Matteo Croce. >

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-13 Thread Alexei Starovoitov
On Tue, Aug 13, 2019 at 04:06:00PM -0700, Andy Lutomirski wrote: > On Tue, Aug 13, 2019 at 2:58 PM Alexei Starovoitov > wrote: > > > > On Tue, Aug 06, 2019 at 10:24:25PM -0700, Andy Lutomirski wrote: > > > > > > > > Inside containers and inside nested containers we need to start > > > > processes

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Carlos Antonio Neira Bustos
On Tue, Aug 13, 2019 at 11:11:14PM +, Yonghong Song wrote: > > > On 8/13/19 11:47 AM, Carlos Neira wrote: > > From: Carlos > > > > New bpf helper bpf_get_current_pidns_info. > > This helper obtains the active namespace from current and returns > > pid, tgid, device and namespace id as seen

Re: [PATCH bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 16:24:08 -0700, Andrii Nakryiko wrote: > diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile > index 9312066a1ae3..d9afc8509725 100644 > --- a/tools/lib/bpf/Makefile > +++ b/tools/lib/bpf/Makefile > @@ -1,9 +1,10 @@ > # SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Claus

Re: [PATCH bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-13 Thread Andrey Ignatov
Andrii Nakryiko [Tue, 2019-08-13 16:24 -0700]: > Currently libbpf version is specified in 2 places: libbpf.map and > Makefile. They easily get out of sync and it's very easy to update one, > but forget to update another one. In addition, Github projection of > libbpf has to maintain its own versio

Re: [PATCH net-next v2 0/3] net: phy: let phy_speed_down/up support speeds >1Gbps

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 23:47:45 +0200, Heiner Kallweit wrote: > So far phy_speed_down/up can be used up to 1Gbps only. Remove this > restriction and add needed helpers to phy-core.c > > v2: > - remove unused parameter in patch 1 > - rename __phy_speed_down to phy_speed_down_core in patch 2 Applied,

Re: [PATCH] sctp: fix memleak in sctp_send_reset_streams

2019-08-13 Thread Neil Horman
On Tue, Aug 13, 2019 at 10:05:50PM +0800, zhengbin wrote: > If the stream outq is not empty, need to kfree nstr_list. > > Fixes: d570a59c5b5f ("sctp: only allow the out stream reset when the stream > outq is empty") > Reported-by: Hulk Robot > Signed-off-by: zhengbin > --- > net/sctp/stream.c

Re: [PATCH net-next] net: devlink: remove redundant rtnl lock assert

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 20:02:02 +0300, Vlad Buslov wrote: > It is enough for caller of devlink_compat_switch_id_get() to hold the net > device to guarantee that devlink port is not destroyed concurrently. Remove > rtnl lock assertion and modify comment to warn user that they must hold > either rtnl lo

Re: pull-request: bpf-next 2019-08-14

2019-08-13 Thread Jakub Kicinski
On Wed, 14 Aug 2019 01:16:39 +0200, Daniel Borkmann wrote: > Hi David, hi Jakub, > > The following pull-request contains BPF updates for your *net-next* tree. Pulled, let me know if I did it wrong đŸ€ž

Re: [PATCH net-next] mcast: ensure L-L IPv6 packets are accepted by bridge

2019-08-13 Thread Nikolay Aleksandrov
On 8/13/19 10:53 PM, Ido Schimmel wrote: > + Bridge maintainers, Linus > Good catch Ido, thanks! First I'd say the subject needs to reflect that this is a bridge change better, please rearrange it like so - bridge: mcast: ... More below, > On Tue, Aug 13, 2019 at 03:18:04PM +0100, Patrick Ruddy

Re: [Potential Spoof] Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Yonghong Song
On 8/13/19 4:11 PM, Yonghong Song wrote: > > > On 8/13/19 11:47 AM, Carlos Neira wrote: >> From: Carlos >> >> New bpf helper bpf_get_current_pidns_info. >> This helper obtains the active namespace from current and returns >> pid, tgid, device and namespace id as seen from that namespace, >> al

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-13 Thread Andy Lutomirski
On Tue, Aug 13, 2019 at 3:27 PM Daniel Colascione wrote: > > On Tue, Aug 13, 2019 at 2:58 PM Alexei Starovoitov > wrote: > > > > On Tue, Aug 06, 2019 at 10:24:25PM -0700, Andy Lutomirski wrote: > > > > > > > > Inside containers and inside nested containers we need to start > > > > processes > >

[PATCH bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-13 Thread Andrii Nakryiko
Currently libbpf version is specified in 2 places: libbpf.map and Makefile. They easily get out of sync and it's very easy to update one, but forget to update another one. In addition, Github projection of libbpf has to maintain its own version which has to be remembered to be kept in sync manually

Re: [PATCH bpf-next V9 3/3] tools/testing/selftests/bpf: Add self-tests for new helper.

2019-08-13 Thread Yonghong Song
On 8/13/19 11:47 AM, Carlos Neira wrote: > From: Carlos > > Added self-tests for new helper bpf_get_current_pidns_info. > > Signed-off-by: Carlos Neira > --- > tools/include/uapi/linux/bpf.h | 31 - > tools/testing/selftests/bpf/Makefile | 2 +- >

pull-request: bpf-next 2019-08-14

2019-08-13 Thread Daniel Borkmann
Hi David, hi Jakub, The following pull-request contains BPF updates for your *net-next* tree. There is a small merge conflict in libbpf (Cc Andrii so he's in the loop as well): for (i = 1; i <= btf__get_nr_types(btf); i++) { t = (struct btf_type *)btf__type_by_id(btf, i);

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Yonghong Song
On 8/13/19 11:47 AM, Carlos Neira wrote: > From: Carlos > > New bpf helper bpf_get_current_pidns_info. > This helper obtains the active namespace from current and returns > pid, tgid, device and namespace id as seen from that namespace, > allowing to instrument a process inside a container. >

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-13 Thread Andy Lutomirski
On Tue, Aug 13, 2019 at 2:58 PM Alexei Starovoitov wrote: > > On Tue, Aug 06, 2019 at 10:24:25PM -0700, Andy Lutomirski wrote: > > > > > > Inside containers and inside nested containers we need to start processes > > > that will use bpf. All of the processes are trusted. > > > > Trusted by whom?

Re: [PATCH RFC 2/4] net: phy: allow to bind genphy driver at probe time

2019-08-13 Thread Heiner Kallweit
On 14.08.2019 00:53, Florian Fainelli wrote: > On 8/13/19 2:25 PM, Heiner Kallweit wrote: >> In cases like a fixed phy that is never attached to a net_device we >> may want to bind the genphy driver at probe time. Setting a PHY ID of >> 0x to bind the genphy driver would fail due to a check

Re: [PATCH RFC 2/4] net: phy: allow to bind genphy driver at probe time

2019-08-13 Thread Florian Fainelli
On 8/13/19 2:25 PM, Heiner Kallweit wrote: > In cases like a fixed phy that is never attached to a net_device we > may want to bind the genphy driver at probe time. Setting a PHY ID of > 0x to bind the genphy driver would fail due to a check in > get_phy_device(). Therefore let's change the

Re: [patch net-next] devlink: send notifications for deleted snapshots on region destroy

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 14:28:31 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the notifications for deleted snapshots are sent only in case > user deletes a snapshot manually. Send the notifications in case region > is destroyed too. > > Signed-off-by: Jiri Pirko Applied, thanks!

Re: [patch net-next] selftests: netdevsim: add devlink params tests

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 15:04:46 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Test recently added netdevsim devlink param implementation. > > Signed-off-by: Jiri Pirko Thanks for the test, but it doesn't pass here: TEST: fw flash test [ OK ] TEST

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Yonghong Song
On 8/13/19 11:47 AM, Carlos Neira wrote: > From: Carlos > > New bpf helper bpf_get_current_pidns_info. > This helper obtains the active namespace from current and returns > pid, tgid, device and namespace id as seen from that namespace, > allowing to instrument a process inside a container. >

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-13 Thread Daniel Colascione
On Tue, Aug 13, 2019 at 2:58 PM Alexei Starovoitov wrote: > > On Tue, Aug 06, 2019 at 10:24:25PM -0700, Andy Lutomirski wrote: > > > > > > Inside containers and inside nested containers we need to start processes > > > that will use bpf. All of the processes are trusted. > > > > Trusted by whom?

Re: [PATCH net-next 2/5] RDS: limit the number of times we loop in rds_send_xmit

2019-08-13 Thread santosh . shilimkar
On 8/13/19 11:20 AM, Gerd Rausch wrote: From: Chris Mason Date: Fri, 3 Feb 2012 11:07:54 -0500 This will kick the RDS worker thread if we have been looping too long. Original commit from 2012 updated to include a change by Venkat Venkatsubra that triggers "must_wake" if "rds_ib_recv_refill_on

Re: [PATCH net-next 5/5] rds: check for excessive looping in rds_send_xmit

2019-08-13 Thread santosh . shilimkar
On 8/13/19 11:21 AM, Gerd Rausch wrote: From: Andy Grover Date: Thu, 13 Jan 2011 11:40:31 -0800 Original commit from 2011 updated to include a change by Yuval Shaia that adds a new statistic counter "send_stuck_rm" to capture the messages looping exessively in the send path. You need Andy's

Re: [PATCH net-next 4/5] net/rds: Add a few missing rds_stat_names entries

2019-08-13 Thread santosh . shilimkar
On 8/13/19 11:21 AM, Gerd Rausch wrote: Date: Thu, 11 Jul 2019 12:15:50 -0700 In a previous commit, fields were added to "struct rds_statistics" but array "rds_stat_names" was not updated accordingly. Please note the inconsistent naming of the string representations that is done in the name of

Re: [PATCH net-next 3/5] RDS: don't use GFP_ATOMIC for sk_alloc in rds_create

2019-08-13 Thread santosh . shilimkar
On 8/13/19 11:21 AM, Gerd Rausch wrote: From: Chris Mason Date: Fri, 3 Feb 2012 11:08:51 -0500 Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen Signed-off-by: Gerd Rausch Signed-off-by: Somasundaram Krishnasamy ---Acked-by: Santosh Shilimkar

Re: [patch net-next v2 1/2] netdevsim: implement support for devlink region and snapshots

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 16:48:42 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Implement dummy region of size 32K and allow user to create snapshots > or random data using debugfs file trigger. > > Signed-off-by: Jiri Pirko Hmm.. did you send the right version? > diff --git a/drivers/net/netdev

Re: [PATCH net-next 1/5] RDS: Re-add pf/sol access via sysctl

2019-08-13 Thread santosh . shilimkar
On 8/13/19 11:20 AM, Gerd Rausch wrote: From: Andy Grover Date: Tue, 24 Nov 2009 15:35:51 -0800 Although RDS has an official PF_RDS value now, existing software expects to look for rds sysctls to determine it. We need to maintain these for now, for backwards compatibility. Signed-off-by: Andy

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-13 Thread Alexei Starovoitov
On Tue, Aug 06, 2019 at 10:24:25PM -0700, Andy Lutomirski wrote: > > > > Inside containers and inside nested containers we need to start processes > > that will use bpf. All of the processes are trusted. > > Trusted by whom? In a non-nested container, the container manager > *might* be trusted by

Re: [v5,0/4] tools: bpftool: add net attach/detach command to attach XDP prog

2019-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2019 11:46:17 +0900, Daniel T. Lee wrote: > Currently, bpftool net only supports dumping progs attached on the > interface. To attach XDP prog on interface, user must use other tool > (eg. iproute2). By this patch, with `bpftool net attach/detach`, user > can attach/detach XDP prog o

Re: [PATCH bpf-next v2 2/4] bpf: support cloning sk storage on accept()

2019-08-13 Thread Stanislav Fomichev
On 08/13, Daniel Borkmann wrote: > On 8/12/19 7:52 PM, Stanislav Fomichev wrote: > > On 08/12, Daniel Borkmann wrote: > > > On 8/9/19 6:10 PM, Stanislav Fomichev wrote: > > > > Add new helper bpf_sk_storage_clone which optionally clones sk storage > > > > and call it from sk_clone_lock. > > > > >

[PATCH RFC 4/4] net: phy: fixed_phy: let genphy driver set supported and advertised modes

2019-08-13 Thread Heiner Kallweit
A fixed phy as special swphy binds to the genphy driver that calls genphy_read_abilities(). This function populates the supported and advertised modes, so we don't have to do it manually. Signed-off-by: Heiner Kallweit --- drivers/net/phy/fixed_phy.c | 23 --- 1 file changed,

[PATCH RFC 2/4] net: phy: allow to bind genphy driver at probe time

2019-08-13 Thread Heiner Kallweit
In cases like a fixed phy that is never attached to a net_device we may want to bind the genphy driver at probe time. Setting a PHY ID of 0x to bind the genphy driver would fail due to a check in get_phy_device(). Therefore let's change the PHY ID the genphy driver binds to to 0xfffe. T

[PATCH RFC 3/4] net: phy: swphy: bind swphy to genphy driver at probe time

2019-08-13 Thread Heiner Kallweit
Let a swphy bind to the genphy driver at probe time. This provides automatic feature detection even if the swphy never gets attached to a net_device. So far the genphy driver binds to a PHY as fallback only once the PHY is attached to a net_device. Signed-off-by: Heiner Kallweit --- drivers/net/

[PATCH RFC 1/4] net: phy: swphy: emulate register MII_ESTATUS

2019-08-13 Thread Heiner Kallweit
When the genphy driver binds to a swphy it will call genphy_read_abilites that will try to read MII_ESTATUS if BMSR_ESTATEN is set in MII_BMSR. So far this would read the default value 0x and 1000FD and 1000HD are reported as supported just by chance. Better add explicit support for emulating M

[PATCH RFC 0/4] net: phy: improve fixed_phy / swphy handling

2019-08-13 Thread Heiner Kallweit
Based on discussion [0] I prepared a patch set for improving few aspects of swphy and fixed_phy handling. So far it's compile-tested only. I'd appreciate testing on different devices. [0] https://marc.info/?t=15655361071&r=1&w=2 Heiner Kallweit (4): net: phy: swphy: emulate register MII_EST

Re: [PATCH bpf-next 0/2] libbpf: make use of BTF through sysfs

2019-08-13 Thread Daniel Borkmann
On 8/13/19 8:54 PM, Andrii Nakryiko wrote: Now that kernel's BTF is exposed through sysfs at well-known location, attempt to load it first as a target BTF for the purpose of BPF CO-RE relocations. Patch #1 is a follow-up patch to rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux. Patch

Re: Error when loading BPF_CGROUP_INET_EGRESS program with bpftool

2019-08-13 Thread Andrii Nakryiko
On Mon, Aug 12, 2019 at 1:48 PM Fejes Ferenc wrote: > > Thanks for the answer, I really appreciate it. I tried omitting Please reply inline, no top posting on kernel mailing lists. > "cgroup/skb" to let libbpf guess the attach type, but I got the same > error. Really interesting, because I got t

Re: [PATCH bpf-next v2 2/4] bpf: support cloning sk storage on accept()

2019-08-13 Thread Daniel Borkmann
On 8/12/19 7:52 PM, Stanislav Fomichev wrote: On 08/12, Daniel Borkmann wrote: On 8/9/19 6:10 PM, Stanislav Fomichev wrote: Add new helper bpf_sk_storage_clone which optionally clones sk storage and call it from sk_clone_lock. Cc: Martin KaFai Lau Cc: Yonghong Song Signed-off-by: Stanislav F

Re: [PATCH net-next] net: dsa: mv88e6xxx: check for mode change in port_setup_mac

2019-08-13 Thread Marek Behun
On Tue, 13 Aug 2019 22:32:34 +0200 Andrew Lunn wrote: > On Tue, Aug 13, 2019 at 07:12:43PM +0200, Marek BehĂșn wrote: > > @@ -598,12 +599,49 @@ int mv88e6352_port_link_state(struct mv88e6xxx_chip > > *chip, int port, > > struct phylink_link_state *state) > > { > > i

Re: [PATCH net] netdevsim: Restore per-network namespace accounting for fib entries

2019-08-13 Thread Jiri Pirko
Tue, Aug 13, 2019 at 07:40:54PM CEST, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Tue, 13 Aug 2019 09:14:45 +0200 > >> Mon, Aug 12, 2019 at 05:28:02PM CEST, da...@davemloft.net wrote: >>>From: Jiri Pirko >>>Date: Mon, 12 Aug 2019 10:36:35 +0200 >>> I understand it with real devices,

Re: [PATCH net-next] net: dsa: mv88e6xxx: check for mode change in port_setup_mac

2019-08-13 Thread Andrew Lunn
On Tue, Aug 13, 2019 at 07:12:43PM +0200, Marek BehĂșn wrote: > @@ -598,12 +599,49 @@ int mv88e6352_port_link_state(struct mv88e6xxx_chip > *chip, int port, > struct phylink_link_state *state) > { > int err; > - u16 reg; > + u16 reg, mac; > > err =

Re: [PATCH net-next v2 2/3] net: phy: add phy_speed_down_core and phy_resolve_min_speed

2019-08-13 Thread Andrew Lunn
On Mon, Aug 12, 2019 at 11:51:27PM +0200, Heiner Kallweit wrote: > phy_speed_down_core provides most of the functionality for > phy_speed_down. It makes use of new helper phy_resolve_min_speed that is > based on the sorting of the settings[] array. In certain cases it may be > helpful to be able to

Re: [PATCH net-next v2 1/3] net: phy: add __set_linkmode_max_speed

2019-08-13 Thread Andrew Lunn
On Mon, Aug 12, 2019 at 11:50:30PM +0200, Heiner Kallweit wrote: > We will need the functionality of __set_linkmode_max_speed also for > linkmode bitmaps other than phydev->supported. Therefore split it. > > v2: > - remove unused parameter from __set_linkmode_max_speed > > Signed-off-by: Heiner K

Re: [PATCH net-next] mcast: ensure L-L IPv6 packets are accepted by bridge

2019-08-13 Thread Ido Schimmel
+ Bridge maintainers, Linus On Tue, Aug 13, 2019 at 03:18:04PM +0100, Patrick Ruddy wrote: > At present only all-nodes IPv6 multicast packets are accepted by > a bridge interface that is not in multicast router mode. Since > other protocols can be running in the absense of multicast > forwarding e

Re: [PATCH net-next,v4 08/12] drivers: net: use flow block API

2019-08-13 Thread Pablo Neira Ayuso
On Mon, Aug 12, 2019 at 06:50:09PM +0100, Edward Cree wrote: > On 09/07/2019 21:55, Pablo Neira Ayuso wrote: > > This patch updates flow_block_cb_setup_simple() to use the flow block API. > > Several drivers are also adjusted to use it. > > > > This patch introduces the per-driver list of flow bloc

[PATCH bpf-next 1/2] btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux

2019-08-13 Thread Andrii Nakryiko
Expose kernel's BTF under the name vmlinux to be more uniform with using kernel module names as file names in the future. Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs") Suggested-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko --- Documentation/ABI/testing/sysfs-kernel-btf | 2 +

[PATCH bpf-next 2/2] libbpf: attempt to load kernel BTF from sysfs first

2019-08-13 Thread Andrii Nakryiko
Add support for loading kernel BTF from sysfs (/sys/kernel/btf/vmlinux) as a target BTF. Also extend the list of on disk search paths for vmlinux ELF image with entries that perf is searching for. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 64

[PATCH bpf-next 0/2] libbpf: make use of BTF through sysfs

2019-08-13 Thread Andrii Nakryiko
Now that kernel's BTF is exposed through sysfs at well-known location, attempt to load it first as a target BTF for the purpose of BPF CO-RE relocations. Patch #1 is a follow-up patch to rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux. Patch #2 adds ability to load raw BTF contents from

[PATCH bpf-next V9 3/3] tools/testing/selftests/bpf: Add self-tests for new helper.

2019-08-13 Thread Carlos Neira
From: Carlos Added self-tests for new helper bpf_get_current_pidns_info. Signed-off-by: Carlos Neira --- tools/include/uapi/linux/bpf.h | 31 - tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_helpers.h | 3 + .../

[PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Carlos Neira
From: Carlos New bpf helper bpf_get_current_pidns_info. This helper obtains the active namespace from current and returns pid, tgid, device and namespace id as seen from that namespace, allowing to instrument a process inside a container. Signed-off-by: Carlos Neira --- fs/internal.h

[PATCH bpf-next V9 2/3] samples/bpf: added sample code for bpf_get_current_pidns_info.

2019-08-13 Thread Carlos Neira
From: Carlos sample program to call new bpf helper bpf_get_current_pidns_info. Signed-off-by: Carlos Neira --- samples/bpf/Makefile | 3 +++ samples/bpf/trace_ns_info_user.c | 35 samples/bpf/trace_ns_info_user_kern.c | 44 +++

[PATCH bpf-next V9 0/3] BPF: New helper to obtain namespace data from current task

2019-08-13 Thread Carlos Neira
This helper obtains the active namespace from current and returns pid, tgid, device and namespace id as seen from that namespace, allowing to instrument a process inside a container. Device is read from /proc/self/ns/pid, as in the future it's possible that different pid_ns files may belong to diff

Re: [RESEND][PATCH v3 bpf-next] btf: expose BTF info through sysfs

2019-08-13 Thread Arnaldo Carvalho de Melo
Em Tue, Aug 13, 2019 at 11:08:14AM -0700, Andrii Nakryiko escreveu: > On Tue, Aug 13, 2019 at 7:20 AM Daniel Borkmann wrote: > > On 8/12/19 8:39 PM, Andrii Nakryiko wrote: > > > 3. final vmlinux image is generated by linking this object file (and > > > kallsyms, if necessary). sysfs_btf.c then

[PATCH net-next] mcast: ensure L-L IPv6 packets are accepted by bridge

2019-08-13 Thread Patrick Ruddy
At present only all-nodes IPv6 multicast packets are accepted by a bridge interface that is not in multicast router mode. Since other protocols can be running in the absense of multicast forwarding e.g. OSPFv3 IPv6 ND. Change the test to allow all of the FFx2::/16 range to be accepted when not in m

[PATCH 13/17] netfilter: remove "#ifdef __KERNEL__" guards from some headers.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden A number of non-UAPI Netfilter header-files contained superfluous "#ifdef __KERNEL__" guards. Removed them. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- include/linux/netfilter/nf_conntrack_dccp.h | 3 --- include/linux/netfilter/nf_conntrack_h32

[PATCH 17/17] netfilter: connlabels: prefer static lock initialiser

2019-08-13 Thread Pablo Neira Ayuso
From: Florian Westphal seen during boot: BUG: spinlock bad magic on CPU#2, swapper/0/1 lock: nf_connlabels_lock+0x0/0x60, .magic: , .owner: /-1, .owner_cpu: 0 Call Trace: do_raw_spin_lock+0x14e/0x1b0 nf_connlabels_get+0x15/0x40 ct_init_net+0xc4/0x270 ops_init+0x56/0x1c0 register_pe

[PATCH 16/17] netfilter: nf_nat_proto: make tables static

2019-08-13 Thread Pablo Neira Ayuso
From: Valdis Klētnieks Sparse warns about two tables not being declared. CHECK net/netfilter/nf_nat_proto.c net/netfilter/nf_nat_proto.c:725:26: warning: symbol 'nf_nat_ipv4_ops' was not declared. Should it be static? net/netfilter/nf_nat_proto.c:964:26: warning: symbol 'nf_nat_ipv6_ops' wa

[PATCH 12/17] netfilter: add missing IS_ENABLED(CONFIG_NETFILTER) checks to some header-files.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden linux/netfilter.h defines a number of struct and inline function definitions which are only available is CONFIG_NETFILTER is enabled. These structs and functions are used in declarations and definitions in other header-files. Added preprocessor checks to make sure these heade

[PATCH 15/17] netfilter: nf_tables: add missing prototypes.

2019-08-13 Thread Pablo Neira Ayuso
From: Valdis Klētnieks Sparse rightly complains about undeclared symbols. CHECK net/netfilter/nft_set_hash.c net/netfilter/nft_set_hash.c:647:21: warning: symbol 'nft_set_rhash_type' was not declared. Should it be static? net/netfilter/nft_set_hash.c:670:21: warning: symbol 'nft_set_hash_ty

[PATCH 14/17] kbuild: remove all netfilter headers from header-test blacklist.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden All the blacklisted NF headers can now be compiled stand-alone, so removed them from the blacklist. Cc: Masahiro Yamada Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- include/Kbuild | 74 -- 1 file

[PATCH 11/17] netfilter: add missing IS_ENABLED(CONFIG_NF_CONNTRACK) checks to some header-files.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden struct nf_conn contains a "struct nf_conntrack ct_general" member and struct net contains a "struct netns_ct ct" member which are both only defined in CONFIG_NF_CONNTRACK is enabled. These members are used in a number of inline functions defined in other header-files. Added

[PATCH 10/17] netfilter: add missing IS_ENABLED(CONFIG_NF_TABLES) check to header-file.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden nf_tables.h defines an API comprising several inline functions and macros that depend on the nft member of struct net. However, this is only defined is CONFIG_NF_TABLES is enabled. Added preprocessor checks to ensure that nf_tables.h will compile if CONFIG_NF_TABLES is disab

[PATCH 00/17] Netfilter/IPVS updates for net-next

2019-08-13 Thread Pablo Neira Ayuso
Hi, The following patchset contains Netfilter/IPVS updates for net-next: 1) Rename mss field to mss_option field in synproxy, from Fernando Mancera. 2) Use SYSCTL_{ZERO,ONE} definitions in conntrack, from Matteo Croce. 3) More strict validation of IPVS sysctl values, from Junwei Hu. 4) Remove

[PATCH 03/17] ipvs: Improve robustness to the ipvs sysctl

2019-08-13 Thread Pablo Neira Ayuso
From: Junwei Hu The ipvs module parse the user buffer and save it to sysctl, then check if the value is valid. invalid value occurs over a period of time. Here, I add a variable, struct ctl_table tmp, used to read the value from the user buffer, and save only when it is valid. I delete proc_do_sy

[PATCH 05/17] netfilter: nft_bitwise: add offload support

2019-08-13 Thread Pablo Neira Ayuso
Extract mask from bitwise operation and store it into the corresponding context register so the cmp instruction can set the mask accordingly. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_bitwise.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/net/netfilter/nf

[PATCH 02/17] netfilter: conntrack: use shared sysctl constants

2019-08-13 Thread Pablo Neira Ayuso
From: Matteo Croce Use shared sysctl variables for zero and one constants, as in commit eec4844fae7c ("proc/sysctl: add shared variables for range check") Fixes: 8f14c99c7eda ("netfilter: conntrack: limit sysctl setting for boolean options") Signed-off-by: Matteo Croce Signed-off-by: Pablo Nei

[PATCH 04/17] netfilter: remove unnecessary spaces

2019-08-13 Thread Pablo Neira Ayuso
From: yangxingwu This patch removes extra spaces. Signed-off-by: yangxingwu Signed-off-by: Pablo Neira Ayuso --- net/netfilter/ipset/ip_set_hash_gen.h | 2 +- net/netfilter/ipset/ip_set_list_set.c | 2 +- net/netfilter/ipvs/ip_vs_core.c| 2 +- net/netfilter/ipvs/ip_vs_mh.c

[PATCH 09/17] netfilter: add missing IS_ENABLED(CONFIG_BRIDGE_NETFILTER) checks to header-file.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden br_netfilter.h defines inline functions that use an enum constant and struct member that are only defined if CONFIG_BRIDGE_NETFILTER is enabled. Added preprocessor checks to ensure br_netfilter.h will compile if CONFIG_BRIDGE_NETFILTER is disabled. Signed-off-by: Jeremy Sowd

[PATCH 08/17] netfilter: add missing includes to a number of header-files.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden A number of netfilter header-files used declarations and definitions from other headers without including them. Added include directives to make those declarations and definitions available. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- include/linux/n

[PATCH 01/17] netfilter: synproxy: rename mss synproxy_options field

2019-08-13 Thread Pablo Neira Ayuso
From: Fernando Fernandez Mancera After introduce "mss_encode" field in the synproxy_options struct the field "mss" is a little confusing. It has been renamed to "mss_option". Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_conntrack_synp

[PATCH 06/17] netfilter: nf_tables: store data in offload context registers

2019-08-13 Thread Pablo Neira Ayuso
Store immediate data into offload context register. This allows follow up instructions to take it from the corresponding source register. This patch is required to support for payload mangling, although other instructions that take data from source register will benefit from this too. Signed-off-

[PATCH 07/17] netfilter: inline four headers files into another one.

2019-08-13 Thread Pablo Neira Ayuso
From: Jeremy Sowden linux/netfilter/ipset/ip_set.h included four other header files: include/linux/netfilter/ipset/ip_set_comment.h include/linux/netfilter/ipset/ip_set_counter.h include/linux/netfilter/ipset/ip_set_skbinfo.h include/linux/netfilter/ipset/ip_set_timeout.h Of these the f

[PATCH net-next 3/5] RDS: don't use GFP_ATOMIC for sk_alloc in rds_create

2019-08-13 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:08:51 -0500 Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen Signed-off-by: Gerd Rausch Signed-off-by: Somasundaram Krishnasamy --- net/rds/af_rds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/af_rds.c b/net/rds/

[PATCH net-next 4/5] net/rds: Add a few missing rds_stat_names entries

2019-08-13 Thread Gerd Rausch
Date: Thu, 11 Jul 2019 12:15:50 -0700 In a previous commit, fields were added to "struct rds_statistics" but array "rds_stat_names" was not updated accordingly. Please note the inconsistent naming of the string representations that is done in the name of compatibility with the Oracle internal cod

[PATCH net-next 5/5] rds: check for excessive looping in rds_send_xmit

2019-08-13 Thread Gerd Rausch
From: Andy Grover Date: Thu, 13 Jan 2011 11:40:31 -0800 Original commit from 2011 updated to include a change by Yuval Shaia that adds a new statistic counter "send_stuck_rm" to capture the messages looping exessively in the send path. Signed-off-by: Gerd Rausch --- net/rds/rds.h | 2 +- n

  1   2   >