Re: [PATCH net-next v2 13/14] selftests: devlink_trap: Add test cases for devlink-trap

2019-08-14 Thread Ido Schimmel
On Wed, Aug 14, 2019 at 05:42:29PM -0700, Jakub Kicinski wrote: > On Tue, 13 Aug 2019 10:53:59 +0300, Ido Schimmel wrote: > > From: Ido Schimmel > > > > Add test cases for devlink-trap on top of the netdevsim implementation. > > > > The tests focus on the devlink-trap core infrastructure and use

[PATCH] net: hns: hns_enet: Add of_node_put in hns_nic_dev_probe()

2019-08-14 Thread Nishka Dasgupta
The local variable ae_node in function hns_nic_dev_probe takes the return value of of_parse_phandle, which gets a node but does not put it. This may cause a memory leak. Hence put ae_node after the last time it is invoked. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/n

Re: [PATCH net-next v2 11/14] netdevsim: Add devlink-trap support

2019-08-14 Thread Ido Schimmel
On Wed, Aug 14, 2019 at 04:59:57PM -0700, Jakub Kicinski wrote: > On Tue, 13 Aug 2019 10:53:57 +0300, Ido Schimmel wrote: > > diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c > > index 08ca59fc189b..2758d95c8d18 100644 > > --- a/drivers/net/netdevsim/dev.c > > +++ b/drivers/ne

[PATCH net] tunnel: fix dev null pointer dereference when send pkg larger than mtu in collect_md mode

2019-08-14 Thread Hangbin Liu
When we send a packet larger than PMTU, we need to reply with icmp_send(ICMP_FRAG_NEEDED) or icmpv6_send(ICMPV6_PKT_TOOBIG). But in collect_md mode, kernel will crash while accessing the dst dev as __metadata_dst_init() init dst->dev to NULL by default. Here is what the code path looks like, for G

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

2019-08-14 Thread Jiri Pirko
Thu, Aug 15, 2019 at 03:09:00AM CEST, jakub.kicin...@netronome.com wrote: >On Wed, 14 Aug 2019 17:26:04 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Test recently added netdevsim devlink param implementation. >> >> Signed-off-by: Jiri Pirko >> --- >> v1->v2: >> -using cmd_jq helper > >Sti

Re: [net-next 1/1] tipc: clean up skb list lock handling on send path

2019-08-14 Thread Xin Long
- Original Message - > The policy for handling the skb list locks on the send and receive paths > is simple. > > - On the send path we never need to grab the lock on the 'xmitq' list > when the destination is an exernal node. > > - On the receive path we always need to grab the lock

Re: tun: mark small packets as owned by the tap sock

2019-08-14 Thread Jason Wang
On 2019/8/13 下午10:00, Dave Jones wrote: On Tue, Aug 13, 2019 at 04:33:59PM +0800, Jason Wang wrote: > > On 2019/8/13 上午6:19, Dave Jones wrote: > > On Wed, Aug 07, 2019 at 12:30:07AM +, Linux Kernel wrote: > > > Commit: 4b663366246be1d1d4b1b8b01245b2e88ad9e706 > > > Parent:

[PATCH bpf-next 4/5] ixgbe: Enable XDP_SKIP_BPF option for AF_XDP sockets

2019-08-14 Thread Sridhar Samudrala
This patch skips calling BPF program in the receive path if the queue is associated with UMEM that is not shared and bound to an AF_XDP socket that has enabled skip bpf during bind() call. Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20 +--

[PATCH bpf-next 1/5] xsk: Convert bool 'zc' field in struct xdp_umem to a u32 bitmap

2019-08-14 Thread Sridhar Samudrala
The bool 'zc' field in struct xdp_uem is replaced with a u32 flags field and a bit within flags is used to indicate zerocopy. This flags field will be used in later patches for other bit fields. Also, removed the bool 'zc' field from struct xdp_sock as it can be accessed via flags in xs->umem. Si

[PATCH bpf-next 2/5] xsk: Introduce XDP_SKIP_BPF bind option

2019-08-14 Thread Sridhar Samudrala
This option enables an AF_XDP socket to specify XDP_SKIP_BPF flag with the bind() call to skip calling the BPF program in the receive path and pass the XDP buffer directly to the socket. When a single AF_XDP socket is associated with a queue and a HW filter is used to redirect the packets and the

[PATCH bpf-next 3/5] i40e: Enable XDP_SKIP_BPF option for AF_XDP sockets

2019-08-14 Thread Sridhar Samudrala
This patch skips calling BPF program in the receive path if the queue is associated with UMEM that is not shared and bound to an AF_XDP socket that has enabled skip bpf during bind() call. Here are some performance numbers collected on - 2 socket 28 core Intel(R) Xeon(R) Platinum 8180 CPU @ 2.5

[PATCH bpf-next 5/5] xdpsock_user: Add skip_bpf option

2019-08-14 Thread Sridhar Samudrala
Signed-off-by: Sridhar Samudrala --- samples/bpf/xdpsock_user.c | 8 1 file changed, 8 insertions(+) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 93eaaf7239b2..509fc6a18af9 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -123,6 +

[PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-14 Thread Sridhar Samudrala
This patch series introduces XDP_SKIP_BPF flag that can be specified during the bind() call of an AF_XDP socket to skip calling the BPF program in the receive path and pass the buffer directly to the socket. When a single AF_XDP socket is associated with a queue and a HW filter is used to redirec

[net] tipc: fix false detection of retransmit failures

2019-08-14 Thread Tuong Lien
This commit eliminates the use of the link 'stale_limit' & 'prev_from' (besides the already removed - 'stale_cnt') variables in the detection of repeated retransmit failures as there is no proper way to initialize them to avoid a false detection, i.e. it is not really a retransmission failure but d

Re: [PATCH net-next] net/mvpp2: Replace tasklet with softirq hrtimer

2019-08-14 Thread David Miller
From: Sebastian Andrzej Siewior Date: Tue, 13 Aug 2019 10:00:25 +0200 > From: Thomas Gleixner > > The tx_done_tasklet tasklet is used in invoke the hrtimer > (mvpp2_hr_timer_cb) in softirq context. This can be also achieved without > the tasklet but with HRTIMER_MODE_SOFT as hrtimer mode. > >

Re: [PATCH 0/2] Netfilter updates for net-next

2019-08-14 Thread David Miller
From: Pablo Neira Ayuso Date: Wed, 14 Aug 2019 23:43:45 +0200 > The following patchset contains Netfilter updates for net-next. > This round addresses fallout from previous pull request: > > 1) Remove #warning from ipt_LOG.h and ip6t_LOG.h headers, >from Jeremy Sowden. > > 2) Incorrect pare

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

2019-08-14 Thread David Miller
From: Gerd Rausch Date: Wed, 14 Aug 2019 14:45:21 -0700 > a) It is utterly inappropriate to have Oracle applications >rely on a /proc/sys API that was kept out of Upstream-Linux >for this long Yes. > > b) It is utterly inappropriate to include such a /proc/sys API >that Oracle appl

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

2019-08-14 Thread Jakub Kicinski
On Wed, 14 Aug 2019 17:37:34 +0200, Jiri Pirko wrote: > diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c > index 08ca59fc189b..125a0358bc04 100644 > --- a/drivers/net/netdevsim/dev.c > +++ b/drivers/net/netdevsim/dev.c > @@ -27,6 +27,41 @@ > > static struct dentry *nsim_dev

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

2019-08-14 Thread Jakub Kicinski
On Wed, 14 Aug 2019 17:26:04 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Test recently added netdevsim devlink param implementation. > > Signed-off-by: Jiri Pirko > --- > v1->v2: > -using cmd_jq helper Still failing here :( # ./devlink.sh TEST: fw flash test

Re: [PATCH net-next v2 13/14] selftests: devlink_trap: Add test cases for devlink-trap

2019-08-14 Thread Jakub Kicinski
On Tue, 13 Aug 2019 10:53:59 +0300, Ido Schimmel wrote: > From: Ido Schimmel > > Add test cases for devlink-trap on top of the netdevsim implementation. > > The tests focus on the devlink-trap core infrastructure and user space > API. They test both good and bad flows and also dismantle of the n

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

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 04:59:18PM -0700, Andy Lutomirski wrote: > > > > On Aug 14, 2019, at 4:33 PM, Alexei Starovoitov > > wrote: > > > >> On Wed, Aug 14, 2019 at 03:30:51PM -0700, Andy Lutomirski wrote: > >> > >> > On Aug 14, 2019, at 3:05 PM, Alexei Starovoitov > wrote: > >>>

Re: [PATCH net-next v2 11/14] netdevsim: Add devlink-trap support

2019-08-14 Thread Jakub Kicinski
On Tue, 13 Aug 2019 10:53:57 +0300, Ido Schimmel wrote: > diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c > index 08ca59fc189b..2758d95c8d18 100644 > --- a/drivers/net/netdevsim/dev.c > +++ b/drivers/net/netdevsim/dev.c > @@ -17,11 +17,21 @@ > > #include > #include > +#

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

2019-08-14 Thread Andy Lutomirski
> On Aug 14, 2019, at 4:33 PM, Alexei Starovoitov > wrote: > >> On Wed, Aug 14, 2019 at 03:30:51PM -0700, Andy Lutomirski wrote: >> >> On Aug 14, 2019, at 3:05 PM, Alexei Starovoitov wrote: On Wed, Aug 14, 2019 at 10:51:23AM -0700, Andy Lutomirski wrote: If

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

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 03:30:51PM -0700, Andy Lutomirski wrote: > > > > On Aug 14, 2019, at 3:05 PM, Alexei Starovoitov > > wrote: > > > >> On Wed, Aug 14, 2019 at 10:51:23AM -0700, Andy Lutomirski wrote: > >> > >> If eBPF is genuinely not usable by programs that are not fully trusted > >> b

Re: [PATCH bpf-next v4 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-08-14 Thread Daniel Borkmann
On 8/12/19 7:25 PM, Björn Töpel wrote: On Mon, 12 Aug 2019 at 14:28, Daniel Borkmann wrote: [...] diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 59b57d708697..c3447bad608a 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -362,6 +362,50 @@ static void xsk_unbind_dev(struct xdp_sock *xs)

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

2019-08-14 Thread Andy Lutomirski
> On Aug 14, 2019, at 3:05 PM, Alexei Starovoitov > wrote: > >> On Wed, Aug 14, 2019 at 10:51:23AM -0700, Andy Lutomirski wrote: >> >> If eBPF is genuinely not usable by programs that are not fully trusted >> by the admin, then no kernel changes at all are needed. Programs that >> want to r

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

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 10:51:23AM -0700, Andy Lutomirski wrote: > > If eBPF is genuinely not usable by programs that are not fully trusted > by the admin, then no kernel changes at all are needed. Programs that > want to reduce their own privileges can easily fork() a privileged > subprocess or

Re: [PATCH bpf-next v2] net: Don't call XDP_SETUP_PROG when nothing is changed

2019-08-14 Thread Jakub Kicinski
On Wed, 14 Aug 2019 14:34:06 +, Maxim Mikityanskiy wrote: > Don't uninstall an XDP program when none is installed, and don't install > an XDP program that has the same ID as the one already installed. > > dev_change_xdp_fd doesn't perform any checks in case it uninstalls an > XDP program. It m

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

2019-08-14 Thread Gerd Rausch
Hi David, On 14/08/2019 14.31, David Miller wrote: > From: santosh.shilim...@oracle.com > Date: Wed, 14 Aug 2019 11:36:19 -0700 > >> On 8/14/19 11:21 AM, David Miller wrote: >>> From: santosh.shilim...@oracle.com >>> Date: Wed, 14 Aug 2019 11:01:36 -0700 >>> Some of the application software

[PATCH 2/2] netfilter: nft_bitwise: Adjust parentheses to fix memcmp size argument

2019-08-14 Thread Pablo Neira Ayuso
From: Nathan Chancellor clang warns: net/netfilter/nft_bitwise.c:138:50: error: size argument in 'memcmp' call is a comparison [-Werror,-Wmemsize-comparison] if (memcmp(&priv->xor, &zero, sizeof(priv->xor) || ~~^~ net/netfilter/nft_bi

[PATCH 1/2] netfilter: remove deprecation warnings from uapi headers.

2019-08-14 Thread Pablo Neira Ayuso
From: Jeremy Sowden There are two netfilter userspace headers which contain deprecation warnings. While these headers are not used within the kernel, they are compiled stand-alone for header-testing. Pablo informs me that userspace iptables still refer to these headers, and the intention was to

[PATCH 0/2] Netfilter updates for net-next

2019-08-14 Thread Pablo Neira Ayuso
Hi, The following patchset contains Netfilter updates for net-next. This round addresses fallout from previous pull request: 1) Remove #warning from ipt_LOG.h and ip6t_LOG.h headers, from Jeremy Sowden. 2) Incorrect parens in memcmp() in nft_bitwise, from Nathan Chancellor. You can pull thes

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

2019-08-14 Thread Andrey Ignatov
Andrii Nakryiko [Wed, 2019-08-14 13:57 -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 1/5] RDS: Re-add pf/sol access via sysctl

2019-08-14 Thread David Miller
From: santosh.shilim...@oracle.com Date: Wed, 14 Aug 2019 11:36:19 -0700 > On 8/14/19 11:21 AM, David Miller wrote: >> From: santosh.shilim...@oracle.com >> Date: Wed, 14 Aug 2019 11:01:36 -0700 >> >>> Some of the application software was released before 2009 and ended up >>> using these proc ent

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

2019-08-14 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] tools: bpftool: compile with $(EXTRA_WARNINGS)

2019-08-14 Thread Daniel Borkmann
On 8/14/19 1:37 PM, Quentin Monnet wrote: Compile bpftool with $(EXTRA_WARNINGS), as defined in scripts/Makefile.include, and fix the new warnings produced. Simply leave -Wswitch-enum out of the warning list, as we have several switch-case structures where it is not desirable to process all valu

Re: tc - mirred ingress not supported at the moment

2019-08-14 Thread Cong Wang
On Wed, Aug 14, 2019 at 2:02 AM Martin Olsson wrote: > > Hi Cong! > > Ah sorry. > Already implemented. Great! > > Hmmm. Then why don't the manual at > https://www.linux.org/docs/man8/tc-mirred.html to reflect the changes? > That was the place I checked to see if ingress was still not implemented.

Re: [PATCH bpf-next 3/4] selftests/bpf: test_progs: remove global fail/success counts

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 1:07 PM Stanislav Fomichev wrote: > > On 08/14, Andrii Nakryiko wrote: > > On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > > > > > Now that we have a global per-test/per-environment state, there > > > is no longer the need to have global fail/success counters

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

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 10:12 AM Quentin Monnet wrote: > > 2019-08-14 09:58 UTC-0700 ~ Alexei Starovoitov > > > On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote: > >> > >> On 14/08/2019 10:42, Quentin Monnet wrote: > >>> 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov > >>> > The same can

Re: [PATCH bpf-next 3/4] selftests/bpf: test_progs: remove global fail/success counts

2019-08-14 Thread Stanislav Fomichev
On 08/14, Andrii Nakryiko wrote: > On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > > > Now that we have a global per-test/per-environment state, there > > is no longer the need to have global fail/success counters > > (and there is no need to save/get the diff before/after the > > te

Re: [PATCH bpf-next 2/4] selftests/bpf: test_progs: test__skip

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 12:53 PM Stanislav Fomichev wrote: > > On 08/14, Andrii Nakryiko wrote: > > On Wed, Aug 14, 2019 at 12:22 PM Andrii Nakryiko > > wrote: > > > > > > On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev > > > wrote: > > > > > > > > Export test__skip() to indicate skipped tes

[PATCH net] ibmvnic: Unmap DMA address of TX descriptor buffers after use

2019-08-14 Thread Thomas Falcon
There's no need to wait until a completion is received to unmap TX descriptor buffers that have been passed to the hypervisor. Instead unmap it when the hypervisor call has completed. This patch avoids the possibility that a buffer will not be unmapped because a TX completion is lost or mishandled.

Re: [PATCH bpf-next 4/4] selftests/bpf: test_progs: remove asserts from subtests

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > Otherwise they can bring the whole process down. > > Cc: Andrii Nakryiko > Signed-off-by: Stanislav Fomichev > --- This is probably why you added all that extra logging in __test__fail(), right? So had a low-priority TODO item to ad

Re: [PATCH bpf-next 2/4] selftests/bpf: test_progs: test__skip

2019-08-14 Thread Stanislav Fomichev
On 08/14, Andrii Nakryiko wrote: > On Wed, Aug 14, 2019 at 12:22 PM Andrii Nakryiko > wrote: > > > > On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > > > > > Export test__skip() to indicate skipped tests and use it in > > > test_send_signal_nmi(). > > > > > > Cc: Andrii Nakryiko > >

Re: [PATCH bpf-next 3/4] selftests/bpf: test_progs: remove global fail/success counts

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > Now that we have a global per-test/per-environment state, there > is no longer the need to have global fail/success counters > (and there is no need to save/get the diff before/after the > test). > > Cc: Andrii Nakryiko > Signed-off-by

Re: [PATCH bpf-next 2/4] selftests/bpf: test_progs: test__skip

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 12:22 PM Andrii Nakryiko wrote: > > On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > > > Export test__skip() to indicate skipped tests and use it in > > test_send_signal_nmi(). > > > > Cc: Andrii Nakryiko > > Signed-off-by: Stanislav Fomichev > > --- > > For

Re: [PATCH bpf-next 2/4] selftests/bpf: test_progs: test__skip

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 9:48 AM Stanislav Fomichev wrote: > > Export test__skip() to indicate skipped tests and use it in > test_send_signal_nmi(). > > Cc: Andrii Nakryiko > Signed-off-by: Stanislav Fomichev > --- For completeness, we should probably also support test__skip_subtest() eventually

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

2019-08-14 Thread santosh . shilimkar
On 8/14/19 11:21 AM, David Miller wrote: From: santosh.shilim...@oracle.com Date: Wed, 14 Aug 2019 11:01:36 -0700 Some of the application software was released before 2009 and ended up using these proc entries from downstream kernel. The newer lib/app using RDS don't use these. Unfortunately lo

Re: [PATCH] MAINTAINERS: r8169: Update path to the driver

2019-08-14 Thread Heiner Kallweit
On 14.08.2019 14:12, Denis Efremov wrote: > Update MAINTAINERS record to reflect the filename change. > The file was moved in commit 25e992a4603c ("r8169: rename > r8169.c to r8169_main.c") > > Cc: Heiner Kallweit > Cc: nic_s...@realtek.com > Cc: David S. Miller > Cc: netdev@vger.kernel.org > Si

Re: [PATCH net] ipv6: Fix return value of ipv6_mc_may_pull() for malformed packets

2019-08-14 Thread Linus Lüssing
On Wed, Aug 14, 2019 at 12:58:58PM -0400, David Miller wrote: > From: Stefano Brivio > Date: Tue, 13 Aug 2019 00:46:01 +0200 > > > Commit ba5ea614622d ("bridge: simplify ip_mc_check_igmp() and > > ipv6_mc_check_mld() calls") replaces direct calls to pskb_may_pull() > > in br_ipv6_multicast_mld2_r

Re: [PATCH] netfilter: nft_bitwise: Adjust parentheses to fix memcmp size argument

2019-08-14 Thread Nick Desaulniers
On Wed, Aug 14, 2019 at 9:58 AM Nathan Chancellor wrote: > > clang warns: > > net/netfilter/nft_bitwise.c:138:50: error: size argument in 'memcmp' > call is a comparison [-Werror,-Wmemsize-comparison] > if (memcmp(&priv->xor, &zero, sizeof(priv->xor) || >

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

2019-08-14 Thread David Miller
From: santosh.shilim...@oracle.com Date: Wed, 14 Aug 2019 11:01:36 -0700 > Some of the application software was released before 2009 and ended up > using these proc entries from downstream kernel. The newer lib/app > using RDS don't use these. Unfortunately lot of customer still use > Oracle 9, 10

Re: [PATCH v4 9/9] Input: add IOC3 serio driver

2019-08-14 Thread Dmitry Torokhov
On Wed, Aug 14, 2019 at 06:57:55PM +0200, Jonas Gorski wrote: > On Wed, 14 Aug 2019 at 16:37, Thomas Bogendoerfer > wrote: > > > > On Wed, 14 Aug 2019 15:20:14 +0200 > > Jonas Gorski wrote: > > > > > > + d = devm_kzalloc(&pdev->dev, sizeof(*d), GFP_KERNEL); > > > > > > &pdev->dev => dev >

[PATCH] cx82310_eth: fix a memory leak bug

2019-08-14 Thread Wenwen Wang
In cx82310_bind(), 'dev->partial_data' is allocated through kmalloc(). Then, the execution waits for the firmware to become ready. If the firmware is not ready in time, the execution is terminated. However, the allocated 'dev->partial_data' is not deallocated on this path, leading to a memory leak

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

2019-08-14 Thread santosh . shilimkar
On 8/14/19 8:56 AM, Doug Ledford wrote: On Tue, 2019-08-13 at 11:20 -0700, 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 f

Re: [PATCH v4 12/14] net: phy: adin: implement downshift configuration via phy-tunable

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > Down-speed auto-negotiation may not always be enabled, in which case the > PHY won't down-shift to 100 or 10 during auto-negotiation. > > This change enables downshift and configures the number of retries to > default 4 (which is also in the dat

Re: [PATCH bpf-next v2] net: Don't call XDP_SETUP_PROG when nothing is changed

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 7:34, Maxim Mikityanskiy wrote: > Don't uninstall an XDP program when none is installed, and don't install > an XDP program that has the same ID as the one already installed. > > dev_change_xdp_fd doesn't perform any checks in case it uninstalls an > XDP program. It means tha

Re: [PATCH v4 11/14] net: phy: adin: implement Energy Detect Powerdown mode

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The ADIN PHYs support Energy Detect Powerdown mode, which puts the PHY into > a low power mode when there is no signal on the wire (typically cable > unplugged). > This behavior is enabled by default, but can be disabled via device > property. W

Re: [PATCH v4 09/14] net: phy: adin: add EEE translation layer from Clause 45 to Clause 22

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The ADIN1200 & ADIN1300 PHYs support EEE by using standard Clause 45 access > to access MMD registers for EEE. > > The EEE register addresses (when using Clause 22) are available at > different addresses (than Clause 45), and since accessing the

Re: [PATCH v4 08/14] net: phy: adin: add support MDI/MDIX/Auto-MDI selection

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The ADIN PHYs support automatic MDI/MDIX negotiation. By default this is > disabled, so this is enabled at `config_init`. > > This is controlled via the PHY Control 1 register. > The supported modes are: > 1. Manual MDI > 2. Manual MDIX >

Re: [PATCH v4 07/14] net: phy: adin: make RMII fifo depth configurable

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The FIFO depth can be configured for the RMII mode. This change adds > support for doing this via device-tree (or ACPI). > > Reviewed-by: Andrew Lunn > Signed-off-by: Alexandru Ardelean Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 06/14] net: phy: adin: make RGMII internal delays configurable

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The internal delays for the RGMII are configurable for both RX & TX. This > change adds support for configuring them via device-tree (or ACPI). > > Reviewed-by: Andrew Lunn > Signed-off-by: Alexandru Ardelean Reviewed-by: Florian Fainelli --

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

2019-08-14 Thread Andy Lutomirski
On Tue, Aug 13, 2019 at 5:57 PM Alexei Starovoitov wrote: > hmm. No. Kernel developers should not make any assumptions. > They should guide their design by real use cases instead. That includes > studing > what people do now and hacks they use to workaround lack of interfaces. > Effecitvely bpf

Re: [PATCH v4 05/14] net: phy: adin: configure RGMII/RMII/MII modes on config

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The ADIN1300 chip supports RGMII, RMII & MII modes. Default (if > unconfigured) is RGMII. > This change adds support for configuring these modes via the device > registers. > > For RGMII with internal delays (modes RGMII_ID,RGMII_TXID, RGMII_RXI

Re: [PATCH v4 04/14] net: phy: adin: add {write,read}_mmd hooks

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > Both ADIN1200 & ADIN1300 support Clause 45 access for some registers. > The Extended Management Interface (EMI) registers are accessible via both > Clause 45 (at register MDIO_MMD_VEND1) and using Clause 22. > > The Clause 22 access for MMD regs

Re: [PATCH v4 03/14] net: phy: adin: add support for interrupts

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > This change hooks link-status-change interrupts to phylib. > > Reviewed-by: Andrew Lunn > Signed-off-by: Alexandru Ardelean Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 02/14] net: phy: adin: hook genphy_{suspend,resume} into the driver

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > The chip supports standard suspend/resume via BMCR reg. > Hook these functions into the `adin` driver. > > Reviewed-by: Andrew Lunn > Signed-off-by: Alexandru Ardelean Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 01/14] net: phy: adin: add support for Analog Devices PHYs

2019-08-14 Thread Florian Fainelli
On 8/12/2019 4:23 AM, Alexandru Ardelean wrote: > This change adds support for Analog Devices Industrial Ethernet PHYs. > Particularly the PHYs this driver adds support for: > * ADIN1200 - Robust, Industrial, Low Power 10/100 Ethernet PHY > * ADIN1300 - Robust, Industrial, Low Latency 10/100/1

[PATCH] net: usbnet: fix a memory leak bug

2019-08-14 Thread Wenwen Wang
In usbnet_start_xmit(), 'urb->sg' is allocated through kmalloc_array() by invoking build_dma_sg(). Later on, if 'CONFIG_PM' is defined and the if branch is taken, the execution will go to the label 'deferred'. However, 'urb->sg' is not deallocated on this execution path, leading to a memory leak bu

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

2019-08-14 Thread Gerd Rausch
Hi Doug, On 14/08/2019 08.56, Doug Ledford wrote: > Good Lord...RDS was taken into the kernel in Feb of 2009, so over 10 > years ago. The patch to put PF_RDS/AF_RDS/SOL_RDS was taken into > include/linux/socket.h Feb 26, 2009. The RDS ports were allocated by > IANA on Feb 27 and May 20, 2009. A

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

2019-08-14 Thread Stanislav Fomichev
Sync new sk storage clone flag. Cc: Martin KaFai Lau Cc: Yonghong Song Acked-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include

[PATCH bpf-next v4 4/4] selftests/bpf: add sockopt clone/inheritance test

2019-08-14 Thread Stanislav Fomichev
Add a test that calls setsockopt on the listener socket which triggers BPF program. This BPF program writes to the sk storage and sets clone flag. Make sure that sk storage is cloned for a newly accepted connection. We have two cloned maps in the tests to make sure we hit both cases in bpf_sk_stor

[PATCH bpf-next v4 1/4] bpf: export bpf_map_inc_not_zero

2019-08-14 Thread Stanislav Fomichev
Rename existing bpf_map_inc_not_zero to __bpf_map_inc_not_zero to indicate that it's caller's responsibility to do proper locking. Create and export bpf_map_inc_not_zero wrapper that properly locks map_idr_lock. Will be used in the next commit to hold a map while cloning a socket. Cc: Martin KaFai

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

2019-08-14 Thread Stanislav Fomichev
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 Acked-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Stanislav Fomichev --- include/net/bpf_sk_storage.h | 10 include/uapi/linux/b

[PATCH bpf-next v4 0/4] bpf: support cloning sk storage on accept()

2019-08-14 Thread Stanislav Fomichev
Currently there is no way to propagate sk storage from the listener socket to a newly accepted one. Consider the following use case: fd = socket(); setsockopt(fd, SOL_IP, IP_TOS,...); /* ^^^ setsockopt BPF program triggers here and saves something * into sk storage

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

2019-08-14 Thread Stanislav Fomichev
On Wed, Aug 14, 2019 at 10:28 AM Martin Lau wrote: > > On Tue, Aug 13, 2019 at 09:26:28AM -0700, Stanislav Fomichev wrote: > > Add new helper bpf_sk_storage_clone which optionally clones sk storage > > and call it from sk_clone_lock. > Acked-by: Martin KaFai Lau Thanks! Will send out a v4 to addr

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

2019-08-14 Thread Martin Lau
On Tue, Aug 13, 2019 at 09:26:28AM -0700, Stanislav Fomichev wrote: > Add new helper bpf_sk_storage_clone which optionally clones sk storage > and call it from sk_clone_lock. Acked-by: Martin KaFai Lau

Re: fallout from net-next netfilter changes

2019-08-14 Thread Pablo Neira Ayuso
On Wed, Aug 14, 2019 at 07:27:58PM +0200, Pablo Neira Ayuso wrote: > On Wed, Aug 14, 2019 at 12:53:30PM -0400, David Miller wrote: > > > > This started happening after Jakub's pull of your net-next changes > > yesterday: > > > > ./include/uapi/linux/netfilter_ipv6/ip6t_LOG.h:5:2: warning: #warnin

Re: fallout from net-next netfilter changes

2019-08-14 Thread Pablo Neira Ayuso
On Wed, Aug 14, 2019 at 12:53:30PM -0400, David Miller wrote: > > This started happening after Jakub's pull of your net-next changes > yesterday: > > ./include/uapi/linux/netfilter_ipv6/ip6t_LOG.h:5:2: warning: #warning "Please > update iptables, this file will be removed soon!" [-Wcpp] > #warn

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

2019-08-14 Thread Andrii Nakryiko
On Wed, Aug 14, 2019 at 12:12 AM Andrey Ignatov wrote: > > Andrii Nakryiko [Tue, 2019-08-13 21:46 -0700]: > > 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 an

Re: [PATCH net-next] net: phy: realtek: add NBase-T PHY auto-detection

2019-08-14 Thread David Miller
From: Heiner Kallweit Date: Tue, 13 Aug 2019 08:09:32 +0200 > Realtek provided information on how the new NIC-integrated PHY's > expose whether they support 2.5G/5G/10G. This allows to automatically > differentiate 1Gbps and 2.5Gbps PHY's, and therefore allows to > remove the fake PHY ID mechanis

[PATCH net-next v2 4/4] net: bridge: mdb: allow add/delete for host-joined groups

2019-08-14 Thread Nikolay Aleksandrov
Currently this is needed only for user-space compatibility, so similar object adds/deletes as the dumped ones would succeed. Later it can be used for L2 mcast MAC add/delete. v2: don't send a notification when used from user-space, arm the group timer if no ports are left after host entry del

[PATCH net-next v2 1/4] net: bridge: mdb: move vlan comments

2019-08-14 Thread Nikolay Aleksandrov
Trivial patch to move the vlan comments in their proper places above the vid 0 checks. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 428af1abf8cc..ee6208c

[PATCH net-next v2 0/4] net: bridge: mdb: allow dump/add/del of host-joined entries

2019-08-14 Thread Nikolay Aleksandrov
Hi, This set makes the bridge dump host-joined mdb entries, they should be treated as normal entries since they take a slot and are aging out. We already have notifications for them but we couldn't dump them until now so they remained hidden. We dump them similar to how they're notified, in order t

[PATCH net-next v2 2/4] net: bridge: mdb: factor out mdb filling

2019-08-14 Thread Nikolay Aleksandrov
We have to factor out the mdb fill portion in order to re-use it later for the bridge mdb entries. No functional changes intended. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 68 - 1 file changed, 37 insertions(+), 31 deletions(-) dif

Re: [PATCH] MAINTAINERS: net_failover: Fix typo in a filepath

2019-08-14 Thread David Miller
From: Denis Efremov Date: Tue, 13 Aug 2019 09:05:30 +0300 > Replace "driver" with "drivers" in the filepath to net_failover.c > > Cc: Sridhar Samudrala > Cc: David S. Miller > Cc: netdev@vger.kernel.org > Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") > Signed-off-by: Denis Efremov

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

2019-08-14 Thread Stanislav Fomichev
On 08/13, Toshiaki Makita wrote: > * Implementation > > xdp_flow makes use of UMH to load an eBPF program for XDP, similar to > bpfilter. The difference is that xdp_flow does not generate the eBPF > program dynamically but a prebuilt program is embedded in UMH. This is > mainly because flow insert

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

2019-08-14 Thread Jakub Kicinski
On Wed, 14 Aug 2019 05:31:54 +, John Fastabend wrote: > 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_

[PATCH net-next] selftests: Fix get_ifidx and callers in nettest.c

2019-08-14 Thread David Ahern
From: David Ahern Dan reported: The patch acda655fefae: "selftests: Add nettest" from Aug 1, 2019, leads to the following static checker warning: ./tools/testing/selftests/net/nettest.c:1690 main() warn: unsigned 'tmp' is never less than zero. ./tools/testin

Re: fallout from net-next netfilter changes

2019-08-14 Thread Florian Westphal
David Miller wrote: > This started happening after Jakub's pull of your net-next changes > yesterday: > > ./include/uapi/linux/netfilter_ipv6/ip6t_LOG.h:5:2: warning: #warning "Please > update iptables, this file will be removed soon!" [-Wcpp] > #warning "Please update iptables, this file will

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

2019-08-14 Thread Edward Cree
On 14/08/2019 17:58, Quentin Monnet wrote: > 2019-08-14 17:45 UTC+0100 ~ Edward Cree >> This might be a really dumb suggestion, but: you're wanting to collect a >>  summary statistic over an in-kernel data structure in a single syscall, >>  because making a series of syscalls to examine every entr

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

2019-08-14 Thread Quentin Monnet
2019-08-14 09:58 UTC-0700 ~ Alexei Starovoitov > On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote: >> >> On 14/08/2019 10:42, Quentin Monnet wrote: >>> 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov >>> The same can be achieved by 'bpftool map dump|grep key|wc -l', no? >>> To some extent (

Re: [PATCH bpf-next 1/4] selftests/bpf: test_progs: change formatting of the condenced output

2019-08-14 Thread Stanislav Fomichev
On 08/14, Alexei Starovoitov wrote: > On Wed, Aug 14, 2019 at 9:47 AM Stanislav Fomichev wrote: > > > > This makes it visually simpler to follow the output. > > Also, highlight with red color failures when outputting to tty. > > > > Before: > > #1 attach_probe:FAIL > > #2 bpf_obj_id:OK > > #

[PATCH net-next v2 3/4] net: bridge: mdb: dump host-joined entries as well

2019-08-14 Thread Nikolay Aleksandrov
Currently we dump only the port mdb entries but we can have host-joined entries on the bridge itself and they should be treated as normal temp mdbs, they're already notified: $ bridge monitor all [MDB]dev br0 port br0 grp ff02::8 temp The group will not be shown in the bridge mdb output, but it ta

Re: [PATCH AUTOSEL 4.19 04/42] netfilter: conntrack: always store window size un-scaled

2019-08-14 Thread Sasha Levin
On Wed, Aug 14, 2019 at 01:17:30PM +0200, Jakub Jankowski wrote: On 2019-08-14, Reindl Harald wrote: that's still not in 5.2.8 It will make its way into next 5.2.x release, as it is now in the pending queue: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5

Re: [PATCH bpf-next 1/4] selftests/bpf: test_progs: change formatting of the condenced output

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 9:47 AM Stanislav Fomichev wrote: > > This makes it visually simpler to follow the output. > Also, highlight with red color failures when outputting to tty. > > Before: > #1 attach_probe:FAIL > #2 bpf_obj_id:OK > #3/1 bpf_verif_scale:loop3.o:OK > #3/2 bpf_verif_scal

Re: [PATCH net] ipv6: Fix return value of ipv6_mc_may_pull() for malformed packets

2019-08-14 Thread David Miller
From: Stefano Brivio Date: Tue, 13 Aug 2019 00:46:01 +0200 > Commit ba5ea614622d ("bridge: simplify ip_mc_check_igmp() and > ipv6_mc_check_mld() calls") replaces direct calls to pskb_may_pull() > in br_ipv6_multicast_mld2_report() with calls to ipv6_mc_may_pull(), > that returns -EINVAL on buffer

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

2019-08-14 Thread Nikolay Aleksandrov
On 8/14/19 7:40 PM, Patrick Ruddy wrote: > Thanks both for the quick replies, answers inline... > > On Wed, 2019-08-14 at 02:55 +0300, Nikolay Aleksandrov wrote: >> On 8/13/19 10:53 PM, Ido Schimmel wrote: >>> + Bridge maintainers, Linus >>> >> >> Good catch Ido, thanks! >> First I'd say the subje

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

2019-08-14 Thread Quentin Monnet
2019-08-14 17:45 UTC+0100 ~ Edward Cree > On 14/08/2019 10:42, Quentin Monnet wrote: >> 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov >> >>> The same can be achieved by 'bpftool map dump|grep key|wc -l', no? >> To some extent (with subtleties for some other map types); and we use a >> similar co

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

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote: > > On 14/08/2019 10:42, Quentin Monnet wrote: > > 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov > > > >> The same can be achieved by 'bpftool map dump|grep key|wc -l', no? > > To some extent (with subtleties for some other map types); and we us

  1   2   >