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

2020-07-15 Thread Xiaoliang Yang
Hi Allan, On 11.06.2002 2:18, Allan W. Nielsen wrote: >> >> Here is my initial suggestion for an alternative chain-schema: >> >> >> >> Chain 0: The default chain - today this is in IS2. If we proceed >> >> with this as is - then this will change. >> >> Chain 1-:

Re: KASAN: slab-out-of-bounds Read in __xfrm6_tunnel_spi_lookup

2020-07-15 Thread Steffen Klassert
On Wed, Jul 15, 2020 at 05:18:36PM +0800, Xin Long wrote: > Hi, Steffen, > > I've confirmed the patchset I posted yesterday would fix this: > > [PATCH ipsec-next 0/3] xfrm: not register one xfrm(6)_tunnel object twice Thanks for the confirmation! That patchset is now applied to ipsec-next.

Re: [PATCH ipsec-next 0/3] xfrm: not register one xfrm(6)_tunnel object twice

2020-07-15 Thread Steffen Klassert
On Mon, Jul 13, 2020 at 03:42:35PM +0800, Xin Long wrote: > Now in ip(6)_vti and xfrm interface tunnel support, it uses the > same xfrm(6)_tunnel object to handle for AF_NET and AF_INET6 by > registering it twice. > > However the xfrm(6)_tunnel object is linked into a list with its > 'next' pointe

Re: [PATCH] net: smc91x: Fix possible memory leak in smc_drv_probe()

2020-07-15 Thread Markus Elfring
> If try_toggle_control_gpio() failed in smc_drv_probe(), free_netdev(ndev) > should be called to free the ndev created earlier. Otherwise, a memleak > will occur. * Will it be nicer to use the term “memory leak” also in this change description? * Would another imperative wording be preferred fo

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-15 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 12:20:09PM +0800, Jason Wang wrote: > > On 2020/7/16 下午12:13, Zhu, Lingshan wrote: > > > > > > On 7/16/2020 12:02 PM, Jason Wang wrote: > > > > > > On 2020/7/16 上午11:59, Zhu, Lingshan wrote: > > > > > > > > On 7/16/2020 10:59 AM, Jason Wang wrote: > > > > > > > > > > O

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-15 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 09:39:17AM +0800, Zhu, Lingshan wrote: > > On 7/15/2020 9:43 PM, Jason Wang wrote: > > > On 2020/7/12 下午10:52, Zhu Lingshan wrote: > > Hi All, > > This series intends to implement IRQ offloading for > vhost_vdpa. > > By the feat of i

Re: [PATCH v2 bpf-next 2/2] selftests/bpf: add callchain_stackid

2020-07-15 Thread Andrii Nakryiko
On Tue, Jul 14, 2020 at 11:09 PM Song Liu wrote: > > This tests new helper function bpf_get_stackid_pe and bpf_get_stack_pe. > These two helpers have different implementation for perf_event with PEB > entries. > > Signed-off-by: Song Liu > --- > .../bpf/prog_tests/perf_event_stackmap.c | 12

Re: [PATCH mlx5-next 0/4] mlx5 next updates 2020-07-14

2020-07-15 Thread Saeed Mahameed
On Tue, 2020-07-14 at 21:28 -0700, Saeed Mahameed wrote: > Hi, > > This patchset introduces some updates to mlx5 next shared branch. > > 1) Eli Cohen, Adds HW and mlx5_core driver definitions and bits for > upcoming mlx5 VDPA driver support. > 2) Michael Guralnik Enables count actions for simple

Re: [PATCH v2 bpf-next 1/2] bpf: separate bpf_get_[stack|stackid] for perf events BPF

2020-07-15 Thread Andrii Nakryiko
On Tue, Jul 14, 2020 at 11:08 PM Song Liu wrote: > > Calling get_perf_callchain() on perf_events from PEBS entries may cause > unwinder errors. To fix this issue, the callchain is fetched early. Such > perf_events are marked with __PERF_SAMPLE_CALLCHAIN_EARLY. > > Similarly, calling bpf_get_[stack

Re: BPF logging infrastructure. Was: [PATCH bpf-next 4/6] tools: add new members to bpf_attr.raw_tracepoint in bpf.h

2020-07-15 Thread Alexei Starovoitov
On Wed, Jul 15, 2020 at 06:11:39PM -0700, Andrii Nakryiko wrote: > > > > On Wed, Jul 15, 2020, Andrii Nakryiko wrote: > > > > > > Inability to figure out what's wrong when using BPF is at the top of > > > complaints from many users, together with hard to understand logs from > > > verifier. > > > >

Re: [RFC] bonding driver terminology change proposal

2020-07-15 Thread Jarod Wilson
On Wed, Jul 15, 2020 at 11:18 PM Andrew Lunn wrote: > > On Wed, Jul 15, 2020 at 11:04:16PM -0400, Jarod Wilson wrote: > > On Mon, Jul 13, 2020 at 8:26 PM Andrew Lunn wrote: > > > > > > Hi Jarod > > > > > > Do you have this change scripted? Could you apply the script to v5.4 > > > and then cherry-

答复: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode

2020-07-15 Thread Li,Rongqing
> > > > > > > > Thank you RongQing for reporting this. I will take a look at it > > > > and produce a patch. > > > > > > > > /Magnus > > > > > > > Ping > > My apologies RongQing, but it is taking longer than expected due to key people > being on vacation during this summer period. We are debating

[PATCH bpf-next v2] bpftool: use only nftw for file tree parsing

2020-07-15 Thread Tony Ambardar
The bpftool sources include code to walk file trees, but use multiple frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and is widely available, fts is not conformant and less common, especially on non-glibc systems. The inconsistent framework usage hampers maintenance and porta

Re: WARNING in submit_bio_checks

2020-07-15 Thread syzbot
syzbot has bisected this issue to: commit 449325b52b7a6208f65ed67d3484fd7b7184477b Author: Alexei Starovoitov Date: Tue May 22 02:22:29 2018 + umh: introduce fork_usermode_blob() helper bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10fc4b0090 start commit: 9e50b94

[PATCH v3 bpf-next 5/9] bpf, xdp: implement LINK_UPDATE for BPF XDP link

2020-07-15 Thread Andrii Nakryiko
Add support for LINK_UPDATE command for BPF XDP link to enable reliable replacement of underlying BPF program. Signed-off-by: Andrii Nakryiko --- net/core/dev.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index

[PATCH v3 bpf-next 4/9] bpf, xdp: add bpf_link-based XDP attachment API

2020-07-15 Thread Andrii Nakryiko
Add bpf_link-based API (bpf_xdp_link) to attach BPF XDP program through BPF_LINK_CREATE command. bpf_xdp_link is mutually exclusive with direct BPF program attachment, previous BPF program should be detached prior to attempting to create a new bpf_xdp_link attachment (for a given XDP mode). Once B

[PATCH v3 bpf-next 1/9] bpf: make bpf_link API available indepently of CONFIG_BPF_SYSCALL

2020-07-15 Thread Andrii Nakryiko
Similarly to bpf_prog, make bpf_link and related generic API available unconditionally to make it easier to have bpf_link support in various parts of the kernel. Stub out init/prime/settle/cleanup and inc/put APIs. Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko --- include/linux/

[PATCH v3 bpf-next 6/9] bpf: implement BPF XDP link-specific introspection APIs

2020-07-15 Thread Andrii Nakryiko
Implement XDP link-specific show_fdinfo and link_info to emit ifindex. Signed-off-by: Andrii Nakryiko --- include/uapi/linux/bpf.h | 3 +++ net/core/dev.c | 31 +++ 2 files changed, 34 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linu

[PATCH v3 bpf-next 8/9] selftests/bpf: add BPF XDP link selftests

2020-07-15 Thread Andrii Nakryiko
Add selftest validating all the attachment logic around BPF XDP link. Test also link updates and get_obj_info() APIs. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/xdp_link.c | 137 ++ .../selftests/bpf/progs/test_xdp_link.c | 12 ++ 2 files changed

[PATCH v3 bpf-next 2/9] bpf, xdp: maintain info on attached XDP BPF programs in net_device

2020-07-15 Thread Andrii Nakryiko
Instead of delegating to drivers, maintain information about which BPF programs are attached in which XDP modes (generic/skb, driver, or hardware) locally in net_device. This effectively obsoletes XDP_QUERY_PROG command. Such re-organization simplifies existing code already. But it also allows to

[PATCH v3 bpf-next 3/9] bpf, xdp: extract commong XDP program attachment logic

2020-07-15 Thread Andrii Nakryiko
Further refactor XDP attachment code. dev_change_xdp_fd() is split into two parts: getting bpf_progs from FDs and attachment logic, working with bpf_progs. This makes attachment logic a bit more straightforward and prepares code for bpf_xdp_link inclusion, which will share the common logic. Signe

[PATCH v3 bpf-next 9/9] bpf, xdp: remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands

2020-07-15 Thread Andrii Nakryiko
Now that BPF program/link management is centralized in generic net_device code, kernel code never queries program id from drivers, so XDP_QUERY_PROG/XDP_QUERY_PROG_HW commands are unnecessary. This patch removes all the implementations of those commands in kernel, along the xdp_attachment_query().

[PATCH v3 bpf-next 7/9] libbpf: add support for BPF XDP link

2020-07-15 Thread Andrii Nakryiko
Sync UAPI header and add support for using bpf_link-based XDP attachment. Make xdp/ prog type set expected attach type. Kernel didn't enforce attach_type for XDP programs before, so there is no backwards compatiblity issues there. Also fix section_names selftest to recognize that xdp prog types no

[PATCH v3 bpf-next 0/9] BPF XDP link

2020-07-15 Thread Andrii Nakryiko
Following cgroup and netns examples, implement bpf_link support for XDP. The semantics is described in patch #2. Program and link attachments are mutually exclusive, in the sense that neither link can replace attached program nor program can replace attached link. Link can't replace attached link

[PATCH] igc: Do not use link uninitialized in igc_check_for_copper_link

2020-07-15 Thread Nathan Chancellor
Clang warns: drivers/net/ethernet/intel/igc/igc_mac.c:374:6: warning: variable 'link' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!mac->get_link_status) { ^ drivers/net/ethernet/intel/igc/igc_mac.c:424:33: note: unin

Re: [PATCH bpf v2] xsk: fix memory leak and packet loss in Tx skb path

2020-07-15 Thread Magnus Karlsson
On Wed, Jul 15, 2020 at 8:36 PM Daniel Borkmann wrote: > > On 7/11/20 9:39 AM, Magnus Karlsson wrote: > > On Sat, Jul 11, 2020 at 1:28 AM Daniel Borkmann > > wrote: > >> On 7/10/20 8:45 AM, Magnus Karlsson wrote: > >>> In the skb Tx path, transmission of a packet is performed with > >>> dev_dire

Re: [PATCH bpf-next v2 04/14] xsk: move fill and completion rings to buffer pool

2020-07-15 Thread Magnus Karlsson
On Wed, Jul 15, 2020 at 11:29 AM Maxim Mikityanskiy wrote: > > On 2020-07-10 17:16, Magnus Karlsson wrote: > > Move the fill and completion rings from the umem to the buffer > > pool. This so that we in a later commit can share the umem > > between multiple HW queue ids. In this case, we need one

Re: [PATCH bpf-next] selftests/bpf: fix possible hang in sockopt_inherit

2020-07-15 Thread Andrii Nakryiko
On Wed, Jul 15, 2020 at 3:41 PM Stanislav Fomichev wrote: > > Andrii reported that sockopt_inherit occasionally hangs up on 5.5 kernel [0]. > This can happen if server_thread runs faster than the main thread. > In that case, pthread_cond_wait will wait forever because > pthread_cond_signal was exe

RE: [PATCH 2/9] iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code

2020-07-15 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Tuesday, July 14, 2020 9:40 PM > > Hi Shimoda-san, > > On Tue, Jul 14, 2020 at 1:42 PM Yoshihiro Shimoda > wrote: > > > From: Geert Uytterhoeven, Sent: Tuesday, July 14, 2020 5:42 PM > > > On Tue, Jul 14, 2020 at 10:30 AM Lad, Prabhakar > > > wro

Re: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode

2020-07-15 Thread Magnus Karlsson
On Tue, Jul 14, 2020 at 1:05 PM Li,Rongqing wrote: > > > > > -邮件原件- > > 发件人: Li,Rongqing > > 发送时间: 2020年7月6日 14:38 > > 收件人: 'Magnus Karlsson' > > 抄送: intel-wired-lan ; Björn Töpel > > ; Karlsson, Magnus ; > > Netdev > > 主题: 答复: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be

Re: [PATCH bpf-next v2 11/14] xsk: add shared umem support between devices

2020-07-15 Thread Magnus Karlsson
On Tue, Jul 14, 2020 at 12:18 PM Maxim Mikityanskiy wrote: > > On 2020-07-10 17:16, Magnus Karlsson wrote: > > Add support to share a umem between different devices. This mode > > can be invoked with the XDP_SHARED_UMEM bind flag. Previously, > > sharing was only supported within the same device.

[PATCH] can: m_can: Set device to software init mode before closing

2020-07-15 Thread Faiz Abbas
There might be some requests pending in the buffer when the interface close sequence occurs. In some devices, these pending requests might lead to the module not shutting down properly when m_can_clk_stop() is called. Therefore, move the device to init state before potentially powering it down. S

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-15 Thread Jason Wang
On 2020/7/16 下午12:13, Zhu, Lingshan wrote: On 7/16/2020 12:02 PM, Jason Wang wrote: On 2020/7/16 上午11:59, Zhu, Lingshan wrote: On 7/16/2020 10:59 AM, Jason Wang wrote: On 2020/7/16 上午9:39, Zhu, Lingshan wrote: On 7/15/2020 9:43 PM, Jason Wang wrote: On 2020/7/12 下午10:52, Zhu Lingsh

Re: kernel BUG at net/core/dev.c:LINE! (3)

2020-07-15 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:4ff91fa0 Merge branch 'udp_tunnel-NIC-RX-port-offload-infr.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1777b9bf10 kernel config: https://syzkaller.appspot.com/x/.config?x=8a8f9de

[PATCH] net: smc91x: Fix possible memory leak in smc_drv_probe()

2020-07-15 Thread Wang Hai
If try_toggle_control_gpio() failed in smc_drv_probe(), free_netdev(ndev) should be called to free the ndev created earlier. Otherwise, a memleak will occur. Fixes: 7d2911c43815 ("net: smc91x: Fix gpios for device tree based booting") Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/

Re: [PATCH 3/9 v2 net-next] net: wimax: fix duplicate words in comments

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 20:35:34 -0700 Randy Dunlap wrote: > On 7/15/20 8:34 PM, Jakub Kicinski wrote: > > On Wed, 15 Jul 2020 09:42:40 -0700 Randy Dunlap wrote: > >> /* > >> - * CPP sintatic sugar to generate A_B like symbol names when one of > >> - * the arguments is a a preprocessor #define. > >>

Re: Bonding driver unexpected behaviour

2020-07-15 Thread Zhu Yanjun
On Wed, Jul 15, 2020 at 8:49 PM p...@bestov.io wrote: > > I'm attempting to set up the bonding driver on two gretap interfaces, > gretap15 and gretap16 > but I'm observing unexpected (to me) behaviour. > The underlying interfaces for those two are respectively intra15 (ipv4: > 10.88.15.100/24) a

Re: [PATCH net-next] net: phy: sfp: Cotsworks SFF module EEPROM fixup

2020-07-15 Thread Florian Fainelli
On 7/15/2020 8:32 PM, Chris Healy wrote: > > > On Wed, Jul 15, 2020 at 8:10 PM Florian Fainelli > wrote: > > > > On 7/14/2020 10:59 AM, Chris Healy wrote: > > Some Cotsworks SFF have invalid data in the first few bytes of the > > module EEPROM.  Thi

Re: [PATCH 3/9 v2 net-next] net: wimax: fix duplicate words in comments

2020-07-15 Thread Randy Dunlap
On 7/15/20 8:34 PM, Jakub Kicinski wrote: > On Wed, 15 Jul 2020 09:42:40 -0700 Randy Dunlap wrote: >> /* >> - * CPP sintatic sugar to generate A_B like symbol names when one of >> - * the arguments is a a preprocessor #define. >> + * CPP syntatic sugar to generate A_B like symbol names when one of

Re: [PATCH 3/9 v2 net-next] net: wimax: fix duplicate words in comments

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 09:42:40 -0700 Randy Dunlap wrote: > /* > - * CPP sintatic sugar to generate A_B like symbol names when one of > - * the arguments is a a preprocessor #define. > + * CPP syntatic sugar to generate A_B like symbol names when one of synta*c*tic Let me fix that up before applyin

Re: [PATCH] SUNDANCE NETWORK DRIVER: Replace HTTP links with HTTPS ones

2020-07-15 Thread Joe Perches
On Wed, 2020-07-15 at 17:44 -0700, Jakub Kicinski wrote: > On Thu, 9 Jul 2020 22:49:25 +0200 Alexander A. Klimov wrote: > > Rationale: > > Reduces attack surface on kernel devs opening the links for MITM > > as HTTPS traffic is much harder to manipulate. > > > > Deterministic algorithm: > > For e

Re: [RFC] bonding driver terminology change proposal

2020-07-15 Thread Andrew Lunn
On Wed, Jul 15, 2020 at 11:04:16PM -0400, Jarod Wilson wrote: > On Mon, Jul 13, 2020 at 8:26 PM Andrew Lunn wrote: > > > > Hi Jarod > > > > Do you have this change scripted? Could you apply the script to v5.4 > > and then cherry-pick the 8 bonding fixes that exist in v5.4.51. How > > many result i

Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-15 Thread Andrew Lunn
On Wed, Jul 15, 2020 at 08:04:36PM -0700, Florian Fainelli wrote: > > > On 7/15/2020 2:03 AM, Calvin Johnson wrote: > > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > > provide them to be connected to MAC. > > > > An ACPI node property "mdio-handle" is introduced to referenc

Re: [PATCH net-next] net: phy: sfp: Cotsworks SFF module EEPROM fixup

2020-07-15 Thread Florian Fainelli
On 7/14/2020 10:59 AM, Chris Healy wrote: > Some Cotsworks SFF have invalid data in the first few bytes of the > module EEPROM. This results in these modules not being detected as > valid modules. > > Address this by poking the correct EEPROM values into the module > EEPROM when the model/PN m

Re: [RFC] bonding driver terminology change proposal

2020-07-15 Thread Jarod Wilson
On Mon, Jul 13, 2020 at 9:00 PM David Miller wrote: > > From: Michal Kubecek > Date: Tue, 14 Jul 2020 00:00:16 +0200 > > > Could we, please, avoid breaking existing userspace tools and scripts? > > I will not let UAPI breakage, don't worry. Seeking some clarification here. Does the output of /pr

Re: [net-next PATCH v7 4/6] net: phy: introduce phy_find_by_mdio_handle()

2020-07-15 Thread Florian Fainelli
On 7/15/2020 2:03 AM, Calvin Johnson wrote: > The PHYs on an mdiobus are probed and registered using mdiobus_register(). > Later, for connecting these PHYs to MAC, the PHYs registered on the > mdiobus have to be referenced. > > For each MAC node, a property "mdio-handle" is used to reference th

Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-15 Thread Florian Fainelli
On 7/15/2020 2:03 AM, Calvin Johnson wrote: > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > provide them to be connected to MAC. > > An ACPI node property "mdio-handle" is introduced to reference the > MDIO bus on which PHYs are registered with autoprobing method used > by

Re: [net-next PATCH v7 2/6] net: phy: introduce device_mdiobus_register()

2020-07-15 Thread Florian Fainelli
On 7/15/2020 2:03 AM, Calvin Johnson wrote: > Introduce device_mdiobus_register() to register mdiobus > in cases of either DT or ACPI. > > Signed-off-by: Calvin Johnson Reviewed-by: Florian Fainelli -- Florian

Re: [net-next PATCH v7 3/6] net/fsl: use device_mdiobus_register()

2020-07-15 Thread Florian Fainelli
On 7/15/2020 2:03 AM, Calvin Johnson wrote: > Replace of_mdiobus_register() with device_mdiobus_register() > to take care of both DT and ACPI mdiobus_register. > > Remove unused device_node pointer. > > Signed-off-by: Calvin Johnson Reviewed-by: Florian Fainelli -- Florian

Re: [RFC] bonding driver terminology change proposal

2020-07-15 Thread Jarod Wilson
On Mon, Jul 13, 2020 at 8:26 PM Andrew Lunn wrote: > > Hi Jarod > > Do you have this change scripted? Could you apply the script to v5.4 > and then cherry-pick the 8 bonding fixes that exist in v5.4.51. How > many result in conflicts? > > Could you do the same with v4.19...v4.19.132, which has 20

Re: [PATCH bpf-next] bpftool: use only nftw for file tree parsing

2020-07-15 Thread Tony Ambardar
On Wed, 15 Jul 2020 at 10:35, Quentin Monnet wrote: > > 2020-07-14 22:12 UTC-0700 ~ Tony Ambardar > > The bpftool sources include code to walk file trees, but use multiple > > frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and > > is widely available, fts is not conformant

RE: [EXT] [PATCH net-next v2 0/4] net: fec: a few improvements

2020-07-15 Thread Andy Duan
From: Sergey Organov Sent: Wednesday, July 15, 2020 11:43 PM > This is a collection of simple improvements that reduce and/or simplify code. > They got developed out of attempt to use DP83640 PTP PHY connected to > built-in FEC (that has its own PTP support) of the iMX 6SX micro-controller. > The

答复: [PATCH v2] ipvs: clean code for ip_vs_sync.c

2020-07-15 Thread Zhouxudong (EulerOS)
Thank you for suggestion. I will send v3 patch. -邮件原件- 发件人: Suraj Upadhyay [mailto:usura...@gmail.com] 发送时间: 2020年7月16日 10:46 收件人: Zhouxudong (EulerOS) 抄送: wens...@linux-vs.org; ho...@verge.net.au; netdev@vger.kernel.org; lvs-de...@vger.kernel.org; kernel-janit...@vger.kernel.org; Chenx

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-15 Thread Jason Wang
On 2020/7/16 上午9:39, Zhu, Lingshan wrote: On 7/15/2020 9:43 PM, Jason Wang wrote: On 2020/7/12 下午10:52, Zhu Lingshan wrote: Hi All, This series intends to implement IRQ offloading for vhost_vdpa. By the feat of irq forwarding facilities like posted interrupt on X86, irq bypass can  help

[PATCH v3] ipvs: clean code for ip_vs_sync.c

2020-07-15 Thread zhouxudong199
Use appropriate spaces around operators. Signed-off-by: zhouxudong199 --- v1 -> v2: add missing spaces after Signed-off-by and ipvs: in the subject. i=0 changed to i = 0. v2 -> v3: move version changes after Signed-off-by. change commit messages net/netfilter/ipvs/ip_vs_sync.c | 18 +--

Re: [PATCH net-next v2 0/3] make nf_ct_frag/6_gather elide the skb CB clear

2020-07-15 Thread wenxu
On 7/16/2020 5:17 AM, Florian Westphal wrote: > Jakub Kicinski wrote: >> On Tue, 7 Jul 2020 12:55:08 +0800 we...@ucloud.cn wrote: >>> From: wenxu >>> >>> Add nf_ct_frag_gather and Make nf_ct_frag6_gather elide the CB clear >>> when packets are defragmented by connection tracking. This can mak

Re: [PATCH v2] ipvs: clean code for ip_vs_sync.c

2020-07-15 Thread Suraj Upadhyay
On Thu, Jul 16, 2020 at 01:57:51AM +, zhouxudong199 wrote: > v1 -> v2: > add missing spaces after Signed-off-by and ipvs: in the subject. > i=0 changed to i = 0. > You should write the version changes after "---" and before the first diff. Also, looking at your patch I think your commit me

Re: [PATCH net-next] bareudp: Reverted support to enable & disable rx metadata collection

2020-07-15 Thread Martin Varghese
On Wed, Jul 15, 2020 at 01:43:47PM -0700, Jakub Kicinski wrote: > On Wed, 15 Jul 2020 08:42:40 +0530 Martin Varghese wrote: > > From: Martin Varghese > > > > The commit fe80536acf83 ("bareudp: Added attribute to enable & disable > > rx metadata collection") breaks the the original(5.7) default be

Re: [PATCH bpf-next v4 00/16] Run a BPF program on socket lookup

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:47 AM Jakub Sitnicki wrote: > > Dependencies > > > This patch series depends on: > > 1. 'bpf-multi-prog-prep' series in 'bpf' [0] >(commit 951f38cf0835 ("Merge branch 'bpf-multi-prog-prep'")) > 2. "bpf: Shift and mask loads narrower than context field si

Re: [PATCH bpf-next v4 04/16] inet: Run SK_LOOKUP BPF program on socket lookup

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:47 AM Jakub Sitnicki wrote: > > Run a BPF program before looking up a listening socket on the receive path. > Program selects a listening socket to yield as result of socket lookup by > calling bpf_sk_assign() helper and returning SK_PASS code. Program can > revert its d

Re: [PATCH bpf-next v4 16/16] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:48 AM Jakub Sitnicki wrote: > > Add tests to test_progs that exercise: > > - attaching/detaching/querying programs to BPF_SK_LOOKUP hook, > - redirecting socket lookup to a socket selected by BPF program, > - failing a socket lookup on BPF program's request, > - erro

Re: [PATCH bpf-next v4 14/16] selftests/bpf: Add verifier tests for bpf_sk_lookup context access

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:48 AM Jakub Sitnicki wrote: > > Exercise verifier access checks for bpf_sk_lookup context fields. > > Signed-off-by: Jakub Sitnicki > --- > LGTM. Acked-by: Andrii Nakryiko > Notes: > v4: > - Bring back tests for narrow loads. > > v3: > - Consolidate

Re: [PATCH bpf-next v4 13/16] tools/bpftool: Add name mappings for SK_LOOKUP prog and attach type

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:48 AM Jakub Sitnicki wrote: > > Make bpftool show human-friendly identifiers for newly introduced program > and attach type, BPF_PROG_TYPE_SK_LOOKUP and BPF_SK_LOOKUP, respectively. > > Signed-off-by: Jakub Sitnicki > --- You should probably also update bash-completion

Re: [PATCH bpf-next] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL

2020-07-15 Thread Hangbin Liu
On Thu, Jul 16, 2020 at 12:28:16AM +0200, Daniel Borkmann wrote: > On 7/15/20 9:00 AM, Hangbin Liu wrote: > > Add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL which could be > > used when we want to allow NULL pointer for map parameter. The bpf helper > > need to take care and check if the map

Re: KASAN: use-after-free Read in __xfrm6_tunnel_spi_lookup

2020-07-15 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:ca0e494a Add linux-next specific files for 20200715 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=175099bf10 kernel config: https://syzkaller.appspot.com/x/.config?x

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

2020-07-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: kernel/bpf/btf.c between commit: 5b801dfb7feb ("bpf: Fix NULL pointer dereference in __btf_resolve_helper_id()") from the bpf tree and commit: 138b9a0511c7 ("bpf: Remove btf_id helpers resolving") from the net-ne

[PATCH v2] ipvs: clean code for ip_vs_sync.c

2020-07-15 Thread zhouxudong199
v1 -> v2: add missing spaces after Signed-off-by and ipvs: in the subject. i=0 changed to i = 0. Signed-off-by: zhouxudong199 --- net/netfilter/ipvs/ip_vs_sync.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfil

BUG_ON observed in kmalloc during alloc_skb()

2020-07-15 Thread Rajendra Dendukuri
Observed below kernel BUG_ON in slab.c while using "Debian 4.9.189-3+deb9u2" on an x86 platform. This was observed when the device was being rebooted while a packet storm was in progress and the packets were still in-flight in the network device driver. netdev_alloc_skb() was being done to send th

Re: [PATCH bpf-next v4 03/16] inet: Extract helper for selecting socket from reuseport group

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:47 AM Jakub Sitnicki wrote: > > Prepare for calling into reuseport from __inet_lookup_listener as well. > > Signed-off-by: Jakub Sitnicki > --- Acked-by: Andrii Nakryiko > net/ipv4/inet_hashtables.c | 29 - > 1 file changed, 20 insertions

Re: [PATCH bpf-next v4 02/16] bpf: Introduce SK_LOOKUP program type with a dedicated attach point

2020-07-15 Thread Andrii Nakryiko
On Mon, Jul 13, 2020 at 10:47 AM Jakub Sitnicki wrote: > > Add a new program type BPF_PROG_TYPE_SK_LOOKUP with a dedicated attach type > BPF_SK_LOOKUP. The new program kind is to be invoked by the transport layer > when looking up a listening socket for a new connection request for > connection or

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-15 Thread David Miller
From: Jakub Kicinski Date: Wed, 15 Jul 2020 17:06:32 -0700 > On Wed, 15 Jul 2020 18:51:55 -0500 Thomas Falcon wrote: >> free_netdev(netdev); >> dev_set_drvdata(&dev->dev, NULL); >> +netdev_info(netdev, "VNIC client device has been successfully >> removed.\n"); > > A step too far,

Re: [PATCH v2 1/1] ax88172a: fix ax88172a_unbind() failures

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 09:59:31 -0400 George Kennedy wrote: > If ax88172a_unbind() fails, make sure that the return code is > less than zero so that cleanup is done properly and avoid UAF. > > Signed-off-by: George Kennedy > Reported-by: syzbot+4cd84f527bf4a10fc...@syzkaller.appspotmail.com Fixes:

[PATCH] bpf: bpf.h: drop duplicated words in comments

2020-07-15 Thread Randy Dunlap
From: Randy Dunlap Drop doubled words "will" and "attach". Signed-off-by: Randy Dunlap Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: netdev@vger.kernel.org Cc: b...@vger.kernel.org --- include/uapi/linux/bpf.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- linux-next-20

Re: [PATCH v2 3/8] drivers: net: wan: Fix trivial spelling

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 13:48:34 +0100 Kieran Bingham wrote: > The word 'descriptor' is misspelled throughout the tree. > > Fix it up accordingly: > decriptor -> descriptor > > Signed-off-by: Kieran Bingham Applied to net-next.

Re: [PATCH net-next 00/11] mlxsw: Offload tc police action

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 11:27:22 +0300 Ido Schimmel wrote: > From: Ido Schimmel > > This patch set adds support for tc police action in mlxsw. > > Patches #1-#2 add defines for policer bandwidth limits and resource > identifiers (e.g., maximum number of policers). > > Patch #3 adds a common policer

Re: BPF logging infrastructure. Was: [PATCH bpf-next 4/6] tools: add new members to bpf_attr.raw_tracepoint in bpf.h

2020-07-15 Thread Andrii Nakryiko
On Wed, Jul 15, 2020 at 4:41 PM Alexei Starovoitov wrote: > > On Wed, Jul 15, 2020 at 02:56:36PM +0200, Toke Høiland-Jørgensen wrote: > > Alexei Starovoitov writes: > > > > > On Wed, Jul 15, 2020 at 12:19:03AM +0200, Toke Høiland-Jørgensen > > > wrote: > > >> Andrii Nakryiko writes: > > >

Re: [PATCH net-next v3] hinic: add firmware update support

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 15:30:23 +0800 Luo bin wrote: > add support to update firmware by the devlink flashing API > > Signed-off-by: Luo bin Applied, thank you.

Re: [PATCH v2] decnet: dn_dev: Remove an unnecessary label.

2020-07-15 Thread Jakub Kicinski
On Tue, 14 Jul 2020 19:53:28 +0530 Suraj Upadhyay wrote: > Remove the unnecessary label from dn_dev_ioctl() and make its error > handling simpler to read. > > Signed-off-by: Suraj Upadhyay Applied, thank you.

答复: [PATCH] ipvs:clean code for ip_vs_sync.c

2020-07-15 Thread Zhouxudong (EulerOS)
Thank you for suggestion. Firstly, I show an explanation for the second email. Sorry, I forgot to CC myself in sending first email, which lead to I cannot know if it successfully. So,I send it again. And now, I will add a space after ipvs: in the subject and after Signed-off-by:. -邮件原件-

Re: [PATCH] selftests: net: ip_defrag: modprobe missing nf_defrag_ipv6 support

2020-07-15 Thread Jakub Kicinski
On Tue, 14 Jul 2020 14:40:32 +0200 Paolo Pisati wrote: > # > # Run a couple of IP defragmentation tests. > > +modprobe -q nf_defrag_ipv6 > + > set +x > set -e > Any reason you add this command before set -e ? It seems we want the script to fail if module can't be loaded.

Re: [PATCH v2 net-next] docs: networking: timestamping: add section for stacked PHC devices

2020-07-15 Thread Jakub Kicinski
On Thu, 9 Jul 2020 23:17:33 +0300 Vladimir Oltean wrote: > The concept of timestamping DSA switches / Ethernet PHYs is becoming > more and more popular, however the Linux kernel timestamping code has > evolved quite organically and there's layers upon layers of new and old > code that need to work

Re: [PATCH] vsock/virtio: annotate 'the_virtio_vsock' RCU pointer

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 16:34:46 +0200 Stefano Garzarella wrote: > > Acked-by: Michael S. Tsirkin > > > > who's merging this? Dave? > > I think so, but I forgot the 'net' tag :-( > > I'll wait to see if Dave will queue this, otherwise I'll resend with > the 'net' tag. Applied to net now, thanks!

Re: [PATCH] SUNDANCE NETWORK DRIVER: Replace HTTP links with HTTPS ones

2020-07-15 Thread Jakub Kicinski
On Thu, 9 Jul 2020 22:49:25 +0200 Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't cont

Re: [PATCH net] dpaa2-eth: check fsl_mc_get_endpoint for IS_ERR_OR_NULL()

2020-07-15 Thread Jakub Kicinski
On Tue, 14 Jul 2020 15:08:16 +0300 Ioana Ciornei wrote: > The fsl_mc_get_endpoint() function can return an error or directly a > NULL pointer in case the peer device is not under the root DPRC > container. Treat this case also, otherwise it would lead to a NULL > pointer when trying to access the p

Re: [PATCH] af_packet: TPACKET_V3: replace busy-wait loop

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 18:35:00 -0400 Willem de Bruijn wrote: > On Wed, Jul 15, 2020 at 4:21 PM Jakub Kicinski wrote: > > > > On Tue, 7 Jul 2020 17:28:04 +0206 John Ogness wrote: > > > A busy-wait loop is used to implement waiting for bits to be copied > > > from the skb to the kernel buffer befor

Re: [RFC PATCH net-next 6/6] ice: implement devlink parameters to control flash update

2020-07-15 Thread Jacob Keller
On 7/15/2020 4:23 PM, Jakub Kicinski wrote: > On Wed, 15 Jul 2020 14:41:04 -0700 Jacob Keller wrote: >> To summarize this discussion, the next spin will have the following changes: >> >> 1) remove all parameters except for the preservation_level. Both >> ignore_pending_flash_update and allow_dow

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 18:51:55 -0500 Thomas Falcon wrote: > free_netdev(netdev); > dev_set_drvdata(&dev->dev, NULL); > + netdev_info(netdev, "VNIC client device has been successfully > removed.\n"); A step too far, perhaps. In general this patch looks a little questionable IMHO, th

Re: [Intel-wired-lan] NAT performance issue 944mbit -> ~40mbit

2020-07-15 Thread Ian Kumlien
On Thu, Jul 16, 2020 at 1:42 AM Alexander Duyck wrote: > On Wed, Jul 15, 2020 at 3:51 PM Ian Kumlien wrote: > > On Thu, Jul 16, 2020 at 12:32 AM Alexander Duyck > > wrote: > > > On Wed, Jul 15, 2020 at 3:00 PM Ian Kumlien wrote: > > > > On Wed, Jul 15, 2020 at 11:40 PM Jakub Kicinski wrote: >

Re: [PATCH bpf-next] bpf: Add bpf_prog iterator

2020-07-15 Thread Alexei Starovoitov
On Wed, Jul 1, 2020 at 10:23 PM Yonghong Song wrote: > > > > On 7/1/20 6:40 PM, Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > > > It's mostly a copy paste of commit 6086d29def80 ("bpf: Add bpf_map > > iterator") > > that is use to implement bpf_seq_file opreations to traverse all bp

[PATCH net-next] ibmvnic: Increase driver logging

2020-07-15 Thread Thomas Falcon
Improve the ibmvnic driver's logging capabilities by providing more informational messages to track driver operations, facilitating first-pass debug. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 76 -- 1 file changed, 62 insertions(+), 14 dele

Re: [PATCH v2 net-next 02/10] net: atlantic: additional per-queue stats

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 18:48:34 +0300 Igor Russkikh wrote: > +int aq_nic_fill_stats_data(struct aq_ring_stats_rx_s *stats_rx, > +struct aq_ring_stats_tx_s *stats_tx, > +u64 *data, > +unsigned int *p_count) > +{ > + unsigned in

[PATCH bpf-next 4/5] bpf, x64: rework pro/epilogue and tailcall handling in JIT

2020-07-15 Thread Maciej Fijalkowski
This commit serves two things: 1) it optimizes BPF prologue/epilogue generation 2) it makes possible to have tailcalls within BPF subprogram Both points are related to each other since without 1), 2) could not be achieved. In [1], Alexei says: "The prologue will look like: nop5 xor eax,eax  // tw

Re: [Intel-wired-lan] NAT performance issue 944mbit -> ~40mbit

2020-07-15 Thread Alexander Duyck
On Wed, Jul 15, 2020 at 3:51 PM Ian Kumlien wrote: > > On Thu, Jul 16, 2020 at 12:32 AM Alexander Duyck > wrote: > > On Wed, Jul 15, 2020 at 3:00 PM Ian Kumlien wrote: > > > On Wed, Jul 15, 2020 at 11:40 PM Jakub Kicinski wrote: > > > > On Wed, 15 Jul 2020 23:12:23 +0200 Ian Kumlien wrote: > >

[PATCH bpf-next 2/5] bpf: allow for tailcalls in BPF subprograms

2020-07-15 Thread Maciej Fijalkowski
Relax verifier's restriction that was meant to forbid tailcall usage when subprog count was higher than 1. Also, do not max out the stack depth of program that utilizes tailcalls. Signed-off-by: Maciej Fijalkowski --- kernel/bpf/verifier.c | 5 - 1 file changed, 5 deletions(-) diff --git a

[PATCH bpf-next 5/5] selftests: bpf: add dummy prog for bpf2bpf with tailcall

2020-07-15 Thread Maciej Fijalkowski
Introduce 6th test to taicalls kselftest that checks if tailcall can be correctly executed from the BPF subprogram. Signed-off-by: Maciej Fijalkowski --- .../selftests/bpf/prog_tests/tailcalls.c | 85 +++ tools/testing/selftests/bpf/progs/tailcall6.c | 38 + 2 files

[PATCH bpf-next 3/5] bpf: propagate poke descriptors to subprograms

2020-07-15 Thread Maciej Fijalkowski
Previously, there was no need for poke descriptors being present in subprogram's bpf_prog_aux struct since tailcalls were simply not allowed in them. Each subprog is JITed independently so in order to enable JITing such subprograms, simply copy poke descriptors from main program to subprogram's pok

[PATCH bpf-next 1/5] bpf, x64: use %rcx instead of %rax for tail call retpolines

2020-07-15 Thread Maciej Fijalkowski
Currently, %rax is used to store the jump target when BPF program is emitting the retpoline instructions that are handling the indirect tailcall. There is a plan to use %rax for different purpose, which is storing the tail call counter. In order to preserve this value across the tailcalls, use %rc

Re: BPF logging infrastructure. Was: [PATCH bpf-next 4/6] tools: add new members to bpf_attr.raw_tracepoint in bpf.h

2020-07-15 Thread Alexei Starovoitov
On Wed, Jul 15, 2020 at 02:56:36PM +0200, Toke Høiland-Jørgensen wrote: > Alexei Starovoitov writes: > > > On Wed, Jul 15, 2020 at 12:19:03AM +0200, Toke Høiland-Jørgensen > > wrote: > >> Andrii Nakryiko writes: > >> > >> >> However, assuming it *is* possible, my larger point was that we

[PATCH bpf-next 0/5] bpf: tailcalls in BPF subprograms

2020-07-15 Thread Maciej Fijalkowski
RFC->v1: - rename poke->ip/poke->ip_aux pair to poke->tailcall_target/poke->tailcall_bypass (Alexei) - get rid of x86-specific code in prog_array_map_poke_run (Alexei) - use synchronize_rcu in prog_array_map_poke_run so that other CPUs in the middle of execution will finish running the program

Re: [RFC PATCH net-next 6/6] ice: implement devlink parameters to control flash update

2020-07-15 Thread Jakub Kicinski
On Wed, 15 Jul 2020 14:41:04 -0700 Jacob Keller wrote: > To summarize this discussion, the next spin will have the following changes: > > 1) remove all parameters except for the preservation_level. Both > ignore_pending_flash_update and allow_downgrade_on_flash_update will be > removed and change

  1   2   3   4   >