Re: [Linux-kernel-mentees][PATCH] rtl8150: set memory to all 0xFFs on failed register reads

2020-09-16 Thread Petko Manolov
On 20-09-16 10:35:40, Anant Thazhemadam wrote: > get_registers() copies whatever memory is written by the > usb_control_msg() call even if the underlying urb call ends up failing. Not true, memcpy() is only called if "ret" is positive. > If get_registers() fails, or ends up reading 0 bytes, meani

[PATCH net-next] net: stmmac: Add support to Ethtool get/set ring parameters

2020-09-16 Thread Wong Vee Khee
From: "Song, Yoong Siang" This patch add support to --show-ring & --set-ring Ethtool functions: - Adding min, max, power of two check to new ring parameter's value. - Bring down the network interface before changing the value of ring parameters. - Bring up the network interface after changing t

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Greg Kroah-Hartman
On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wrote: > On Wed, Sep 16, 2020 at 9:25 AM Greg Kroah-Hartman > wrote: > > > > On Tue, Sep 15, 2020 at 11:49:12PM +0300, Oded Gabbay wrote: > > > On Tue, Sep 15, 2020 at 11:42 PM David Miller wrote: > > > > > > > > From: Oded Gabbay > > > > Dat

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman wrote: > > On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wrote: > > On Wed, Sep 16, 2020 at 9:25 AM Greg Kroah-Hartman > > wrote: > > > > > > On Tue, Sep 15, 2020 at 11:49:12PM +0300, Oded Gabbay wrote: > > > > On Tue, Sep 15, 2020 at 11

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Greg Kroah-Hartman
On Wed, Sep 16, 2020 at 11:02:39AM +0300, Oded Gabbay wrote: > On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wrote: > > > On Wed, Sep 16, 2020 at 9:25 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Tue, Sep 15, 20

Re: [PATCH] mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo

2020-09-16 Thread Paolo Abeni
Hi, On Wed, 2020-09-16 at 11:30 +0800, Ye Bin wrote: > Fixes make coccicheck warnig: > net/mptcp/protocol.c:164:11-18: WARNING: Unsigned expression compared with > zero: max_seq > 0 > > Reported-by: Hulk Robot > Signed-off-by: Ye Bin > --- > net/mptcp/protocol.c | 5 +++-- > 1 file changed, 3

Re: [PATCH net-next 6/6] net: hns3: use napi_consume_skb() when cleaning tx desc

2020-09-16 Thread Saeed Mahameed
On Tue, 2020-09-15 at 15:04 +0800, Yunsheng Lin wrote: > On 2020/9/15 13:09, Saeed Mahameed wrote: > > On Mon, 2020-09-14 at 20:06 +0800, Huazhong Tan wrote: > > > From: Yunsheng Lin > > > > > > Use napi_consume_skb() to batch consuming skb when cleaning > > > tx desc in NAPI polling. > > > > >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 11:21 AM Greg Kroah-Hartman wrote: > > On Wed, Sep 16, 2020 at 11:02:39AM +0300, Oded Gabbay wrote: > > On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wrote: > > > > On Wed, Sep 16, 2020 at 9

inconsistent lock state in xfrm_policy_lookup_inexact_addr

2020-09-16 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:6b02addb Add linux-next specific files for 20200915 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=15888efd90 kernel config: https://syzkaller.appspot.com/x/.config?x=7086d0e9e44d4a14 dashboard

possible deadlock in xfrm_policy_lookup_inexact_addr

2020-09-16 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:5fa35f24 Add linux-next specific files for 20200916 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1426870190 kernel config: https://syzkaller.appspot.com/x/.config?x=6bdb7e39caf48f53 dashboard

KASAN: use-after-free Write in rxrpc_put_bundle

2020-09-16 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:ed6d9b02 ionic: fix up debugfs after queue swap git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=13d4c1b590 kernel config: https://syzkaller.appspot.com/x/.config?x=d29a102d22f784ea dashboard link:

inconsistent lock state in xfrm_user_rcv_msg

2020-09-16 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:6b02addb Add linux-next specific files for 20200915 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=175c55b590 kernel config: https://syzkaller.appspot.com/x/.config?x=7086d0e9e44d4a14 dashboard

[PATCH net] geneve: add transport ports in route lookup for geneve

2020-09-16 Thread Mark Gray
This patch adds transport ports information for route lookup so that IPsec can select Geneve tunnel traffic to do encryption. This is needed for OVS/OVN IPsec with encrypted Geneve tunnels. This can be tested by configuring a host-host VPN using an IKE daemon and specifying port numbers. For examp

[PATCH] net/mlx5: IPsec: make spdxcheck.py happy

2020-09-16 Thread Lukas Bulwahn
Commit 2d64663cd559 ("net/mlx5: IPsec: Add HW crypto offload support") provided a proper SPDX license expression, but slipped in a typo. Fortunately, ./scripts/spdxcheck.py warns: drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec_offload.c: 1:39 \ Invalid License ID: Linux-OpenIBt Remove t

WARNING: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected

2020-09-16 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:6b02addb Add linux-next specific files for 20200915 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1148b90190 kernel config: https://syzkaller.appspot.com/x/.config?x=7086d0e9e44d4a14 dashboard

[PATCH net] geneve: add transport ports in route lookup for geneve

2020-09-16 Thread Mark Gray
This patch adds transport ports information for route lookup so that IPsec can select Geneve tunnel traffic to do encryption. This is needed for OVS/OVN IPsec with encrypted Geneve tunnels. This can be tested by configuring a host-host VPN using an IKE daemon and specifying port numbers. For examp

[PATCH net v2] geneve: add transport ports in route lookup for geneve

2020-09-16 Thread Mark Gray
This patch adds transport ports information for route lookup so that IPsec can select Geneve tunnel traffic to do encryption. This is needed for OVS/OVN IPsec with encrypted Geneve tunnels. This can be tested by configuring a host-host VPN using an IKE daemon and specifying port numbers. For examp

Re: [PATCH v3] ravb: Fixed to be able to unload modules

2020-09-16 Thread Geert Uytterhoeven
Hi Ashizuka-san, On Thu, Aug 20, 2020 at 2:55 PM Yuusuke Ashizuka wrote: > When this driver is built as a module, I cannot rmmod it after insmoding > it. > This is because that this driver calls ravb_mdio_init() at the time of > probe, and module->refcnt is incremented by alloc_mdio_bitbang() cal

[PATCH V2 net-next 2/6] net: hns3: batch tx doorbell operation

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Use netdev_xmit_more() to defer the tx doorbell operation when the skb is passed to the driver continuously. By doing this we can improve the overall xmit performance by avoid some doorbell operations. Also, the tx_err_cnt stat is not used, so rename it to tx_more stat. Signe

[PATCH V2 net-next 4/6] net: hns3: optimize the rx clean process

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Currently HNS3_RING_RX_RING_FBDNUM_REG register is read to determine how many rx desc can be cleaned. To avoid the register read operation in the critical data path, use the valid bit in the rx desc to determine if a specific rx desc can be cleaned. The hns3 driver clear valid

[PATCH V2 net-next 1/6] net: hns3: batch the page reference count updates

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Batch the page reference count updates instead of doing them one at a time. By doing this we can improve the overall receive performance by avoid some atomic increment operations when the rx page is reused. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers

[PATCH V2 net-next 6/6] net: hns3: use napi_consume_skb() when cleaning tx desc

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Use napi_consume_skb() to batch consuming skb when cleaning tx desc in NAPI polling. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 27 +++--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[PATCH V2 net-next 0/6] net: hns3: updates for -next

2020-09-16 Thread Huazhong Tan
There are some optimizations related to IO path. Change since V1: - fixes a unsuitable handling in hns3_lb_clear_tx_ring() of #6 which pointed out by Saeed Mahameed. previous version: V1: https://patchwork.ozlabs.org/project/netdev/cover/1600085217-26245-1-git-send-email-tanhuazh...@huawei.com

[PATCH V2 net-next 5/6] net: hns3: use writel() to optimize the barrier operation

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin writel() can be used to order I/O vs memory by default when writing portable drivers. Use writel() to replace wmb() + writel_relaxed(), and writel() is dma_wmb() + writel_relaxed() for ARM64, so there is an optimization here because dma_wmb() is a lighter barrier than wmb(). S

[PATCH V2 net-next 3/6] net: hns3: optimize the tx clean process

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Currently HNS3_RING_TX_RING_HEAD_REG register is read to determine how many tx desc can be cleaned. To avoid the register read operation in the critical data path, use the valid bit in the tx desc to determine if a specific tx desc can be cleaned. The hns3 driver sets valid bi

[PATCH v6 2/3] net: switchdev: Add VLAN protocol support for switchdev port

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" Add VLAN protocol support when adding or deleting VLAN for switchdev port, get current bridge's VLAN protocol and pass it to port driver. Signed-off-by: hongbo.wang --- net/bridge/br_switchdev.c | 24 1 file changed, 24 insertions(+) diff --git a/n

[PATCH v6 0/3] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" 1. Overview a) 0001* is for support to set dsa slave into 802.1AD(QinQ) mode. b) 0002* is for vlan_proto support for br_switchdev_port_vlan_add and br_switchdev_port_vlan_del. c) 0003* is for setting QinQ related registers in ocelot switch driver, after applying this patch,

[PATCH v6 1/3] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Set bridge's vlan protocol: ip link set br0 type bridge vlan_protocol 802.1ad Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 Signed-off-by:

[PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" This feature can be test in the following case: Customer <-> swp0 <-> swp1 <-> ISP Customer will send and receive packets with single VLAN tag(CTAG), ISP will send and receive packets with double VLAN tag(STAG and CTAG). This refers to "4.3.3 Provider Bridges and

[PATCH v3] hv_netvsc: Add validation for untrusted Hyper-V values

2020-09-16 Thread Andrea Parri (Microsoft)
From: Andres Beltran For additional robustness in the face of Hyper-V errors or malicious behavior, validate all values that originate from packets that Hyper-V has sent to the guest in the host-to-guest ring buffer. Ensure that invalid values cannot cause indexing off the end of an array, or sub

Re: [PATCH net 0/7] Bugfixes in Microsemi Ocelot switch driver

2020-09-16 Thread Alexandre Belloni
Hi, On 15/09/2020 21:22:22+0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > This is a series of 7 assorted patches for "net", on the drivers for the > VSC7514 MIPS switch (Ocelot-1), the VSC9953 PowerPC (Seville), and a few > more that are common to all supported devices since they are i

Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread Vladimir Oltean
Hi Hongbo, On Wed, Sep 16, 2020 at 05:48:45PM +0800, hongbo.w...@nxp.com wrote: > From: "hongbo.wang" > > This feature can be test in the following case: > Customer <-> swp0 <-> swp1 <-> ISP > > Customer will send and receive packets with single VLAN tag(CTAG), > ISP will send and re

[PATCH net] net: dsa: microchip: ksz8795: really set the correct number of ports

2020-09-16 Thread Matthias Schiffer
The KSZ9477 and KSZ8795 use the port_cnt field differently: For the KSZ9477, it includes the CPU port(s), while for the KSZ8795, it doesn't. It would be a good cleanup to make the handling of both drivers match, but as a first step, fix the recently broken assignment of num_ports in the KSZ8795 dr

RE: [v2, 5/5] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-16 Thread Y.b. Lu
Hi Ioana, > -Original Message- > From: Ioana Ciornei > Sent: Thursday, September 10, 2020 6:30 PM > To: Y.b. Lu ; netdev@vger.kernel.org > Cc: Y.b. Lu ; David S . Miller ; > Jakub Kicinski ; Richard Cochran > > Subject: RE: [v2, 5/5] dpaa2-eth: support PTP Sync packet one-step > timestam

RE: [PATCH 1/5] dpaa2-eth: add APIs of 1588 single step timestamping

2020-09-16 Thread Y.b. Lu
Hi Jakub, > -Original Message- > From: Jakub Kicinski > Sent: Thursday, September 10, 2020 10:40 PM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; David S . Miller ; Ioana > Ciornei ; Ioana Ciocoi Radulescu > ; Richard Cochran > > Subject: Re: [PATCH 1/5] dpaa2-eth: add APIs of 1588 single

Re: [EXT] Re: [net-next PATCH 0/2] Introduce mbox tracepoints for Octeontx2

2020-09-16 Thread Jiri Pirko
Mon, Sep 07, 2020 at 12:59:45PM CEST, sundeep.l...@gmail.com wrote: >Hi Jakub, > >On Sat, Sep 5, 2020 at 2:07 AM Jakub Kicinski wrote: >> >> On Fri, 4 Sep 2020 12:29:04 + Sunil Kovvuri Goutham wrote: >> > > >No, there are 3 drivers registering to 3 PCI device IDs and there can >> > > >be many

Re: [PATCH net] net: dsa: microchip: ksz8795: really set the correct number of ports

2020-09-16 Thread Codrin.Ciubotariu
On 16.09.2020 13:08, Matthias Schiffer wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > The KSZ9477 and KSZ8795 use the port_cnt field differently: For the > KSZ9477, it includes the CPU port(s), while for the KSZ8795, it doesn't. > > It w

[PATCH net-next] genetlink: Remove unused function genl_err_attr()

2020-09-16 Thread YueHaibing
It is never used, so can remove it. Signed-off-by: YueHaibing --- include/net/genetlink.h | 8 1 file changed, 8 deletions(-) diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 6e5f1e1aa822..b9eb92f3fe86 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink

[PATCH net-next v9 2/6] net: marvell: prestera: Add PCI interface support

2020-09-16 Thread Vadym Kochan
Add PCI interface driver for Prestera Switch ASICs family devices, which provides: - Firmware loading mechanism - Requests & events handling to/from the firmware - Access to the firmware on the bus level The firmware has to be loaded each time the device is reset. The driver is loadin

[PATCH net-next v9 3/6] net: marvell: prestera: Add basic devlink support

2020-09-16 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- PATCH v8: 1) Put license in one line. 2) Use traditional error handling pattern in prestera_devlink_port_register(): err = F(); if (err)

[PATCH v2] ath10k: sdio: remove redundant check in for loop

2020-09-16 Thread Alex Dewar
The for loop checks whether cur_section is NULL on every iteration, but we know it can never be NULL as there is another check towards the bottom of the loop body. Refactor to avoid this unnecessary check. Also, increment the variable i inline for clarity Addresses-Coverity: 1496984 ("Null pointe

[PATCH net-next v9 4/6] net: marvell: prestera: Add ethtool interface support

2020-09-16 Thread Vadym Kochan
The ethtool API provides support for the configuration of the following features: speed and duplex, auto-negotiation, MDI-x, forward error correction, port media type. The API also provides information about the port status, hardware and software statistic. The following limitation exists: - p

Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-16 Thread KP Singh
On Wed, Sep 16, 2020 at 1:24 PM Jiri Olsa wrote: > > Some kernels builds might inline vfs_getattr call within fstat > syscall code path, so fentry/vfs_getattr trampoline is not called. > > Alexei suggested [1] we should use security_inode_getattr instead, > because it's less likely to get inlined.

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Jean-Philippe Brucker
On Wed, Sep 16, 2020 at 03:39:37PM +0300, Yauheni Kaliuta wrote: > If you start to amend extables, could you consider a change like > > 05a68e892e89 ("s390/kernel: expand exception table logic to allow new > handling options") > > and implementation of BPF_PROBE_MEM then? Commit 800834285361 ("

Re: [PATCH 3/3] ARM: s3c: Bring back notes from removed debug-macro.S

2020-09-16 Thread Krzysztof Kozlowski
On Fri, Sep 11, 2020 at 04:33:43PM +0200, Krzysztof Kozlowski wrote: > Documentation references notes from a removed debug-macro.S file so > bring the contents here. > > Signed-off-by: Krzysztof Kozlowski > --- > arch/arm/mach-s3c/s3c64xx.c | 7 ++- > 1 file changed, 6 insertions(+), 1 delet

[PATCH net] cxgb4: fix memory leak during module unload

2020-09-16 Thread Raju Rangoju
Fix the memory leak in mps during module unload path by freeing mps reference entries if the list adpter->mps_ref is not already empty Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting") Signed-off-by: Raju Rangoju --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c | 2 +- 1 fil

Re: [PATCH] Bluetooth: pause/resume advertising around suspend

2020-09-16 Thread Marcel Holtmann
Hi Daniel, > Currently, the controller will continue advertising when the system > enters suspend. This patch makes sure that all advertising instances are > paused when entering suspend, and resumed when suspend exits. > > The Advertising and Suspend/Resume test suites were both run on this > ch

RE: [v3, 6/6] dpaa2-eth: fix a build warning in dpmac.c

2020-09-16 Thread Ioana Ciornei
> Subject: [v3, 6/6] dpaa2-eth: fix a build warning in dpmac.c > > Fix below sparse warning in dpmac.c. > warning: cast to restricted __le64 > > Signed-off-by: Yangbo Lu > --- > Changes for v3: > - Added this patch. > --- > drivers/net/ethernet/freescale/dpaa2/dpmac.c | 2 +- > 1 file c

[PATCH net-next] netdev: Remove unused funtions

2020-09-16 Thread YueHaibing
There is no callers in tree, so can remove it. Signed-off-by: YueHaibing --- include/linux/netdevice.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 157e0242e9ee..909b1fbb0481 100644 --- a/include/linux/netdevice.h +++

[PATCH net-next] selftests: mptcp: interpret \n as a new line

2020-09-16 Thread Matthieu Baerts
In case of errors, this message was printed: (...) # read: Resource temporarily unavailable # client exit code 0, server 3 # \nnetns ns1-0-BJlt5D socket stat for 10003: (...) Obviously, the idea was to add a new line before the socket stat and not print "\nnetns". Fixes: b08fbf241064

[v3, 5/6] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-16 Thread Yangbo Lu
This patch is to add PTP sync packet one-step timestamping support. Before egress, one-step timestamping enablement needs, - Enabling timestamp and FAS (Frame Annotation Status) in dpni buffer layout. - Write timestamp to frame annotation and set PTP bit in FAS to mark as one-step timestampin

[v3, 0/6] dpaa2_eth: support 1588 one-step timestamping

2020-09-16 Thread Yangbo Lu
This patch-set is to add MC APIs of 1588 one-step timestamping, and support one-step timestamping for PTP Sync packet on DPAA2. Before egress, one-step timestamping enablement needs, - Enabling timestamp and FAS (Frame Annotation Status) in dpni buffer layout. - Write timestamp to frame annota

[v3, 1/6] dpaa2-eth: add APIs of 1588 single step timestamping

2020-09-16 Thread Yangbo Lu
This patch is to add APIs of 1588 single step timestamping. - dpni_set_single_step_cfg - dpni_get_single_step_cfg Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed sparse warnings. --- drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h | 21 +++ drive

[v3, 6/6] dpaa2-eth: fix a build warning in dpmac.c

2020-09-16 Thread Yangbo Lu
Fix below sparse warning in dpmac.c. warning: cast to restricted __le64 Signed-off-by: Yangbo Lu --- Changes for v3: - Added this patch. --- drivers/net/ethernet/freescale/dpaa2/dpmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpa

[PATCH bpf v5] xsk: do not discard packet when NETDEV_TX_BUSY

2020-09-16 Thread Magnus Karlsson
From: Magnus Karlsson In the skb Tx path, transmission of a packet is performed with dev_direct_xmit(). When NETDEV_TX_BUSY is set in the drivers, it signifies that it was not possible to send the packet right now, please try later. Unfortunately, the xsk transmit code discarded the packet and re

[PATCH net-next] netfilter: nf_tables: Remove ununsed function nft_data_debug

2020-09-16 Thread YueHaibing
It is never used, so can be removed. Signed-off-by: YueHaibing --- include/net/netfilter/nf_tables.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 8ceca0e419b3..c4c526507ddb 100644 --- a/include/net/netfilte

[PATCH net-next 5/7] srcu: use a more appropriate lockdep helper

2020-09-16 Thread Jakub Kicinski
lockdep_is_held() is defined as: #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) it hides away the dereference, so that builds with !LOCKDEP don't break. We should use it instead of using lock_is_held() directly. This didn't use to be a problem, because RCU_LOCKDEP_WARN()

Re: [PATCH bpf-next v5 3/8] bpf: move prog->aux->linked_prog and trampoline into bpf_link on attach

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > In preparation for allowing multiple attachments of freplace programs, move > the references to the target program and trampoline into the > bpf_tracing_link structure when that is created. To do th

[PATCH net-next 7/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition

2020-09-16 Thread Jakub Kicinski
We run into a unused variable warning in bridge code when variable is only used inside the condition of rcu_dereference_protected(). #define mlock_dereference(X, br) \ rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock)) Since on builds with CONFIG_PROVE_RCU=n rcu_dereferen

[PATCH net-next 0/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition

2020-09-16 Thread Jakub Kicinski
Hi! So I unfolded the RFC patch into smaller chunks and fixed an issue in SRCU pointed out by build bot. Build bot has been quiet for a day but I'm not 100% sure it's scanning my tree, so let's give these patches some ML exposure. The motivation here is that we run into a unused variable warning

[PATCH net-next 6/7] lockdep: provide dummy forward declaration of *_is_held() helpers

2020-09-16 Thread Jakub Kicinski
When CONFIG_LOCKDEP is not set, lock_is_held() and lockdep_is_held() are not declared or defined. This forces all callers to use ifdefs around these checks. Recent RCU changes added a lot of lockdep_is_held() calls inside rcu_dereference_protected(). rcu_dereference_protected() hides its argument

[PATCH net-next 3/7] net: un-hide lockdep_sock_is_held() for !LOCKDEP

2020-09-16 Thread Jakub Kicinski
We're trying to make LOCKDEP-related function declarations visible to the compiler and depend on dead code elimination to remove them. Un-hide lockdep_sock_is_held(). Signed-off-by: Jakub Kicinski --- include/net/sock.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/net/sock.h b/i

[PATCH net-next 2/7] rcu: un-hide lockdep maps for !LOCKDEP

2020-09-16 Thread Jakub Kicinski
We're trying to make LOCKDEP-related forward declarations visible to the compiler and depend on dead code elimination to remove them. Expose RCU lock maps. Signed-off-by: Jakub Kicinski --- CC: paul...@kernel.org CC: j...@joshtriplett.org CC: rost...@goodmis.org CC: mathieu.desnoy...@efficios.co

[PATCH net-next 4/7] net: sched: remove broken definitions and un-hide for !LOCKDEP

2020-09-16 Thread Jakub Kicinski
We're trying to make LOCKDEP-related function declarations visible to the compiler and depend on dead code elimination to remove them. Fix up the situation with lockdep_tcf_chain_is_locked() and lockdep_tcf_proto_is_locked(). Signed-off-by: Jakub Kicinski -- CC: j...@mojatatu.com CC: xiyou.wangc

[PATCH net-next 1/7] sched: un-hide lockdep_tasklist_lock_is_held() for !LOCKDEP

2020-09-16 Thread Jakub Kicinski
We're trying to make LOCKDEP-related function declarations visible to the compiler and depend on dead code elimination to remove them. Make lockdep_tasklist_lock_is_held() visible. Signed-off-by: Jakub Kicinski --- CC: christian.brau...@ubuntu.com CC: pet...@infradead.org CC: ebied...@xmission.c

RE: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread Hongbo Wang
Hi Vladimir, > -Original Message- > From: Vladimir Oltean > Sent: 2020年9月16日 18:00 > To: Hongbo Wang > Cc: Xiaoliang Yang ; Po Liu ; > Mingkai Hu ; allan.niel...@microchip.com; Claudiu > Manoil ; Alexandru Marginean > ; Vladimir Oltean > ; Leo Li ; and...@lunn.ch; > f.faine...@gmail.com;

[PATCH net-next] net/packet: Fix a comment about mac_header

2020-09-16 Thread Xie He
1. Change all "dev->hard_header" to "dev->header_ops" 2. On receiving incoming frames when header_ops == NULL: The comment only says what is wrong, but doesn't say what is right. This patch changes the comment to make it clear what is right. 3. On transmitting and receiving outgoing frames when

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-09-16 Thread Kishon Vijay Abraham I
Hi Jason, On 16/09/20 8:40 am, Jason Wang wrote: > > On 2020/9/15 下午11:47, Kishon Vijay Abraham I wrote: >> Hi Jason, >> >> On 15/09/20 1:48 pm, Jason Wang wrote: >>> Hi Kishon: >>> >>> On 2020/9/14 下午3:23, Kishon Vijay Abraham I wrote: > Then you need something that is functional equivalent

Re: [PATCH 10/16] wireless: intersil: convert tasklets to use new tasklet_setup() API

2020-09-16 Thread Lee Jones
On Mon, 17 Aug 2020, Allen Pais wrote: > From: Allen Pais > > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly > and remove .data field. >

Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-16 Thread Vladimir Oltean
On Wed, Sep 16, 2020 at 01:12:04PM +0200, Alexandre Belloni wrote: > > + for (port = 0; port < ocelot->num_phys_ports; port++) { > > + struct ocelot_port *ocelot_port = ocelot->ports[port]; > > + > > At this point, ocelot_port is NULL because ocelot_init is called before > the port str

Re: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread Vladimir Oltean
On Wed, Sep 16, 2020 at 10:28:38AM +, Hongbo Wang wrote: > Hi Vladimir, > > if swp0 connects with customer, and swp1 connects with ISP, According > to the VSC99599_1_00_TS.pdf, swp0 and swp1 will have different > VLAN_POP_CNT && VLAN_AWARE_ENA, > > swp0 should set VLAN_CFG.VLAN_POP_CNT=0 && VLA

[PATCH 1/1] net/rds: suppress page allocation failure error in recv buffer refill

2020-09-16 Thread Manjunath Patil
RDS/IB tries to refill the recv buffer in softirq context using GFP_NOWAIT flag. However alloc failure is handled by queueing a work to refill the recv buffer with GFP_KERNEL flag. This means failure to allocate with GFP_NOWAIT isn't fatal. Do not print the PAF warnings if softirq context fails to

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Greg Kroah-Hartman
On Wed, Sep 16, 2020 at 11:47:58AM +0300, Oded Gabbay wrote: > On Wed, Sep 16, 2020 at 11:21 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Sep 16, 2020 at 11:02:39AM +0300, Oded Gabbay wrote: > > > On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Wed, Sep 16, 2

Re: [PATCH v2] mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo

2020-09-16 Thread Matthieu Baerts
Hi Ye, Thank you for this v2. On 16/09/2020 13:41, Ye Bin wrote: Fixes coccicheck warnig: net/mptcp/protocol.c:164:11-18: WARNING: Unsigned expression compared with zero: max_seq > 0 Fixes: ab174ad8ef76 ("mptcp: move ooo skbs into msk out of order queue") Reported-by: Hulk Robot Signed-off-b

Re: [v3, 5/6] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-16 Thread Saeed Mahameed
On Wed, 2020-09-16 at 20:08 +0800, Yangbo Lu wrote: > This patch is to add PTP sync packet one-step timestamping support. > Before egress, one-step timestamping enablement needs, > > - Enabling timestamp and FAS (Frame Annotation Status) in > dpni buffer layout. > > - Write timestamp to frame a

Re: [PATCH 1/1] net/rds: suppress page allocation failure error in recv buffer refill

2020-09-16 Thread santosh . shilimkar
On 9/16/20 12:08 PM, Manjunath Patil wrote: RDS/IB tries to refill the recv buffer in softirq context using GFP_NOWAIT flag. However alloc failure is handled by queueing a work to refill the recv buffer with GFP_KERNEL flag. This means failure to allocate with GFP_NOWAIT isn't fatal. Do not print

[PATCH iproute2-next] ip: promote missed packets to the -s row

2020-09-16 Thread Jakub Kicinski
missed_packet_errors are much more commonly reported: linux$ git grep -c '[.>]rx_missed_errors ' -- drivers/ | wc -l 64 linux$ git grep -c '[.>]rx_over_errors ' -- drivers/ | wc -l 37 Plus those drivers are generally more modern than those using rx_over_errors. Since recently merged kernel docum

[PATCH v2] mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo

2020-09-16 Thread Ye Bin
Fixes coccicheck warnig: net/mptcp/protocol.c:164:11-18: WARNING: Unsigned expression compared with zero: max_seq > 0 Fixes: ab174ad8ef76 ("mptcp: move ooo skbs into msk out of order queue") Reported-by: Hulk Robot Signed-off-by: Ye Bin --- net/mptcp/protocol.c | 5 +++-- 1 file changed, 3 ins

Re: [PATCH bpf-next v5 4/8] bpf: support attaching freplace programs to multiple attach points

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > This enables support for attaching freplace programs to multiple attach > points. It does this by amending the UAPI for bpf_link_Create with a target > btf ID that can be used to supply the new atta

resolve_btfids breaks kernel cross-compilation

2020-09-16 Thread Seth Forshee
The requirement to build resolve_btfids whenever CONFIG_DEBUG_INFO_BTF is enabled breaks some cross builds. For example, when building a 64-bit powerpc kernel on amd64 I get: Auto-detecting system features: ...libelf: [ [32mon[m ] ... zlib: [ [3

[PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Alex Dewar
In mt7531_cpu_port_config(), if the variable port is neither 5 nor 5, then variable interface will be used uninitialised. Change the function to return -EINVAL in this case. As the return value of mt7531_cpu_port_config() is never checked (even though it returns an int) add a check in the correct

Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-16 Thread Alexandre Belloni
On 15/09/2020 21:22:24+0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > The ocelot_port->ts_id is used to: > - populate skb->cb[0] for matching the TX timestamp in the PTP IRQ with > an skb. > - populate the REW_OP from the injection header of the ongoing skb. > Only then is ocelot_port

Re: [PATCH bpf-next v5 5/8] bpf: Fix context type resolving for extension programs

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > Eelco reported we can't properly access arguments if the tracing > program is attached to extension program. > > Having following program: > > SEC("classifier/test_pkt_md_access") > int test_pkt

Re: [PATCH bpf-next v5 2/8] bpf: verifier: refactor check_attach_btf_id()

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > The check_attach_btf_id() function really does three things: > > 1. It performs a bunch of checks on the program to ensure that the >attachment is valid. > > 2. It stores a bunch of state about

Re: general protection fault in cache_clean

2020-09-16 Thread J. Bruce Fields
On Tue, Sep 15, 2020 at 01:04:20AM -0700, syzbot wrote: > syzbot found the following issue on: > > HEAD commit:581cb3a2 Merge tag 'f2fs-for-5.9-rc5' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11f5c01190 > kernel config: ht

Re: [EXT] Re: [net-next PATCH 0/2] Introduce mbox tracepoints for Octeontx2

2020-09-16 Thread sundeep subbaraya
On Wed, Sep 16, 2020 at 4:04 PM Jiri Pirko wrote: > > Mon, Sep 07, 2020 at 12:59:45PM CEST, sundeep.l...@gmail.com wrote: > >Hi Jakub, > > > >On Sat, Sep 5, 2020 at 2:07 AM Jakub Kicinski wrote: > >> > >> On Fri, 4 Sep 2020 12:29:04 + Sunil Kovvuri Goutham wrote: > >> > > >No, there are 3 dri

Re: [PATCH bpf-next v5 5/8] bpf: Fix context type resolving for extension programs

2020-09-16 Thread Andrii Nakryiko
On Wed, Sep 16, 2020 at 12:59 PM Andrii Nakryiko wrote: > > On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen > wrote: > > > > From: Toke Høiland-Jørgensen > > > > Eelco reported we can't properly access arguments if the tracing > > program is attached to extension program. > > > > Having

Re: [PATCH net-next] netdev: Remove unused funtions

2020-09-16 Thread Saeed Mahameed
On Wed, 2020-09-16 at 22:18 +0800, YueHaibing wrote: > There is no callers in tree, so can remove it. > You have a typo in the patch title: funtions -> functions > Signed-off-by: YueHaibing Please feel free to add my R.B tag after on V2. Reviewed-by: Saeed Mahameed And by the way, you have 3

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Yauheni Kaliuta
Hi, Jean-Philippe! > On Wed, 16 Sep 2020 15:17:02 +0200, Jean-Philippe Brucker wrote: > On Wed, Sep 16, 2020 at 03:39:37PM +0300, Yauheni Kaliuta wrote: >> If you start to amend extables, could you consider a change like >> >> 05a68e892e89 ("s390/kernel: expand exception table logic to

Re: [PATCH bpf-next] bpf: don't check against device MTU in __bpf_skb_max_len

2020-09-16 Thread Toke Høiland-Jørgensen
Maciej Żenczykowski writes: > On Tue, Sep 15, 2020 at 1:47 AM Toke Høiland-Jørgensen > wrote: >> >> [ just jumping in to answer this bit: ] >> >> > Would you happen to know what ebpf startup overhead is? >> > How big a problem is having two (or more) back to back tc programs >> > instead of one

[PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-16 Thread Jiri Olsa
Some kernels builds might inline vfs_getattr call within fstat syscall code path, so fentry/vfs_getattr trampoline is not called. Alexei suggested [1] we should use security_inode_getattr instead, because it's less likely to get inlined. Adding security_inode_getattr to the d_path allowed list an

Re: [PATCH bpf-next v5 1/8] bpf: change logging calls from verbose() to bpf_log() and use log pointer

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > In preparation for moving code around, change a bunch of references to > env->log (and the verbose() logging helper) to use bpf_log() and a direct > pointer to struct bpf_verifier_log. While we're t

Re: [PATCH bpf-next v5 6/8] libbpf: add support for freplace attachment in bpf_link_create

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > This adds support for supplying a target btf ID for the bpf_link_create() > operation, and adds a new bpf_program__attach_freplace() high-level API for > attaching freplace functions with a target.

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Yauheni Kaliuta
Hi, Ilias! > On Tue, 15 Sep 2020 22:23:11 +0300, Ilias Apalodimas wrote: > Hi Will, > On Tue, Sep 15, 2020 at 03:17:08PM +0100, Will Deacon wrote: >> On Tue, Sep 15, 2020 at 04:53:44PM +0300, Ilias Apalodimas wrote: >> > On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: >> >

Re: [pull request][net-next 00/16] mlx5 updates 2020-09-15

2020-09-16 Thread Jakub Kicinski
On Tue, 15 Sep 2020 13:25:17 -0700 sa...@kernel.org wrote: > From: Saeed Mahameed > > Hi Dave & Jakub, > > This series adds some misc updates to mlx5 driver. > > For more information please see tag log below. > > Please pull and let me know if there is any problem. I don't really know what th

[v3, 4/6] dpaa2-eth: utilize skb->cb[0] for hardware timestamping

2020-09-16 Thread Yangbo Lu
This patch is a preparation for next hardware one-step timestamping support. For DPAA2, the one step timestamping configuration on hardware registers has to be done when there is no one-step timestamping packet in flight. So we will have to use workqueue and skb queue for such packets transmitting,

[v3, 3/6] dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code

2020-09-16 Thread Yangbo Lu
Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD, rather than calling it in dpaa2_eth_build_single_fd(), dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd(). Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. --- drivers/net

[v3, 2/6] dpaa2-eth: define a global ptp_qoriq structure pointer

2020-09-16 Thread Yangbo Lu
Define a global ptp_qoriq structure pointer, and export to use. The ptp clock operations will be used in dpaa2-eth driver. For example, supporting one step timestamping needs to write current time to hardware frame annotation before sending and then hardware inserts the delay time on frame during s

Re: [PATCH] ath10k: sdio: remove reduntant check in for loop

2020-09-16 Thread Alex Dewar
[snip] 'i' is only referenced once inside the loop to check boundary, the loop is actually iterating over cur_section, so i would make it clear in the loop statement, e.g.: Remove the break condition and the cur_section assignment at the end of the loop and use the loop statement to do it for yo

Re: [PATCH bpf-next v5 8/8] selftests/bpf: Adding test for arg dereference in extension trace

2020-09-16 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen wrote: > > From: Jiri Olsa > > Adding test that setup following program: > > SEC("classifier/test_pkt_md_access") > int test_pkt_md_access(struct __sk_buff *skb) > > with its extension: > > SEC("freplace/test_pkt_md_access") > int tes

  1   2   3   >