Re: DPAA Ethernet problems with mainstream Linux kernels

2018-01-17 Thread Christian Zigotzky
Hi Jamie, Many thanks for your effort. If you need a new kernel for testing please let me know. Cheers, Christian Sent from my iPhone > On 18. Jan 2018, at 02:59, Jamie Krueger > wrote: > > Hi Madalin, > > On 01/16/2018 11:33 AM, Madalin-cristian Bucur wrote: > > Here are some results fro

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread Jiri Pirko
Thu, Jan 18, 2018 at 08:16:54AM CET, ido...@idosch.org wrote: >On Wed, Jan 17, 2018 at 04:15:04PM -0800, David Ahern wrote: >> How about the attached - make ping, ping6 and mz variables? Default to >> ping and mausezahn but let users update that name if necessary. Comments >> in the sample config t

Re: [RFC PATCH] e1000e: Remove Other from EIAC.

2018-01-17 Thread Benjamin Poirier
On 2018/01/18 15:50, Benjamin Poirier wrote: > It was reported that emulated e1000e devices in vmware esxi 6.5 Build > 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver > overrun interrupt bursts", v4.15-rc1). Some tracing shows that after > e1000e_trigger_lsc() is called, I

Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests

2018-01-17 Thread Ido Schimmel
Hi Andrew, Florian On Thu, Jan 18, 2018 at 12:11:11AM +0100, Andrew Lunn wrote: > > >> However, a similar kind of flexibility can be achieved by using VRFs and > > >> by looping the switch ports together. For example: > > >> > > >> br0 > > >>

Re: [RFC PATCH] e1000e: Remove Other from EIAC.

2018-01-17 Thread Benjamin Poirier
On 2018/01/18 15:50, Benjamin Poirier wrote: > It was reported that emulated e1000e devices in vmware esxi 6.5 Build > 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver > overrun interrupt bursts", v4.15-rc1). Some tracing shows that after > e1000e_trigger_lsc() is called, I

Re: AIO operation and CMSG

2018-01-17 Thread Stephan Mueller
Am Mittwoch, 17. Januar 2018, 20:22:13 CET schrieb Christoph Hellwig: Hi Christoph, > On Sun, Jan 14, 2018 at 09:01:00AM +0100, Stephan Müller wrote: > > The syscall io_submit sends data to the kernel and invokes the respective > > handler function in the kernel such as the recvmsg handler. What

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread Ido Schimmel
On Wed, Jan 17, 2018 at 04:15:04PM -0800, David Ahern wrote: > How about the attached - make ping, ping6 and mz variables? Default to > ping and mausezahn but let users update that name if necessary. Comments > in the sample config to the effect need to be added to help users. Yes, looks good to m

[RFC PATCH] e1000e: Remove Other from EIAC.

2018-01-17 Thread Benjamin Poirier
It was reported that emulated e1000e devices in vmware esxi 6.5 Build 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts", v4.15-rc1). Some tracing shows that after e1000e_trigger_lsc() is called, ICR reads out as 0x0 in e1000_msix_other() on emulated

[PATCH net] netlink: reset extack earlier in netlink_rcv_skb

2018-01-17 Thread Xin Long
Move up the extack reset/initialization in netlink_rcv_skb, so that those 'goto ack' will not skip it. Otherwise, later on netlink_ack may use the uninitialized extack and cause kernel crash. Fixes: cbbdf8433a5f ("netlink: extack needs to be reset each time through loop") Reported-by: syzbot+03bee

[PATCH net-next 0/5] add some features to hns3 driver

2018-01-17 Thread Peng Li
This patchset adds some features to hns3 driver, include the support for ethtool command -d, -p and support for manager table. [Patch 1/5] adds support for ethtool command -d, its ops is get_regs. driver will send command to command queue, and get regs number and regs value from command queue. [Pa

[PATCH net-next 5/5] net: hns3: add net status led support for fiber port

2018-01-17 Thread Peng Li
From: Jian Shen Check the net status per second, include port speed, total rx/tx packets and link status. Updating the led status for fiber port. Signed-off-by: Jian Shen Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet/hisilicon/hns3/hns3pf/

[PATCH net-next 1/5] net: hns3: add support for get_regs

2018-01-17 Thread Peng Li
From: Fuyun Liang This patch adds get_regs support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 +- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 23 +++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd

[PATCH net-next 3/5] net: hns3: add ethtool -p support for phy device

2018-01-17 Thread Peng Li
From: Jian Shen Add led location support for phy device. The led will keep blinking with frequency 2HZ when locating. Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 12 +++ ...

[PATCH net-next 4/5] net: hns3: add ethtool -p support for fiber port

2018-01-17 Thread Peng Li
From: Jian Shen Add led location support for fiber port. The led will keep blinking when locating. Signed-off-by: Jian Shen Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 20 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 101 -

[PATCH net-next 2/5] net: hns3: add manager table initialization for hardware

2018-01-17 Thread Peng Li
From: Fuyun Liang The manager table is empty by default. If it is not initialized, the management pkgs like LLDP will be dropped by hardware. Default entries need to be added to manager table. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_c

Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-17 Thread Willem de Bruijn
On Thu, Jan 18, 2018 at 12:20 AM, Willem de Bruijn wrote: > On Wed, Jan 17, 2018 at 10:48 PM, Jason Wang wrote: >> >> >> On 2018年01月18日 07:11, Willem de Bruijn wrote: >>> >>> From: Willem de Bruijn >>> >>> Validate gso_type of untrusted SKB_GSO_DODGY packets during >>> segmentation. >>> >>> Untru

[PATCH] ixgbe: fix ipv6 support for ipsec offload

2018-01-17 Thread Shannon Nelson
Fix up the Rx path to watch for and decode ipv6 headers that might be carrying ipsec headers. To do so, we first change the search function to be able to take both ipv4 and ipv6 addresses from a pointer, and add an argument that tells which we are using. Then in the Rx handler we add a check for

Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-17 Thread Willem de Bruijn
On Wed, Jan 17, 2018 at 10:48 PM, Jason Wang wrote: > > > On 2018年01月18日 07:11, Willem de Bruijn wrote: >> >> From: Willem de Bruijn >> >> Validate gso_type of untrusted SKB_GSO_DODGY packets during >> segmentation. >> >> Untrusted user packets are limited to a small set of gso types in >> virtio_

Re: [PATCH net] net: validate untrusted gso packets

2018-01-17 Thread Willem de Bruijn
virtio_net_hdr_to_skb checks gso_type, but it does not verify that this type correctly describes the actual packet. Segmentation happens based on packet contents. So a packet was crafted to enter sctp gso, even though no such gso_type exists. This issue is not specific to sctp.

Re: [RFC][PATCH] get rid of the use of set_fs() (by way of kernel_recvmsg()) in sunrpc

2018-01-17 Thread Al Viro
On Wed, Jan 17, 2018 at 07:16:02PM -0800, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 7:06 PM, Al Viro wrote: > > > > Similar to the way put_cmsg() handles 32bit case on biarch > > targets, introduce a flag telling put_cmsg() to treat > > ->msg_control as kernel pointer, using memcpy instead o

Re: [PATCH v2 net 0/2] IB/ipoib: ip link support

2018-01-17 Thread Jason Gunthorpe
On Mon, Jan 15, 2018 at 01:13:09PM -0500, David Miller wrote: > From: Denis Drozdov > Date: Tue, 9 Jan 2018 23:42:45 +0200 > > > IP link was broken due to the changes in IPoIB for the rdma_netdev > > support after commit cd565b4b51e5 > > ("IB/IPoIB: Support acceleration options callbacks"). > >

Re: [PATCH net] flow_dissector: properly cap thoff field

2018-01-17 Thread Jason Wang
On 2018年01月18日 06:21, Eric Dumazet wrote: From: Eric Dumazet syzbot reported yet another crash [1] that is caused by insufficient validation of DODGY packets. Two bugs are happening here to trigger the crash. 1) Flow dissection leaves with incorrect thoff field. 2) skb_probe_transport_head

Re: [PATCH 2/3] tcp: Add ESP encapsulation support

2018-01-17 Thread Herbert Xu
On Tue, Jan 16, 2018 at 11:28:23AM +0100, Steffen Klassert wrote: > > > Is there any chance this can be done with almost no change in TCP > > stack, using a layer model ? ( net/kcm comes to mind ) > > Herbert, would this be an option or is this not possible? Yes it can be done. I'm working on it

Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-17 Thread Jason Wang
On 2018年01月18日 07:11, Willem de Bruijn wrote: From: Willem de Bruijn Validate gso_type of untrusted SKB_GSO_DODGY packets during segmentation. Untrusted user packets are limited to a small set of gso types in virtio_net_hdr_to_skb. But segmentation occurs on packet contents. Syzkaller was abl

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread Kai Heng Feng
> On 18 Jan 2018, at 11:04 AM, Hayes Wang wrote: > > [...] >>> r8153 on Dell TB15/16 dock corrupts rx packets. >>> >>> This change is suggested by Realtek. They guess that the XHCI >>> controller doesn't have enough buffer, and their guesswork is correct, >>> once the RX aggregation gets disabl

Re: [PATCH net] net: validate untrusted gso packets

2018-01-17 Thread Jason Wang
On 2018年01月17日 22:27, Willem de Bruijn wrote: On Wed, Jan 17, 2018 at 6:54 AM, Jason Wang wrote: On 2018年01月17日 12:33, Willem de Bruijn wrote: On Tue, Jan 16, 2018 at 11:04 PM, Jason Wang wrote: On 2018年01月17日 04:29, Willem de Bruijn wrote: From: Willem de Bruijn Validate gso packet ty

Re: [RFC][PATCH] get rid of the use of set_fs() (by way of kernel_recvmsg()) in sunrpc

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 7:06 PM, Al Viro wrote: > > Similar to the way put_cmsg() handles 32bit case on biarch > targets, introduce a flag telling put_cmsg() to treat > ->msg_control as kernel pointer, using memcpy instead of > copy_to_user(). That allows to avoid the use of kernel_recvmsg() > wi

[PATCH bpf-next 1/8] bpf: arraymap: move checks out of alloc function

2018-01-17 Thread Jakub Kicinski
Use the new callback to perform allocation checks for array maps. The fd maps don't need a special allocation callback, they only need a special check callback. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- kernel/bpf/arraymap.c | 42 -- 1

[PATCH bpf-next 8/8] nfp: bpf: add short busy wait for FW replies

2018-01-17 Thread Jakub Kicinski
Scheduling out and in for every FW message can slow us down unnecessarily. Our experiments show that even under heavy load the FW responds to 99.9% messages within 200 us. Add a short busy wait before entering the wait queue. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp

[PATCH bpf-next 7/8] selftest/bpf: extend the offload test with map checks

2018-01-17 Thread Jakub Kicinski
Check map device information is reported correctly, and perform basic map operations. Check device destruction gets rid of the maps and map allocation failure path by telling netdevsim to reject map offload via DebugFS. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/bpf/Makefile

[PATCH bpf-next 6/8] netdevsim: bpf: support fake map offload

2018-01-17 Thread Jakub Kicinski
Add to netdevsim ability to pretend it's offloading BPF maps. We only allow allocation of tiny 2 entry maps, to keep things simple. Mutex lock may seem heavy for the operations we perform, but we want to make sure callbacks can sleep. Signed-off-by: Jakub Kicinski --- drivers/net/netdevsim/bpf.

[PATCH bpf-next 5/8] tools: bpftool: report device information for offloaded maps

2018-01-17 Thread Jakub Kicinski
Print the information about device on which map is created. Signed-off-by: Jakub Kicinski --- tools/bpf/bpftool/map.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index 8d7db9d6b9cd..a152c1a5c94c 100644 --- a/tools/bp

[PATCH bpf-next 3/8] bpf: offload: allow array map offload

2018-01-17 Thread Jakub Kicinski
The special handling of different map types is left to the driver. Allow offload of array maps by simply adding it to accepted types. For nfp we have to make sure array elements are not deleted. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 2 ++ kernel/bpf

[PATCH bpf-next 4/8] bpf: offload: report device information about offloaded maps

2018-01-17 Thread Jakub Kicinski
Tell user space about device on which the map was created. Unfortunate reality of user ABI makes sharing this code with program offload difficult but the information is the same. Signed-off-by: Jakub Kicinski --- include/linux/bpf.h| 2 ++ include/uapi/linux/bpf.h | 3 +++ ke

[pull request bpf-next 0/8] bpf: offload: array maps, reporting and test

2018-01-17 Thread Jakub Kicinski
Hi! This set bring in the rest of map offload code held up by urgent fixes and improvements to the BPF arrays. The first 3 patches take care of array map offload, similarly to hash maps the attribute validation is split out to a separate map op, and used for both offloaded and non-offloaded case

[PATCH bpf-next 2/8] bpf: arraymap: use bpf_map_init_from_attr()

2018-01-17 Thread Jakub Kicinski
Arraymap was not converted to use bpf_map_init_from_attr() to avoid merge conflicts with emergency fixes. Do it now. Signed-off-by: Jakub Kicinski --- kernel/bpf/arraymap.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c in

[RFC][PATCH] get rid of the use of set_fs() (by way of kernel_recvmsg()) in sunrpc

2018-01-17 Thread Al Viro
On Wed, Jan 17, 2018 at 06:52:32PM +, Al Viro wrote: [use of set_fs() by sunrpc] > We are asking for recvmsg() with zero data length; what we really want is > ->msg_control. And _that_ is why we need that set_fs() - we want the damn > thing to go into local variable. > > But note that fillin

RE: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread Hayes Wang
[...] > > r8153 on Dell TB15/16 dock corrupts rx packets. > > > > This change is suggested by Realtek. They guess that the XHCI > > controller doesn't have enough buffer, and their guesswork is correct, > > once the RX aggregation gets disabled, the issue is gone. > > > > ASMedia is currently worki

[PATCH net-next 07/12] nfp: add TLV capabilities to the BAR

2018-01-17 Thread Jakub Kicinski
NFP is entirely programmable, including the PCI data interface. Using a fixed control BAR layout certainly makes implementations easier, but require careful considerations when space is allocated. Once BAR area is allocated to one feature nothing else can use it. Allocating space statically also re

[PATCH net-next 06/12] nfp: improve app not found message

2018-01-17 Thread Jakub Kicinski
When driver app matching loaded FW is not found users are faced with: nfp: failed to find app with ID 0x%02x This message does not properly explain that matching driver code is either not built into the driver or the driver is too old. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der

[PATCH net-next 05/12] nfp: protect each repr pointer individually with RCU

2018-01-17 Thread Jakub Kicinski
Representors are grouped in sets by type. Currently the whole sets are under RCU protection, but individual representor pointers are not. This causes some inconveniences when representors have to be destroyed, because we have to allocate new sets to remove any representors. Protect the individua

[PATCH net-next 04/12] nfp: add nfp_reprs_get_locked() helper

2018-01-17 Thread Jakub Kicinski
The write side of repr tables is always done under pf->lock. Add a helper to dereference repr table pointers under protection of that lock. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/nfp_app.c | 12 ++-- drivers/net/ethernet

[PATCH net-next 09/12] nfp: read mailbox address from TLV caps

2018-01-17 Thread Jakub Kicinski
Allow specifying alternative vNIC mailbox location in TLV caps. This way we can size the mailbox to the needs and not necessarily waste 512B of ctrl memory space. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 20 ++

[PATCH net-next 02/12] nfp: release global resources only on the remove path

2018-01-17 Thread Jakub Kicinski
NFP app is currently shut down as soon as all the vNICs are gone. This means we can't depend on the app existing throughout the lifetime of the device. Free the app only from PCI remove path. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/n

[PATCH net-next 11/12] nfp: allow apps to disable ctrl vNIC capabilities

2018-01-17 Thread Jakub Kicinski
Most vNIC capabilities are netdev related. It makes no sense to initialize them and waste FW resources. Some are even counter-productive, like IRQ moderation, which will slow down exchange of control messages. Add to nfp_app a mask of enabled control vNIC capabilities for apps to use. Make flow

[PATCH net-next 10/12] nfp: split reading capabilities out of nfp_net_init()

2018-01-17 Thread Jakub Kicinski
nfp_net_init() is a little long and we are about to add more code to reading capabilties. Move the capability reading, parsing and validating out. Only actual initialization will stay in nfp_net_init(). No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe ---

[PATCH net-next 08/12] nfp: read ME frequency from vNIC ctrl memory

2018-01-17 Thread Jakub Kicinski
PCIe island clock frequency is used when converting coalescing parameters from usecs to NFP timestamps. Most chips don't run at 1200MHz, allow FW to provide us with the real frequency. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/nfp_net_

[PATCH net-next 01/12] nfp: core: make scalar CPP helpers fail on short accesses

2018-01-17 Thread Jakub Kicinski
Currently the helpers for accessing 4 or 8 byte values over the CPP bus return the length of IO on success. If the IO was short caller has to deal with error handling. The short IO for 4/8B values is completely impractical. Make the helpers return an error if full access was not possible. Fix th

[PATCH net-next 03/12] nfp: register devlink after app is created

2018-01-17 Thread Jakub Kicinski
Devlink used to have two global locks: devlink lock and port lock, our lock ordering looked like this: devlink lock -> driver's pf->lock -> devlink port lock After recent changes port lock was replaced with per-instance lock. Unfortunately, new per-instance lock is taken on most operations now

[PATCH net-next 12/12] nfp: bpf: disable all ctrl vNIC capabilities

2018-01-17 Thread Jakub Kicinski
BPF firmware currently exposes IRQ moderation capability. The driver will make use of it by default, inserting 50 usec delay to every control message exchange. This cuts the number of messages per second we can exchange by almost half. None of the other capabilities make much sense for BPF contro

[PATCH net-next 00/12] nfp: devlink, capabilities extensions and updates

2018-01-17 Thread Jakub Kicinski
Hi! This series starts with an improvement to the usability of the device memory accessors (CPP transactions). Next few patches are devoted to fixing the devlink locking. After recent patches for mlxsw the locking scheme of devlink ops has to be reworked. Following patches improve NFP code deal

Re: dangers of bots on the mailing lists was Re: divide error in ___bpf_prog_run

2018-01-17 Thread Joe Perches
On Wed, 2018-01-17 at 17:46 -0800, Eric Biggers wrote: > On Wed, Jan 17, 2018 at 05:18:17PM -0800, Joe Perches wrote: > > On Wed, 2018-01-17 at 20:09 -0500, Theodore Ts'o wrote: > > > get_maintainer.pl, which is often not accurate > > > > Examples please. > > > > Well, the primary problem is tha

RE: [PATCH] net: fec: add necessary defines to work on ARM64

2018-01-17 Thread Andy Duan
From: Lucas Stach Sent: Thursday, January 18, 2018 2:31 AM >The i.MX8 is a ARMv8 based SoC, that uses the same FEC IP as the earlier, >ARMv7 based, i.MX SoCs. Allow the driver to work on ARM64. > >Signed-off-by: Lucas Stach >--- > drivers/net/ethernet/freescale/fec.h | 5 +++-- > drivers/net

Re: dangers of bots on the mailing lists was Re: divide error in ___bpf_prog_run

2018-01-17 Thread Eric Biggers
On Wed, Jan 17, 2018 at 05:18:17PM -0800, Joe Perches wrote: > On Wed, 2018-01-17 at 20:09 -0500, Theodore Ts'o wrote: > > get_maintainer.pl, which is often not accurate > > Examples please. > Well, the primary problem is that place the crash occurs is not necessarily responsible for the bug. B

[PATCH net-next] net: hns: Fix for variable may be used uninitialized warnings

2018-01-17 Thread Huazhong Tan
When !CONFIG_REGMAP hns throws compiler warnings since dsaf_read_syscon ignores the return result from regmap_read, which allows val to be uninitialized. Fixes: 86897c960b49 ("net: hns: add syscon operation for dsaf") Reported-by: Jason Gunthorpe Signed-off-by: Huazhong Tan Signed-off-by: Yunshe

Re: [PATCH] net/mlx5e: Fix trailing semicolon

2018-01-17 Thread Saeed Mahameed
On 01/17/2018 04:09 AM, Luis de Bethencourt wrote: > The trailing semicolon is an empty statement that does no operation. > Removing it since it doesn't do anything. > > Signed-off-by: Luis de Bethencourt Looks Good, Thanks Luis. Reviewed-by: Saeed Mahameed

Re: [PATCHv2 net-next 8/8] net: sched: cls_u32: add extack support

2018-01-17 Thread Jakub Kicinski
On Wed, 17 Jan 2018 17:40:27 -0500, Alexander Aring wrote: > diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c > index 8840baa1b9b4..daeac7282387 100644 > --- a/net/sched/cls_u32.c > +++ b/net/sched/cls_u32.c > @@ -524,8 +524,10 @@ static int u32_replace_hw_hnode(struct tcf_proto *tp, > struc

Re: [PATCHv2 net-next 7/8] net: sched: cls: add extack support for tc_setup_cb_call

2018-01-17 Thread Jakub Kicinski
On Wed, 17 Jan 2018 17:40:26 -0500, Alexander Aring wrote: > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 9f88107c29c5..e864ad523800 100644 > --- a/net/sched/cls_api.c > +++ b/net/sched/cls_api.c > @@ -1566,21 +1566,26 @@ static int tc_exts_setup_cb_egdev_call(struct > tcf_exts *

linux-next: build warning after merge of the net-next tree

2018-01-17 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning: net/sched/cls_api.c: In function 'tc_dump_tfilter': net/sched/cls_api.c:1362:8: warning: 'parent' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!tcf_chai

Re: dangers of bots on the mailing lists was Re: divide error in ___bpf_prog_run

2018-01-17 Thread Joe Perches
On Wed, 2018-01-17 at 20:09 -0500, Theodore Ts'o wrote: > get_maintainer.pl, which is often not accurate Examples please.

pull-request: bpf 2018-01-18

2018-01-17 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a divide by zero due to wrong if (src_reg == 0) check in 64-bit mode. Properly handle this in interpreter and mask it also generically in verifier to guard against similar checks

[PATCH net-next] macvlan: Pass SIOC[SG]HWTSTAMP ioctls and get_ts_info to lower device

2018-01-17 Thread grzegorz . halat
This patch allows to enable hardware timestamping on macvlan intefaces and find out capabilities of the lower device. Signed-off-by: Grzegorz Halat --- drivers/net/macvlan.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/net/macvlan.c b/

Re: dangers of bots on the mailing lists was Re: divide error in ___bpf_prog_run

2018-01-17 Thread Theodore Ts'o
On Wed, Jan 17, 2018 at 04:21:13PM -0800, Alexei Starovoitov wrote: > > If syzkaller can only test one tree than linux-next should be the one. Well, there's been some controversy about that. The problem is that it's often not clear if this is long-standing bug, or a bug which is in a particular

linux-next: manual merge of the net-next tree with the net tree

2018-01-17 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/tun.c between commit: 4df0bfc79904 ("tun: fix a memory leak for tfile->tx_array") from the net tree and commits: 8bf5c4ee1889 ("tun: setup xdp_rxq_info") 5990a30510ed ("tun/tap: use ptr_ring instead o

[PATCH bpf-next 0/2] bpf: increase bpf test coverage

2018-01-17 Thread Alexei Starovoitov
BPF verifier has 700+ tests used to check correctness of the verifier. Beyond checking the verifier log tell kernel to run accepted programs as well via bpf_prog_test_run() command. That improves quality of the tests and increases bpf test coverage. Alexei Starovoitov (2): bpf: allow socket_filt

[PATCH bpf-next 1/2] bpf: allow socket_filter programs to use bpf_prog_test_run

2018-01-17 Thread Alexei Starovoitov
in order to improve test coverage allow socket_filter program type to be run via bpf_prog_test_run command. Since such programs can be loaded by non-root tighten permissions for bpf_prog_test_run to be root only to avoid surprises. Signed-off-by: Alexei Starovoitov --- kernel/bpf/syscall.c | 2 +

[PATCH bpf-next 2/2] selftests/bpf: make test_verifier run most programs

2018-01-17 Thread Alexei Starovoitov
to improve test coverage make test_verifier run all successfully loaded programs on 64-byte zero initialized data. For clsbpf and xdp it means empty 64-byte packet. For lwt and socket_filters it's 64-byte packet where skb->data points after L2. Signed-off-by: Alexei Starovoitov --- tools/testing

Re: [bpf-next PATCH] samples/bpf: xdp2skb_meta comment explain why pkt-data pointers are invalidated

2018-01-17 Thread Daniel Borkmann
On 01/17/2018 11:17 AM, Jesper Dangaard Brouer wrote: > Improve the 'unknown reason' comment, with an actual explaination of why > the ctx pkt-data pointers need to be loaded after the helper function > bpf_xdp_adjust_meta(). Based on the explaination Daniel gave. > > Fixes: 36e04a2d78d9 ("sample

Re: [PATCH bpf-next 0/3] bpf: add dumping and disassembler for non-host JITs

2018-01-17 Thread Daniel Borkmann
On 01/17/2018 01:05 AM, Jakub Kicinski wrote: > Hi, > > Currently bpftool could disassemble host jited image, for example x86_64, > using libbfd. However it couldn't disassemble offload jited image. > > There are two reasons: > > 1. bpf_obj_get_info_by_fd/struct bpf_prog_info couldn't get the

Re: [PATCH bpf v2] bpf: mark dst unknown on inconsistent {s,u}bounds adjustments

2018-01-17 Thread Alexei Starovoitov
On Thu, Jan 18, 2018 at 01:15:21AM +0100, Daniel Borkmann wrote: > syzkaller generated a BPF proglet and triggered a warning with > the following: > > 0: (b7) r0 = 0 > 1: (d5) if r0 s<= 0x0 goto pc+0 >R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 > 2: (1f) r0 -= r1 >R0=inv0 R1=ctx(id=0,of

Re: [PATCH RFC net-next 6/6] rds: zerocopy Tx support.

2018-01-17 Thread Willem de Bruijn
On Wed, Jan 17, 2018 at 7:20 AM, Sowmini Varadhan wrote: > If the MSG_ZEROCOPY flag is specified with rds_sendmsg(), and, > if the SO_ZEROCOPY socket option has been set on the PF_RDS socket, > application pages sent down with rds_sendmsg() are pinned. > > The pinning uses the accounting infrastru

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread David Ahern
On 1/17/18 3:06 PM, Florian Fainelli wrote: > diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index 7bf8b85ade16..9f732c3dc2ce 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -295,10 +295,29 @@ static ssize_t carrier_changes_show(struct device *dev, > struct n

Re: [RFC v2 net-next 02/10] net: ipv4: raw: Hook into time based transmission.

2018-01-17 Thread Eric Dumazet
On Wed, 2018-01-17 at 15:06 -0800, Jesus Sanchez-Palencia wrote: > From: Richard Cochran > > For raw packets, copy the desired future transmit time from the CMSG > cookie into the skb. > > Signed-off-by: Richard Cochran > Signed-off-by: Jesus Sanchez-Palencia > --- > net/ipv4/raw.c | 2 ++ >

Re: [PATCH RFC net-next 5/6] rds: support for zcopy completion notification

2018-01-17 Thread Willem de Bruijn
On Wed, Jan 17, 2018 at 7:20 AM, Sowmini Varadhan wrote: > RDS removes a datagram from the retransmit queue when an ACK is > received. The ACK indicates that the receiver has queued the > RDS datagram, so that the sender can safely forget the datagram. > > If the datagram to be removed had pinned

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Andrei Vagin
On Thu, Jan 18, 2018 at 01:06:52AM +0100, Andrew Lunn wrote: > > What is the idea to have two separate counters? Can a delta between them > > be a bigger than 1? > > Yes, it can. > > These counters are incremented in netif_carrier_on() / > netif_carrier_off(). They are not always called in pairs

Re: dangers of bots on the mailing lists was Re: divide error in ___bpf_prog_run

2018-01-17 Thread Alexei Starovoitov
On Wed, Jan 17, 2018 at 03:47:35PM -0500, Theodore Ts'o wrote: > On Wed, Jan 17, 2018 at 12:09:18PM +0100, Dmitry Vyukov wrote: > > On Wed, Jan 17, 2018 at 10:49 AM, Daniel Borkmann > > wrote: > > > Don't know if there's such a possibility, but it would be nice if we could > > > target fuzzing fo

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread David Ahern
On 1/17/18 3:52 PM, Jiri Pirko wrote: > Thu, Jan 18, 2018 at 12:06:57AM CET, f.faine...@gmail.com wrote: >> From: David Decotigny >> >> Expose the number of times the link has been going UP or DOWN, and >> update the "carrier_changes" counter to be the sum of these two events. >> While at it, also

[PATCH bpf v2] bpf: mark dst unknown on inconsistent {s,u}bounds adjustments

2018-01-17 Thread Daniel Borkmann
syzkaller generated a BPF proglet and triggered a warning with the following: 0: (b7) r0 = 0 1: (d5) if r0 s<= 0x0 goto pc+0 R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 2: (1f) r0 -= r1 R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 verifier internal error: known but bad sbounds What happens

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread David Ahern
On 1/17/18 3:31 PM, Jiri Pirko wrote: > Wed, Jan 17, 2018 at 11:59:10PM CET, ro...@cumulusnetworks.com wrote: >> On Wed, Jan 17, 2018 at 2:46 PM, Roopa Prabhu >> wrote: >>> On Wed, Jan 17, 2018 at 1:01 PM, Jiri Pirko wrote: Wed, Jan 17, 2018 at 09:48:54PM CET, dsah...@gmail.com wrote: >

Re: remove pci_dma_* abuses and workarounds V2

2018-01-17 Thread Bjorn Helgaas
[+cc David] On Wed, Jan 10, 2018 at 07:03:18PM +0100, Christoph Hellwig wrote: > Back before the dawn of time pci_dma_* with a NULL pci_dev argument > was used for all kinds of things, e.g. dma mapping for non-PCI > devices. All this has been long removed, but it turns out we > still care for a N

Re: [PATCH 3/4] tsi108_eth: use dma API properly

2018-01-17 Thread Bjorn Helgaas
[+cc David, FYI, I plan to merge this via PCI along with the rest of Christoph's series] On Wed, Jan 10, 2018 at 07:03:21PM +0100, Christoph Hellwig wrote: > We need to pass a struct device to the dma API, even if some > architectures still support that for legacy reasons, and should not mix > it

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Andrew Lunn
> What is the idea to have two separate counters? Can a delta between them > be a bigger than 1? Yes, it can. These counters are incremented in netif_carrier_on() / netif_carrier_off(). They are not always called in pairs and they can be called multiple times for the same event. The phylib will c

Re: [PATCH RFC net-next 4/6] sock: permit SO_ZEROCOPY on PF_RDS socket

2018-01-17 Thread Willem de Bruijn
On Wed, Jan 17, 2018 at 7:20 AM, Sowmini Varadhan wrote: > allow the application to set SO_ZEROCOPY on the underlying sk > of a PF_RDS socket > > Signed-off-by: Sowmini Varadhan > --- > net/core/sock.c |7 +++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/net/core/s

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Jiri Pirko
Thu, Jan 18, 2018 at 12:06:57AM CET, f.faine...@gmail.com wrote: >From: David Decotigny > >Expose the number of times the link has been going UP or DOWN, and >update the "carrier_changes" counter to be the sum of these two events. >While at it, also update the sysfs-class-net documentation to cove

Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue

2018-01-17 Thread Willem de Bruijn
On Wed, Jan 17, 2018 at 7:19 AM, Sowmini Varadhan wrote: > Allow the application the ability to use MSG_PEEK with sk_error_queue > so that it can peek and re-read message in cases where MSG_TRUNC > may be encountered. > > Signed-off-by: Sowmini Varadhan > int sock_recv_errqueue(struct sock *sk,

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Andrei Vagin
On Wed, Jan 17, 2018 at 03:06:57PM -0800, Florian Fainelli wrote: > From: David Decotigny > > Expose the number of times the link has been going UP or DOWN, and > update the "carrier_changes" counter to be the sum of these two events. > While at it, also update the sysfs-class-net documentation t

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

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 10:33:32PM CET, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Wed, 17 Jan 2018 21:18:07 +0100 > >> Odd. I don't see this warning with: >> gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC) > >Yeah, for reference I'm using: > >gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2) I

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 11:59:10PM CET, ro...@cumulusnetworks.com wrote: >On Wed, Jan 17, 2018 at 2:46 PM, Roopa Prabhu >wrote: >> On Wed, Jan 17, 2018 at 1:01 PM, Jiri Pirko wrote: >>> Wed, Jan 17, 2018 at 09:48:54PM CET, dsah...@gmail.com wrote: On 1/15/18 11:18 AM, Ido Schimmel wrote: >

Re: [PATCH net] net: validate untrusted gso packets

2018-01-17 Thread Willem de Bruijn
> From: Willem de Bruijn > > Validate gso packet type and headers on kernel entry. Reuse the info > gathered by skb_probe_transport_header. > > Syzbot found two bugs by passing bad gso packets in packet sockets. > Untrusted user packets are limited to a small set of gso

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Jakub Kicinski
On Wed, 17 Jan 2018 15:06:57 -0800, Florian Fainelli wrote: > +What:/sys/class/net// ?

Re: [PATCH net-next] net: stmmac: Fix reception of Broadcom switches tags

2018-01-17 Thread Florian Fainelli
Hi Peppe, On 01/16/2018 11:06 PM, Giuseppe CAVALLARO wrote: > Hi Florian > > for gmac4.x and gmac3.x series the ACS bit is the Automatic Pad or CRC > Stripping, so the > core strips the Pad or FCS on frames if the value of the length field is > < 1536 bytes. > For MAC10-100 there is the Bit 8 (AS

[RFC iproute2] tc: Add support for the TBS Qdisc

2018-01-17 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes The Time Based Scheduler (TBS) queueing discipline allows precise control of the transmission time of packets. The syntax is: tc qdisc add dev DEV parent NODE tbs delta clockid offload <1|0> Signed-off-by: Vinicius Costa Gomes --- include/uap

[PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-17 Thread Willem de Bruijn
From: Willem de Bruijn Validate gso_type of untrusted SKB_GSO_DODGY packets during segmentation. Untrusted user packets are limited to a small set of gso types in virtio_net_hdr_to_skb. But segmentation occurs on packet contents. Syzkaller was able to enter gso callbacks that are not hardened ag

Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests

2018-01-17 Thread Andrew Lunn
> >> However, a similar kind of flexibility can be achieved by using VRFs and > >> by looping the switch ports together. For example: > >> > >> br0 > >> + > >>vrf-h1 | vrf-h2 > >> +

[RFC v2 net-next 03/10] net: ipv4: udp: Hook into time based transmission.

2018-01-17 Thread Jesus Sanchez-Palencia
From: Richard Cochran For udp packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/udp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ipv4/udp.c b/net/

[RFC v2 net-next 05/10] net/sched: Allow creating a Qdisc watchdog with other clocks

2018-01-17 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes This adds 'qdisc_watchdog_init_clockid()' that allows a clockid to be passed, this allows other time references to be used when scheduling the Qdisc to run. Signed-off-by: Vinicius Costa Gomes --- include/net/pkt_sched.h | 2 ++ net/sched/sch_api.c | 11

[RFC v2 net-next 02/10] net: ipv4: raw: Hook into time based transmission.

2018-01-17 Thread Jesus Sanchez-Palencia
From: Richard Cochran For raw packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/raw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 1

[PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Florian Fainelli
From: David Decotigny Expose the number of times the link has been going UP or DOWN, and update the "carrier_changes" counter to be the sum of these two events. While at it, also update the sysfs-class-net documentation to cover: carrier_changes (3.15), count_link_up (4.16) and count_link_down (4

[RFC v2 net-next 06/10] net/sched: Introduce the TBS Qdisc

2018-01-17 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes TBS (Time Based Scheduler) uses the information added earlier in this series (the socket option SO_TXTIME and the new role of sk_buff->tstamp) to schedule traffic transmission based on absolute time. For some workloads, just bandwidth enforcement is not enough, and pre

[RFC v2 net-next 04/10] net: packet: Hook into time based transmission.

2018-01-17 Thread Jesus Sanchez-Palencia
From: Richard Cochran For raw layer-2 packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/packet/af_packet.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/packet/af_packe

  1   2   3   4   >