Re: [PATCH] samples: bpf: fix style in bpf_load

2019-05-22 Thread Jakub Sitnicki
On Wed, May 22, 2019 at 02:24 AM CEST, Daniel T. Lee wrote: > This commit fixes style problem in samples/bpf/bpf_load.c > > Styles that have been changed are: > - Magic string use of 'DEBUGFS' > - Useless zero initialization of a global variable > - Minor style fix with whitespace > > Signed-off

DSA setup IMX6ULL and Marvell 88E6390 with 2 Ethernet Phys - CPU Port is not working

2019-05-22 Thread Benjamin Beckmeyer
Hi all, I'm currently working on a custom board with the imx6ull processor and the 6390 switching chip. This is our hardware setup. - -MAC | i.MX | MAC | PHY | PHY | PHY || 88E6390 | | 6ULL |-|KSZ8081

[PATCH] mISDN: make sure device name is NUL terminated

2019-05-22 Thread Dan Carpenter
The user can change the device_name with the IMSETDEVNAME ioctl, but we need to ensure that the user's name is NUL terminated. Otherwise it could result in a buffer overflow when we copy the name back to the user with IMGETDEVINFO ioctl. I also changed two strcpy() calls which handle the name to

Re: [PATCH net] net: sched: sch_ingress: do not report ingress filter info in egress path

2019-05-22 Thread Davide Caratti
On Tue, 2019-05-21 at 14:59 +0200, Lorenzo Bianconi wrote: > Currently if we add a filter to the ingress qdisc (e.g matchall) the > filter data are reported even in the egress path. The issue can be > triggered with the following reproducer: > > $tc qdisc add dev lo ingress > $tc filter add dev lo

[PATCH bpf] selftests: bpf: add zero extend checks for ALU32 and/or/xor

2019-05-22 Thread Björn Töpel
Add three tests to test_verifier/basic_instr that make sure that the high 32-bits of the destination register is cleared after an ALU32 and/or/xor. Signed-off-by: Björn Töpel --- .../selftests/bpf/verifier/basic_instr.c | 39 +++ 1 file changed, 39 insertions(+) diff --git

[bpf PATCH] bpf: sockmap, restore sk_write_space when psock gets dropped

2019-05-22 Thread Jakub Sitnicki
Once psock gets unlinked from its sock (sk_psock_drop), user-space can still trigger a call to sk->sk_write_space by setting TCP_NOTSENT_LOWAT socket option. This causes a null-ptr-deref because we try to read psock->saved_write_space from sk_psock_write_space:

Re: [PATCH net] net: sched: sch_ingress: do not report ingress filter info in egress path

2019-05-22 Thread Lorenzo Bianconi
> On Tue, 2019-05-21 at 14:59 +0200, Lorenzo Bianconi wrote: > > Currently if we add a filter to the ingress qdisc (e.g matchall) the > > filter data are reported even in the egress path. The issue can be > > triggered with the following reproducer: > > [...] > > diff --git a/net/sched/sch_ingre

[No Subject]

2019-05-22 Thread Gardner, Tim
We are now providing business & personal loans: -Rate starting at: 2.05%. -Flexible repayment: up to 30 years. For more information and application, please reply. > To unsubscribe please reply with "unsubscribe" as subject.

Re: [Intel-wired-lan] [PATCH] e1000e: Work around hardware unit hang by disabling TSO

2019-05-22 Thread Neftin, Sasha
On 5/21/2019 18:42, Juliana Rodrigueiro wrote: So I ask myself, how actually feasible is it to gamble the usage of "ethtool" to turn on or off TSO every time the network configuration changes? Hello Juliana, There are many PCH2 devices with different SKU's. Not all devices have this problem (T

Re: [PATCH net] net: sched: sch_ingress: do not report ingress filter info in egress path

2019-05-22 Thread Daniel Borkmann
On 05/22/2019 12:20 PM, Lorenzo Bianconi wrote: >> On Tue, 2019-05-21 at 14:59 +0200, Lorenzo Bianconi wrote: >>> Currently if we add a filter to the ingress qdisc (e.g matchall) the >>> filter data are reported even in the egress path. The issue can be >>> triggered with the following reproducer:

Re: [PATCH net] sk_msg: Keep reference on socket file while psock lives

2019-05-22 Thread Jakub Sitnicki
Hi John, On Tue, May 21, 2019 at 10:07 PM CEST, John Fastabend wrote: > Jakub Sitnicki wrote: >> Hi Daniel, >> >> On Tue, Feb 19, 2019 at 05:00 PM CET, Daniel Borkmann wrote: >> > On 02/11/2019 10:09 AM, Jakub Sitnicki wrote: >> >> Backlog work for psock (sk_psock_backlog) might sleep while waitin

Re: [PATCH net v2 3/3] Documentation: add TLS offload documentation

2019-05-22 Thread Boris Pismenny
Hi Jakub, Thanks for all the fixes. This version is much better. On 5/22/2019 4:57 AM, Jakub Kicinski wrote: > Describe existing kernel TLS offload (added back in Linux 4.19) - > the mechanism, the expected behavior and the notable corner cases. > > This documentation is mostly targeting hardwar

[RFC PATCH 1/1] enic: prvent waking up stopped tx queues during watchdog reset process

2019-05-22 Thread Firo Yang
Our customer reports several kernel crashes all preceding with message of tx queue timed out: NETDEV WATCHDOG: eth2 (enic): transmit queue 0 timed out Error message of one of those crashes: BUG: unable to handle kernel paging request at a007e090 ... Call Trace: [] skb_release_head_state+0x

Re: [PATCH net] net: sched: sch_ingress: do not report ingress filter info in egress path

2019-05-22 Thread Lorenzo Bianconi
> On 05/22/2019 12:20 PM, Lorenzo Bianconi wrote: > >> On Tue, 2019-05-21 at 14:59 +0200, Lorenzo Bianconi wrote: > >>> Currently if we add a filter to the ingress qdisc (e.g matchall) the > >>> filter data are reported even in the egress path. The issue can be > >>> triggered with the following re

Re: stmmac / meson8b-dwmac

2019-05-22 Thread Simon Huelck
Hi, what exactly do you mean with this DT binding ? i cant find this for meson gxbb somewhere in the DTS ? regards, Simon Am 13.05.2019 um 11:07 schrieb Jose Abreu: > From: Simon Huelck > Date: Sat, May 11, 2019 at 15:53:34 > >> ethtool -S gave me some counts for mmc_rx_fifo_overflow, which i

[PATCH bpf-next 0/2] net: xdp: refactor the XDP_QUERY_PROG and XDP_QUERY_PROG_HW code

2019-05-22 Thread Björn Töpel
Here's another attempt (the first, horribly broken one, here [1]) to move the XDP_QUERY_PROG{,_HW} code out from the drivers to generic netdev code. The first patch in the series move the XDP query functionality, and the second remove XDP_QUERY_PROG{,_HW} from all drivers. Please refer to the ind

[PATCH bpf-next 2/2] net: xdp: remove XDP_QUERY_PROG{,_HW}

2019-05-22 Thread Björn Töpel
From: Björn Töpel Remove all use of XDP_QUERY_PROG{,_HW}, since it was moved to the generic code path. Signed-off-by: Björn Töpel --- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 .../net/ethernet/cavium/thunder/nicvf_main.c | 3 --- .../net/ethernet/freescale/dpaa2/dpaa2-eth.c |

[PATCH bpf-next 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-05-22 Thread Björn Töpel
From: Björn Töpel All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} command of ndo_bpf. The query code is fairly generic. This commit refactors the query code up from the drivers to the netdev level. The struct net_device has gained four new members tracking the XDP program, the

Re: [PATCH bpf-next 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-05-22 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > From: Björn Töpel > > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} > command of ndo_bpf. The query code is fairly generic. This commit > refactors the query code up from the drivers to the netdev level. > > The struct net_device has gained four new mem

[PATCH bpf-next v2 0/2] net: xdp: Two XSKMAP improvements

2019-05-22 Thread Björn Töpel
This series add two improvements for the XSKMAP, used by AF_XDP sockets. 1. Automatic cleanup when an AF_XDP socket goes out of scope. Instead of manually cleaning out the "released" state socket from the map, this is done automatically. This mimics the SOCKMAP behavior; Each socket track

[PATCH bpf-next v2 2/2] xsk: support BPF_EXIST and BPF_NOEXIST flags in XSKMAP

2019-05-22 Thread Björn Töpel
From: Björn Töpel The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flags when updating an entry. This patch addressed that. Signed-off-by: Björn Töpel --- kernel/bpf/xskmap.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/xskmap.c b/kernel/

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

2019-05-22 Thread Björn Töpel
From: Björn Töpel When an AF_XDP socket is released/closed the XSKMAP still holds a reference to the socket in a "released" state. The socket will still use the netdev queue resource, and block newly created sockets from attaching to that queue, but no user application can access the fill/complet

Re: [PATCH net] ocelot: Dont allocate another multicast list, use __dev_mc_sync

2019-05-22 Thread Alexandre Belloni
On 21/05/2019 19:52:55+0300, Claudiu Manoil wrote: > Doing kmalloc in atomic context is always an issue, > more so for a list that can grow significantly. > Turns out that the driver only uses the duplicated > list of multicast mac addresses to keep track of > what addresses to delete from h/w befo

[PATCH] net: fec: remove redundant ipg clock disable

2019-05-22 Thread Baruch Siach
Don't disable the ipg clock in the regulator error path. The clock is disable unconditionally two lines below the failed_regulator label. Signed-off-by: Baruch Siach --- drivers/net/ethernet/freescale/fec_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fe

Re: stmmac / meson8b-dwmac

2019-05-22 Thread Neil Armstrong
Hi Jose, On 13/05/2019 11:07, Jose Abreu wrote: > From: Simon Huelck > Date: Sat, May 11, 2019 at 15:53:34 > >> ethtool -S gave me some counts for mmc_rx_fifo_overflow, which i didnt >> recognize before. > > Flow Control can prevent this to happen. Please check if your DT FIFO > bindings are >

i.MX8MQ clk: enet1_root_clk already disabled

2019-05-22 Thread Baruch Siach
Hi Abel, I'm testing kernel v5.2-rc1 on my i.MX8MQ system, SolidRun Hummingboard Pulse. The fec driver happens to probe before the gpio driver that we need for the PHY reset. So fec_reset_phy() returns -EPROBE_DEFER. This triggers the splat below when clk_ahb is disabled somewhere below the 'fai

Re: [PATCH net-next] cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size"

2019-05-22 Thread Vishal Kulkarni
Hi David, On Wednesday, May 05/22/19, 2019 at 01:53:31 +0530, David Miller wrote: > From: Vishal Kulkarni > Date: Tue, 21 May 2019 09:12:02 +0530 > > > This reverts commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1 > > SGE's BAR2 Doorbell/GTS Page Size is now interpreted correctly in the > > firmw

Re: [PATCH net-next] cxgb4: Enable hash filter with offload

2019-05-22 Thread Vishal Kulkarni
On Wednesday, May 05/22/19, 2019 at 01:54:10 +0530, David Miller wrote: > From: Vishal Kulkarni > Date: Tue, 21 May 2019 09:10:37 +0530 > > > This patch enables hash filter along with offload > > > > Signed-off-by: Vishal Kulkarni > > This commit message is too terse. > > What is going on her

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Vlad Buslov
On Tue 21 May 2019 at 16:23, Vlad Buslov wrote: > On Tue 21 May 2019 at 15:46, Jamal Hadi Salim wrote: >> On 2019-05-20 5:12 p.m., Jamal Hadi Salim wrote: >>> On 2019-05-20 2:36 p.m., Edward Cree wrote: On 20/05/2019 17:29, Jamal Hadi Salim wrote: >> >>> Ok, so the "get" does it. Will try t

[RFC PATCH net-next] net: sched: don't use tc_action->order during action dump

2019-05-22 Thread Vlad Buslov
Function tcf_action_dump() relies on tc_action->order field when starting nested nla to send action data to userspace. This approach breaks in several cases: - When multiple filters point to same shared action, tc_action->order field is overwritten each time it is attached to filter. This causes

[PATCH bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Andrii Nakryiko
It's easy to have a mismatch of "intended to be public" vs really exposed API functions. While Makefile does check for this mismatch, if it actually occurs it's not trivial to determine which functions are accidentally exposed. This patch dumps out a diff showing what's not supposed to be exposed f

[PATCH net-next v2] cxgb4: Enable hash filter with offload

2019-05-22 Thread Vishal Kulkarni
Hash (exact-match) filters used for offloading flows share the same active region resources on the chip with upper layer drivers, like iw_cxgb4, chcr, etc. Currently, only either Hash filters or ULDs can use the active region resources, but not both. Hence, use the new firmware configuration parame

Re: [PATCH bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Alexei Starovoitov
On 5/22/19 9:15 AM, Andrii Nakryiko wrote: > It's easy to have a mismatch of "intended to be public" vs really > exposed API functions. While Makefile does check for this mismatch, if > it actually occurs it's not trivial to determine which functions are > accidentally exposed. This patch dumps out

Re: DSA setup IMX6ULL and Marvell 88E6390 with 2 Ethernet Phys - CPU Port is not working

2019-05-22 Thread Andrew Lunn
On Wed, May 22, 2019 at 10:33:29AM +0200, Benjamin Beckmeyer wrote: > Hi all, > > I'm currently working on a custom board with the imx6ull processor and the > 6390 > switching chip. This is our hardware setup. > > - -MAC > | i.MX

LPC networking track?

2019-05-22 Thread Jesse Brandeburg
Hi, is there any update on the plan for the networking track at Plumbers (LPC) in Lisbon this year? Last year there was a CFP, but if there was one this year I can't find any mention or details. Should we be assuming we are submitting through the normal LPC channels and timelines for presentation

Re: [PATCH bpf-next v2 0/3] bpf: implement bpf_send_signal() helper

2019-05-22 Thread Stanislav Fomichev
On 05/21, Yonghong Song wrote: > This patch tries to solve the following specific use case. > > Currently, bpf program can already collect stack traces > through kernel function get_perf_callchain() > when certain events happens (e.g., cache miss counter or > cpu clock counter overflows). But such

Re: [PATCH bpf-next v2 0/3] bpf: implement bpf_send_signal() helper

2019-05-22 Thread Alexei Starovoitov
On 5/22/19 9:38 AM, Stanislav Fomichev wrote: > On 05/21, Yonghong Song wrote: >> This patch tries to solve the following specific use case. >> >> Currently, bpf program can already collect stack traces >> through kernel function get_perf_callchain() >> when certain events happens (e.g., cache miss

Re: [PATCH bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Stanislav Fomichev
On 05/22, Alexei Starovoitov wrote: > On 5/22/19 9:15 AM, Andrii Nakryiko wrote: > > It's easy to have a mismatch of "intended to be public" vs really > > exposed API functions. While Makefile does check for this mismatch, if > > it actually occurs it's not trivial to determine which functions are

Re: [PATCH rdma-next v2 05/17] RDMA/counter: Add set/clear per-port auto mode support

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:41AM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > Add an API to support set/clear per-port auto mode. > > Signed-off-by: Mark Zhang > Reviewed-by: Majd Dibbiny > Signed-off-by: Leon Romanovsky > drivers/infiniband/core/Makefile | 2 +- > drivers/infin

Re: [bpf PATCH v4 1/4] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-05-22 Thread Jakub Kicinski
On Thu, 09 May 2019 21:57:49 -0700, John Fastabend wrote: > It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE > state via tcp_disconnect() without calling into close callback. This > would allow a kTLS enabled socket to exist outside of ESTABLISHED > state which is not supported

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > Since a QP can only be bound to one counter, then if it is bound to a > separate counter, for backward compatibility purpose, the statistic > value must be: > * stat of default counter > + stat of all running

Re: LPC networking track?

2019-05-22 Thread David Miller
From: Jesse Brandeburg Date: Wed, 22 May 2019 09:36:44 -0700 > Hi, is there any update on the plan for the networking track at > Plumbers (LPC) in Lisbon this year? Last year there was a CFP, but if > there was one this year I can't find any mention or details. We are assembling the tech commit

Re: [PATCH bpf-next v2 0/3] bpf: implement bpf_send_signal() helper

2019-05-22 Thread Stanislav Fomichev
On 05/22, Alexei Starovoitov wrote: > On 5/22/19 9:38 AM, Stanislav Fomichev wrote: > > On 05/21, Yonghong Song wrote: > >> This patch tries to solve the following specific use case. > >> > >> Currently, bpf program can already collect stack traces > >> through kernel function get_perf_callchain()

Re: [PATCH rdma-next v2 06/17] RDMA/counter: Add "auto" configuration mode support

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:42AM +0300, Leon Romanovsky wrote: > void rdma_counter_init(struct ib_device *dev) > { > struct rdma_port_counter *port_counter; > diff --git a/drivers/infiniband/core/device.c > b/drivers/infiniband/core/device.c > index 9204b4251fc8..dfaa57de871f 100644 > +

Re: [PATCH rdma-next v2 06/17] RDMA/counter: Add "auto" configuration mode support

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:42AM +0300, Leon Romanovsky wrote: > +/** > + * rdma_counter_unbind_qp - Unbind a qp from a counter > + * @force: > + * true - Decrease the counter ref-count anyway (e.g., qp destroy) > + */ > +int rdma_counter_unbind_qp(struct ib_qp *qp, bool force) > +{ > + st

Re: [PATCH rdma-next v2 11/17] RDMA/netlink: Implement counter dumpit calback

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:47AM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > This patch adds the ability to return all available counters > together with their properties and hwstats. > > Signed-off-by: Mark Zhang > Reviewed-by: Majd Dibbiny > Signed-off-by: Leon Romanovsky > driv

Re: [PATCH rdma-next v2 11/17] RDMA/netlink: Implement counter dumpit calback

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:47AM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > This patch adds the ability to return all available counters > together with their properties and hwstats. > > Signed-off-by: Mark Zhang > Reviewed-by: Majd Dibbiny > Signed-off-by: Leon Romanovsky > driv

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Jamal Hadi Salim
On 2019-05-22 11:08 a.m., Vlad Buslov wrote: On Tue 21 May 2019 at 16:23, Vlad Buslov wrote: It seems that culprit in this case is tc_action->order field. It is used as nla attrtype when dumping actions. Initially it is set according to ordering of actions of filter that creates them. Howev

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > diff --git a/drivers/infiniband/core/device.c > b/drivers/infiniband/core/device.c > index c56ffc61ab1e..8ae4906a60e7 100644 > +++ b/drivers/infiniband/core/device.c > @@ -1255,7 +1255,11 @@ int ib_register_device(struct ib_device

Re: [PATCH rdma-next v2 17/17] RDMA/nldev: Allow get default counter statistics through RDMA netlink

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:53AM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > This patch adds the ability to return the hwstats of per-port default > counters (which can also be queried through sysfs nodes). > > Signed-off-by: Mark Zhang > Signed-off-by: Leon Romanovsky > drivers/in

Re: [PATCH rdma-next v2 00/17] Statistics counter support

2019-05-22 Thread Jason Gunthorpe
On Mon, Apr 29, 2019 at 11:34:36AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > v1 -> v2: > * Rebased to latest rdma-next > v0 -> v1: > * Changed wording of counter comment > * Removed unneeded assignments > * Added extra patch to present global counters > > * I

Re: [PATCH net-next 0/4] phylink/sfp updates

2019-05-22 Thread David Miller
From: Russell King - ARM Linux admin Date: Mon, 20 May 2019 16:21:34 +0100 > I realise that net-next probably isn't open yet, but I believe folk > will find these patches "interesting" so I'm sending them to share > them with people working on this code, rather than expecting them to > be picked

Re: [PATCH bpf-next 0/2] net: xdp: refactor the XDP_QUERY_PROG and XDP_QUERY_PROG_HW code

2019-05-22 Thread Jakub Kicinski
On Wed, 22 May 2019 14:53:50 +0200, Björn Töpel wrote: > Shout out to all XDP driver hackers to check that the second patch > doesn't break anything (especially Jakub). I've only been able to test > on the Intel NICs. Please test XDP offload on netdevsim, that's why we have it! :) At the minimum p

Re: [PATCH bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Andrii Nakryiko
On Wed, May 22, 2019 at 9:21 AM Alexei Starovoitov wrote: > > On 5/22/19 9:15 AM, Andrii Nakryiko wrote: > > It's easy to have a mismatch of "intended to be public" vs really > > exposed API functions. While Makefile does check for this mismatch, if > > it actually occurs it's not trivial to deter

Re: [PATCH bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Andrii Nakryiko
On Wed, May 22, 2019 at 9:46 AM Stanislav Fomichev wrote: > > On 05/22, Alexei Starovoitov wrote: > > On 5/22/19 9:15 AM, Andrii Nakryiko wrote: > > > It's easy to have a mismatch of "intended to be public" vs really > > > exposed API functions. While Makefile does check for this mismatch, if > >

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Vlad Buslov
On Wed 22 May 2019 at 20:24, Jamal Hadi Salim wrote: > On 2019-05-22 11:08 a.m., Vlad Buslov wrote: >> >> On Tue 21 May 2019 at 16:23, Vlad Buslov wrote: > >> >> It seems that culprit in this case is tc_action->order field. It is used >> as nla attrtype when dumping actions. Initially it is set

[PATCH v2 bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Andrii Nakryiko
It's easy to have a mismatch of "intended to be public" vs really exposed API functions. While Makefile does check for this mismatch, if it actually occurs it's not trivial to determine which functions are accidentally exposed. This patch dumps out a diff showing what's not supposed to be exposed f

Re: [PATCH bpf-next] libbpf: emit diff of mismatched public API, if any

2019-05-22 Thread Stanislav Fomichev
On 05/22, Andrii Nakryiko wrote: > On Wed, May 22, 2019 at 9:46 AM Stanislav Fomichev wrote: > > > > On 05/22, Alexei Starovoitov wrote: > > > On 5/22/19 9:15 AM, Andrii Nakryiko wrote: > > > > It's easy to have a mismatch of "intended to be public" vs really > > > > exposed API functions. While M

Re: [PATCH bpf] selftests: bpf: add zero extend checks for ALU32 and/or/xor

2019-05-22 Thread Y Song
On Wed, May 22, 2019 at 2:25 AM Björn Töpel wrote: > > Add three tests to test_verifier/basic_instr that make sure that the > high 32-bits of the destination register is cleared after an ALU32 > and/or/xor. > > Signed-off-by: Björn Töpel I think the patch intends for bpf-next, right? The patch i

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Jamal Hadi Salim
On 2019-05-22 1:49 p.m., Vlad Buslov wrote: On Wed 22 May 2019 at 20:24, Jamal Hadi Salim wrote: Ok, thanks for chasing this. A test case i had in mind is to maybe have 3 actions. Add the drop in the middle for one and at the begging for another and see if they are visible with the patch. If

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Jamal Hadi Salim
On 2019-05-22 2:23 p.m., Jamal Hadi Salim wrote: On 2019-05-22 1:49 p.m., Vlad Buslov wrote: On Wed 22 May 2019 at 20:24, Jamal Hadi Salim wrote: Ok, thanks for chasing this. A test case i had in mind is to maybe have 3 actions. Add the drop in the middle for one and at the begging for anot

Re: [PATCH bpf-next 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-05-22 Thread Jakub Kicinski
On Wed, 22 May 2019 14:53:51 +0200, Björn Töpel wrote: > From: Björn Töpel > > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} > command of ndo_bpf. The query code is fairly generic. This commit > refactors the query code up from the drivers to the netdev level. > > The struct

[PATCH net-next 0/2] net: phy: T1 support

2019-05-22 Thread Andrew Lunn
T1 PHYs make use of a single twisted pair, rather than the traditional 2 pair for 100BaseT or 4 pair for 1000BaseT. This patchset adds link modes for 100BaseT1 and 1000BaseT1, and them makes use of 100BaseT1 in the list of PHY features used by current T1 drivers. --- The NXP PHY TJA1100 and TJA11

Re: [PATCH bpf-next v2 3/3] tools/bpf: add a selftest for bpf_send_signal() helper

2019-05-22 Thread Andrii Nakryiko
On Tue, May 21, 2019 at 10:40 PM Yonghong Song wrote: > > The test covered both nmi and tracepoint perf events. > $ ./test_send_signal_user > test_send_signal (tracepoint): OK > test_send_signal (perf_event): OK > > Signed-off-by: Yonghong Song > --- > tools/testing/selftests/bpf/Makefile

[PATCH net-next v2 4/8] net: phy: dp83867: Rework delay rgmii delay handling

2019-05-22 Thread Trent Piepho
The code was assuming the reset default of the delay control register was to have delay disabled. This is what the datasheet shows as the register's initial value. However, that's not actually true: the default is controlled by the PHY's pin strapping. If the interface mode is selected as RX or

[PATCH net-next v2 2/8] dt-bindings: phy: dp83867: Add documentation for disabling clock output

2019-05-22 Thread Trent Piepho
The clock output is generally only used for testing and development and not used to daisy-chain PHYs. It's just a source of RF noise afterward. Add a mux value for "off". I've added it as another enumeration to the output property. In the actual PHY, the mux and the output enable are independen

[PATCH net-next v2 1/8] dt-bindings: phy: dp83867: Describe how driver behaves w.r.t rgmii delay

2019-05-22 Thread Trent Piepho
Add a note to make it more clear how the driver behaves when "rgmii" vs "rgmii-id", "rgmii-idrx", or "rgmii-idtx" interface modes are selected. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Trent Piepho --- Notes: Changes from v1: Clarify behavior may change to enforce no delay in

[PATCH net-next v2 3/8] net: phy: dp83867: Add ability to disable output clock

2019-05-22 Thread Trent Piepho
Generally, the output clock pin is only used for testing and only serves as a source of RF noise after this. It could be used to daisy-chain PHYs, but this is uncommon. Since the PHY can disable the output, make doing so an option. I do this by adding another enumeration to the allowed values of

[PATCH net-next 2/2] net: phy: Make phy_basic_t1_features use base100t1.

2019-05-22 Thread Andrew Lunn
Now that there is a link mode for 100BaseT1, use it in phy_basic_t1_features so T1 PHY drivers will indicate this mode via the Ethtool API. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c

[PATCH net-next v2 5/8] net: phy: dp83867: Use unsigned variables to store unsigned properties

2019-05-22 Thread Trent Piepho
The variables used to store u32 DT properties were signed ints. This doesn't work properly if the value of the property were to overflow. Use unsigned variables so this doesn't happen. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho --- drivers/net/phy/dp

[PATCH net-next v2 7/8] net: phy: dp83867: Validate FIFO depth property

2019-05-22 Thread Trent Piepho
Insure property is in valid range and fail when reading DT if it is not. Also add error message for existing failure if required property is not present. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho --- Notes: Changes from v1: New patch in ser

[PATCH net-next v2 8/8] net: phy: dp83867: Allocate state struct in probe

2019-05-22 Thread Trent Piepho
This was being done in config the first time the phy was configured. Should be in the probe method. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho --- Notes: Changes from v1: New patch in series v2 drivers/net/phy/dp83867.c | 33 ++

[PATCH net-next v2 6/8] net: phy: dp83867: IO impedance is not dependent on RGMII delay

2019-05-22 Thread Trent Piepho
The driver would only set the IO impedance value when RGMII internal delays were enabled. There is no reason for this. Move the IO impedance block out of the RGMII delay block. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho --- Notes: Changes from v

[PATCH net-next 1/2] net: phy: Add support for 100BaseT1 and 1000BaseT1

2019-05-22 Thread Andrew Lunn
Add link modes for 100Mbps and 1Gbps over a single pair. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy-core.c | 4 +++- include/uapi/linux/ethtool.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c index 3daf0214

Re: [PATCH net-next v2 3/8] net: phy: dp83867: Add ability to disable output clock

2019-05-22 Thread Andrew Lunn
On Wed, May 22, 2019 at 06:43:22PM +, Trent Piepho wrote: > Generally, the output clock pin is only used for testing and only serves > as a source of RF noise after this. It could be used to daisy-chain > PHYs, but this is uncommon. Since the PHY can disable the output, make > doing so an opt

Re: [PATCH iproute2 v2] m_mirred: don't bail if the control action is missing

2019-05-22 Thread Stephen Hemminger
On Mon, 20 May 2019 11:56:52 +0200 Paolo Abeni wrote: > The mirred act admits an optional control action, defaulting > to TC_ACT_PIPE. The parsing code currently emits an error message > if the control action is not provided on the command line, even > if the command itself completes with no erro

Re: [PATCH net-next v2 4/8] net: phy: dp83867: Rework delay rgmii delay handling

2019-05-22 Thread Andrew Lunn
On Wed, May 22, 2019 at 06:43:23PM +, Trent Piepho wrote: > The code was assuming the reset default of the delay control register > was to have delay disabled. This is what the datasheet shows as the > register's initial value. However, that's not actually true: the > default is controlled by

[PATCH v7 bpf-next 04/16] bpf: verifier: insert zero extension according to analysis result

2019-05-22 Thread Jiong Wang
After previous patches, verifier will mark a insn if it really needs zero extension on dst_reg. It is then for back-ends to decide how to use such information to eliminate unnecessary zero extension code-gen during JIT compilation. One approach is verifier insert explicit zero extension for those

[PATCH v7 bpf-next 03/16] bpf: introduce new mov32 variant for doing explicit zero extension

2019-05-22 Thread Jiong Wang
The encoding for this new variant is based on BPF_X format. "imm" field was 0 only, now it could be 1 which means doing zero extension unconditionally .code = BPF_ALU | BPF_MOV | BPF_X .dst_reg = DST .src_reg = SRC .imm = 1 We use this new form for doing zero extension for which verifier

[PATCH v7 bpf-next 00/16] bpf: eliminate zero extensions for sub-register writes

2019-05-22 Thread Jiong Wang
v7: - Drop the first patch in v6, the one adding 32-bit return value and argument type. (Alexei) - Rename bpf_jit_hardware_zext to bpf_jit_needs_zext. (Alexei) - Use mov32 with imm == 1 to indicate it is zext. (Alexei) - JIT back-ends peephole next insn to optimize out unnecessary zext

[PATCH v7 bpf-next 01/16] bpf: verifier: mark verified-insn with sub-register zext flag

2019-05-22 Thread Jiong Wang
eBPF ISA specification requires high 32-bit cleared when low 32-bit sub-register is written. This applies to destination register of ALU32 etc. JIT back-ends must guarantee this semantic when doing code-gen. x86_64 and AArch64 ISA has the same semantics, so the corresponding JIT back-end doesn't ne

[PATCH v7 bpf-next 06/16] bpf: verifier: randomize high 32-bit when BPF_F_TEST_RND_HI32 is set

2019-05-22 Thread Jiong Wang
This patch randomizes high 32-bit of a definition when BPF_F_TEST_RND_HI32 is set. Suggested-by: Alexei Starovoitov Signed-off-by: Jiong Wang --- kernel/bpf/verifier.c | 68 ++- 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/kerne

[PATCH v7 bpf-next 14/16] x32: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
Cc: Wang YanQing Tested-by: Wang YanQing Signed-off-by: Jiong Wang --- arch/x86/net/bpf_jit_comp32.c | 83 +-- 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c index b29e82f..133

[PATCH v7 bpf-next 16/16] nfp: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
This patch eliminate zero extension code-gen for instructions including both alu and load/store. The only exception is for ctx load, because offload target doesn't go through host ctx convert logic so we do customized load and ignores zext flag set by verifier. Cc: Jakub Kicinski Reviewed-by: Jak

[PATCH v7 bpf-next 02/16] bpf: verifier: mark patched-insn with sub-register zext flag

2019-05-22 Thread Jiong Wang
Patched insns do not go through generic verification, therefore doesn't has zero extension information collected during insn walking. We don't bother analyze them at the moment, for any sub-register def comes from them, just conservatively mark it as needing zero extension. Signed-off-by: Jiong W

[PATCH v7 bpf-next 07/16] libbpf: add "prog_flags" to bpf_program/bpf_prog_load_attr/bpf_load_program_attr

2019-05-22 Thread Jiong Wang
libbpf doesn't allow passing "prog_flags" during bpf program load in a couple of load related APIs, "bpf_load_program_xattr", "load_program" and "bpf_prog_load_xattr". It makes sense to allow passing "prog_flags" which is useful for customizing program loading. Reviewed-by: Jakub Kicinski Signed

[PATCH v7 bpf-next 13/16] sparc: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
Cc: David S. Miller Signed-off-by: Jiong Wang --- arch/sparc/net/bpf_jit_comp_64.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c index 65428e7..3364e2a 100644 --- a/arch/sparc

[PATCH v7 bpf-next 12/16] s390: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Jiong Wang --- arch/s390/net/bpf_jit_comp.c | 41 ++--- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 5e7c630..e636728

[PATCH v7 bpf-next 05/16] bpf: introduce new bpf prog load flags "BPF_F_TEST_RND_HI32"

2019-05-22 Thread Jiong Wang
x86_64 and AArch64 perhaps are two arches that running bpf testsuite frequently, however the zero extension insertion pass is not enabled for them because of their hardware support. It is critical to guarantee the pass correction as it is supposed to be enabled at default for a couple of other arc

[PATCH v7 bpf-next 08/16] selftests: bpf: adjust several test_verifier helpers for insn insertion

2019-05-22 Thread Jiong Wang
- bpf_fill_ld_abs_vlan_push_pop: Prevent zext happens inside PUSH_CNT loop. This could happen because of BPF_LD_ABS (32-bit def) + BPF_JMP (64-bit use), or BPF_LD_ABS + EXIT (64-bit use of R0). So, change BPF_JMP to BPF_JMP32 and redefine R0 at exit path to cut off the data-flow f

[PATCH v7 bpf-next 09/16] selftests: bpf: enable hi32 randomization for all tests

2019-05-22 Thread Jiong Wang
The previous libbpf patch allows user to specify "prog_flags" to bpf program load APIs. To enable high 32-bit randomization for a test, we need to set BPF_F_TEST_RND_HI32 in "prog_flags". To enable such randomization for all tests, we need to make sure all places are passing BPF_F_TEST_RND_HI32. C

[PATCH v7 bpf-next 11/16] powerpc: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
Cc: Naveen N. Rao Cc: Sandipan Das Signed-off-by: Jiong Wang --- arch/powerpc/net/bpf_jit_comp64.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c index 21a1dcd..0ebd

[PATCH v7 bpf-next 10/16] arm: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
Cc: Shubham Bansal Signed-off-by: Jiong Wang --- arch/arm/net/bpf_jit_32.c | 42 +++--- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index c8bfbbf..97a6b4b 100644 --- a/arch/arm/net/bpf_j

[PATCH v7 bpf-next 15/16] riscv: bpf: eliminate zero extension code-gen

2019-05-22 Thread Jiong Wang
Cc: Björn Töpel Acked-by: Björn Töpel Tested-by: Björn Töpel Signed-off-by: Jiong Wang --- arch/riscv/net/bpf_jit_comp.c | 43 ++- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/arch/riscv/net/bpf_jit_comp.c b/arch/riscv/net/bpf_jit_comp

Re: [PATCH net v2 3/3] Documentation: add TLS offload documentation

2019-05-22 Thread Jakub Kicinski
On Wed, 22 May 2019 11:25:02 +, Boris Pismenny wrote: > > +Performance metrics > > +=== > > + > > +TLS offload can be characterized by the following basic metrics: > > + > > + * max connection count > > + * connection installation rate > > + * connection installation latency > >

Re: [PATCH net-next v2 5/8] net: phy: dp83867: Use unsigned variables to store unsigned properties

2019-05-22 Thread Andrew Lunn
On Wed, May 22, 2019 at 06:43:24PM +, Trent Piepho wrote: > The variables used to store u32 DT properties were signed ints. This > doesn't work properly if the value of the property were to overflow. > Use unsigned variables so this doesn't happen. > > Cc: Andrew Lunn > Cc: Florian Fainelli

Re: [PATCH net-next v2 6/8] net: phy: dp83867: IO impedance is not dependent on RGMII delay

2019-05-22 Thread Andrew Lunn
On Wed, May 22, 2019 at 06:43:25PM +, Trent Piepho wrote: > The driver would only set the IO impedance value when RGMII internal > delays were enabled. There is no reason for this. Move the IO > impedance block out of the RGMII delay block. > > Cc: Andrew Lunn > Cc: Florian Fainelli > Cc:

[PATCH v2 net-next 0/8] net: Export functions for nexthop code

2019-05-22 Thread David Ahern
From: David Ahern This set exports ipv4 and ipv6 fib functions for use by the nexthop code. It also adds new ones to send route notifications if a nexthop configuration changes. v2 - repost of patches dropped at the end of the last dev window added patch 8 which exports nh_update_mtu since it

[PATCH v2 net-next 2/8] ipv6: Add hook to bump sernum for a route to stubs

2019-05-22 Thread David Ahern
From: David Ahern Add hook to ipv6 stub to bump the sernum up to the root node for a route. This is needed by the nexthop code when a nexthop config changes. Signed-off-by: David Ahern --- include/net/ip6_fib.h| 1 + include/net/ipv6_stubs.h | 1 + net/ipv6/af_inet6.c | 1 + net/ipv6/

[PATCH v2 net-next 4/8] ipv4: Add function to send route updates

2019-05-22 Thread David Ahern
From: David Ahern Add fib_info_notify_update to walk the fib and send RTM_NEWROUTE notifications with NLM_F_REPLACE set for entries linked to a fib_info that have nh_updated flag set. This helper will be used by the nexthop code to notify userspace of routes that are impacted when a nexthop confi

  1   2   3   >