Re: WARNING in can_rcv

2018-01-17 Thread Oliver Hartkopp
On 01/17/2018 08:12 AM, Eric Biggers wrote: On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde wrote: On 01/16/2018 06:58 PM, syzbot wrote: Hello, syzkaller hit the following cr

[PATCH net-next 00/14] bnxt_en: Updates for net-next.

2018-01-17 Thread Michael Chan
First, we upgrade the firmware interface spec. Due to a change in the toolchains, the auto-generated bnxt_hsi.h does not match the old bnxt_hsi.h and the patch is really big. This should be just one-time. Going forward, changes should be incremental. The next 10 patches implement a new scheme

[PATCH net-next 14/14] bnxt_en: export a common switchdev PARENT_ID for all reps of an adapter

2018-01-17 Thread Michael Chan
From: Sathya Perla Currently the driver exports different switchdev PARENT_IDs for representors belonging to different SR-IOV PF-pools of an adapter. This is not correct as the adapter can switch across all vports of an adapter. This patch fixes this by exporting a common switchdev PARENT_ID for

[PATCH net-next 03/14] bnxt_en: Restore MSIX after disabling SRIOV.

2018-01-17 Thread Michael Chan
After SRIOV has been enabled and disabled, the MSIX vectors assigned to the VFs have to be re-initialized. Otherwise they cannot be re-used by the PF. For example, increasing the number of PF rings after disabling SRIOV may fail if the PF uses MSIX vectors previously assigned to the VFs. To fix

[PATCH net-next 02/14] bnxt_en: Refactor bnxt_close_nic().

2018-01-17 Thread Michael Chan
Add a new __bnxt_close_nic() function to do all the work previously done in bnxt_close_nic() except waiting for SRIOV configuration. The new function will be used in the next patch as part of SRIOV cleanup. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 32 +

[PATCH net-next 06/14] bnxt_en: Set initial default RX and TX ring numbers the same in combined mode.

2018-01-17 Thread Michael Chan
In combined mode, the driver is currently not setting RX and TX ring numbers the same when firmware can allocate more RX than TX or vice versa. This will confuse the user as the ethtool convention assumes they are the same in combined mode. Fix it by adding bnxt_trim_dflt_sh_rings() to trim RX and

[PATCH net-next 07/14] bnxt_en: Implement new method to reserve rings.

2018-01-17 Thread Michael Chan
The new method will call firmware to reserve the desired tx, rx, cmpl rings, ring groups, stats context, and vnic resources. A second query call will check the actual resources that firmware is able to reserve. The driver will then trim and adjust based on the actual resources provided by firmware

[PATCH net-next 12/14] bnxt_en: Forward VF MAC address to the PF.

2018-01-17 Thread Michael Chan
From: Vasundhara Volam Forward hwrm_func_vf_cfg command from VF to PF driver, to store VF MAC address in PF's context. This will allow "ip link show" to display all VF MAC addresses. Maintain 2 locations of MAC address in VF info structure, one for a PF assigned MAC and one for VF assigned MAC.

[PATCH net-next 04/14] bnxt_en: Refactor hardware resource data structures.

2018-01-17 Thread Michael Chan
In preparation for new firmware APIs to allocate hardware resources, add a new struct bnxt_hw_resc to hold various min, max and reserved resources. This new structure is common for PFs and VFs. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 126 +++

[PATCH net-next 11/14] bnxt_en: Add BCM5745X NPAR device IDs

2018-01-17 Thread Michael Chan
From: Vasundhara Volam Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index b1317eaa..e26521

[PATCH net-next 13/14] bnxt_en: Add cache line size setting to optimize performance.

2018-01-17 Thread Michael Chan
The chip supports 64-byte and 128-byte cache line size for more optimal DMA performance when matched to the CPU cache line size. The default is 64. If the system is using 128-byte cache line size, set it to 128. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 24

[PATCH net-next 10/14] bnxt_en: Expand bnxt_check_rings() to check all resources.

2018-01-17 Thread Michael Chan
bnxt_check_rings() is called by ethtool, XDP setup, and ndo_setup_tc() to see if there are enough resources to support the new configuration. Expand the call to test all resources if the firmware supports the new API. With the more flexible resource allocation scheme, this call must be made to che

[PATCH net-next 08/14] bnxt_en: Reserve resources for RFS.

2018-01-17 Thread Michael Chan
In bnxt_rfs_capable(), add call to reserve vnic resources to support NTUPLE. Return true if we can successfully reserve enough vnics. Otherwise, reserve the minimum 1 VNIC for normal operations not supporting NTUPLE and return false. Also, suppress warning message about not enough resources for N

[PATCH net-next 05/14] bnxt_en: Add the new firmware API to query hardware resources.

2018-01-17 Thread Michael Chan
The new API HWRM_FUNC_RESOURCE_QCAPS provides min and max hardware resources. Use the new API when it is supported by firmware. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 56 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 fil

[PATCH net-next 09/14] bnxt_en: Implement new method for the PF to assign SRIOV resources.

2018-01-17 Thread Michael Chan
Instead of the old method of evenly dividing the resources to the VFs, use the new firmware API to specify min and max resources for each VF. This way, there is more flexibility for each VF to allocate more or less resources. The min is the absolute minimum for each VF to function. The max is the

Re: WARNING in can_rcv

2018-01-17 Thread Oliver Hartkopp
On 01/17/2018 08:39 AM, Dmitry Vyukov wrote: On Wed, Jan 17, 2018 at 8:12 AM, Eric Biggers wrote: On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde wrote: On 01/16/2018 06:58 P

Re: WARNING in can_rcv

2018-01-17 Thread Dmitry Vyukov
On Wed, Jan 17, 2018 at 9:22 AM, Oliver Hartkopp wrote: > > > On 01/17/2018 08:39 AM, Dmitry Vyukov wrote: >> >> On Wed, Jan 17, 2018 at 8:12 AM, Eric Biggers wrote: >>> >>> On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: On 01/16/2018 07:11 PM, Dmitry Vyukov

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

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 01:03:15AM CET, xiyou.wangc...@gmail.com wrote: >On Tue, Jan 16, 2018 at 7:33 AM, Jiri Pirko wrote: >> static int __init tc_filter_init(void) >> { >> + int err; >> + >> tc_filter_wq = alloc_ordered_workqueue("tc_filter_workqueue", 0); >> if (!tc_filter_

Re: [PATCH net-next v2 08/10] net: aquantia: Fix register definitions to linux style

2018-01-17 Thread Igor Russkikh
>> /* register address for bitfield imr_rx{r}_en */ >> static u32 itr_imr_rxren_adr[32] = { >> 0x2100U, 0x2100U, 0x2104U, 0x2104U, >> >> Be nice to change all these to static const Thanks Joe, will do thatin next patchset. BR, Igor

Re: [PATCH iproute2-next] bpf: support map offload

2018-01-17 Thread Daniel Borkmann
On 01/17/2018 08:50 AM, Jakub Kicinski wrote: > When program is loaded with a specified ifindex, use that > ifindex also when creating maps. > > Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann

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

2018-01-17 Thread Pavel Machek
On Fri 2018-01-12 17:58:01, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b What an useful way to describe kernel version. Could we get reasonable subject line? 4.15-rc7: prefix would be nice if it is on mainline, net-next: subject if it

divide error in ___bpf_prog_run

2018-01-17 Thread syzbot
Hello, syzbot tried to test the proposed patch but build/boot failed: failed to apply patch: can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |--- a/scripts/checksyscalls.sh |+++ b/scripts/checks

Re: WARNING in can_rcv

2018-01-17 Thread Marc Kleine-Budde
On 01/17/2018 09:07 AM, Oliver Hartkopp wrote: > > > On 01/17/2018 08:12 AM, Eric Biggers wrote: >> On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: >>> >>> >>> On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde wrote: >

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

2018-01-17 Thread Dmitry Vyukov
On Wed, Jan 17, 2018 at 10:32 AM, Pavel Machek wrote: > On Fri 2018-01-12 17:58:01, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > > What an useful way to describe kernel version. > > Could we get reasonable subject line? 4.15-rc7:

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

2018-01-17 Thread Pavel Machek
On Wed 2018-01-17 10:45:16, Dmitry Vyukov wrote: > On Wed, Jan 17, 2018 at 10:32 AM, Pavel Machek wrote: > > On Fri 2018-01-12 17:58:01, syzbot wrote: > >> Hello, > >> > >> syzkaller hit the following crash on > >> 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > > > > What an useful way to describe ker

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

2018-01-17 Thread Daniel Borkmann
On 01/17/2018 10:32 AM, Pavel Machek wrote: > On Fri 2018-01-12 17:58:01, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > > What an useful way to describe kernel version. > > Could we get reasonable subject line? 4.15-rc7: prefix wo

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

2018-01-17 Thread Dmitry Vyukov
On Wed, Jan 17, 2018 at 10:32 AM, Pavel Machek wrote: > On Fri 2018-01-12 17:58:01, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > > What an useful way to describe kernel version. > > Could we get reasonable subject line? 4.15-rc7:

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

2018-01-17 Thread Pavel Machek
> > > > ...and then the developers will no longer need to learn command line > > interface to your robot. > > > > #syz test: git://gcc.gnu.org/git/gcc.git master > > #syz dup: `date` > > > Pavel, please stop harming the useful process! > syzkaller+syzbot already helped to fix 500+ kernel runtime

[PATCH iproute2-next v2 03/10] rdma: Add filtering infrastructure

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky This patch adds general infrastructure to RDMAtool to handle various filtering options needed for the downstream resource tracking patches. The infrastructure is generic and stores filters in list of key<->value entries. There are three types of filters: 1. Numeric - the v

[PATCH iproute2-next v2 02/10] rdma: Make visible the number of arguments

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 1 + rdma/utils.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rdma/rdma.h b/rdma/rdma.h index cbd9aa89..1b66ae04 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -74,6 +74,7 @@ int rd_exec_cmd(struct

[PATCH iproute2-next v2 00/10] RDMA resource tracking

2018-01-17 Thread Leon Romanovsky
Changelog: v1 -> v2; * Added checks for all occurrences of strdup failures and added patch with fix of already merged code. * Sync with latest kernel code. * Rewrote table representation to be similar to "ip route" output. * Implemented string filters. * Removed curr/max repres

[PATCH iproute2-next v2 07/10] rdma: Add resource tracking summary

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky The global resource summary information. The object names, current utilization and maximum numbers are received as is from the kernel. $ rdma res 1: mlx5_0: pd 3 cq 5 qp 4 2: mlx5_1: pd 3 cq 5 qp 4 3: mlx5_2: pd 3 cq 5 qp 4 4: mlx5_3: pd 2 cq 3 qp 2 5: mlx5_4: pd 3 cq 5 qp

[PATCH iproute2-next v2 09/10] rdma: Document resource tracking

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Spartan version of resource tracking documentation. Signed-off-by: Leon Romanovsky --- man/man8/rdma-resource.8 | 86 1 file changed, 86 insertions(+) create mode 100644 man/man8/rdma-resource.8 diff --git a/man/man8/rdma

[PATCH iproute2-next v2 08/10] rdma: Add QP resource tracking information

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky This patch adds ss-similar interface to view various resource tracked objects. At this stage, only QP is presented. 1. Get all QPs for the specific device: $ rdma res show qp link mlx5_4 link mlx5_4/1 lqpn 7 type UD state RTS sq-psn 0 pid 0 comm [mlx5-gsi] link mlx5_4/1 lqp

[PATCH iproute2-next v2 06/10] rdma: Update kernel header file

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Synchronize iporute2 package with latest kernel RDMA netlink header file. Signed-off-by: Leon Romanovsky --- include/uapi/rdma/rdma_netlink.h | 61 ++-- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/include/uapi/rdma/rd

[PATCH iproute2-next v2 10/10] rdma: Check return value of strdup call

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool") Signed-off-by: Leon Romanovsky --- rdma/utils.c | 4 1 file changed, 4 insertions(+) diff --git a/rdma/utils.c b/rdma/utils.c index 059aa788..f9460162 100644 --- a/rdma/utils.c +++ b/rdma/utils.c @@

[PATCH iproute2-next v2 05/10] rdma: Allow external usage of compare string routine

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 2 ++ rdma/utils.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rdma/rdma.h b/rdma/rdma.h index 35506a96..d2cde895 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -90,6 +90,8 @@ void rd_free(struct rd

[PATCH iproute2-next v2 01/10] rdma: Add option to provide "-" sign for the port number

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky According to the IBTA spec [1], the physical connected port is provided for the QP in RTR-to-INIT stage performed by modify_qp(). It causes to do not have port number for newly created QPs. The following patch adds "-" sign to present absence of port, because QPs are going

[PATCH iproute2-next v2 04/10] rdma: Set pointer to device name position

2018-01-17 Thread Leon Romanovsky
From: Leon Romanovsky The dev and link execution callbacks expects that next command line argument is device or port name. Set pointer to device or port name position prior calls to rd_exec_dev()/rd_exec_link(). Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 1 + rdma/utils.c | 19 +++

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

2018-01-17 Thread Florian Westphal
Pavel Machek wrote: > > > ...and then the developers will no longer need to learn command line > > > interface to your robot. > > > > > > #syz test: git://gcc.gnu.org/git/gcc.git master > > > #syz dup: `date` > > > > > > Pavel, please stop harming the useful process! > > syzkaller+syzbot already

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

2018-01-17 Thread Henrique de Moraes Holschuh
On Wed, 17 Jan 2018, Dmitry Vyukov wrote: > On Wed, Jan 17, 2018 at 10:32 AM, Pavel Machek wrote: > > On Fri 2018-01-12 17:58:01, syzbot wrote: > >> syzkaller hit the following crash on > >> 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > > > > What an useful way to describe kernel version. > > > > Cou

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

2018-01-17 Thread Jesper Dangaard Brouer
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 ("samples/bpf: xdp2skb_meta shows transferring info from XDP to SKB") R

Re: [PATCH v3 net-next 0/4] l2tp: set l2specific_len based on l2specific_type

2018-01-17 Thread Guillaume Nault
On Tue, Jan 16, 2018 at 11:01:53PM +0100, Lorenzo Bianconi wrote: > Do not rely on l2specific_len value provided by userspace but set sublayer > length according to l2specific_type. > Mark L2TP_ATTR_L2SPEC_LEN attribute as not used > Nice. Thanks for doing this work Lorenzo.

Re: net merged into net-next

2018-01-17 Thread Daniel Borkmann
On 01/17/2018 06:19 AM, David Miller wrote: > > Daniel, please double check my merge work especially wrt. your > packet scheduler fix. The merge resolution for the qdisc bits looks good to me, thanks!

Re: KASAN: stack-out-of-bounds Read in __nla_put

2018-01-17 Thread Xin Long
On Wed, Jan 17, 2018 at 1:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > fdddade65d7b5f8779374eb73d09889185280f60 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is

Re: [RFC bpf-next PATCH] bpf: add comments to BPF ld/ldx sizes

2018-01-17 Thread Jesper Dangaard Brouer
On Wed, 17 Jan 2018 00:21:27 +0100 Daniel Borkmann wrote: > On 01/16/2018 12:31 PM, Jesper Dangaard Brouer wrote: > > Doc BPF ld/ldx size defines, as it help me understand the code in filter.c. > > > > Signed-off-by: Jesper Dangaard Brouer > > --- > > 0 files changed > > > > diff --git a/incl

[PATCH net-next] l2tp: remove switch block in l2tp_nl_cmd_session_create()

2018-01-17 Thread Lorenzo Bianconi
Remove the switch block in l2tp_nl_cmd_session_create() that checks pseudowire-specific parameters since just L2TP_PWTYPE_ETH and L2TP_PWTYPE_PPP are currently supported and no actual checks are performed. Moreover the L2TP_PWTYPE_IP/default case presents a harmless issue in error handling (break i

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

2018-01-17 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

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

2018-01-17 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 v11 03/13] net: sched: avoid usage of tp->q in tcf_classify

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko Use block index in the messages instead. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Acked-by: David Ahern --- 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 ee319b1..70059

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

2018-01-17 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 Acked-by: David Ahern --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ++-- .../ethernet/mellanox/mlxsw/spe

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

2018-01-17 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 v11 01/13] net: sched: introduce support for multiple filter chain pointers registration

2018-01-17 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 Acked-by: Jamal Hadi Salim Acked-by: David Ahern

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

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko As the tcm_ifindex with value TCM_IFINDEX_MAGIC_BLOCK is invalid ifindex, use it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is set to TCM_IFINDEX_MAGIC_BLOCK, tcm_parent is used to carry block_index. If the block is set to be shared between at least

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

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

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

2018-01-17 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 Acked-by: Jamal Hadi Salim Acked-by: David Ahern

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

2018-01-17 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 iproute2 net-next v11 3/4] tc: introduce support for block-handle for filter operations

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko So far, qdisc was the only handle that could be used to manipulate filters. Kernel added support for using block to manipulate it. So add the support to use block index to manipulate filters. The magic TCM_IFINDEX_MAGIC_BLOCK indicates the block index is in use. Signed-off-by: J

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

2018-01-17 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..aba8b18 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/l

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

2018-01-17 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 Acked-by: David Ahern --- drivers/net/ethernet/mellanox/ml

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

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko Both are no longer used, so remove them. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Acked-by: David Ahern --- 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_gen

[patch iproute2 net-next v11 4/4] tc: implement ingress/egress block index attributes for qdiscs

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko During qdisc creation it is possible to specify shared block for bot ingress and egress. Pass this values to kernel according to the command line options. Signed-off-by: Jiri Pirko --- man/man8/tc.8 | 6 +- tc/tc_qdisc.c | 36 2 files

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

2018-01-17 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 Acked-by: David Ahern --- v7->v8:

[patch iproute2 net-next v11 2/4] tc: introduce tc_qdisc_block_exists helper

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko This hepler used qdisc dump to list all qdisc and find if block index in question is used by any of them. That means the block with specified index exists. Signed-off-by: Jiri Pirko --- tc/tc_qdisc.c | 61 +++ tc/tc_util.

Re: [PATCH net-next v2] net: sched: red: don't reset the backlog on every stat dump

2018-01-17 Thread Jiri Pirko
Mon, Jan 15, 2018 at 05:01:26AM CET, jakub.kicin...@netronome.com wrote: >Commit 0dfb33a0d7e2 ("sch_red: report backlog information") copied >child's backlog into RED's backlog. Back then RED did not maintain >its own backlog counts. This has changed after commit 2f5fb43f >("net_sched: update

[patch net-next v11 08/13] net: sched: introduce ingress/egress block index attributes for qdisc

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko Introduce two new attributes to be used for qdisc creation and dumping. One for ingress block, one for egress block. Introduce a set of ops that qdisc which supports block sharing would implement. Passing block indexes in qdisc change is not supported yet and it is checked and f

[PATCH] rtl8xxxu: Fix trailing semicolon

2018-01-17 Thread Luis de Bethencourt
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 --- Hi, After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches suggested I fix it treewide [0]. Best regards Luis [0] http://dri

[PATCH][next] mlxsw: spectrum: make function mlxsw_sp_kvdl_part_occ static

2018-01-17 Thread Colin King
From: Colin Ian King The function mlxsw_sp_kvdl_part_occ is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'mlxsw_sp_kvdl_part_occ' was not declared. Should it be static? Signed-off-by: Colin Ian King --- drivers/net/ethernet/

[PATCH] igb: add VF trust infrastructure

2018-01-17 Thread Corinna Vinschen
* Add a per-VF value to know if a VF is trusted, by default don't trust VFs. * Implement netdev op to trust VFs (igb_ndo_set_vf_trust) and add trust status to ndo_get_vf_config output. * Allow a trusted VF to change MAC and MAC filters even if MAC has been administratively set. Signed-off-

[bpf-next PATCH] bpf: add comments to BPF ld/ldx sizes

2018-01-17 Thread Jesper Dangaard Brouer
Doc BPF ld/ldx size defines as comments in code, as it makes in faster to lookup in a programming/review setting, than looking up the sizes in Documentation/networking/filter.txt. Signed-off-by: Jesper Dangaard Brouer --- include/uapi/linux/bpf.h|2 +- include/uapi/linux/bpf_common.h

Re: tun: memory leak in tun_set_iff

2018-01-17 Thread Xin Long
On Wed, Jan 10, 2018 at 2:20 AM, Dmitry Vyukov wrote: > Hello, > > syzkaller has hit the following memory leak on 4.15-rc7. > Reproducer is attached. > > unreeferenced object 0x88002c9ac400 (size 4096): > comm "syz-executor0", pid 12349, jiffies 4295751114 (age 10.067s) > hex dump (first 3

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

2018-01-17 Thread Dmitry Vyukov
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 for specific subsystems in related subtrees directly (e.g. > for bpf in bpf and bpf-next trees as one example). Dmitry? Hi Daniel, It's doable. L

Re: [PATCH net-next] kcm: do not attach sockets if sk_user_data is already used

2018-01-17 Thread James Chapman
On 16 January 2018 at 19:00, David Miller wrote: > From: Tom Herbert > Date: Tue, 16 Jan 2018 09:36:41 -0800 > >> sk_user_data is set with the sk_callback lock held in code below. >> Should be able to take the lock earlier can do this check under the >> lock. > > csock, and this csk, is obtained

[PATCH][devlink-next] devlink: make functions a couple of new functions static

2018-01-17 Thread Colin King
From: Colin Ian King The functions devlink_resource_find and devlink_resource_validate_children are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'devlink_resource_find' was not declared. Should it be static? warning: symbol 'de

Re: [PATCH net-next] l2tp: remove switch block in l2tp_nl_cmd_session_create()

2018-01-17 Thread Guillaume Nault
On Wed, Jan 17, 2018 at 11:41:20AM +0100, Lorenzo Bianconi wrote: > Remove the switch block in l2tp_nl_cmd_session_create() that > checks pseudowire-specific parameters since just L2TP_PWTYPE_ETH and > L2TP_PWTYPE_PPP are currently supported and no actual checks are > performed. Moreover the L2TP_P

divide error in ___bpf_prog_run

2018-01-17 Thread syzbot
Hello, syzbot tried to test the proposed patch but build/boot failed: failed to apply patch: can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |--- a/scripts/checksyscalls.sh |+++ b/scripts/checks

Re: tun: memory leak in tun_set_iff

2018-01-17 Thread Jason Wang
On 2018年01月17日 19:07, Xin Long wrote: On Wed, Jan 10, 2018 at 2:20 AM, Dmitry Vyukov wrote: Hello, syzkaller has hit the following memory leak on 4.15-rc7. Reproducer is attached. unreeferenced object 0x88002c9ac400 (size 4096): comm "syz-executor0", pid 12349, jiffies 4295751114 (ag

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-17 Thread Joakim Tjernlund
On Thu, 1970-01-01 at 00:00 +, Andrew Lunn wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > > > You appear to be using an old kernel. Take a look at: > >

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

2018-01-17 Thread Jason Wang
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 type and headers on kernel entry. Reuse the info gathered by skb_probe_transport_header. Syzbot found

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

2018-01-17 Thread Jason Wang
On 2018年01月17日 12:56, Willem de Bruijn wrote: This just makes that check more strict. Frequency of malicious packets is not really relevant if a single bad packet can cause damage. The alternative to validate on kernel entry is to harden the entire segmentation layer and lower part of the stac

[PATCH] net/mlx5e: Fix trailing semicolon

2018-01-17 Thread Luis de Bethencourt
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 --- Hi, After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches suggested I fix it treewide [0]. Best regards, Luis [0] http://dri

Re: [PATCH] Bluetooth: 6lowpan: Fix disconnect bug in 6lowpan

2018-01-17 Thread Luiz Augusto von Dentz
Hi, On Wed, Jan 17, 2018 at 1:47 AM, Guo Yi wrote: > This patch fix the bluetooth 6lowpan disconnect fail bug. > > The type of the same address type have different define value in HCI layer > and L2CAP layer.That makes disconnect fail due to wrong network type.User > will not be able to disconnec

[PATCH RFC net-next 3/6] rds: hold a sock ref from rds_message to the rds_sock

2018-01-17 Thread Sowmini Varadhan
The existing model holds a reference from the rds_sock to the rds_message, but the rds_message does not itself hold a sock_put() on the rds_sock. Instead the m_rs field in the rds_message is assigned when the message is queued on the sock, and nulled when the message is dequeued from the sock. We

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

2018-01-17 Thread Sowmini Varadhan
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 infrastructure added by Commit a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY p

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

2018-01-17 Thread Sowmini Varadhan
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/sock.c b/net/core/sock.c index 4f52677..f0f44b0 100644 --- a/net/core/sock.

[PATCH RFC net-next 0/6] rds: zerocopy support

2018-01-17 Thread Sowmini Varadhan
This patch series provides support for MSG_ZERCOCOPY on a PF_RDS socket based on the APIs and infrastructure added by f214f915e7db ("tcp: enable MSG_ZEROCOPY") For single threaded rds-stress testing using rds-tcp with the ixgbe driver using 1M message sizes (-a 1M -q 1M) preliminary results show t

[PATCH RFC net-next 2/6] skbuff: export mm_[un]account_pinned_pages for other modules

2018-01-17 Thread Sowmini Varadhan
RDS would like to use the helper functions for managing pinned pages added by Commit a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY pages") Signed-off-by: Sowmini Varadhan --- include/linux/skbuff.h |3 +++ net/core/skbuff.c |6 -- 2 files changed, 7 insertions(+), 2 deletions(-)

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

2018-01-17 Thread Sowmini Varadhan
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 pages set up, add an entry to the rs->rs_znotify_queue so that the

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

2018-01-17 Thread Sowmini Varadhan
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 --- drivers/net/tun.c |2 +- include/net/sock.h |2 +- net/core/sock.c|7 +--

Re: [PATCH net] ip6_gre: init dev->mtu and dev->hard_header_len correctly

2018-01-17 Thread Alexey Kodanev
On 01/16/2018 07:32 PM, David Miller wrote: > From: Alexey Kodanev > Date: Thu, 11 Jan 2018 16:02:54 +0300 > >> For ip6gretap, reset dev->mtu to zero in ip6gre_tap_setup() >> after ether_setup(), in order for it to work with the new check >> in ip6gre_tunnel_init_common(). > > This part is error

Re: [PATCH net-next] mlxsw: spectrum: Make function mlxsw_sp_kvdl_part_occ() static

2018-01-17 Thread Arkadi Sharshevsky
On 01/17/2018 05:27 AM, Wei Yongjun wrote: > Fixes the following sparse warning: > > drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:289:5: warning: > symbol 'mlxsw_sp_kvdl_part_occ' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Acked-by: Arkadi Sharshevsky > --

[PATCH iproute2] devlink: Ignore unknown attributes

2018-01-17 Thread Arkadi Sharshevsky
In case of extending the UAPI old packages would break. Signed-off-by: Arkadi Sharshevsky --- devlink/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 39cda06..c9d1838 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c

Re: [PATCH iproute2] devlink: Ignore unknown attributes

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 02:28:00PM CET, arka...@mellanox.com wrote: >In case of extending the UAPI old packages would break. > >Signed-off-by: Arkadi Sharshevsky Acked-by: Jiri Pirko

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-17 Thread Andrew Lunn
> That doesn't work really, having users to hit the bug, debug it, fix it and > then > find it fixed already in upstream, then specifically request it to be > backported to stable. > I don't need this fix to be backported, already got it. Someone else might > though. The "someone else might th

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-17 Thread Jeff Moyer
Christoph Hellwig writes: > On Wed, Jan 17, 2018 at 04:27:21AM +, Al Viro wrote: >> On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote: >> >if (sigmask) { >> > - if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask))) >> > + if (!access_ok(VERIFY_READ, sigmask,

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-17 Thread Jeff Moyer
Christoph Hellwig writes: > On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote: >> I'd be willing to bet the issue is in your io_syscall6 implementation. >> You pass in arg5 where arg6 should be used. Don't feel bad, it took me >> the better part of today to figure that out. :) >> >> H

[PATCH net] xfrm: Add SA to hardware at the end of xfrm_state_construct()

2018-01-17 Thread yossiku
From: Yossi Kuperman Current code configures the hardware with a new SA before the state has been fully initialized. During this time interval, an incoming ESP packet can cause a crash due to a NULL dereference. More specifically, xfrm_input() considers the packet as valid, and yet, anti-replay m

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

2018-01-17 Thread Alan Cox
> That fixes bpf side of "Variant 1: bounds check bypass (CVE-2017- > 5753)" on > all architectures with and without JIT. For Intel we believe this is true for all family 6 Core, Atom and Knights processors. If that ceases to be the case in future then Intel will provide guidance beforehand. For

RE: DPAA Ethernet traffice troubles with Linux kernel

2018-01-17 Thread Madalin-cristian Bucur
> -Original Message- > From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com] > Sent: Tuesday, January 16, 2018 7:58 PM > To: and...@lunn.ch > Subject: Re: DPAA Ethernet traffice troubles with Linux kernel > > On Thu, 1970-01-01 at 00:00 +, Andrew Lunn wrote: > > > > Hi Joakim >

RE: DPAA Ethernet traffice troubles with Linux kernel

2018-01-17 Thread Madalin-cristian Bucur
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Wednesday, January 17, 2018 3:44 PM > To: Joakim Tjernlund > Subject: Re: DPAA Ethernet traffice troubles with Linux kernel > > > That doesn't work really, having users to hit the bug, debug it, fix it > and then > >

  1   2   3   4   >