Re: [PATCH net-next 00/18] ipv6: Align nexthop behaviour with IPv4

2018-01-09 Thread Ido Schimmel
On Sun, Jan 07, 2018 at 10:20:11AM -0700, David Ahern wrote: > One of many follow on changes that would be beneficial is to remove the > idev dereference in the hot path to check the > ignore_routes_with_linkdown sysctl. When a netdev loses its carrier we can set the RTNH_F_DEAD flag for all the n

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-09 Thread Steffen Klassert
On Mon, Jan 08, 2018 at 02:53:48PM +0100, Tobias Hommel wrote: ... > [ 439.095554] BUG: unable to handle kernel NULL pointer dereference at > 0020 > [ 439.103664] IP: xfrm_lookup+0x2a/0x7d0 > [ 439.107551] PGD 0 P4D 0 > [ 439.110144] Oops: [#1] SMP PTI > [ 439.113653] Modu

Re: [V2] wcn36xx: fix incorrect assignment to msg_body.min_ch_time

2018-01-09 Thread Kalle Valo
Colin Ian King wrote: > The second assignment to msg_body.min_ch_time is incorrect, it > should actually be to msg_body.max_ch_time. > > Thanks to Bjorn Andersson for identifying the correct way to fix > this as my original fix was incorrect. > > Detected by CoverityScan, CID#1463042 ("Unused V

[PATCH net, v2] of_mdio: avoid MDIO bus removal when a PHY is missing

2018-01-09 Thread Madalin Bucur
If one of the child devices is missing the of_mdiobus_register_phy() call will return -ENODEV. When a missing device is encountered the registration of the remaining PHYs is stopped and the MDIO bus will fail to register. Propagate all errors except ENODEV to avoid it. Signed-off-by: Madalin Bucur

Re: [PATCH net, v2] of_mdio: avoid MDIO bus removal when a PHY is missing

2018-01-09 Thread Geert Uytterhoeven
Hi Madalin, On Tue, Jan 9, 2018 at 9:33 AM, Madalin Bucur wrote: > If one of the child devices is missing the of_mdiobus_register_phy() > call will return -ENODEV. When a missing device is encountered the > registration of the remaining PHYs is stopped and the MDIO bus will > fail to register. Pr

Re: [PATCH v2] b43: Replace mdelay with usleep_range in b43_radio_2057_init_post

2018-01-09 Thread Greg KH
On Tue, Jan 09, 2018 at 09:40:06AM +0800, Jia-Ju Bai wrote: > b43_radio_2057_init_post is not called in an interrupt handler > nor holding a spinlock. > The function mdelay in it can be replaced with usleep_range, > to reduce busy wait. > > Signed-off-by: Jia-Ju Bai > --- > v2: > * Replace mdela

Re: [PATCH v2] b43: Replace mdelay with usleep_range in b43_radio_2057_init_post

2018-01-09 Thread Jia-Ju Bai
On 2018/1/9 16:35, Greg KH wrote: On Tue, Jan 09, 2018 at 09:40:06AM +0800, Jia-Ju Bai wrote: b43_radio_2057_init_post is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with usleep_range, to reduce busy wait. Signed-off-by: Jia-Ju Bai ---

Re: [PATCH 07/18] [media] uvcvideo: prevent bounds-check bypass via speculative execution

2018-01-09 Thread Laurent Pinchart
Hi Greg, On Saturday, 6 January 2018 11:40:26 EET Greg KH wrote: > On Sat, Jan 06, 2018 at 10:09:07AM +0100, Greg KH wrote: > > On Fri, Jan 05, 2018 at 05:10:32PM -0800, Dan Williams wrote: > >> Static analysis reports that 'index' may be a user controlled value that > >> is used as a data depende

Re: [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2018-01-09 Thread Phil Reid
On 7/01/2018 00:54, Egil Hjelmeland wrote: Den 13. nov. 2017 09:07, skrev Phil Reid: Replaces Pan Bian patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have only compile tested the code as I don't have the

[PATCH] doc: clarification about setting SO_ZEROCOPY

2018-01-09 Thread Kornilios Kourtis
Signed-off-by: Kornilios Kourtis --- Documentation/networking/msg_zerocopy.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/networking/msg_zerocopy.rst b/Documentation/networking/msg_zerocopy.rst index 77f6d7e..c3380f4 100644 --- a/Documentation/networking/msg_zerocopy.r

[PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Antoine Tenart
This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses nearly the same code path. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/marvell/mvpp2.c | 50 +--- 1 file changed

[PATCH net-next v3 1/4] phy: add 2.5G SGMII mode to the phy_mode enum

2018-01-09 Thread Antoine Tenart
This patch adds one more generic PHY mode to the phy_mode enum, to allow configuring generic PHYs to the 2.5G SGMII mode by using the set_mode callback. Signed-off-by: Antoine Tenart --- include/linux/phy/phy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/phy/phy.h b/include

[PATCH net-next v3 0/4] net: mvpp2: 1000BaseX and 2500BaseX support

2018-01-09 Thread Antoine Tenart
Hi all, This series adds 1000BaseX and 2500BaseX support to the Marvell PPv2 driver. In order to use it, the 2.5 SGMII mode is added in the Marvell common PHY driver (cp110-comphy). This was tested on a mcbin. All patches should probably go through net-next as patch 4/4 depends on patch 1/4 to b

Re: [Intel-wired-lan] [PATCH 01/27] timecounter: Make cyclecounter struct part of timecounter struct

2018-01-09 Thread Sagar Arun Kamble
Thanks Aaron. Regards, Sagar On 1/9/2018 3:50 AM, Brown, Aaron F wrote: From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On Behalf Of Sagar Arun Kamble Sent: Thursday, December 14, 2017 11:38 PM To: linux-ker...@vger.kernel.org Cc: alsa-de...@alsa-project.org; linux-r...@vger.k

[PATCH net-next v3 2/4] phy: cp110-comphy: 2.5G SGMII mode

2018-01-09 Thread Antoine Tenart
This patch allow the CP100 comphy to configure some lanes in the 2.5G SGMII mode. This mode is quite close to SGMII and uses nearly the same code path. Signed-off-by: Antoine Tenart --- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 17 ++--- 1 file changed, 14 insertions(+), 3 delet

[PATCH net-next v3 3/4] net: mvpp2: 1000baseX support

2018-01-09 Thread Antoine Tenart
This patch adds the 1000Base-X PHY mode support in the Marvell PPv2 driver. 1000Base-X is quite close the SGMII and uses nearly the same code path. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/marvell/mvpp2.c | 45 1 file changed, 35 insertions(+),

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-09 Thread Tobias Hommel
On Tue, Jan 09, 2018 at 09:19:39AM +0100, Steffen Klassert wrote: > On Mon, Jan 08, 2018 at 02:53:48PM +0100, Tobias Hommel wrote: > > ... > > > [ 439.095554] BUG: unable to handle kernel NULL pointer dereference at > > 0020 > > [ 439.103664] IP: xfrm_lookup+0x2a/0x7d0 > > [ 439.1

Re: [PATCH v2] b43: Replace mdelay with usleep_range in b43_radio_2057_init_post

2018-01-09 Thread Arend van Spriel
On 1/9/2018 9:39 AM, Jia-Ju Bai wrote: On 2018/1/9 16:35, Greg KH wrote: On Tue, Jan 09, 2018 at 09:40:06AM +0800, Jia-Ju Bai wrote: b43_radio_2057_init_post is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with usleep_range, to reduce bu

Re: [v2] net: gianfar_ptp: move set_fipers() to spinlock protecting area

2018-01-09 Thread Fabio Estevam
On Tue, Jan 9, 2018 at 1:02 AM, Yangbo Lu wrote: > set_fipers() calling should be protected by spinlock in > case that any interrupt breaks related registers setting > and the function we expect. This patch is to move set_fipers() > to spinlock protecting area in ptp_gianfar_adjtime(). > > Signed-

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-09 Thread Steffen Klassert
On Tue, Jan 09, 2018 at 10:06:51AM +0100, Tobias Hommel wrote: > > > > You have CONFIG_INET_ESP_OFFLOAD enabled, this is new maybe it > > still has some problems. You should not hit an offload codepath > > because all your SAs are configured with UDP encapsulation which > > is still not supported

Re: [PATCH v2] b43: Replace mdelay with usleep_range in b43_radio_2057_init_post

2018-01-09 Thread Jia-Ju Bai
On 2018/1/9 17:07, Arend van Spriel wrote: On 1/9/2018 9:39 AM, Jia-Ju Bai wrote: On 2018/1/9 16:35, Greg KH wrote: On Tue, Jan 09, 2018 at 09:40:06AM +0800, Jia-Ju Bai wrote: b43_radio_2057_init_post is not called in an interrupt handler nor holding a spinlock. The function mdelay in it c

Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro

2018-01-09 Thread Gal Pressman
On 09-Jan-18 05:05, David Miller wrote: > From: Joe Perches > Date: Mon, 08 Jan 2018 18:42:01 -0800 > >> On Sun, 2018-01-07 at 12:08 +0200, Gal Pressman wrote: >>> netdev_WARN_ONCE is broken (whoops..), this fix will remove the >>> unnecessary "condition" parameter, add the missing comma and chan

Re: AM43x boot broken on linux-next

2018-01-09 Thread Keerthy
On Tuesday 09 January 2018 02:03 PM, Keerthy wrote: > Hi, Adding netdev@vger.kernel.org > > Seems like AM437x boot is broken on latest linux-next. > Log here: > > https://pastebin.ubuntu.com/26351906/ > > "Unable to handle kernel paging request at virtual address 13e8 > [2.367045] pgd

Re: [PATCH 07/18] [media] uvcvideo: prevent bounds-check bypass via speculative execution

2018-01-09 Thread Greg KH
On Tue, Jan 09, 2018 at 10:40:21AM +0200, Laurent Pinchart wrote: > On Saturday, 6 January 2018 11:40:26 EET Greg KH wrote: > > On Sat, Jan 06, 2018 at 10:09:07AM +0100, Greg KH wrote: > > > > While I'm all for fixing this type of thing, I feel like we need to do > > something "else" for this as p

Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support

2018-01-09 Thread Graeme Gregory
On Mon, Jan 08, 2018 at 06:17:06PM +0100, Marcin Wojtas wrote: > Hi Andrew, > > > > 2018-01-08 16:42 GMT+01:00 Andrew Lunn : > > w> I am not familiar with MDIO, but if its similar or a specific > >> implementation of a serial bus that does sound sane! > > > > Thanks for digging, I will check if

Re: [PATCH bpf] bpf: prevent out-of-bounds speculation

2018-01-09 Thread Will Deacon
Hi Linus, On Mon, Jan 08, 2018 at 10:49:01AM -0800, Linus Torvalds wrote: > On Mon, Jan 8, 2018 at 9:05 AM, Mark Rutland wrote: > > > > I'm a little worried that in the presence of some CPU/compiler > > optimisations, the masking may effectively be skipped under speculation. > > So I'm not sure h

Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support

2018-01-09 Thread Marcin Wojtas
2018-01-09 11:19 GMT+01:00 Graeme Gregory : > On Mon, Jan 08, 2018 at 06:17:06PM +0100, Marcin Wojtas wrote: >> Hi Andrew, >> >> >> >> 2018-01-08 16:42 GMT+01:00 Andrew Lunn : >> > w> I am not familiar with MDIO, but if its similar or a specific >> >> implementation of a serial bus that does sound

[PATCH net-next] vhost_net: batch used ring update in rx

2018-01-09 Thread Jason Wang
This patch tries to batched used ring update during RX. This is pretty fit for the case when guest is much faster (e.g dpdk based backend). In this case, used ring is almost empty: - we may get serious cache line misses/contending on both used ring and used idx. - at most 1 packet could be deque

[PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Geert Uytterhoeven
In case of success, the return values of (__)phy_write() and (__)phy_modify() are not compatible: (__)phy_write() returns 0, while (__)phy_modify() returns the old PHY register value. Apparently this change was catered for in drivers/net/phy/marvell.c, but not in other source files. Hence genphy_

Re: [PATCH v2] b43: Replace mdelay with usleep_range in b43_radio_2057_init_post

2018-01-09 Thread Arend van Spriel
On 1/9/2018 10:47 AM, Jia-Ju Bai wrote: On 2018/1/9 17:07, Arend van Spriel wrote: On 1/9/2018 9:39 AM, Jia-Ju Bai wrote: On 2018/1/9 16:35, Greg KH wrote: On Tue, Jan 09, 2018 at 09:40:06AM +0800, Jia-Ju Bai wrote: b43_radio_2057_init_post is not called in an interrupt handler nor holdin

Re: [PATCH net-next v3 06/10] net/mlx5e: Change Mellanox references in DIM code

2018-01-09 Thread kbuild test robot
Hi Andy, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Andy-Gospodarek/net-create-dynamic-software-irq-moderation-library/20180109-182838 config: ia64-allmodconfig (attached as .config) compiler: ia64

[PATCH] caif_usb: use strlcpy() instead of strncpy()

2018-01-09 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports net/caif/caif_usb.c: In function 'cfusbl_device_notify': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] The compiler require that the input param 'len' of

Re: [PATCH v2] xfrm: Return error on unknown encap_type in init_state

2018-01-09 Thread Steffen Klassert
On Fri, Jan 05, 2018 at 10:12:32PM +1100, Herbert Xu wrote: > On Fri, Jan 05, 2018 at 09:32:47AM +0100, Steffen Klassert wrote: > > > > Looks like we catch the unknown mode in __xfrm_init_state(). > > But in any case, if we want to return -EINVAL on unknown mode, > > we should do it for IPv6 and fo

Re: [PATCH ipsec] xfrm: don't call xfrm_policy_cache_flush while holding spinlock

2018-01-09 Thread Steffen Klassert
On Sat, Jan 06, 2018 at 01:13:08AM +0100, Florian Westphal wrote: > xfrm_policy_cache_flush can sleep, so it cannot be called while holding > a spinlock. We could release the lock first, but I don't see why we need > to invoke this function here in first place, the packet path won't reuse > an xds

Re: [PATCH net-next v3 06/10] net/mlx5e: Change Mellanox references in DIM code

2018-01-09 Thread kbuild test robot
Hi Andy, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Andy-Gospodarek/net-create-dynamic-software-irq-moderation-library/20180109-182838 reproduce: # apt-get install sparse make

[PATCH bpf] bpf: avoid false sharing of map refcount with max_entries

2018-01-09 Thread Daniel Borkmann
In addition to commit b2157399cc98 ("bpf: prevent out-of-bounds speculation") also change the layout of struct bpf_map such that false sharing of fast-path members like max_entries is avoided when the maps reference counter is altered. Therefore enforce them to be placed into separate cachelines.

RFC(V3): Audit Kernel Container IDs

2018-01-09 Thread Richard Guy Briggs
Containers are a userspace concept. The kernel knows nothing of them. The Linux audit system needs a way to be able to track the container provenance of events and actions. Audit needs the kernel's help to do this. Since the concept of a container is entirely a userspace concept, a registration

Re: aio poll, io_pgetevents and a new in-kernel poll API

2018-01-09 Thread Christoph Hellwig
On Thu, Jan 04, 2018 at 09:00:12AM +0100, Christoph Hellwig wrote: > The changes were sponsored by Scylladb, and improve performance > of the seastar framework up to 10%, while also removing the need > for a privileged SCHED_FIFO epoll listener thread. Due to the current events: With KPTI enabled

[PATCH net, v3] of_mdio: avoid MDIO bus removal when a PHY is missing

2018-01-09 Thread Madalin Bucur
If one of the child devices is missing the of_mdiobus_register_phy() call will return -ENODEV. When a missing device is encountered the registration of the remaining PHYs is stopped and the MDIO bus will fail to register. Propagate all errors except ENODEV to avoid it. Signed-off-by: Madalin Bucur

pull-request: wireless-drivers 2018-01-09

2018-01-09 Thread Kalle Valo
Hi Dave, My first pull request in 2018 so Happy New Year! This is for 4.15 to the net tree. Only two fixes this time so should be an easy pull. This is quite late due to the holidays but it has been pretty quiet so I guess I wasn't the only one trying to not touch the computer ;) And Linus said

Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support

2018-01-09 Thread Andrew Lunn
On Tue, Jan 09, 2018 at 11:22:00AM +0100, Marcin Wojtas wrote: > 2018-01-09 11:19 GMT+01:00 Graeme Gregory : > > On Mon, Jan 08, 2018 at 06:17:06PM +0100, Marcin Wojtas wrote: > >> Hi Andrew, > >> > >> > >> > >> 2018-01-08 16:42 GMT+01:00 Andrew Lunn : > >> > w> I am not familiar with MDIO, but if

Re: [PATCH] doc: clarification about setting SO_ZEROCOPY

2018-01-09 Thread Willem de Bruijn
On Tue, Jan 9, 2018 at 3:52 AM, Kornilios Kourtis wrote: > Signed-off-by: Kornilios Kourtis Acked-by: Willem de Bruijn Thanks, Kornilios. > --- > Documentation/networking/msg_zerocopy.rst | 4 > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/networking/msg_zerocopy.rst

Re: [bpf-next PATCH 4/7] bpf: sockmap sample, report bytes/sec

2018-01-09 Thread Jesper Dangaard Brouer
On Mon, 08 Jan 2018 10:05:58 -0800 John Fastabend wrote: > Report bytes/sec sent as well as total bytes. Useful to get rough > idea how different configurations and usage patterns perform with > sockmap. Why BYTES per second, and not BITS per sec? -- Best regards, Jesper Dangaard Brouer MS

Re: [bpf-next PATCH 1/7] bpf: refactor sockmap sample program update for arg parsing

2018-01-09 Thread Jesper Dangaard Brouer
On Mon, 08 Jan 2018 10:05:07 -0800 John Fastabend wrote: > sockmap sample program takes arguments from cmd line but it reads them > in using offsets into the array. Because we want to add more arguments > in the future lets do proper argument handling. > > Also refactor code to pull apart sock i

[PATCH 5/5] pktgen: Clean read user supplied flag mess

2018-01-09 Thread Dmitry Safonov
Don't use error-prone-brute-force way. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 144 +++--- 1 file changed, 39 insertions(+), 105 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index e320f0cbfd62..a3862e500643 100644

[PATCH 4/5] pktgen: Remove brute-force printing of flags

2018-01-09 Thread Dmitry Safonov
Like, we can do it using index. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 71 ++- 1 file changed, 13 insertions(+), 58 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 51f273319baf..e320f0cbfd62 100644 --- a/ne

[PATCH 2/5] pktgen: Add missing !flag parameters

2018-01-09 Thread Dmitry Safonov
o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ" o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show() o IPSEC now may be disabled Note, that IPV6 is enabled with dst6/src6 parameters, not with a flag parameter. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 8

[PATCH 3/5] pktgen: Add behavior flag names array - pkt_flag_names

2018-01-09 Thread Dmitry Safonov
The array will be used to simplify the code that prints/reads pkg flags. Sorted the array in order of printing the flags in pktgen_if_show() Note: Renamed IPSEC_ON => IPSEC for simplicity. No visible behavior change expected. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 64

[PATCH 1/5] Documentation/pktgen: Clearify how-to use pktgen samples

2018-01-09 Thread Dmitry Safonov
o Change process name in ps output: looks like, these days the process is named kpktgend_, rather than pktgen/. o Use pg_ctrl for start/stop as it can work well with pgset without changes to $(PGDEV) variable. o Clarify a bit needed $(PGDEV) definition for sample scripts and that one needs to

[PATCH 0/5] pktgen: Behavior flags fixes

2018-01-09 Thread Dmitry Safonov
There are a bunch of fixes/cleanups/Documentations. Diffstat says for itself, regardless added docs and missed flag parameters. Cc: Arnd Bergmann Cc: "David S. Miller" Cc: David Windsor Cc: Eric Dumazet Cc: Ingo Molnar Cc: Johannes Berg Cc: Mark Rutland Cc: Radu Rendec Cc: "Reshetova, Elen

Re: [PATCH net, v3] of_mdio: avoid MDIO bus removal when a PHY is missing

2018-01-09 Thread Andrew Lunn
On Tue, Jan 09, 2018 at 02:43:34PM +0200, Madalin Bucur wrote: > If one of the child devices is missing the of_mdiobus_register_phy() > call will return -ENODEV. When a missing device is encountered the > registration of the remaining PHYs is stopped and the MDIO bus will > fail to register. Propag

[patch net-next v7 00/13] net: sched: allow qdiscs to share filter block instances

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Currently the filters added to qdiscs are independent. So for example if you have 2 netdevices and you create ingress qdisc on both and you want to add identical filter rules both, you need to add them twice. This patchset makes this easier and mainly saves resources allowing to

[patch net-next v7 06/13] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko During block bind, we need to check tc offload feature. If it is disabled yet still the block contains offloaded filters, forbid the bind. Also forbid to register callback for a block that already contains offloaded filters, as the play back is not supported now. For keeping trac

[patch net-next v7 11/13] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 9 -- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c| 33 +++

[patch net-next v7 13/13] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ++-- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c| 2

[patch net-next v7 12/13] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-by: Jiri Pirko --- v2->v3: - add tc offload featur

[patch net-next v7 10/13] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 10

[patch net-next v7 08/13] net: sched: add rt netlink message type for block get

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Add simple block get operation which primary purpose is to check the block existence by block index. Signed-off-by: Jiri Pirko --- v6->v7: - new patch --- include/uapi/linux/rtnetlink.h | 6 net/sched/cls_api.c| 64 ++

[patch net-next v7 09/13] net: sched: allow ingress and clsact qdiscs to share filter blocks

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Benefit from the previously introduced shared filter blocks infrastructure and allow ingress and clsact qdisc instances to share filter blocks. The block index is coming from userspace as qdisc option. Signed-off-by: Jiri Pirko --- v6->v7: - adjust to the core changes and check

[patch net-next v7 05/13] net: sched: remove classid and q fields from tcf_proto

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Both are no longer used, so remove them. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 2 -- net/sched/cls_api.c | 7 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index df97c3e..d

[patch net-next v7 04/13] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Couple of classifiers call netif_keep_dst directly on q->dev. That is not possible to do directly for shared blocke where multiple qdiscs are owning the block. So introduce a infrastructure to keep track of the block owners in list and use this list to implement block variant of

[patch net-next v7 01/13] net: sched: introduce support for multiple filter chain pointers registration

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko So far, there was possible only to register a single filter chain pointer to block->chain[0]. However, when the blocks will get shareable, we need to allow multiple filter chain pointers registration. Signed-off-by: Jiri Pirko --- v6->v7: - unsquashed shared block patch that wa

[patch net-next v7 03/13] net: sched: avoid usage of tp->q in tcf_classify

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Use block index in the messages instead. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 9b45950..31e91dc 100644 --- a/net/sched/cls_api.c +++ b/net/sched

[patch net-next v7 07/13] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko As the tcm_ifindex 0 is invalid ifindex, reuse it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is 0, tcm_parent is used to carry block_index. If the block is set to be shared between at least 2 qdiscs, it is forbidden to use the qdisc handle to add/de

[patch net-next v7 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put extended modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 index. This index is passed from user during the qdisc creation. If user

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Andrew Lunn
On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: > In case of success, the return values of (__)phy_write() and > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while > (__)phy_modify() returns the old PHY register value. > > Apparently this change was catered f

Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Andrew Lunn
On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses > nearly the same code path. > > Signed-off-by: Antoine Tenart Thanks for adding the co

[patch iproute2 net-next v7 3/3] tc: implement filter block sharing to ingress and clsact qdiscs

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/pkt_sched.h | 11 + tc/q_clsact.c | 52 ++ tc/q_ingress.c | 30 +--- 3 files changed, 85 insertions(+), 8 deletions(-) diff --g

[patch iproute2 net-next v7 2/3] tc: introduce support for block-handle for filter operations

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_filter.c | 127 + 1 file changed, 110 insertions(+), 17 deletions(-) diff --git a/tc/tc_filter.c b/tc/tc_filter.c index 545cc3a..67a0577 100644 --- a/tc/tc_filter.c +++ b/tc/tc_filter.c

[patch iproute2 net-next v7 1/3] include: update rtnetlink header according to kernel

2018-01-09 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/rtnetlink.h | 12 1 file changed, 12 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 13bf56f..34ed866 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/l

Re: [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context

2018-01-09 Thread Michael Holzheu
Am Thu, 14 Dec 2017 21:07:23 +0100 schrieb Daniel Borkmann : > The assumption of unconditionally reloading skb pointers on > BPF helper calls where bpf_helper_changes_pkt_data() holds > true is wrong. There can be different contexts where the > BPF helper would enforce a reload such as in case of

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 03:10:08PM +0100, Andrew Lunn wrote: > On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: > > In case of success, the return values of (__)phy_write() and > > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while > > (__)phy_modify() returns

Re: [PATCH 07/18] [media] uvcvideo: prevent bounds-check bypass via speculative execution

2018-01-09 Thread Laurent Pinchart
Hi Greg, On Tuesday, 9 January 2018 12:04:10 EET Greg KH wrote: > On Tue, Jan 09, 2018 at 10:40:21AM +0200, Laurent Pinchart wrote: > > On Saturday, 6 January 2018 11:40:26 EET Greg KH wrote: > >> On Sat, Jan 06, 2018 at 10:09:07AM +0100, Greg KH wrote: > >> > >> While I'm all for fixing this typ

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Niklas Cassel
enable ? BMCR_LOOPBACK : 0); > + int ret = phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK, > + enable ? BMCR_LOOPBACK : 0); > + > + return ret < 0 ? ret : 0; > } > EXPORT_SYMBOL(genphy_loopback); > > This patch solves the following pro

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Geert Uytterhoeven
Hi Russell, On Tue, Jan 9, 2018 at 3:22 PM, Russell King - ARM Linux wrote: > On Tue, Jan 09, 2018 at 03:10:08PM +0100, Andrew Lunn wrote: >> On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: >> > In case of success, the return values of (__)phy_write() and >> > (__)phy_modify()

[PATCH net-next 0/4] ipv6: Add support for non-equal-cost multipath

2018-01-09 Thread Ido Schimmel
This set aims to add support for IPv6 non-equal-cost multipath routes. The first three patches convert multipath selection to use the hash-threshold method (RFC 2992) instead of modulo-N. The same method is employed by the IPv4 routing code since commit 0e884c78ee19 ("ipv4: L3 hash-based multipath"

[PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops

2018-01-09 Thread Ido Schimmel
Before we convert IPv6 to use hash-threshold instead of modulo-N, we first need each nexthop to store its region boundary in the hash function's output space. The boundary is calculated by dividing the output space equally between the different active nexthops. That is, nexthops that are not dead

[PATCH net-next 2/4] ipv6: Use a 31-bit multipath hash

2018-01-09 Thread Ido Schimmel
The hash thresholds assigned to IPv6 nexthops are in the range of [-1, 2^31 - 1], where a negative value is assigned to nexthops that should not be considered during multipath selection. Therefore, in a similar fashion to IPv4, we need to use the upper 31-bits of the multipath hash for multipath s

[PATCH net-next 4/4] ipv6: Add support for non-equal-cost multipath

2018-01-09 Thread Ido Schimmel
The use of hash-threshold instead of modulo-N makes it trivial to add support for non-equal-cost multipath. Instead of dividing the multipath hash function's output space equally between the nexthops, each nexthop is assigned a region size which is proportional to its weight. Signed-off-by: Ido S

[PATCH net-next 3/4] ipv6: Use hash-threshold instead of modulo-N

2018-01-09 Thread Ido Schimmel
Now that each nexthop stores its region boundary in the multipath hash function's output space, we can use hash-threshold instead of modulo-N in multipath selection. This reduces the number of checks we need to perform during lookup, as dead and linkdown nexthops are assigned a negative region bou

Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses > nearly the same code path. For 2500Base-X, do you report a speed of 2500Mbps through et

Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses > nearly the same code path. Sorry, also... > @@ -4668,6 +4692,10 @@ static void mvpp2_p

Re: [PATCH 07/18] [media] uvcvideo: prevent bounds-check bypass via speculative execution

2018-01-09 Thread Greg KH
On Tue, Jan 09, 2018 at 04:26:28PM +0200, Laurent Pinchart wrote: > Hi Greg, > > On Tuesday, 9 January 2018 12:04:10 EET Greg KH wrote: > > On Tue, Jan 09, 2018 at 10:40:21AM +0200, Laurent Pinchart wrote: > > > On Saturday, 6 January 2018 11:40:26 EET Greg KH wrote: > > >> On Sat, Jan 06, 2018 at

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Andrew Lunn
> > I took a quick look at the uses of phy_modify(). I don't see any uses > > of the return code other than as an error indicator. So having it > > return 0 on success seems like a better fix. > > I'd like to avoid that, because I don't want to have yet another > accessor that needs to be used for

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 03:48:13PM +0100, Andrew Lunn wrote: > > > I took a quick look at the uses of phy_modify(). I don't see any uses > > > of the return code other than as an error indicator. So having it > > > return 0 on success seems like a better fix. > > > > I'd like to avoid that, becaus

[PATCH v2 1/3] net: Fix possible race in peernet2id_alloc()

2018-01-09 Thread Kirill Tkhai
peernet2id_alloc() is racy without rtnl_lock() as atomic_read(&peer->count) under net->nsid_lock does not guarantee, peer is alive: rcu_read_lock() peernet2id_alloc().. spin_lock_bh(&net->nsid_lock) .. atomic_read(&peer->count) == 1 .. .

[PATCH v2 3/3] net: Remove spinlock from get_net_ns_by_id()

2018-01-09 Thread Kirill Tkhai
idr_find() is safe under rcu_read_lock() and maybe_get_net() guarantees that net is alive. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |2 -- 1 file changed, 2 deletions(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 497135f314ce..5f9e18b31a1a 100644

[PATCH v2 2/3] net: Add BUG_ON() to get_net()

2018-01-09 Thread Kirill Tkhai
Since people may mistakenly obtain destroying net from net_namespace_list and from net::netns_ids without checking for its net::counter, let's protect against such situations and insert BUG_ON() to stop move on after this. Panic is better, than memory corruption and undefined behavior. Signed-off

Re: [PATCH bpf] bpf: prevent out-of-bounds speculation

2018-01-09 Thread Mark Rutland
On Mon, Jan 08, 2018 at 10:49:01AM -0800, Linus Torvalds wrote: > On Mon, Jan 8, 2018 at 9:05 AM, Mark Rutland wrote: > > > > I'm a little worried that in the presence of some CPU/compiler > > optimisations, the masking may effectively be skipped under speculation. > > So I'm not sure how robust t

Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Antoine Tenart
Hi Russell, On Tue, Jan 09, 2018 at 02:42:38PM +, Russell King - ARM Linux wrote: > On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 > > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and us

Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Antoine Tenart
Hi Russell, On Tue, Jan 09, 2018 at 02:44:48PM +, Russell King - ARM Linux wrote: > On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 > > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and us

Re: [PATCH net-next 2/2] openvswitch: add erspan version II support

2018-01-09 Thread William Tu
On Mon, Jan 8, 2018 at 4:03 PM, Pravin Shelar wrote: > On Fri, Jan 5, 2018 at 2:29 PM, William Tu wrote: >> The patch adds support for configuring the erspan version II >> fields for openvswitch. >> > The patch looks good, But it could change userspace API for > OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, h

[PATCH v2] vhost: Remove the unused variable.

2018-01-09 Thread Tonghao Zhang
The patch (7235acdb1) changed the way of the work flushing in which the queued seq, done seq, and the flushing are not used anymore. Then remove them now. Fixes: 7235acdb1 ("vhost: simplify work flushing") Cc: Jason Wang Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/vhost

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

2018-01-09 Thread Pablo Neira Ayuso
On Mon, Jan 08, 2018 at 08:55:58PM -0500, David Miller wrote: > From: Pablo Neira Ayuso > Date: Mon, 8 Jan 2018 21:19:08 +0100 > > > The following patchset contains Netfilter/IPVS updates for your > > net-next tree: > ... > > 4) Add generic flow table offload infrastructure for nf_tables, this

Re: [PATCH net-next] vhost_net: batch used ring update in rx

2018-01-09 Thread Michael S. Tsirkin
On Tue, Jan 09, 2018 at 06:27:45PM +0800, Jason Wang wrote: > This patch tries to batched used ring update during RX. This is pretty > fit for the case when guest is much faster (e.g dpdk based > backend). In this case, used ring is almost empty: > > - we may get serious cache line misses/contendi

Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support

2018-01-09 Thread Antoine Tenart
Hi Russell, On Tue, Jan 09, 2018 at 04:17:35PM +0100, Antoine Tenart wrote: > On Tue, Jan 09, 2018 at 02:44:48PM +, Russell King - ARM Linux wrote: > > On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > > > val |= MVPP2_GMAC_CONFIG_GMII_SPEED | > > > M

Re: [patch iproute2 v7 2/2] tc: Add batchsize feature for filter and actions

2018-01-09 Thread Stephen Hemminger
On Tue, 9 Jan 2018 15:59:08 +0900 Chris Mi wrote: > +static bool batchsize_enabled(int argc, char *argv[]) > +{ > + if (argc < 2) > + return false; > + if ((strcmp(argv[0], "filter") && strcmp(argv[0], "action")) > + || (strcmp(argv[1], "add") && strcmp(argv[1], "dele

Re: [PATCH iproute2] ip fou: Pass family attribute as u8

2018-01-09 Thread Stephen Hemminger
On Sun, 7 Jan 2018 15:28:13 +0100 Filip Moc wrote: > This fixes fou on big-endian systems. > > Signed-off-by: Filip Moc Applied

Re: [iproute2 1/2] ss: fix crash when skipping disabled header field

2018-01-09 Thread Stephen Hemminger
On Sun, 7 Jan 2018 02:31:49 +0800 Antonio Quartulli wrote: > When the first header field is disabled (i.e. when passing the -t > option), field_flush() is invoked with the `buffer` global variable > still zero'd. > However, in field_flush() we try to access buffer.cur->len > during variables ini

Re: [PATCH net-next V2 0/2] XDP transmission for tuntap

2018-01-09 Thread David Miller
From: Jason Wang Date: Thu, 4 Jan 2018 11:14:26 +0800 > This series tries to implement XDP transmission (ndo_xdp_xmit) for > tuntap. Pointer ring was used for queuing both XDP buffers and > sk_buff, this is done by encoding the type into lowest bit of the > pointer and storin XDP metadata in the

  1   2   3   4   >