[PATCH] can: flexcan: change .tseg1_min value to 2 in bittiming const

2019-04-29 Thread Joakim Zhang
Time Segment1(tseg1) is composed of Propagate Segment(prop_seg) and Phase Segmeng1(phase_seg1). The range of Time Segment1(plus 2) is 2 up to 16 according to latest reference manual. That means the minimum value of PROPSEG and PSEG1 bit field is 0. So change .tseg1 min value to 2. Signed-off-by: J

[PATCH rdma-next v2 04/17] RDMA/restrack: Make is_visible_in_pid_ns() as an API

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Remove is_visible_in_pid_ns() from nldev.c and make it as a restrack API, so that it can be taken advantage by other parts like counter. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/nldev.c| 15 ++-

[PATCH mlx5-next v2 07/17] IB/mlx5: Support set qp counter

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Support bind a qp with counter. If counter is null then bind the qp to the default counter. Different QP state has different operation: - RESET: Set the counter field so that it will take effective during RST2INIT change; - RTS: Issue an RTS2RTS change to update the QP counter;

[PATCH rdma-next v2 09/17] IB/mlx5: Support statistic q counter configuration

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Add support for ib callbacks counter_bind_qp() and counter_unbind_qp(). Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 55 +++ 1 file changed, 55 insertions(+) diff --git

[PATCH 11/12] net: ll_temac: Allow configuration of IRQ coalescing

2019-04-29 Thread Esben Haabendal
This allows custom setup of IRQ coalescing for platforms using legacy platform_device. The irq timeout and count parameters can be used for tuning cpu load vs. latency. I have maintained the 0x0400 bit in TX_CHNL_CTRL. It is specified as unused in the documentation I have available. It does

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

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang This patch adds the ability to return all available counters together with their properties and hwstats. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/counters.c | 28 + drivers/infiniband/core/device.c

[PATCH rdma-next v2 15/17] RDMA/nldev: Allow counter manual mode configration through RDMA netlink

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Provide an option to allow users to manually bind a qp with a counter through RDMA netlink. Limit it to users with ADMIN capability only. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/nldev.c | 111 +++

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

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Since a QP can only be bound to one counter, then if it is bound to a separate counter, for backward compatibility purpose, the statistic value must be: * stat of default counter + stat of all running allocated counters + stat of all deallocated counters (history stats) Signed-o

[PATCH rdma-next v2 08/17] IB/mlx5: Add counter set id as a parameter for mlx5_ib_query_q_counters()

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Add counter set id as a parameter so that this API can be used for querying any q counter. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-

[PATCH rdma-next v2 10/17] RDMA/nldev: Allow counter auto mode configration through RDMA netlink

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Provide an option to enable/disable per-port counter auto mode through RDMA netlink. Limit it to users with ADMIN capability only. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/nldev.c | 78 +++

[PATCH rdma-next v2 14/17] RDMA/counter: Allow manual mode configuration support

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang In manual mode a QP is bound to a counter manually. If counter is not specified then a new one will be allocated. Manually mode is enabled when user binds a QP, and disabled when the last manually bound QP is unbound. When auto-mode is turned off and there are counters left, manu

[PATCH rdma-next v2 03/17] RDMA/restrack: Add an API to attach a task to a resource

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Add rdma_restrack_attach_task() which is able to attach a task other then "current" to a resource. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/restrack.c | 14 ++ drivers/infiniband/core/restrack.

[PATCH rdma-next v2 12/17] IB/mlx5: Add counter_alloc_stats() and counter_update_stats() support

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Add support for ib callback counter_alloc_stats() and counter_update_stats(). Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a

[PATCH rdma-next v2 02/17] RDMA/restrack: Introduce statistic counter

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Introduce statistic counter as a new resource. It allows a user to monitor specific objects (e.g., QPs) by binding to a counter. In some cases a user counter resource is created with task other then "current", because its creation is done as part of rdmatool call. Signed-off-by

[PATCH rdma-next v2 16/17] RDMA/nldev: Allow get counter mode through RDMA netlink

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Provide an option to get current counter mode through RDMA netlink. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/counters.c | 13 + drivers/infiniband/core/nldev.c| 78 +- 2

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

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang This patch adds the ability to return the hwstats of per-port default counters (which can also be queried through sysfs nodes). Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/nldev.c | 101 +++- 1 file changed,

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

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang In auto mode all QPs belong to one category are bind automatically to a single counter set. Currently only "qp type" is supported. In this mode the qp counter is set in RST2INIT modification, and when a qp is destroyed the counter is unbound. Signed-off-by: Mark Zhang Reviewed

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

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Add an API to support set/clear per-port auto mode. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/counters.c | 77 ++ drivers/infiniband/c

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

2019-04-29 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1 -> v2: * Rebased to latest rdma-next v0 -> v1: * Changed wording of counter comment * Removed unneeded assignments * Added extra patch to present global counters * I didn't change QP type from int to be enum ib_qp_type, because it caused to cyclic de

[PATCH 08/12] net: ll_temac: Fix iommu/swiotlb leak

2019-04-29 Thread Esben Haabendal
Unmap the actual buffer length, not the amount of data received, avoiding resource exhaustion of swiotlb (seen on x86_64 platform). Signed-off-by: Esben Haabendal --- drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ether

[PATCH 05/12] net: ll_temac: Fix support for little-endian platforms

2019-04-29 Thread Esben Haabendal
Both TEMAC and SDMA is big-endian, so make sure that all values in SDMA buffer descriptors (cmdac_bd) are handled as big-endian, independent of the host endianness. With all currently supported platforms being big-endian, this change does not make a change for any of them. Note, when using app3 an

[PATCH 06/12] net: ll_temac: Allow use on x86 platforms

2019-04-29 Thread Esben Haabendal
With little-endian and 64-bit support in place, the ll_temac driver can now be used on x86 and x86_64 platforms. And while at it, enable COMPILE_TEST also. Signed-off-by: Esben Haabendal --- drivers/net/ethernet/xilinx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH 12/12] net: ll_temac: Enable DMA when ready, not before

2019-04-29 Thread Esben Haabendal
As soon as TAILDESCR_PTR is written, DMA transfers might start. Let's ensure we are ready to receive DMA IRQ's before doing that. Signed-off-by: Esben Haabendal --- drivers/net/ethernet/xilinx/ll_temac_main.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dr

[PATCH mlx5-next v2 01/17] net/mlx5: Add rts2rts_qp_counters_set_id field in hca cap

2019-04-29 Thread Leon Romanovsky
From: Mark Zhang Add rts2rts_qp_counters_set_id field in hca cap so that RTS2RTS qp modification can be used to change the counter of a QP. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky --- include/linux/mlx5/mlx5_ifc.h | 4 +++- 1 file changed, 3 inserti

RE: [PATCH net] packet: in recvmsg msg_name return at least sockaddr_ll

2019-04-29 Thread David Laight
From: Willem de Bruijn [mailto:willemdebruijn.ker...@gmail.com] > Sent: 26 April 2019 20:30 > Packet send checks that msg_name is at least sizeof sockaddr_ll. > Packet recv must return at least this length, so that its output > can be passed unmodified to packet send. > > This ceased to be true si

RE: [PATCH net] packet: validate msg_namelen in send directly

2019-04-29 Thread David Laight
From: Willem de Bruijn > Sent: 26 April 2019 20:28 > Packet sockets in datagram mode take a destination address. Verify its > length before passing to dev_hard_header. > > Prior to 2.6.14-rc3, the send code ignored sll_halen. This is > established behavior. Directly compare msg_namelen to dev->add

[PATCH bpf-next 2/6] tools: bpftool: add --log-all option to print all possible log info

2019-04-29 Thread Quentin Monnet
The --log-all option is a shortcut for "--log-libbpf warn,info,debug". It tells bpftool to print all possible logs from libbpf, and may be extended in the future to set other log levels from other components as well. This option has a short name: "-l". Signed-off-by: Quentin Monnet Reviewed-by:

[PATCH bpf-next 3/6] libbpf: add bpf_object__load_xattr() API function to pass log_level

2019-04-29 Thread Quentin Monnet
libbpf was recently made aware of the log_level attribute for programs, used to specify the level of information expected to be dumped by the verifier. Create an API function to pass additional attributes when loading a bpf_object, so we can set this log_level value in programs when loading them,

[PATCH bpf-next 5/6] tools: bpf: report latest changes from BPF UAPI header to tools

2019-04-29 Thread Quentin Monnet
BPF verifier log level flags were moved from an internal header to the UAPI header file. Report the changes accordingly. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- tools/include/uapi/linux/bpf.h | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/include/uapi/linux

[PATCH bpf-next 6/6] tools: bpftool: add --log-verifier option to print kernel debug logs

2019-04-29 Thread Quentin Monnet
Add a new --log-verifier option to set the log level for the kernel verifier, even in case the program loads successfully. This can be used to print verifier statistics, for example. The mandatory argument is a comma-separated list of values, which can be "level1", "level2", or "stats". The defaul

[PATCH bpf-next 0/6] tools: bpftool: add options for debug info from libbpf and verifier

2019-04-29 Thread Quentin Monnet
Hi, This series adds several options to bpftool to make it print additional information via libbpf or the kernel verifier when attempting to load programs. A first option is used to select the log level for libbpf, and a second one is used for the verifier level. A third option (with a short name)

[PATCH bpf-next 4/6] bpf: make BPF_LOG_* flags available in UAPI header

2019-04-29 Thread Quentin Monnet
The kernel verifier combines several flags to select what kind of logs to print to the log buffer provided by users. In order to make it easier to provide the relevant flags, move the related #define-s to the UAPI header, so that applications can set for example: attr->log_level = BPF_LOG_LEVEL1 |

[PATCH bpf-next 1/6] tools: bpftool: add --log-libbpf option to get debug info from libbpf

2019-04-29 Thread Quentin Monnet
libbpf has three levels of priority for output: warn, info, debug. By default, debug output is not printed to stderr. Add a new "--log-libbpf LOG_LEVEL" option to bpftool to provide more flexibility on the log level for libbpf. LOG_LEVEL is a comma-separated list of levels of log to print ("warn",

Re: [PATCH 5/5] isdn: move capi drivers to staging

2019-04-29 Thread Thomas Jarosch
Hi Arnd, You wrote on Thu, Apr 25, 2019 at 01:24:09PM +0200: > > > Right, this is what I'm trying to find out here. I realize that there > > > are (very few) remaining users of ISDN voice services, but this only > > > matters if someone uses them > > > > > > 1. with a modern Linux kernel, and plan

[PATCH v4 net-next 04/15] net: aquantia: link interrupt handling function

2019-04-29 Thread Igor Russkikh
Define link interrupt handler Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlan

[PATCH v4 net-next 13/15] net: aquantia: get total counters from DMA block

2019-04-29 Thread Igor Russkikh
From: Dmitry Bogdanov aq_nic_update_ndev_stats pushes statistics to ndev->stats from system interface. This is not always good because it counts packets/bytes before any of rx filters (including mac filter). Its better to report the packet/bytes statistics from DMA counters which gives actual va

[PATCH v4 net-next 06/15] net: aquantia: link status irq handling

2019-04-29 Thread Igor Russkikh
Here we define and request an extra interrupt line, assign it on link isr handler and restructure abit aq_pci code to better support that. We also remove logic for using different timer intervals depending on link state, since thats now useless. Signed-off-by: Igor Russkikh --- .../net/ethernet

[PATCH v4 net-next 08/15] net: aquantia: use macros for better visibility

2019-04-29 Thread Igor Russkikh
Improve for better readability Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 8 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --

[PATCH v4 net-next 05/15] net: aquantia: create global service workqueue

2019-04-29 Thread Igor Russkikh
From: Nikita Danilov We need this to schedule link interrupt handling and various service tasks. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_main.c | 41 +++ .../net/ethernet/aquantia/atlantic/aq_main.h | 2 + .../eth

[PATCH v4 net-next 15/15] net: aquantia: remove outdated device ids

2019-04-29 Thread Igor Russkikh
From: Nikita Danilov Some device ids were never released and does not exist. Cleanup these. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_common.h| 3 --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 6 -- d

[PATCH v4 net-next 12/15] net: aquantia: fetch up to date statistics on ethtool request

2019-04-29 Thread Igor Russkikh
From: Dmitry Bogdanov This improves ethtool -S usage, where stats are now actual on each request. Before that stats only were updated at service timer period. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov --- drivers/net/ethernet/aquantia/atlantic/aq_n

[PATCH v4 net-next 07/15] net: aquantia: improve ifup link detection

2019-04-29 Thread Igor Russkikh
Original code detected link only after 1 sec is passed after up. Here we replace this with direct service callback which updates link status immediately Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v4 net-next 14/15] net: aquantia: fixups on 64bit dma counters

2019-04-29 Thread Igor Russkikh
From: Dmitry Bogdanov DMA counters are 64 bit and we can fetch that to reduce counter overflow, espesially on byte counters. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov --- .../ethernet/aquantia/atlantic/aq_hw_utils.c | 12 ++ .../ethernet/aquan

[PATCH v4 net-next 03/15] net: aquantia: add link interrupt fields

2019-04-29 Thread Igor Russkikh
Declare macroes and nic fields to support link interrupt handling Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 2 ++ drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v4 net-next 10/15] net: aquantia: introduce fwreq mutex

2019-04-29 Thread Igor Russkikh
From: Nikita Danilov Some of FW operations could be invoked simultaneously, from f.e. ethtool context and from service service activity work. Here we introduce a fw mutex to secure and serialize access to FW logic. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../ethernet/aq

[PATCH v4 net-next 09/15] net: aquantia: user correct MSI irq type

2019-04-29 Thread Igor Russkikh
Typo in msi code. No much impact though. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/et

[PATCH v4 net-next 01/15] net: aquantia: add infrastructure to readout chip temperature

2019-04-29 Thread Igor Russkikh
From: Yana Esina Ability to read the chip temperature from memory via hwmon interface Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 2 ++ .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 1 + .../atla

[PATCH v4 net-next 11/15] net: aquantia: extract timer cb into work job

2019-04-29 Thread Igor Russkikh
Service timer callback fetches statistics from FW and that may cause a long delay in error cases. We also now need to use fw mutex to prevent concurrent access to FW, thus - extract that logic from timer callback into the job in the separate work queue. Signed-off-by: Nikita Danilov Signed-off-by

[PATCH v4 net-next 00/15] net: atlantic: Aquantia driver updates 2019-04

2019-04-29 Thread Igor Russkikh
This patchset contains various improvements: - Work targeting link up speedups: link interrupt introduced, some other logic changes to imrove this. - FW operations securing with mutex - Counters and statistics logic improved by Dmitry - read out of chip temperature via hwmon interface implement

[PATCH v4 net-next 02/15] net: aquantia: implement hwmon api for chip temperature

2019-04-29 Thread Igor Russkikh
From: Yana Esina Added support for hwmon api to fetch out chip temperature Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/Makefile | 1 + .../ethernet/aquantia/atlantic/aq_drvinfo.c | 125 ++ .

RE: [PATCH] can: flexcan: change .tseg1_min value to 2 in bittiming const

2019-04-29 Thread Aisheng Dong
> From: Joakim Zhang > Sent: Monday, April 29, 2019 3:48 PM > > Time Segment1(tseg1) is composed of Propagate Segment(prop_seg) and > Phase Segmeng1(phase_seg1). The range of Time Segment1(plus 2) is 2 up to > 16 according to latest reference manual. That means the minimum value of > PROPSEG and P

Re: 32-bit zext time complexity (Was Re: [PATCH bpf-next] selftests/bpf: two scale tests)

2019-04-29 Thread Edward Cree
On 27/04/2019 04:11, Alexei Starovoitov wrote: > instead of converting all insns into lists of 1 before all patching > it can be done on demand: > convert from insn to list only when patching is needed. Makes sense. > Patched insn becomes a pointer to a block of new insns. > We have reserved opcode

RE: [PATCH] can: flexcan: change .tseg1_min value to 2 in bittiming const

2019-04-29 Thread Joakim Zhang
> -Original Message- > From: Aisheng Dong > Sent: 2019年4月29日 18:36 > To: Joakim Zhang ; w...@grandegger.com; > m...@pengutronix.de; da...@davemloft.net > Cc: dl-linux-imx ; linux-...@vger.kernel.org; > netdev@vger.kernel.org > Subject: RE: [PATCH] can: flexcan: change .tseg1_min value to 2

Re: [PATCH net] sctp: avoid running the sctp state machine recursively

2019-04-29 Thread Neil Horman
On Mon, Apr 29, 2019 at 02:16:19PM +0800, Xin Long wrote: > Ying triggered a call trace when doing an asconf testing: > > BUG: scheduling while atomic: swapper/12/0/0x1100 > Call Trace: > [] dump_stack+0x19/0x1b >[] __schedule_bug+0x64/0x72 >[] __schedule+0x9ba/0xa00 >[] _

Re: [PATCH net] sctp: avoid running the sctp state machine recursively

2019-04-29 Thread Marcelo Ricardo Leitner
On Mon, Apr 29, 2019 at 02:16:19PM +0800, Xin Long wrote: > Ying triggered a call trace when doing an asconf testing: > > BUG: scheduling while atomic: swapper/12/0/0x1100 > Call Trace: > [] dump_stack+0x19/0x1b >[] __schedule_bug+0x64/0x72 >[] __schedule+0x9ba/0xa00 >[] _

Re: [PATCH 5/5] isdn: move capi drivers to staging

2019-04-29 Thread Arnd Bergmann
On Mon, Apr 29, 2019 at 11:59 AM Thomas Jarosch wrote: > You wrote on Thu, Apr 25, 2019 at 01:24:09PM +0200: > > I'm still confused by this: You say here that you use the CAPI > > subsystem from the mainline kernel (i.e. /dev/capi20 rather > > than mISDNcapid), but this does not appear to interact

[iproute PATCH] ip-xfrm: Respect family in deleteall and list commands

2019-04-29 Thread Phil Sutter
Allow to limit 'ip xfrm {state|policy} list' output to a certain address family and to delete all states/policies by family. Although preferred_family was already set in filters, the filter function ignored it. To enable filtering despite the lack of other selectors, filter.use has to be set if fa

Re: [PATCH net] packet: validate msg_namelen in send directly

2019-04-29 Thread Willem de Bruijn
On Mon, Apr 29, 2019 at 5:00 AM David Laight wrote: > > From: Willem de Bruijn > > Sent: 26 April 2019 20:28 > > Packet sockets in datagram mode take a destination address. Verify its > > length before passing to dev_hard_header. > > > > Prior to 2.6.14-rc3, the send code ignored sll_halen. This i

Re: [PATCH net] packet: in recvmsg msg_name return at least sockaddr_ll

2019-04-29 Thread Willem de Bruijn
On Mon, Apr 29, 2019 at 5:03 AM David Laight wrote: > > From: Willem de Bruijn [mailto:willemdebruijn.ker...@gmail.com] > > Sent: 26 April 2019 20:30 > > Packet send checks that msg_name is at least sizeof sockaddr_ll. > > Packet recv must return at least this length, so that its output > > can be

RE: [PATCH net] packet: in recvmsg msg_name return at least sockaddr_ll

2019-04-29 Thread David Laight
> Can then also change memset to zero only two bytes in the Ethernet case. > > + if (msg->msg_namelen < sizeof(struct sockaddr_ll)) { > + msg->msg_namelen = sizeof(struct sockaddr_ll); > + memset(msg->msg_name + copy

RE: [PATCH net] packet: validate msg_namelen in send directly

2019-04-29 Thread David Laight
From: Willem de Bruijn > Sent: 29 April 2019 13:53 > On Mon, Apr 29, 2019 at 5:00 AM David Laight wrote: > > > > From: Willem de Bruijn > > > Sent: 26 April 2019 20:28 > > > Packet sockets in datagram mode take a destination address. Verify its > > > length before passing to dev_hard_header. > > >

Re: [PATCH net] packet: in recvmsg msg_name return at least sockaddr_ll

2019-04-29 Thread Willem de Bruijn
On Mon, Apr 29, 2019 at 9:19 AM David Laight wrote: > > > Can then also change memset to zero only two bytes in the Ethernet case. > > > > + if (msg->msg_namelen < sizeof(struct sockaddr_ll)) { > > + msg->msg_namelen = sizeof(struct > > sockaddr

Re: [PATCH net] packet: validate msg_namelen in send directly

2019-04-29 Thread Willem de Bruijn
On Mon, Apr 29, 2019 at 9:25 AM David Laight wrote: > > From: Willem de Bruijn > > Sent: 29 April 2019 13:53 > > On Mon, Apr 29, 2019 at 5:00 AM David Laight > > wrote: > > > > > > From: Willem de Bruijn > > > > Sent: 26 April 2019 20:28 > > > > Packet sockets in datagram mode take a destination

[PATCH net] ipv4: ip_do_fragment: Preserve skb_iif during fragmentation

2019-04-29 Thread Shmulik Ladkani
Previously, during fragmentation after forwarding, skb->skb_iif isn't preserved, i.e. 'ip_copy_metadata' does not copy skb_iif from given 'from' skb. As a result, ip_do_fragment's creates fragments with zero skb_iif, leading to inconsistent behavior. Assume for example an eBPF program attached at

[PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread YueHaibing
Change the call to PTR_ERR to access the value just tested by IS_ERR. Signed-off-by: YueHaibing --- drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index c3cba46fac9d..e37680654a13

[PATCH net-next] bpf: Use PTR_ERR_OR_ZERO in bpf_fd_sk_storage_update_elem()

2019-04-29 Thread YueHaibing
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing --- net/core/bpf_sk_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c index a8e9ac71b22d..cc9597a87770 100644 --- a/net/core/bpf_s

Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread Andrew Lunn
On Mon, Apr 29, 2019 at 01:56:50PM +, YueHaibing wrote: > Change the call to PTR_ERR to access the value just tested by IS_ERR. > > Signed-off-by: YueHaibing Please could you add a Fixes: tag. Reviewed-by: Andrew Lunn Andrew

Re: Testing of r8169 workaround removal

2019-04-29 Thread Neil MacLeod
Hi, just re-sending this email as it doesn't appear to have arrived at the mailing list. Phil Many thanks - you've nailed it! Reverting the workaround from Heiner, and also fc8f36de77111bf925d19f347c2113, resulted in 5.0.6 syncing at 10Mbps after resuming from S3 instead of the 1000Mbps it syncs

Re: TC stats / hw offload question

2019-04-29 Thread Edward Cree
On 26/04/2019 19:49, Pablo Neira Ayuso wrote: > On Fri, Apr 26, 2019 at 01:13:41PM +0100, Edward Cree wrote: >> Thus if (and only if) two TC actions have the same tcfa_index, they will >>  share a single counter in the HW. >> I gathered from a previous conversation with Jamal[1] that that was the >

Re: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread YueHaibing
On 2019/4/29 21:56, Andrew Lunn wrote: > On Mon, Apr 29, 2019 at 01:56:50PM +, YueHaibing wrote: >> Change the call to PTR_ERR to access the value just tested by IS_ERR. >> >> Signed-off-by: YueHaibing > > Please could you add a Fixes: tag. > Ok, will sendv2, thanks! > Reviewed-by: Andrew

[PATCH net-next RFC] Dump SW SQ context as part of tx reporter

2019-04-29 Thread Aya Levin
TX reporter reports an error on two scenarios: - TX timeout on a specific tx queue - TX completion error on a specific send queue Prior to this patch, no dump data was supported by the tx reporter. This patch adds support for SW data dump of the related SQ context. The dump is simply the SQ's raw m

[PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread YueHaibing
Change the call to PTR_ERR to access the value just tested by IS_ERR. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn --- v2: add Fixes tag --- drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file cha

Re: Why should we add duplicate rules without NLM_F_EXCL?

2019-04-29 Thread David Ahern
On 4/28/19 12:21 AM, Hangbin Liu wrote: > Hi David, Mateusz, > > Kernel commit 153380ec4b9b ("fib_rules: Added NLM_F_EXCL support to > fib_nl_newrule") added a check and return -EEXIST if the rule is already > exist. With it the ip rule works as expected now. > > But without NLM_F_EXCL people sti

Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled

2019-04-29 Thread Richard Cochran
On Sun, Apr 28, 2019 at 10:57:57PM -0400, Willem de Bruijn wrote: > It is debatable whether this is a fix or a new feature. It extends > SOF_TIMESTAMPING_OPT_ID to hardware timestamps. I don't think this > would be a stable candidate. Was the original series advertised as SW timestamping only? If

Re: TC stats / hw offload question

2019-04-29 Thread Pablo Neira Ayuso
On Mon, Apr 29, 2019 at 03:11:06PM +0100, Edward Cree wrote: > On 26/04/2019 19:49, Pablo Neira Ayuso wrote: > > On Fri, Apr 26, 2019 at 01:13:41PM +0100, Edward Cree wrote: > >> Thus if (and only if) two TC actions have the same tcfa_index, they will > >>  share a single counter in the HW. > >> I

Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled

2019-04-29 Thread Willem de Bruijn
On Mon, Apr 29, 2019 at 11:02 AM Richard Cochran wrote: > > On Sun, Apr 28, 2019 at 10:57:57PM -0400, Willem de Bruijn wrote: > > It is debatable whether this is a fix or a new feature. It extends > > SOF_TIMESTAMPING_OPT_ID to hardware timestamps. I don't think this > > would be a stable candidat

Re: [PATCH net-next] bpf: Use PTR_ERR_OR_ZERO in bpf_fd_sk_storage_update_elem()

2019-04-29 Thread Martin Lau
On Mon, Apr 29, 2019 at 01:56:11PM +, YueHaibing wrote: > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Acked-by: Martin KaFai Lau

Re: [PATCH net-next] bpf: Use PTR_ERR_OR_ZERO in bpf_fd_sk_storage_update_elem()

2019-04-29 Thread Martin Lau
On Mon, Apr 29, 2019 at 08:40:17AM -0700, Martin KaFai Lau wrote: > On Mon, Apr 29, 2019 at 01:56:11PM +, YueHaibing wrote: > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > Acked-by: Martin KaFai Lau btw, that should go to the bpf-next branch.

[PATCH net v2] packet: in recvmsg msg_name return at least sizeof sockaddr_ll

2019-04-29 Thread Willem de Bruijn
From: Willem de Bruijn Packet send checks that msg_name is at least sizeof sockaddr_ll. Packet recv must return at least this length, so that its output can be passed unmodified to packet send. This ceased to be true since adding support for lladdr longer than sll_addr. Since, the return value u

RE: [PATCH net v2] packet: in recvmsg msg_name return at least sizeof sockaddr_ll

2019-04-29 Thread David Laight
From: Willem de Bruijn > Sent: 29 April 2019 16:47 > Packet send checks that msg_name is at least sizeof sockaddr_ll. > Packet recv must return at least this length, so that its output > can be passed unmodified to packet send. > > This ceased to be true since adding support for lladdr longer than

Re: [PATCH net] ipv6: fix races in ip6_dst_destroy()

2019-04-29 Thread Martin Lau
On Sun, Apr 28, 2019 at 12:22:25PM -0700, Eric Dumazet wrote: > We had many syzbot reports that seem to be caused by use-after-free > of struct fib6_info. > > ip6_dst_destroy(), fib6_drop_pcpu_from() and rt6_remove_exception() > are writers vs rt->from, and use non consistent synchronization among

[PATCH net v2] packet: validate msg_namelen in send directly

2019-04-29 Thread Willem de Bruijn
From: Willem de Bruijn Packet sockets in datagram mode take a destination address. Verify its length before passing to dev_hard_header. Prior to 2.6.14-rc3, the send code ignored sll_halen. This is established behavior. Directly compare msg_namelen to dev->addr_len. Change v1->v2: initialize ad

RE: [PATCH net v2] packet: validate msg_namelen in send directly

2019-04-29 Thread David Laight
From: Willem de Bruijn > Sent: 29 April 2019 16:53 > Packet sockets in datagram mode take a destination address. Verify its > length before passing to dev_hard_header. > > Prior to 2.6.14-rc3, the send code ignored sll_halen. This is > established behavior. Directly compare msg_namelen to dev->add

Re: [PATCH net v2] packet: in recvmsg msg_name return at least sizeof sockaddr_ll

2019-04-29 Thread Willem de Bruijn
On Mon, Apr 29, 2019 at 11:49 AM David Laight wrote: > > From: Willem de Bruijn > > Sent: 29 April 2019 16:47 > > Packet send checks that msg_name is at least sizeof sockaddr_ll. > > Packet recv must return at least this length, so that its output > > can be passed unmodified to packet send. > > >

[PATCH v3 net-next 2/3] ipv4: Pass fib_nh_common to rt_cache_route

2019-04-29 Thread David Ahern
From: David Ahern Now that the cached routes are in fib_nh_common, pass it to rt_cache_route and simplify its callers. For rt_set_nexthop, the tclassid becomes the last user of fib_nh so move the container of under the #ifdef CONFIG_IP_ROUTE_CLASSID. Signed-off-by: David Ahern --- net/ipv4/rou

[PATCH v3 net-next 0/3] ipv4: Move location of pcpu route cache and exceptions

2019-04-29 Thread David Ahern
From: David Ahern This series moves IPv4 pcpu cached routes from fib_nh to fib_nh_common to make the caches available for IPv6 nexthops (fib6_nh) with IPv4 routes. This allows a fib6_nh struct to be used with both IPv4 and and IPv6 routes. v3 - dropped ipv6 patches for now. Will resubmit those o

[PATCH v3 net-next 1/3] ipv4: Move cached routes to fib_nh_common

2019-04-29 Thread David Ahern
From: David Ahern While the cached routes, nh_pcpu_rth_output and nh_rth_input, are IPv4 specific, a later patch wants to make them accessible for IPv6 nexthops with IPv4 routes using a fib6_nh. Move the cached routes from fib_nh to fib_nh_common and update references. Initialization of the cach

[PATCH v3 net-next 3/3] ipv4: Move exception bucket to nh_common

2019-04-29 Thread David Ahern
From: David Ahern Similar to the cached routes, make IPv4 exceptions accessible when using an IPv6 nexthop struct with IPv4 routes. Simplify the exception functions by passing in fib_nh_common since that is all it needs, and then cleanup the call sites that have extraneous fib_nh conversions. As

Re: TC stats / hw offload question

2019-04-29 Thread Edward Cree
On 29/04/2019 16:21, Pablo Neira Ayuso wrote: > On Mon, Apr 29, 2019 at 03:11:06PM +0100, Edward Cree wrote: >> This is a bit of a mess; the best idea I've got is for the >>  TC_CLSFLOWER_STATS call to include a tcfa_index.  Then the driver >>  returns counter stats for that index, and tcf_exts_sta

Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread Julia Lawall
On Mon, 29 Apr 2019, YueHaibing wrote: > Change the call to PTR_ERR to access the value just tested by IS_ERR. I assume you didn't find the problem just looking through the code by hand. If you used a tool, it would be really good to acknowledge the tool that was used. The tools don't come f

Re: [PATCH net] ipv6: fix races in ip6_dst_destroy()

2019-04-29 Thread Wei Wang
On Sun, Apr 28, 2019 at 12:24 PM Eric Dumazet wrote: > > We had many syzbot reports that seem to be caused by use-after-free > of struct fib6_info. > > ip6_dst_destroy(), fib6_drop_pcpu_from() and rt6_remove_exception() > are writers vs rt->from, and use non consistent synchronization among > them

Re: [PATCH 4.9 stable 0/5] net: ip6 defrag: backport fixes

2019-04-29 Thread Captain Wiggum
My $.02 I do not see 4.4 used much in my circles. We do not use it anywhere at McAfee. On Fri, Apr 26, 2019 at 3:27 PM Peter Oskolkov wrote: > > On Fri, Apr 26, 2019 at 8:41 AM Peter Oskolkov wrote: > > > > This is a backport of a 5.1rc patchset: > > https://patchwork.ozlabs.org/cover/1029418/

Re: [PATCH 4.9 stable 0/5] net: ip6 defrag: backport fixes

2019-04-29 Thread Captain Wiggum
I have run the 4.9 patch set on the full TAHI test sweet. Similar to 4.14, it does fix all the IPv6 frag header issues. But the "change MTU" mesg routing is still broken. Overall, it fixes what it was intended to fix, so I suggest it move toward release. Thanks Peter! --John Masinter On Fri, Apr

Re: [PATCH iproute2-next] tc: add support for plug qdisc

2019-04-29 Thread Stephen Hemminger
On Fri, 26 Apr 2019 10:47:52 +0200 Paolo Abeni wrote: > Hi, > > On Wed, 2019-04-24 at 13:49 -0700, Stephen Hemminger wrote: > > On Wed, 24 Apr 2019 18:29:39 +0200 > > Paolo Abeni wrote: > > > > > +static int plug_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr > > > *opt) > > > +{ >

Re: [PATCH 4.9 stable 0/5] net: ip6 defrag: backport fixes

2019-04-29 Thread Captain Wiggum
Hi Peter, I forgot to mention one thing about the 4.9 patch set. When patching against 4.9.170, I had to remove a couple of snippets that were already in release: Patch #604 (linux-4.9-4-ip6-defrag-use-rbtrees.patch): + /usr/bin/cat /home/admin/WORK/os/PACKAGES/kernel49/WORK/linux-4.9-4-ip6-defr

[PATCH net] selftests: fib_rule_tests: Fix icmp proto with ipv6

2019-04-29 Thread David Ahern
From: David Ahern A recent commit returns an error if icmp is used as the ip-proto for IPv6 fib rules. Update fib_rule_tests to send ipv6-icmp instead of icmp. Fixes: 5e1a99eae8499 ("ipv4: Add ICMPv6 support when parse route ipproto") Signed-off-by: David Ahern --- tools/testing/selftests/net/

Re: [PATCH 4.9 stable 0/5] net: ip6 defrag: backport fixes

2019-04-29 Thread Peter Oskolkov
On Mon, Apr 29, 2019 at 10:24 AM Captain Wiggum wrote: > > Hi Peter, > > I forgot to mention one thing about the 4.9 patch set. > When patching against 4.9.170, I had to remove a couple of snippets > that were already in release: Hi John, I see these checks still present in 4.4.171. Maybe you had

Re: [PATCH 2/2] dt-bindings: can: flexcan: add can wakeup property

2019-04-29 Thread Rob Herring
On Tue, 9 Apr 2019 10:39:49 +0200, Sean Nyekjaer wrote: > add wakeup-source boolean property. > > Signed-off-by: Sean Nyekjaer > --- > Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Rob Herring

[PATCH V2 mlx5-next 05/11] net/mlx5: Enable general events on all interfaces

2019-04-29 Thread Saeed Mahameed
From: Aya Levin Open events of type 'GENERAL' to all types of interfaces. Prior to this patch, 'GENERAL' events were captured only by Ethernet interfaces. Other interface types (non-Ethernet) were excluded and couldn't receive 'GENERAL' events. Fixes: 5d3c537f9070 ("net/mlx5: Handle event of pow

[PATCH V2 mlx5-next 02/11] net/mlx5: Get rid of storing copy of device name

2019-04-29 Thread Saeed Mahameed
From: Parav Pandit Currently mlx5 core stores copy of the PCI device name in a mlx5_priv structure and uses pr_warn, pr_err helpers. Get rid of the copy of this name; instead store the parent device pointer that contains name as well as dma specific parameters. This also allows to use kernel's w

  1   2   3   >