Re: [PATCH] can: flexcan: fix deadlock when using self wakeup

2019-06-11 Thread Sean Nyekjaer
On 11/06/2019 08.58, Joakim Zhang wrote: How is it going with the updated patch? Hi Sean, I still need discuss with Marc about the solution. Joakim Zhang Hi, Joakim Please include me in the loop :-) /Sean

[PATCH net 3/7] selftests: mlxsw: Test nexthop offload indication

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel Test that IPv4 and IPv6 nexthops are correctly marked with offload indication in response to neighbour events. Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/rtnetlink.sh | 47 +++ 1 file changed, 47 insertions(+) diff --git a/tools/testing

[PATCH net 1/7] mlxsw: spectrum: Use different seeds for ECMP and LAG hash

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel The same hash function and seed are used for both ECMP and LAG hash. Therefore, when a LAG device is used as a nexthop device as part of an ECMP group, hash polarization can occur and all the traffic will be hashed to a single LAG slave. Fix this by using a different seed for

[PATCH net 6/7] mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2

2019-06-11 Thread Ido Schimmel
From: Petr Machata Due to an issue on Spectrum-2, in front-panel ports split four ways, 2 out of 32 port buffers cannot be used. To work around this, the next FW release will mark them as unused, and will report correspondingly lower total shared buffer size. mlxsw will pick up the new value thro

[PATCH net 0/7] mlxsw: Various fixes

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel This patchset contains various fixes for mlxsw. Patch #1 fixes an hash polarization problem when a nexthop device is a LAG device. This is caused by the fact that the same seed is used for the LAG and ECMP hash functions. Patch #2 fixes an issue in which the driver fails to r

[PATCH net 7/7] mlxsw: spectrum: Disallow prio-tagged packets when PVID is removed

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel When PVID is removed from a bridge port, the Linux bridge drops both untagged and prio-tagged packets. Align mlxsw with this behavior. Fixes: 148f472da5db ("mlxsw: reg: Add the Switch Port Acceptable Frame Types register") Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --

[PATCH net 4/7] mlxsw: spectrum_flower: Fix TOS matching

2019-06-11 Thread Ido Schimmel
From: Jiri Pirko The TOS value was not extracted correctly. Fix it. Fixes: 87996f91f739 ("mlxsw: spectrum_flower: Add support for ip tos") Reported-by: Alexander Petrovskiy Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 4 ++-

[PATCH net 5/7] selftests: tc_flower: Add TOS matching test

2019-06-11 Thread Ido Schimmel
From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/tc_flower.sh | 36 ++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/tc_flower.sh b/tools/testing/selftests/net/fo

[PATCH net 2/7] mlxsw: spectrum_router: Refresh nexthop neighbour when it becomes dead

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel The driver tries to periodically refresh neighbours that are used to reach nexthops. This is done by periodically calling neigh_event_send(). However, if the neighbour becomes dead, there is nothing we can do to return it to a connected state and the above function call is bas

RE: [PATCH] can: flexcan: fix deadlock when using self wakeup

2019-06-11 Thread Joakim Zhang
> -Original Message- > From: Sean Nyekjaer > Sent: 2019年6月11日 15:08 > To: Joakim Zhang > Cc: m...@pengutronix.de; linux-...@vger.kernel.org; dl-linux-imx > ; w...@grandegger.com; netdev@vger.kernel.org > Subject: Re: [PATCH] can: flexcan: fix deadlock when using self wakeup > > > > On

Re: [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-11 Thread Björn Töpel
On 2019-06-11 00:24, Jakub Kicinski wrote: On Mon, 10 Jun 2019 18:02:29 +0200, Björn Töpel wrote: Jakub, what's your thoughts on the special handling of XDP offloading? Maybe it's just overkill? Just allocate space for the offloaded program regardless support or not? Also, please review the dev_

Re: [PATCH net-next] ipv4: Support multipath hashing on inner IP pkts for GRE tunnel

2019-06-11 Thread Nikolay Aleksandrov
On 11/06/2019 03:31, Stephen Suryaputra wrote: > Multipath hash policy value of 0 isn't distributing since the outer IP > dest and src aren't varied eventhough the inner ones are. Since the flow > is on the inner ones in the case of tunneled traffic, hashing on them is > desired. > > This currentl

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Benjamin Beckmeyer
>> So all ports are now in forwarding mode (Switch port register 0x4 of all >> ports >> are 0x7f), but I don't reach it over ping. > Hi > > The most common error for people new to DSA is forgetting to bring > the master interface up. > > The second thing to understand is that by default, all inte

Re: [PATCH v2 bpf] bpf: lpm_trie: check left child of last leftmost node for NULL

2019-06-11 Thread Daniel Borkmann
On 06/08/2019 09:54 PM, Jonathan Lemon wrote: > If the leftmost parent node of the tree has does not have a child > on the left side, then trie_get_next_key (and bpftool map dump) will > not look at the child on the right. This leads to the traversal > missing elements. > > Lookup is not affected

Re: [PATCH v2 bpf-next] selftests/bpf : clean up feature/ when make clean

2019-06-11 Thread Daniel Borkmann
On 06/11/2019 02:43 AM, Hechao Li wrote: > An error "implicit declaration of function 'reallocarray'" can be thrown > with the following steps: > > $ cd tools/testing/selftests/bpf > $ make clean && make CC= > $ make clean && make CC= > > The cause is that the feature folder generated by GCC 4.8.

Re: [PATCH v6 bpf-next 0/3] Add a new API libbpf_num_possible_cpus()

2019-06-11 Thread Daniel Borkmann
On 06/11/2019 02:56 AM, Hechao Li wrote: > Getting number of possible CPUs is commonly used for per-CPU BPF maps > and perf_event_maps. Add a new API libbpf_num_possible_cpus() that > helps user with per-CPU related operations and remove duplicate > implementations in bpftool and selftests. > > v2

Kernel v5.2-rc4 trace involving nf_conntrack

2019-06-11 Thread Julian Wollrath
Hi, I got the following trace on v5.2-rc4 involving nf_conntrack: [ 143.193245] general protection fault: [#1] SMP PTI [ 143.193264] CPU: 3 PID: 201 Comm: kworker/3:2 Tainted: GW 5.2.0-rc4 #1 [ 143.193271] Hardware name: FUJITSU LIFEBOOK U747/FJNB2A5, BIOS Version 1.17 0

Re: [PATCH v2 06/11] dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

2019-06-11 Thread Maxime Ripard
Hi Andrew, On Mon, Jun 10, 2019 at 04:37:30PM +0200, Andrew Lunn wrote: > On Mon, Jun 10, 2019 at 11:25:45AM +0200, Maxime Ripard wrote: > > Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable > > the DT validation. > > > > Signed-off-by: Maxime Ripard > > Should there be

Re: [PATCH ipsec-next 0/6] xfrm: reduce xfrm_state_afinfo size

2019-06-11 Thread Steffen Klassert
On Thu, May 09, 2019 at 01:07:48PM +0200, Steffen Klassert wrote: > On Fri, May 03, 2019 at 05:46:13PM +0200, Florian Westphal wrote: > > xfrm_state_afinfo is a very large struct; its over 4kbyte on 64bit systems. > > > > The size comes from two arrays to store the l4 protocol type pointers > > (e

Re: [PATCH v2 11/11] ARM: dts: sunxi: Switch to the generic PHY properties

2019-06-11 Thread Chen-Yu Tsai
On Mon, Jun 10, 2019 at 5:26 PM Maxime Ripard wrote: > > The DWMAC specific properties to manage the PHY have been superseeded by > the generic PHY properties. Let's move to it. > > Signed-off-by: Maxime Ripard > > --- > > This patch should go through arm-soc. > > Changes from v1: > - New patch

[PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread Neil Horman
Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't leak cookie memory, free any previously allocated cookie first. --- Change notes v1

Re: [net PATCH] net: tls, correctly account for copied bytes with multiple sk_msgs

2019-06-11 Thread Andre Tomt
On 11.06.2019 08:15, John Fastabend wrote: tls_sw_do_sendpage needs to return the total number of bytes sent regardless of how many sk_msgs are allocatedt. Unfortunately, copied ^ typo (the value we return up the stack) is zero'd before each new sk_msg is al

Re: [PATCH v2 09/11] dt-bindings: net: sun8i-emac: Convert the binding to a schemas

2019-06-11 Thread Maxime Ripard
Hi, On Mon, Jun 10, 2019 at 01:22:00PM -0600, Rob Herring wrote: > On Mon, Jun 10, 2019 at 3:26 AM Maxime Ripard > wrote: > > +then: > > + properties: > > +allwinner,tx-delay-ps: > > + allOf: > > +- $ref: /schemas/types.yaml#definitions/uint32 > > Can drop t

Re: [PATCH v2 07/11] dt-bindings: net: stmmac: Convert the binding to a schemas

2019-06-11 Thread Maxime Ripard
On Mon, Jun 10, 2019 at 01:13:25PM -0600, Rob Herring wrote: > On Mon, Jun 10, 2019 at 3:26 AM Maxime Ripard > wrote: > > +then: > > + properties: > > +snps,pbl: > > + allOf: > > +- $ref: /schemas/types.yaml#definitions/uint32-array > > +- enum: [

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 07:21:28AM -0400, Neil Horman wrote: > Based on comments from Xin, even after fixes for our recent syzbot > report of cookie memory leaks, its possible to get a resend of an INIT > chunk which would lead to us leaking cookie memory. > > To ensure that we don't leak cookie m

[PATCH net-next v3 1/3] dpaa2-eth: Refactor xps code

2019-06-11 Thread Ioana Radulescu
Move the code configuring xps on the netdev TX queues to a separate function. A subsequent patch will need to call this in another context as well. Signed-off-by: Ioana Radulescu --- v2: no changes v3: no changes drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 45 +--- 1

[PATCH net-next v3 0/3] dpaa2-eth: Add support for MQPRIO offloading

2019-06-11 Thread Ioana Radulescu
Add support for adding multiple TX traffic classes with mqprio. We can have up to one netdev queue and hardware frame queue per TC per core. Ioana Radulescu (3): dpaa2-eth: Refactor xps code dpaa2-eth: Support multiple traffic classes on Tx dpaa2-eth: Add mqprio support drivers/net/etherne

[PATCH net-next v3 2/3] dpaa2-eth: Support multiple traffic classes on Tx

2019-06-11 Thread Ioana Radulescu
DPNI objects can have multiple traffic classes, as reflected by the num_tc attribute. Until now we ignored its value and only used traffic class 0. This patch adds support for multiple Tx traffic classes; we have num_queues x num_tcs hardware queues available for each interface. Signed-off-by: Io

[PATCH net-next v3 3/3] dpaa2-eth: Add mqprio support

2019-06-11 Thread Ioana Radulescu
Implement mqprio qdisc support by mapping traffic classes to different hardware enqueue priorities. The maximum number of supported traffic classes is an attribute of each DPNI object. The traffic classes map to hardware priorities from highest (0) to lowest (highest prio number). The skb priority

[PATCH V3 net 3/7] net: ena: make ethtool show correct current and max queue sizes

2019-06-11 Thread sameehj
From: Sameeh Jubran Currently ethtool -g shows the same size for current and max queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 -- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 2 files changed

[PATCH V3 net 2/7] net: ena: enable negotiating larger Rx ring size

2019-06-11 Thread sameehj
From: Sameeh Jubran Use MAX_QUEUES_EXT get feature capability to query the device. Signed-off-by: Netanel Belgazal Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 144 --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 15 ++ 2 files changed, 1

[PATCH V3 net 0/7] Support for dynamic queue size changes

2019-06-11 Thread sameehj
From: Sameeh Jubran This patchset introduces the following: * add new admin command for supporting different queue size for Tx/Rx * add support for Tx/Rx queues size modification through ethtool * allow queues allocation backoff when low on memory * update driver version Difference from v2: * Dr

[PATCH V3 net 4/7] net: ena: allow queue allocation backoff when low on memory

2019-06-11 Thread sameehj
From: Sameeh Jubran If there is not enough memory to allocate io queues the driver will try to allocate smaller queues. The backoff algorithm is as follows: 1. Try to allocate TX and RX and if successful. 1.1. return success 2. Divide by 2 the size of the larger of RX and TX queues (or both if

[PATCH V3 net 5/7] net: ena: add ethtool function for changing io queue sizes

2019-06-11 Thread sameehj
From: Sameeh Jubran Implement the set_ringparam() function of the ethtool interface to enable the changing of io queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 22 +++ drivers/net/ethernet/amazon/e

[PATCH V3 net 6/7] net: ena: remove inline keyword from functions in *.c

2019-06-11 Thread sameehj
From: Sameeh Jubran Let the compiler decide if the function should be inline in *.c files Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_com.c | 6 ++--- drivers/net/ethernet/amazon/ena/ena_eth_com.c | 26 +-- drivers/net/ethernet/amazon/ena/ena_netde

[PATCH V3 net 1/7] net: ena: add MAX_QUEUES_EXT get feature admin command

2019-06-11 Thread sameehj
From: Arthur Kiyanovski Add a new admin command to support different queue size for Tx/Rx queues (the change also support different SQ/CQ sizes) Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 56 +- drivers/net/eth

[PATCH V3 net 7/7] net: ena: update driver version from 2.0.3 to 2.1.0

2019-06-11 Thread sameehj
From: Sameeh Jubran Update driver version to match device specification. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/am

[PATCH RESEND nf-next] netfilter: add support for matching IPv4 options

2019-06-11 Thread Stephen Suryaputra
This is the kernel change for the overall changes with this description: Add capability to have rules matching IPv4 options. This is developed mainly to support dropping of IP packets with loose and/or strict source route route options. Nevertheless, the implementation include others and ability to

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 07:21:28AM -0400, Neil Horman wrote: Btw, I guess DaveM had meant to add "sctp: " in the subject. Marcelo

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Andrew Lunn
On Tue, Jun 11, 2019 at 09:36:16AM +0200, Benjamin Beckmeyer wrote: > >> So all ports are now in forwarding mode (Switch port register 0x4 of all > >> ports > >> are 0x7f), but I don't reach it over ping. > > Hi > > > > The most common error for people new to DSA is forgetting to bring > > the ma

Re: [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-11 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On 2019-06-11 00:24, Jakub Kicinski wrote: >> On Mon, 10 Jun 2019 18:02:29 +0200, Björn Töpel wrote: >>> Jakub, what's your thoughts on the special handling of XDP offloading? >>> Maybe it's just overkill? Just allocate space for the offloaded >>> program regardless support

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-11 Thread Andrew Lunn
On Tue, Jun 11, 2019 at 09:35:26AM +0300, Ido Schimmel wrote: > On Mon, Jun 10, 2019 at 04:06:33PM +0200, Andrew Lunn wrote: > > On Mon, Jun 10, 2019 at 04:58:48PM +0300, Ido Schimmel wrote: > > > On Mon, Jun 10, 2019 at 03:48:20PM +0200, Andrew Lunn wrote: > > > > > + # Skip 56G becaus

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-11 Thread Ido Schimmel
On Tue, Jun 11, 2019 at 02:22:55PM +0200, Andrew Lunn wrote: > On Tue, Jun 11, 2019 at 09:35:26AM +0300, Ido Schimmel wrote: > > On Mon, Jun 10, 2019 at 04:06:33PM +0200, Andrew Lunn wrote: > > > On Mon, Jun 10, 2019 at 04:58:48PM +0300, Ido Schimmel wrote: > > > > On Mon, Jun 10, 2019 at 03:48:20P

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Benjamin Beckmeyer
> On Tue, Jun 11, 2019 at 09:36:16AM +0200, Benjamin Beckmeyer wrote: So all ports are now in forwarding mode (Switch port register 0x4 of all ports are 0x7f), but I don't reach it over ping. >>> Hi >>> >>> The most common error for people new to DSA is forgetting to bring >>> the

Re: tp->copied_seq used before assignment in tcp_check_urg

2019-06-11 Thread Neal Cardwell
On Tue, Jun 11, 2019 at 2:46 AM Zhongjie Wang wrote: > > Hi Neal, > > Thanks for your valuable feedback! Yes, I think you are right. > It seems not a problem if tp->urg_data and tp->urg_seq are used together. > From our test results, we can only see there are some paths requiring > specific initia

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Andrew Lunn
> I captured a ping from my device to my computer to look if outgoing is working > (captured on both devices). Here is the output from my device where i started > the: > > 00:24:24.752057 ARP, Request who-has 192.168.10.2 tell 192.168.10.1, length 28 > 0x: 0001 0800 0604 0001 6a2a ad79

[PATCH net-next 0/3] net/sched: Introduce tc connection tracking

2019-06-11 Thread Paul Blakey
Hi, This patch series add connection tracking capabilities in tc sw datapath. It does so via a new tc action, called act_ct, and new tc flower classifier matching on conntrack state, mark and label. Usage is as follows: $ tc qdisc add dev ens1f0_0 ingress $ tc qdisc add dev ens1f0_1 ingress $ t

Re: KASAN: null-ptr-deref Read in x25_connect

2019-06-11 Thread Dmitry Vyukov
On Tue, Jun 11, 2019 at 2:39 PM Arnd Bergmann wrote: > > On Tue, Jun 11, 2019 at 9:18 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:f4cfcfbd net: dsa: sja1105: Fix link speed not working at .. > > git tree: net > > console output: htt

[PATCH net-next 2/3] net/flow_dissector: add connection tracking dissection

2019-06-11 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44 +

[PATCH net-next 3/3] net/sched: cls_flower: Add matching on conntrack info

2019-06-11 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127 ++

[PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Paul Blakey
Allow sending a packet to conntrack and set conntrack zone, mark, labels and nat parameters. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/net/flow_offload.h| 5 + include/net/tc_act/tc_ct.h|

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-11 Thread Andrew Lunn
> The test currently resides under > tools/testing/selftests/drivers/net/mlxsw/, so it's specific to mlxsw. > > I believe the 56G quirk is the only thing in the test that is specific > to mlxsw. Should be possible to move it to > tools/testing/selftests/net/forwarding/ and skip 56G for mlxsw. Hi

Re: [PATCH net-next 9/9] selftests: ptp: Add Physical Hardware Clock test

2019-06-11 Thread Shalom Toledo
On 07/06/2019 14:15, Vladimir Oltean wrote: > On Mon, 3 Jun 2019 at 15:25, Ido Schimmel wrote: >> >> From: Shalom Toledo >> >> Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a >> part of "linuxptp"). >> >> The test contains three sub-tests: >> * "settime" test >> * "a

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Toke Høiland-Jørgensen
Paul Blakey writes: > Allow sending a packet to conntrack and set conntrack zone, mark, > labels and nat parameters. How is this different from the newly merged ctinfo action? -Toke > Signed-off-by: Paul Blakey > Signed-off-by: Marcelo Ricardo Leitner > Signed-off-by: Yossi Kuperman > Acked

[PATCH net-next 1/1] tc-tests: updated fw with bind actions by reference use cases

2019-06-11 Thread Roman Mashak
Extended fw TDC tests with use cases where actions are pre-created and attached to a filter by reference, i.e. by action index. Signed-off-by: Roman Mashak --- .../selftests/tc-testing/tc-tests/filters/fw.json | 144 + 1 file changed, 144 insertions(+) diff --git a/tools/te

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Paul Blakey
On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: > Paul Blakey writes: > >> Allow sending a packet to conntrack and set conntrack zone, mark, >> labels and nat parameters. > How is this different from the newly merged ctinfo action? > > -Toke Hi, ctinfo does one of two very specific things,

Re: [RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-11 Thread John Hurley
On Thu, Jun 6, 2019 at 8:52 PM Florian Westphal wrote: > > David Miller wrote: > > From: Florian Westphal > > Date: Thu, 6 Jun 2019 14:58:18 +0200 > > > > >> @@ -827,6 +828,7 @@ struct sk_buff { > > >>__u8tc_at_ingress:1; > > >>__u8tc_redirected:1;

Re: [RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-11 Thread Florian Westphal
John Hurley wrote: > On Thu, Jun 6, 2019 at 8:52 PM Florian Westphal wrote: > > > > David Miller wrote: > > > From: Florian Westphal > > > Date: Thu, 6 Jun 2019 14:58:18 +0200 > > > > > > >> @@ -827,6 +828,7 @@ struct sk_buff { > > > >>__u8tc_at_ingress:1; > > > >>__

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Toke Høiland-Jørgensen
Paul Blakey writes: > On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: >> Paul Blakey writes: >> >>> Allow sending a packet to conntrack and set conntrack zone, mark, >>> labels and nat parameters. >> How is this different from the newly merged ctinfo action? >> >> -Toke > > Hi, > > ctinfo do

[PATCH bpf-next v3 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-11 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The bpf_redirect_map() helper used by XDP programs doesn't return any indication of whether it can successfully redirect to the map index it was given. Instead, BPF programs have to track this themselves, leading to programs using duplicate maps to track which entries

[PATCH bpf-next v3 1/3] devmap/cpumap: Use flush list instead of bitmap

2019-06-11 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The socket map uses a linked list instead of a bitmap to keep track of which entries to flush. Do the same for devmap and cpumap, as this means we don't have to care about the map index when enqueueing things into the map (and so we can cache the map lookup). Signed-

[PATCH bpf-next v3 0/3] xdp: Allow lookup into devmaps before redirect

2019-06-11 Thread Toke Høiland-Jørgensen
When using the bpf_redirect_map() helper to redirect packets from XDP, the eBPF program cannot currently know whether the redirect will succeed, which makes it impossible to gracefully handle errors. To properly fix this will probably require deeper changes to the way TX resources are allocated, bu

[PATCH bpf-next v3 3/3] devmap: Allow map lookups from eBPF

2019-06-11 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen We don't currently allow lookups into a devmap from eBPF, because the map lookup returns a pointer directly to the dev->ifindex, which shouldn't be modifiable from eBPF. However, being able to do lookups in devmaps is useful to know (e.g.) whether forwarding to a spe

[PATCH net-next v2 4/9] mlxsw: reg: Add Management UTC Register

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo The MTUTC register configures the HW UTC counter. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 45 +++ 1 file changed, 45 insertions(+) diff --

[PATCH net-next v2 2/9] mlxsw: core: Add a new interface for reading the hardware free running clock

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Add two new bus operations for reading the hardware free running clock. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 12 drivers/net/ethernet/mellanox

[PATCH net-next v2 1/9] mlxsw: cmd: Free running clock PCI BAR and offsets via query firmware

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Add free running clock PCI BAR and offset to query firmware command. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 1 file changed, 12 insertions(+)

[PATCH net-next v2 3/9] mlxsw: pci: Query free running clock PCI BAR and offsets

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Query free running clock PCI BAR and offsets during the pci_init. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/pci.c| 32 drivers/net/ethernet/mell

[PATCH net-next v2 0/9] mlxsw: Add support for physical hardware clock

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel Shalom says: This patchset adds support for physical hardware clock for Spectrum-1 ASIC only. Patches #1, #2 and #3 add the ability to query the free running clock PCI address. Patches #4 and #5 add two new register, the Management UTC Register and the Management Pulse Per S

[PATCH net-next v2 8/9] mlxsw: spectrum: PTP physical hardware clock initialization

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Initialize the PTP physical hardware clock. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 36 +++ .../net/ethernet/mellanox/mlxsw/spectrum.h|

[PATCH net-next v2 5/9] mlxsw: reg: Add Management Pulse Per Second Register

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo The MTPPS register provides the device PPS capabilities, configure the PPS in and out modules and holds the PPS in time stamp. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/

[PATCH net-next v2 7/9] mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Implement physical hardware clock operations. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 + .../eth

[PATCH net-next v2 9/9] selftests: ptp: Add Physical Hardware Clock test

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a part of "linuxptp"). The test contains three sub-tests: * "settime" test * "adjtime" test * "adjfreq" test "settime" test: * set the PHC time to 0 seconds. * wait for 120.5 seconds. * check

[PATCH net-next v2 6/9] ptp: ptp_clock: Publish scaled_ppm_to_ppb

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Publish scaled_ppm_to_ppb to allow drivers to use it. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/ptp/ptp_clock.c | 3 ++- include/linux/ptp_clock_kernel.h | 8 2 files changed, 10 insertions(+), 1 delet

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 05:34:50PM +0200, Toke Høiland-Jørgensen wrote: > Paul Blakey writes: > > > On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: > >> Paul Blakey writes: > >> > >>> Allow sending a packet to conntrack and set conntrack zone, mark, > >>> labels and nat parameters. > >> How

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread David Miller
From: Neil Horman Date: Tue, 11 Jun 2019 07:21:28 -0400 > Based on comments from Xin, even after fixes for our recent syzbot > report of cookie memory leaks, its possible to get a resend of an INIT > chunk which would lead to us leaking cookie memory. > > To ensure that we don't leak cookie memo

[PATCH iproute2 v2 0/3] refactor the cmd_exec()

2019-06-11 Thread Matteo Croce
Refactor the netns and ipvrf code so less steps are needed to exec commands in a netns or a VRF context. Also remove some code which became dead. bloat-o-meter output: $ bloat-o-meter ip.old ip add/remove: 1/4 grow/shrink: 3/4 up/down: 174/-312 (-138) Function o

[PATCH iproute2 v2 1/3] netns: switch netns in the child when executing commands

2019-06-11 Thread Matteo Croce
'ip netns exec' changes the current netns just before executing a child process, and restores it after forking. This is needed if we're running in batch or do_all mode. Some cleanups must be done both in the parent and in the child: the parent must restore the previous netns, while the child must r

[PATCH iproute2 v2 2/3] ip vrf: use hook to change VRF in the child

2019-06-11 Thread Matteo Croce
On vrf exec, reset the VRF associations in the child process, via the new hook added to cmd_exec(). In this way, the parent doesn't have to reset the VRF associations before spawning other processes. Signed-off-by: Matteo Croce --- ip/ipnetns.c | 5 - ip/ipvrf.c | 12 2 files

[PATCH iproute2] devlink: mnlg: Catch returned error value of dumpit commands

2019-06-11 Thread Moshe Shemesh
Devlink commands which implements the dumpit callback may return error. The netlink function netlink_dump() sends the errno value as the payload of the message, while answering user space with NLMSG_DONE. To enable receiving errno value for dumpit commands we have to check for it in the message. If

[PATCH iproute2 v2 3/3] netns: make netns_{save,restore} static

2019-06-11 Thread Matteo Croce
The netns_{save,restore} functions are only used in ipnetns.c now, since the restore is not needed anymore after the netns exec command. Move them in ipnetns.c, and make them static. Signed-off-by: Matteo Croce --- include/namespace.h | 2 -- ip/ip.c | 1 - ip/ipnetns.c| 31

[PATCH net-next 01/13] s390/qeth: don't mask TX errors on IQD devices

2019-06-11 Thread Julian Wiedmann
Current code suppresses debug entries when an TX buffer completes in ERROR state with no error indication set in SBALF15. This was introduced back with commit 58490f18071d ("qeth: HiperSockets SIGA retry support on CC=2."). But qeth no longer retries after CC=2, and this sort of suppression make no

[PATCH net-next 08/13] s390/qeth: convert device-specific trace entries

2019-06-11 Thread Julian Wiedmann
The vast majority of SETUP-classified trace entries can be moved to their device-specific trace file. This reduces pollution of the global SETUP file, and provides a consistent trace view of all activity on the device. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 196 ++

[PATCH net-next 11/13] s390/qeth: convert RCD code to common IO infrastructure

2019-06-11 Thread Julian Wiedmann
The RCD code is the last remaining IO path that doesn't use the qeth_send_control_data() infrastructure. Doing so allows us to remove all sorts of custom state machinery and logic in the IRQ handler. Instead of introducing statically allocated cmd buffers for this single IO on the data channel, us

[PATCH net-next 04/13] s390/qeth: restart pending READ cmd from callback

2019-06-11 Thread Julian Wiedmann
The completion of a pending READ cmd is processed via qeth_issue_next_read_cb(). Let this callback also start the next READ cmd, instead of hardcoding that step into the IRQ handler. While at it remove the check of the channel state, __qeth_issue_next_read() already does this. Signed-off-by: Juli

[PATCH net-next 13/13] s390/qeth: allocate a single cmd on read channel

2019-06-11 Thread Julian Wiedmann
We statically allocate 8 cmd buffers on the read channel, when the only IO left that's still using them is the long-running READ. Replace this with a single allocated cmd, that gets restarted whenever the READ completed. This introduces refcounting for allocated cmds, so that the READ cmd can surv

[PATCH net-next 07/13] s390/qeth: remove OSN-specific IO code

2019-06-11 Thread Julian Wiedmann
OSN currently provides a custom code path to submit IPA cmds, without waiting for the cmd response. Replace it with qeth_send_ipa_cmd(), which uses the common qeth_send_control_data() IO infrastructure. By setting a custom iob->callback, we can now provide feedback to the caller about whether the

[PATCH net-next 12/13] s390/qeth: command-chain the IDX sequence

2019-06-11 Thread Julian Wiedmann
The current IDX sequence first sends one WRITE cmd to activate the device, and then sends a second cmd that READs the response. Using qeth_alloc_cmd(), we can combine this into a single IO with two command-chained CCWs. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 58 +

[PATCH net-next 10/13] s390/qeth: add support for dynamically allocated cmds

2019-06-11 Thread Julian Wiedmann
qeth currently uses a fixed set of statically allocated cmd buffers for the read and write IO channels. This (1) doesn't play well with the single RCD cmd we need to issue on the data channel, (2) doesn't provide the necessary flexibility for certain IDX improvements, and (3) is also rather wastefu

[PATCH net-next 05/13] s390/qeth: clean up setting of BLKT defaults

2019-06-11 Thread Julian Wiedmann
When called from qeth_core_probe_device(), qeth_determine_capabilities() initializes the device's BLKT defaults. From all other callers, the ccw_device has already been set online and the BLKT setting is skipped. Clean this up by extracting the BLKT setting into a separate helper that gets called

[PATCH net-next 02/13] s390/qeth: use mm helpers

2019-06-11 Thread Julian Wiedmann
Slightly reduce the complexity of the core xmit path, by replacing some open-coded logic with the corresponding helpers. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 33 +++ 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/driv

[PATCH net-next 03/13] s390/qeth: simplify DOWN state handling

2019-06-11 Thread Julian Wiedmann
When the tear down sequence in qeth_l?_stop_card() has finished, the card is guaranteed to be in DOWN state and we don't have to check for it again. With this insight we can also remove the redundant setting of card->state in qeth_l?_set_online()'s error path. Signed-off-by: Julian Wiedmann ---

[PATCH net-next 09/13] s390/qeth: remove 'channel' parameter from callbacks

2019-06-11 Thread Julian Wiedmann
Each cmd buffer maintains a pointer to the IO channel that it was/will be issued on. So when dealing with cmd buffers, we don't need to pass around a separate channel pointer. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 5 ++-- drivers/s390/net/qeth_core_main.c | 38 +

[PATCH net-next 06/13] s390/qeth: remove qeth_wait_for_buffer()

2019-06-11 Thread Julian Wiedmann
The basic MPC initialization sequence is strictly sequential, and waiting for an available cmd buffer should never be necessary. So this change only affects the OSN path, where dangling waiters on an unbounded wait_event() are not desirable. Switch to qeth_get_buffers(), and let OSN callers deal wi

[PATCH net-next 00/13] s390/qeth: updates 2019-06-11

2019-06-11 Thread Julian Wiedmann
Hi Dave, please apply the following patch series for qeth to net-next. This brings all sorts of cleanups and minor improvements, primarily for the control IO path. Thanks, Julian Julian Wiedmann (13): s390/qeth: don't mask TX errors on IQD devices s390/qeth: use mm helpers s390/qeth: simp

[PATCH net-next] net: axienet: move use of resource after validity check

2019-06-11 Thread Robert Hancock
We were accessing the pointer returned from platform_get_resource before checking if it was valid, causing an oops if it was not. Move this access after the call to devm_ioremap_resource which does the validity check. Signed-off-by: Robert Hancock --- This bug was introduced in my recent axienet

Re: [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-11 Thread Jakub Kicinski
On Tue, 11 Jun 2019 09:24:41 +0200, Björn Töpel wrote: > On 2019-06-11 00:24, Jakub Kicinski wrote: > > On Mon, 10 Jun 2019 18:02:29 +0200, Björn Töpel wrote: > >> Jakub, what's your thoughts on the special handling of XDP offloading? > >> Maybe it's just overkill? Just allocate space for the off

net-next: KSZ switch driver oops in ksz_mib_read_work

2019-06-11 Thread Robert Hancock
We are using an embedded platform with a KSZ9897 switch. I am getting the oops below in ksz_mib_read_work when testing with net-next branch. After adding in some debug output, the problem is in this code: for (i = 0; i < dev->mib_port_cnt; i++) { p = &dev->ports[i];

Re: [PATCH bpf-next v3 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-11 Thread Jesper Dangaard Brouer
On Tue, 11 Jun 2019 17:44:00 +0200 Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > The bpf_redirect_map() helper used by XDP programs doesn't return any > indication of whether it can successfully redirect to the map index it was > given. Instead, BPF programs have to track thi

[PATCH iproute2] testsuite: don't clobber /tmp

2019-06-11 Thread Matteo Croce
Even if not running the testsuite, every build will leave a stale tc_testkenv.* file in the system temp directory. Conditionally create the temp file only if we're running the testsuite. Signed-off-by: Matteo Croce --- testsuite/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH iproute2-next] Makefile: pass -pipe to the compiler

2019-06-11 Thread Matteo Croce
Pass the -pipe option to GCC, to use pipes instead of temp files. On a slow AMD G-T40E CPU we get a non negligible 6% improvement in build time. real1m15,111s user1m2,521s sys 0m12,465s real1m10,861s user1m2,520s sys 0m12,901s Signed-off-by: Matteo Croce --- Makefile |

  1   2   >