Re: [PATCH bpf-next RFC 2/3] bpf: devmap dynamic map-value storage area based on BTF

2020-06-02 Thread Jesper Dangaard Brouer
On Mon, 1 Jun 2020 14:30:12 -0700 Alexei Starovoitov wrote: > On Fri, May 29, 2020 at 05:59:45PM +0200, Jesper Dangaard Brouer wrote: > > + > > +/* Expected BTF layout that match struct bpf_devmap_val */ > > +static const struct expect layout[] = { > > + {BTF_KIND_INT, true,0,

Re: [PATCH 1/6] vhost: allow device that does not depend on vhost worker

2020-06-02 Thread Jason Wang
On 2020/6/2 下午1:01, Michael S. Tsirkin wrote: On Fri, May 29, 2020 at 04:02:58PM +0800, Jason Wang wrote: diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index d450e16c5c25..70105e045768 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -166,11 +166,16 @@ static int

Re: [PATCH net-next] mlx5: Restore err assignment in mlx5_mdev_init

2020-06-02 Thread Leon Romanovsky
On Mon, Jun 01, 2020 at 09:07:48PM -0700, Nathan Chancellor wrote: > On Sun, May 31, 2020 at 12:58:10PM +0300, Leon Romanovsky wrote: > > On Fri, May 29, 2020 at 10:54:48PM -0700, Nathan Chancellor wrote: > > > Clang warns: > > > > > > drivers/net/ethernet/mellanox/mlx5/core/main.c:1278:6: warning:

Re: [PATCH 5/6] vdpa: introduce virtio pci driver

2020-06-02 Thread Jason Wang
On 2020/6/2 下午1:08, Michael S. Tsirkin wrote: On Fri, May 29, 2020 at 04:03:02PM +0800, Jason Wang wrote: +static void vp_vdpa_set_vq_ready(struct vdpa_device *vdpa, +u16 qid, bool ready) +{ + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa); + + vp_iowrit

Re: [PATCH 5/6] vdpa: introduce virtio pci driver

2020-06-02 Thread Jason Wang
On 2020/6/2 下午1:09, Michael S. Tsirkin wrote: On Fri, May 29, 2020 at 04:03:02PM +0800, Jason Wang wrote: Note that since virtio specification does not support get/restore virtqueue state. So we can not use this driver for VM. This can be addressed by extending the virtio specification. Looks

Re: [PATCH] ipv4: nexthop: Fix deadcode issue by performing a proper NULL check

2020-06-02 Thread Nikolay Aleksandrov
On 01/06/2020 21:06, David Miller wrote: > From: patrickeigens...@gmail.com > Date: Mon, 1 Jun 2020 13:12:01 +0200 > >> From: Patrick Eigensatz >> >> After allocating the spare nexthop group it should be tested for kzalloc() >> returning NULL, instead the already used nexthop group (which cannot

Re: linux-next: Fixes tag needs some work in the net-next tree

2020-06-02 Thread Ayush Sawal
Hi Stephen & David, On 6/2/2020 4:42 AM, Stephen Rothwell wrote: Hi all, In commit 055be6865dea ("Crypto/chcr: Fixes a coccinile check error") Fixes tag Fixes: 567be3a5d227 ("crypto: has these problem(s): - Subject has leading but no trailing parentheses - Subject has leading b

Re: [PATCH] ipv4: nexthop: Fix deadcode issue by performing a proper NULL check

2020-06-02 Thread Nikolay Aleksandrov
On 02/06/2020 10:23, Nikolay Aleksandrov wrote: > On 01/06/2020 21:06, David Miller wrote: >> From: patrickeigens...@gmail.com >> Date: Mon, 1 Jun 2020 13:12:01 +0200 >> >>> From: Patrick Eigensatz >>> >>> After allocating the spare nexthop group it should be tested for kzalloc() >>> returning NU

Re: [PATCH bpf-next 4/6] bpf: cpumap: add the possibility to attach an eBPF program to cpumap

2020-06-02 Thread Jesper Dangaard Brouer
On Sun, 31 May 2020 23:46:49 +0200 Lorenzo Bianconi wrote: > diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c > index 57402276d8af..24ab0a6b9772 100644 > --- a/kernel/bpf/cpumap.c > +++ b/kernel/bpf/cpumap.c > @@ -51,6 +51,10 @@ struct xdp_bulk_queue { > /* CPUMAP value */ > struct bpf_cp

Re: [PATCH v2 net-next 00/10] net: ocelot: VCAP IS1 and ES0 support

2020-06-02 Thread Vladimir Oltean
Hi Xiaoliang, On Tue, 2 Jun 2020 at 08:25, Xiaoliang Yang wrote: > > This series patches adds support for VCAP IS1 and ES0 module, each VCAP > correspond to a flow chain to offload. > > VCAP IS1 supports FLOW_ACTION_VLAN_MANGLE action to filter MAC, IP, > VLAN, protocol, and TCP/UDP ports keys an

[PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread kerneljasonxing
From: Jason Xing TCP socks cannot be released because of the sock_hold() increasing the sk_refcnt in the manner of tcp_internal_pacing() when RTO happens. Therefore, this situation could increase the slab memory and then trigger the OOM if the machine has beening running for a long time. This iss

[PATCH net,stable 1/1] net: ethernet: stmmac: free tx skb buffer in stmmac_resume()

2020-06-02 Thread fugang . duan
From: Fugang Duan When do suspend/resume test, there have WARN_ON() log dump from stmmac_xmit() funciton, the code logic: entry = tx_q->cur_tx; first_entry = entry; WARN_ON(tx_q->tx_skbuff[first_entry]); In normal case, tx_q->tx_skbuff[txq->cur_tx] should be NULL because

[PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Victor Julien
Introduce a new flag (TP_STATUS_CSUM_UNNECESSARY) to indicate that the driver has completely validated the checksums in the packet. The TP_STATUS_CSUM_UNNECESSARY flag differs from TP_STATUS_CSUM_VALID in that the new flag will only be set if all the layers are valid, while TP_STATUS_CSUM_VALID is

Re: [PATCH net] net: mvpp2: Enable autoneg bypass for 1000BaseX/2500BaseX ports

2020-06-02 Thread Thomas Bogendoerfer
On Fri, 29 May 2020 18:33:40 +0200 Andrew Lunn wrote: > > > By propagated, you mean if the external link is down, the link between > > > the switch and node 1 will also be forced down, at the SERDES level? > > > > yes > > > > > And if external ports are down, the nodes cannot talk to each other

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Victor Julien
Need to learn how to properly do git sendpatch, apologies if i'm not following proper procedures. This v2 fixes up the doc. The output is now tested with rst2pdf and looks good. Added in a trivial related doc fixup. I wasn't completely sure if I was supposed to use tabs or spaces in rst, so did t

Re: [PATCH] bpf: Use tracing helpers for lsm programs

2020-06-02 Thread Jiri Olsa
On Mon, Jun 01, 2020 at 03:12:13PM -0700, Alexei Starovoitov wrote: > On Mon, Jun 1, 2020 at 12:00 PM Song Liu wrote: > > > > On Sun, May 31, 2020 at 8:45 AM Jiri Olsa wrote: > > > > > > Currenty lsm uses bpf_tracing_func_proto helpers which do > > > not include stack trace or perf event output.

Re: [PATCH 7/9] bpf: Compile the BTF id whitelist data in vmlinux

2020-06-02 Thread Jiri Olsa
On Mon, Jun 01, 2020 at 12:06:34PM -0700, Andrii Nakryiko wrote: > On Sun, May 31, 2020 at 8:10 AM Jiri Olsa wrote: > > > > On Fri, May 29, 2020 at 01:48:58PM -0700, Andrii Nakryiko wrote: > > > On Thu, May 28, 2020 at 10:24 AM Jiri Olsa wrote: > > > > > > > > On Thu, May 14, 2020 at 03:46:26PM -

Re: [PATCH v2 net-next 03/10] net: mscc: ocelot: allocated rules to different hardware VCAP TCAMs by chain index

2020-06-02 Thread Allan W. Nielsen
Hi Xiaoliang, Happy to see that you are moving in the directions of multi chain - this seems ilke a much better fit to me. On 02.06.2020 13:18, Xiaoliang Yang wrote: There are three hardware TCAMs for ocelot chips: IS1, IS2 and ES0. Each one supports different actions. The hardware flow order

[PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
So vhost needs to poke at userspace *a lot* in a quick succession. It is thus benefitial to enable userspace access, do our thing, then disable. Except access_ok has already been pre-validated with all the relevant nospec checks, so we don't need that. Add an API to allow userspace access after a

RE: [EXT] Re: [PATCH v2 net-next 00/10] net: ocelot: VCAP IS1 and ES0 support

2020-06-02 Thread Xiaoliang Yang
Hi Vladimir, On Tus, 2 Jun 2020 at 16:04, > First of all, net-next has just closed yesterday and will be closed for the > following 2 weeks: > https://eur01.safelinks.protection.outlook.com/?url=http:%2F%2Fvger.kernel.org%2F~davem%2Fnet-next.html&data=02%7C01% > > 7Cxiaoliang.yang_1%40nxp.com%7

Re: [bpf-next PATCH 2/3] bpf: fix running sk_skb program types with ktls

2020-06-02 Thread Jakub Sitnicki
On Mon, Jun 01, 2020 at 05:50 PM CEST, John Fastabend wrote: > John Fastabend wrote: >> Jakub Sitnicki wrote: >> > On Fri, 29 May 2020 16:06:59 -0700 >> > John Fastabend wrote: >> > >> > > KTLS uses a stream parser to collect TLS messages and send them to >> > > the upper layer tls receive handler

Re: [PATCH bpf-next RFC 2/3] bpf: devmap dynamic map-value storage area based on BTF

2020-06-02 Thread Jesper Dangaard Brouer
On Fri, 29 May 2020 18:39:40 +0200 Toke Høiland-Jørgensen wrote: > Jesper Dangaard Brouer writes: > > > The devmap map-value can be read from BPF-prog side, and could be used for a > > storage area per device. This could e.g. contain info on headers that need > > to be added when packet egress

Re: [PATCH] bpf/sockmap: fix kernel panic at __tcp_bpf_recvmsg

2020-06-02 Thread Jakub Sitnicki
On Fri, May 29, 2020 at 11:05 AM CEST, dihu wrote: > On 2020/5/27 5:10, John Fastabend wrote: >> dihu wrote: >>> From 865a45747de6b68fd02a0ff128a69a5c8feb73c3 Mon Sep 17 00:00:00 2001 >>> From: dihu >>> Date: Mon, 25 May 2020 17:23:16 +0800 >>> Subject: [PATCH] bpf/sockmap: fix kernel panic at __

Re: [PATCH] bpf: Use tracing helpers for lsm programs

2020-06-02 Thread KP Singh
On Tue, Jun 2, 2020 at 10:13 AM Jiri Olsa wrote: > > On Mon, Jun 01, 2020 at 03:12:13PM -0700, Alexei Starovoitov wrote: > > On Mon, Jun 1, 2020 at 12:00 PM Song Liu wrote: > > > > > > On Sun, May 31, 2020 at 8:45 AM Jiri Olsa wrote: > > > > > > > > Currenty lsm uses bpf_tracing_func_proto helpe

[PATCH 00/15] forward MSIx vector enable error code in pci_alloc_irq_vectors_affinity

2020-06-02 Thread Piotr Stankiewicz
The primary objective of this patch series is to change the behaviour of pci_alloc_irq_vectors_affinity such that it forwards the MSI-X enable error code when appropriate. In the process, though, it was pointed out that there are multiple places in the kernel which check/ask for message signalled i

[PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map

2020-06-02 Thread Li RongQing
Fixes: 0a714186d3c0 "(i40e: add AF_XDP zero-copy Rx support)" Signed-off-by: Li RongQing --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c

[PATCH 14/15] net: hns3: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- drivers/net/ethernet

[PATCH 13/15] aquantia: atlantic: use PCI_IRQ_ALL_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +--- 1 file changed, 1 insert

[PATCH 12/15] amd-xgbe: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH bpf-next RFC 2/3] bpf: devmap dynamic map-value storage area based on BTF

2020-06-02 Thread Toke Høiland-Jørgensen
Jesper Dangaard Brouer writes: > On Fri, 29 May 2020 18:39:40 +0200 > Toke Høiland-Jørgensen wrote: > >> Jesper Dangaard Brouer writes: >> >> > The devmap map-value can be read from BPF-prog side, and could be used for >> > a >> > storage area per device. This could e.g. contain info on heade

[PATCH bpf-next v3 3/3] bpf: add SO_KEEPALIVE and related options to bpf_setsockopt

2020-06-02 Thread Dmitry Yakunin
This patch adds support of SO_KEEPALIVE flag and TCP related options to bpf_setsockopt() routine. This is helpful if we want to enable or tune TCP keepalive for applications which don't do it in the userspace code. Signed-off-by: Dmitry Yakunin Acked-by: Martin KaFai Lau --- net/core/filter.c |

[PATCH bpf-next v3 2/3] tcp: expose tcp_sock_set_keepidle_locked

2020-06-02 Thread Dmitry Yakunin
This is preparation for usage in bpf_setsockopt. Signed-off-by: Dmitry Yakunin --- include/linux/tcp.h | 1 + net/ipv4/tcp.c | 7 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 9aac824..3bdec31 100644 --- a/include/linu

Re: [PATCH bpf-next 4/6] bpf: cpumap: add the possibility to attach an eBPF program to cpumap

2020-06-02 Thread Lorenzo Bianconi
> On Sun, May 31, 2020 at 11:46:49PM +0200, Lorenzo Bianconi wrote: > > + > > + prog = READ_ONCE(rcpu->prog); > > for (i = 0; i < n; i++) { > > - void *f = frames[i]; > > + void *f = xdp_frames[i]; > > struct page *page =

[PATCH bpf-next v3 1/3] sock: move sock_valbool_flag to header

2020-06-02 Thread Dmitry Yakunin
This is preparation for usage in bpf_setsockopt. Signed-off-by: Dmitry Yakunin Acked-by: Martin KaFai Lau --- include/net/sock.h | 9 + net/core/sock.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index c53cc42.

Re: [PATCH bpf-next 4/6] bpf: cpumap: add the possibility to attach an eBPF program to cpumap

2020-06-02 Thread Lorenzo Bianconi
> On Sun, 31 May 2020 23:46:49 +0200 > Lorenzo Bianconi wrote: > > > diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c > > index 57402276d8af..24ab0a6b9772 100644 > > --- a/kernel/bpf/cpumap.c > > +++ b/kernel/bpf/cpumap.c > > @@ -51,6 +51,10 @@ struct xdp_bulk_queue { > > /* CPUMAP value *

Re: [PATCH bpf-next v2 04/12] bpf: Add link-based BPF program attachment to network namespace

2020-06-02 Thread Jakub Sitnicki
On Tue, Jun 02, 2020 at 12:30 AM CEST, Andrii Nakryiko wrote: > On Sun, May 31, 2020 at 1:29 AM Jakub Sitnicki wrote: >> >> Extend bpf() syscall subcommands that operate on bpf_link, that is >> LINK_CREATE, LINK_UPDATE, OBJ_GET_INFO, to accept attach types tied to >> network namespaces (only flow

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

2020-06-02 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm tree got a conflict in: kernel/trace/bpf_trace.c between commit: b36e62eb8521 ("bpf: Use strncpy_from_unsafe_strict() in bpf_seq_printf() helper") from the net-next tree and patch: "bpf:bpf_seq_printf(): handle potentially unsafe format stri

Re: [PATCH bpf-next v2 07/12] bpftool: Extract helpers for showing link attach type

2020-06-02 Thread Jakub Sitnicki
On Tue, Jun 02, 2020 at 12:35 AM CEST, Andrii Nakryiko wrote: > On Sun, May 31, 2020 at 1:32 AM Jakub Sitnicki wrote: >> >> Code for printing link attach_type is duplicated in a couple of places, and >> likely will be duplicated for future link types as well. Create helpers to >> prevent duplicati

Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick

2020-06-02 Thread Dan Carpenter
Hi Zhu, url: https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-up-vhost_woker-for-vdpa-vq-kick/20200526-133819 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next config: x86_64-randconfig-m001-20200529 (attached as .config) compiler: gcc-9 (

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

2020-06-02 Thread Stephen Rothwell
Hi all, On Tue, 2 Jun 2020 19:30:48 +1000 Stephen Rothwell wrote: > > Today's linux-next merge of the akpm tree got a conflict in: > > kernel/trace/bpf_trace.c > > between commit: > > b36e62eb8521 ("bpf: Use strncpy_from_unsafe_strict() in bpf_seq_printf() > helper") > > from the net-ne

Re: [PATCH bpf-next v2 11/12] selftests/bpf: Convert test_flow_dissector to use BPF skeleton

2020-06-02 Thread Jakub Sitnicki
On Tue, Jun 02, 2020 at 12:42 AM CEST, Andrii Nakryiko wrote: > On Sun, May 31, 2020 at 1:29 AM Jakub Sitnicki wrote: >> >> Switch flow dissector test setup from custom BPF object loader to BPF >> skeleton to save boilerplate and prepare for testing higher-level API for >> attaching flow dissector

Re: [PATCH net-next v2] xfrm: introduce oseq-may-wrap flag

2020-06-02 Thread Christophe Gouault
Le sam. 30 mai 2020 à 14:39, Petr Vaněk a écrit : > > RFC 4303 in section 3.3.3 suggests to disable anti-replay for manually > distributed ICVs in which case the sender does not need to monitor or > reset the counter. However, the sender still increments the counter and > when it reaches the maxim

Re: [PATCH bpf-next RFC 2/3] bpf: devmap dynamic map-value storage area based on BTF

2020-06-02 Thread Jesper Dangaard Brouer
On Tue, 02 Jun 2020 11:23:24 +0200 Toke Høiland-Jørgensen wrote: > Jesper Dangaard Brouer writes: > > > On Fri, 29 May 2020 18:39:40 +0200 > > Toke Høiland-Jørgensen wrote: > > > >> Jesper Dangaard Brouer writes: > >> > >> > The devmap map-value can be read from BPF-prog side, and could

Re: [PATCH linux-can-next/flexcan] can: flexcan: fix TDC feature

2020-06-02 Thread Michael Walle
Hi Marc, Am 2020-04-16 11:41, schrieb Joakim Zhang: Hi Marc, How about FlexCAN FD patch set, it is pending for a long time. Many work would base on it, we are happy to see it in upstream mainline ASAP. Michael Walle also gives out the test-by tag: Tested-by: Michael Walle There seem

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Jason Wang
On 2020/6/2 下午4:45, Michael S. Tsirkin wrote: So vhost needs to poke at userspace *a lot* in a quick succession. It is thus benefitial to enable userspace access, do our thing, then disable. Except access_ok has already been pre-validated with all the relevant nospec checks, so we don't need t

Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick

2020-06-02 Thread Jason Wang
On 2020/6/2 下午5:42, Dan Carpenter wrote: Hi Zhu, url: https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-up-vhost_woker-for-vdpa-vq-kick/20200526-133819 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next config: x86_64-randconfig-m001-202

Re: linux-next: Fixes tag needs some work in the net-next tree

2020-06-02 Thread Stephen Rothwell
Hi Ayush, On Tue, 2 Jun 2020 13:01:09 +0530 Ayush Sawal wrote: > > On 6/2/2020 4:42 AM, Stephen Rothwell wrote: > > > > In commit > > > >055be6865dea ("Crypto/chcr: Fixes a coccinile check error") > > > > Fixes tag > > > >Fixes: 567be3a5d227 ("crypto: > > > > has these problem(s): > > > >

Re: linux-next: Fixes tag needs some work in the net-next tree

2020-06-02 Thread Ayush Sawal
On 6/2/2020 3:48 PM, Stephen Rothwell wrote: Hi Ayush, On Tue, 2 Jun 2020 13:01:09 +0530 Ayush Sawal wrote: On 6/2/2020 4:42 AM, Stephen Rothwell wrote: In commit 055be6865dea ("Crypto/chcr: Fixes a coccinile check error") Fixes tag Fixes: 567be3a5d227 ("crypto: has these proble

[PATCH] net: stmmac: Drop condition with no effect

2020-06-02 Thread Aishwarya Ramakrishnan
As the "else if" and "else" branch body are identical the condition has no effect. So removing "else if" condition. Signed-off-by: Aishwarya Ramakrishnan --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/st

Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick

2020-06-02 Thread Jason Wang
On 2020/6/2 下午6:16, Jason Wang wrote: On 2020/6/2 下午5:42, Dan Carpenter wrote: Hi Zhu, url: https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-up-vhost_woker-for-vdpa-vq-kick/20200526-133819 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-n

[PATCH] net: nvidia: forcedeth: Drop a condition with no effect

2020-06-02 Thread Aishwarya Ramakrishnan
As the "else if" and "else" branch body are identical the condition has no effect. So removing "else if" condition. Signed-off-by: Aishwarya Ramakrishnan --- drivers/net/ethernet/nvidia/forcedeth.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/d

Re: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map

2020-06-02 Thread Björn Töpel
On Tue, 2 Jun 2020 at 11:20, Li RongQing wrote: > Li, thanks for the patch! Good catch! Please add a proper description for the patch. The fix should be added to the stable branches (5.7 and earlier). Note that this code was recently removed in favor of the new AF_XDP buffer allocation scheme.

[RFC PATCH net-next 1/8] devlink: Move set attribute of devlink_port_attrs to devlink_port

2020-06-02 Thread Danielle Ratson
The struct devlink_port_attrs holds the attributes of devlink_port. The 'set' field is not devlink_port's attribute as opposed to most of the others. Move 'set' to be devlink_port's field called 'attrs_set'. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- include/net/devlink.h | 4

[RFC PATCH net-next 0/8] Expose devlink port attributes

2020-06-02 Thread Danielle Ratson
Currently, user has no way of knowing if a port can be split and into how many ports. Among other things, it is currently impossible to write generic tests for port split. In order to be able to expose the information regarding the split capability to user space, set the required attributes and p

[RFC PATCH net-next 2/8] devlink: Move switch_port attribute of devlink_port_attrs to devlink_port

2020-06-02 Thread Danielle Ratson
The struct devlink_port_attrs holds the attributes of devlink_port. Similarly to the previous patch, 'switch_port' attribute is another exception. Move 'switch_port' to be devlink_port's field. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- include/net/devlink.h | 6 +++--- net/co

[RFC PATCH net-next 4/8] mlxsw: Set number of port lanes attribute in driver

2020-06-02 Thread Danielle Ratson
Currently, port attributes like flavour, port number and whether the port was split are set when initializing a port. Set the number of lanes of the port as well so that it could be easily passed to devlink in the next patch. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- drivers/n

[RFC PATCH net-next 3/8] devlink: Replace devlink_port_attrs_set parameters with a struct

2020-06-02 Thread Danielle Ratson
Currently, devlink_port_attrs_set accepts a long list of parameters, that most of them are devlink port's attributes. Use the devlink_port_attrs struct to replace the relevant parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |

[RFC PATCH net-next 8/8] selftests: net: Add port split test

2020-06-02 Thread Danielle Ratson
Test port split configuration using previously added number of port lanes attribute. Check that all the splittable ports are successfully split to their maximum number of lanes and below, and that those which are not splittable fail to be split. Test output example: TEST: swp4 is unsplittable

[RFC PATCH net-next 7/8] devlink: Add a new devlink port split ability attribute and pass to netlink

2020-06-02 Thread Danielle Ratson
Add a new attribute that indicates the split ability to devlink port. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 1 + drivers/net/etherne

[RFC PATCH net-next 5/8] devlink: Add a new devlink port lanes attribute and pass to netlink

2020-06-02 Thread Danielle Ratson
Add a new devlink port attribute that indicates the port's number of lanes. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. The attribute is not passed to user space in case the number of lanes is invalid (0). Signed-off-by: Danielle Ratson Reviewed-by:

Re: [net-next 10/11] net/mlx5e: kTLS, Add kTLS RX resync support

2020-06-02 Thread Tariq Toukan
On 6/2/2020 1:12 AM, Jakub Kicinski wrote: This is a rare corner case anyway, where more than 1k tcp connections sharing the same RX ring will request resync at the same exact moment. IDK about that. Certain applications are architected for max capacity, not efficiency under steady load. So

[RFC PATCH net-next 6/8] mlxsw: Set port split ability attribute in driver

2020-06-02 Thread Danielle Ratson
Currently, port attributes like flavour, port number and whether the port was split are set when initializing a port. Set the split ability of the port as well, based on port_mapping->width field and split attribute of devlink port in spectrum, so that it could be easily passed to devlink in the n

Re: linux-next: build failure after merge of the mmc tree

2020-06-02 Thread Ulf Hansson
+ Linus On Tue, 2 Jun 2020 at 05:44, Stephen Rothwell wrote: > > Hi all, > > After merging the mmc tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c: In function > 'brcmf_sdiod_probe': > drivers/net/wireless/

[PATCH][v2] i40e: fix wrong index in i40e_xsk_umem_dma_map

2020-06-02 Thread Li RongQing
The dma should be unmapped in rollback path from umem->pages[0].dma till umem->pages[i-1].dma which is last dma map address Fixes: 0a714186d3c0 "(i40e: add AF_XDP zero-copy Rx support)" Signed-off-by: Li RongQing --- diff with v1: add description drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 +

Re: linux-next: build failure after merge of the mmc tree

2020-06-02 Thread Kalle Valo
Stephen Rothwell writes: > Hi all, > > After merging the mmc tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c: In function > 'brcmf_sdiod_probe': > drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:91

Re: [PATCH][v2] i40e: fix wrong index in i40e_xsk_umem_dma_map

2020-06-02 Thread Björn Töpel
On Tue, 2 Jun 2020 at 14:13, Li RongQing wrote: > > The dma should be unmapped in rollback path from > umem->pages[0].dma till umem->pages[i-1].dma which > is last dma map address > > Fixes: 0a714186d3c0 "(i40e: add AF_XDP zero-copy Rx support)" > Signed-off-by: Li RongQing > --- > diff with v1:

答复: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map

2020-06-02 Thread Li,Rongqing
> -邮件原件- > 发件人: Björn Töpel [mailto:bjorn.to...@gmail.com] > 发送时间: 2020年6月2日 19:27 > 收件人: Li,Rongqing ; intel-wired-lan > ; Netdev > 抄送: bpf ; Karlsson, Magnus > > 主题: Re: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map > > On Tue, 2 Jun 2020 at 11:20, Li RongQing wrote: > > >

[PATCH net] net/mlx5: Don't fail driver on failure to create debugfs

2020-06-02 Thread Leon Romanovsky
From: Leon Romanovsky Clang warns: drivers/net/ethernet/mellanox/mlx5/core/main.c:1278:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!priv->dbg_root) { ^~~ drivers/net/ethernet/mellanox/mlx5/core/m

[PATCH] net_failover: fixed rollback in net_failover_open()

2020-06-02 Thread Vasily Averin
found by smatch: drivers/net/net_failover.c:65 net_failover_open() error: we previously assumed 'primary_dev' could be null (see line 43) cc: sta...@vger.kernel.org Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: Vasily Averin --- drivers/net/net_failover.c | 3 ++- 1

[PATCH RFC 09/13] vhost/net: avoid iov length math

2020-06-02 Thread Michael S. Tsirkin
Now that API exposes buffer length, we no longer need to scan IOVs to figure it out. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 47af3d1ce3dd..36843058182b 10

[PATCH RFC 13/13] vhost: drop head based APIs

2020-06-02 Thread Michael S. Tsirkin
Everyone's using buf APIs, no need for head based ones anymore. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 36 drivers/vhost/vhost.h | 12 2 files changed, 8 insertions(+), 40 deletions(-) diff --git a/drivers/vhost/vhost.c b/

[PATCH RFC 11/13] vhost/scsi: switch to buf APIs

2020-06-02 Thread Michael S. Tsirkin
Switch to buf APIs. Doing this exposes a spec violation in vhost scsi: all used bufs are marked with length 0. Fix that is left for another day. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/scsi.c | 73 ++-- 1 file changed, 44 insertions(+), 29 dele

[PATCH RFC 12/13] vhost/vsock: switch to the buf API

2020-06-02 Thread Michael S. Tsirkin
A straight-forward conversion. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vsock.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index fb4e944c4d0d..07d1fb340fb4 100644 --- a/drivers/vhos

[PATCH RFC 10/13] vhost/test: convert to the buf API

2020-06-02 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- drivers/vhost/test.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 02806d6f84ef..251fd2bf74a3 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -44,9 +

[PATCH RFC 07/13] vhost: format-independent API for used buffers

2020-06-02 Thread Michael S. Tsirkin
Add a new API that doesn't assume used ring, heads, etc. For now, we keep the old APIs around to make it easier to convert drivers. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 52 ++- drivers/vhost/vhost.h | 17 +- 2 files cha

[PATCH RFC 06/13] vhost: reorder functions

2020-06-02 Thread Michael S. Tsirkin
Reorder functions in the file to not rely on forward declarations, in preparation to making them static down the road. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/driver

[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs

2020-06-02 Thread Michael S. Tsirkin
Convert vhost net to use the new format-agnostic API. In particular, don't poke at vq internals such as the heads array. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 153 +++- 1 file changed, 81 insertions(+), 72 deletions(-) diff --git a/d

[PATCH RFC 05/13] vhost/net: pass net specific struct pointer

2020-06-02 Thread Michael S. Tsirkin
In preparation for further cleanup, pass net specific pointer to ubuf callbacks so we can move net specific fields out to net structures. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/net

[PATCH RFC 00/13] vhost: format independence

2020-06-02 Thread Michael S. Tsirkin
We let the specifics of the ring format seep through to vhost API callers - mostly because there was only one format so it was hard to imagine what an independent API would look like. Now that there's an alternative in form of the packed ring, it's easier to see the issues, and fixing them is perha

[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct

2020-06-02 Thread Michael S. Tsirkin
The idea is to support multiple ring formats by converting to a format-independent array of descriptors. This costs extra cycles, but we gain in ability to fetch a batch of descriptors in one go, which is good for code cache locality. When used, this causes a minor performance degradation, it's b

[PATCH RFC 04/13] vhost: cleanup fetch_buf return code handling

2020-06-02 Thread Michael S. Tsirkin
Return code of fetch_buf is confusing, so callers resort to tricks to get to sane values. Let's switch to something standard: 0 empty, >0 non-empty, <0 error. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 24 1 file changed, 16 insertions(+), 8 deletions(

[PATCH RFC 03/13] vhost: batching fetches

2020-06-02 Thread Michael S. Tsirkin
With this patch applied, new and old code perform identically. Lots of extra optimizations are now possible, e.g. we can fetch multiple heads with copy_from/to_user now. We can get rid of maintaining the log array. Etc etc. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Link: h

[PATCH RFC 02/13] vhost: use batched version by default

2020-06-02 Thread Michael S. Tsirkin
As testing shows no performance change, switch to that now. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Link: https://lore.kernel.org/r/20200401183118.8334-3-epere...@redhat.com Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 251 +--

Re: [PATCH] seg6: Fix slab-out-of-bounds in fl6_update_dst()

2020-06-02 Thread Eric Dumazet
On 6/1/20 11:51 PM, YueHaibing wrote: > When update flowi6 daddr in fl6_update_dst() for srcrt, the used index > of segments should be segments_left minus one per RFC8754 > (section 4.3.1.1) S15 S16. Otherwise it may results in an out-of-bounds > read. > > Reported-by: syzbot+e8c028b62439eac42.

[PATCH V1 net 0/2] Fix xdp in ena driver

2020-06-02 Thread sameehj
From: Sameeh Jubran This patchset includes 2 XDP related bug fixes. Sameeh Jubran (2): net: ena: xdp: XDP_TX: fix memory leak net: ena: xdp: update napi budget for DROP and ABORTED drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH V1 net 2/2] net: ena: xdp: update napi budget for DROP and ABORTED

2020-06-02 Thread sameehj
From: Sameeh Jubran This patch fixes two issues with XDP: 1. If the XDP verdict is XDP_ABORTED we break the loop, which results in us handling one buffer per napi cycle instead of the total budget (usually 64). To overcome this simply change the xdp_verdict check to != XDP_PASS. When th

[PATCH V1 net 1/2] net: ena: xdp: XDP_TX: fix memory leak

2020-06-02 Thread sameehj
From: Sameeh Jubran When sending very high packet rate, the XDP tx queues can get full and start dropping packets. In this case we don't free the pages which results in ena driver draining the system memory. Fix: Simply free the pages when necessary. Fixes: cad451dd2427 ("net: ena: Implement XD

Re: [PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap

2020-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2020 at 02:49:38PM +0800, Jason Wang wrote: > > On 2020/6/2 下午12:56, Michael S. Tsirkin wrote: > > On Tue, Jun 02, 2020 at 03:22:49AM +0800, kbuild test robot wrote: > > > Hi Jason, > > > > > > I love your patch! Yet something to improve: > > > > > > [auto build test ERROR on vho

Re: [PATCH] seg6: Fix slab-out-of-bounds in fl6_update_dst()

2020-06-02 Thread Ahmed Abdelsalam
I’m already working on a fix for this bug. This patch leads to a bigger semantic problem as it will send SRv6 packets to the second segment not the first segment (as is does not exist in the SRH). Please see my explanation below. The main issue is the seg6_validate_srh() which is used to val

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Willem de Bruijn
On Tue, Jun 2, 2020 at 4:05 AM Victor Julien wrote: > > Introduce a new flag (TP_STATUS_CSUM_UNNECESSARY) to indicate > that the driver has completely validated the checksums in the packet. > > The TP_STATUS_CSUM_UNNECESSARY flag differs from TP_STATUS_CSUM_VALID > in that the new flag will only b

[RFC 0/1] net/tls(TLS_SW): Data integrity issue with sw kTLS using sendfile

2020-06-02 Thread Pooja Trivedi
When sendfile is used for kTLS file delivery and the size provided to sendfile via its 'count' parameter is greater than the file size, kTLS fails to send the file correctly. The last chunk of the file is not sent, and the data integrity of the file is compromised on the receiver side. Based on

[RFC PATCH net 1/1] net/tls(TLS_SW): Add selftest for 'chunked' sendfile test

2020-06-02 Thread Pooja Trivedi
This selftest tests for cases where sendfile's 'count' parameter is provided with a size greater than the intended file size. Motivation: When sendfile is provided with 'count' parameter value that is greater than the size of the file, kTLS example fails to send the file correctly. Last chunk of t

[PATCH bpf 3/3] bpf, selftests: Adapt cls_redirect to call csum_level helper

2020-06-02 Thread Daniel Borkmann
Adapt bpf_skb_adjust_room() to pass in BPF_F_ADJ_ROOM_NO_CSUM_RESET flag and use the new bpf_csum_level() helper to inc/dec the checksum level by one after the encap/decap. Signed-off-by: Daniel Borkmann --- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 9 ++--- 1 file changed, 6 i

[PATCH bpf 1/3] bpf: Fix up bpf_skb_adjust_room helper's skb csum setting

2020-06-02 Thread Daniel Borkmann
Lorenz recently reported: In our TC classifier cls_redirect [0], we use the following sequence of helper calls to decapsulate a GUE (basically IP + UDP + custom header) encapsulated packet: bpf_skb_adjust_room(skb, -encap_len, BPF_ADJ_ROOM_MAC, BPF_F_ADJ_ROOM_FIXED_GSO) bpf_redirec

[PATCH bpf 2/3] bpf: Add csum_level helper for fixing up csum levels

2020-06-02 Thread Daniel Borkmann
Add a bpf_csum_level() helper which BPF programs can use in combination with bpf_skb_adjust_room() when they pass in BPF_F_ADJ_ROOM_NO_CSUM_RESET flag to the latter to avoid falling back to CHECKSUM_NONE. The bpf_csum_level() allows to adjust CHECKSUM_UNNECESSARY skb->csum_levels via BPF_CSUM_LEVE

[PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room

2020-06-02 Thread Daniel Borkmann
This series fixes an issue originally reported by Lorenz Bauer where using the bpf_skb_adjust_room() helper hid a checksum bug since it wasn't adjusting CHECKSUM_UNNECESSARY's skb->csum_level after decap. The fix is two-fold: i) We do a safe reset in bpf_skb_adjust_room() to CHECKSUM_NONE with an

Re: [PATCH v4 04/11] thermal: Store device mode in struct thermal_zone_device

2020-06-02 Thread Guenter Roeck
On Thu, May 28, 2020 at 09:20:44PM +0200, Andrzej Pietrasiewicz wrote: > Prepare for eliminating get_mode(). > > Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck > --- > drivers/acpi/thermal.c| 18 ++-- > .../ethernet/mellanox/mlxsw/core_ther

Re: [PATCH v4 05/11] thermal: remove get_mode() operation of drivers

2020-06-02 Thread Guenter Roeck
On Thu, May 28, 2020 at 09:20:45PM +0200, Andrzej Pietrasiewicz wrote: > get_mode() is now redundant, as the state is stored in struct > thermal_zone_device. > > Consequently the "mode" attribute in sysfs can always be visible, because > it is always possible to get the mode from struct tzd. > >

Re: [PATCH bpf 3/3] bpf, selftests: Adapt cls_redirect to call csum_level helper

2020-06-02 Thread Lorenz Bauer
On Tue, 2 Jun 2020 at 15:58, Daniel Borkmann wrote: > > Adapt bpf_skb_adjust_room() to pass in BPF_F_ADJ_ROOM_NO_CSUM_RESET flag and > use the new bpf_csum_level() helper to inc/dec the checksum level by one after > the encap/decap. Just to be on the safe side: we go from | ETH | IP | UDP | G

Re: [PATCH bpf 2/3] bpf: Add csum_level helper for fixing up csum levels

2020-06-02 Thread Lorenz Bauer
On Tue, 2 Jun 2020 at 15:58, Daniel Borkmann wrote: > > Add a bpf_csum_level() helper which BPF programs can use in combination > with bpf_skb_adjust_room() when they pass in BPF_F_ADJ_ROOM_NO_CSUM_RESET > flag to the latter to avoid falling back to CHECKSUM_NONE. > > The bpf_csum_level() allows t

  1   2   3   >