[net-next PATCH 7/7] octeontx2-pf: ethtool physical link configuration

2021-01-20 Thread Hariprasad Kelam
From: Christina Jacob Register set_link_ksetting callback with driver such that link configurations parameters like advertised mode,speed, duplex and autoneg can be configured. below command ethtool -s eth0 advertise 0x1 speed 10 duplex full autoneg on Signed-off-by: Christina Jacob Signed-off

[net-next PATCH 3/7] octeontx2-pf: ethtool fec mode support

2021-01-20 Thread Hariprasad Kelam
From: Christina Jacob Add ethtool support to configure fec modes baser/rs and support to fecth FEC stats from CGX as well PHY. Configure fec mode - ethtool --set-fec eth0 encoding rs/baser/off/auto Query fec mode - ethtool --show-fec eth0 Signed-off-by: Christina Jacob Signed-o

[net-next PATCH 0/7] ethtool support for fec and link configuration

2021-01-20 Thread Hariprasad Kelam
This series of patches add support for forward error correction(fec) and physical link configuration. Patches 1&2 adds necessary mbox handlers for fec mode configuration request and to fetch stats. Patch 3 registers driver callbacks for fec mode configuration and display. Patch 4&5 adds support of

Re: [PATCH net-next v2 3/3] xsk: build skb by page

2021-01-20 Thread Magnus Karlsson
On Wed, Jan 20, 2021 at 9:29 PM Alexander Lobakin wrote: > > From: Xuan Zhuo > Date: Wed, 20 Jan 2021 16:30:56 +0800 > > > This patch is used to construct skb based on page to save memory copy > > overhead. > > > > This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the > > network c

Re: [PATCH bpf-next v2 7/8] selftest/bpf: add XDP socket tests for bpf_redirect_{xsk, map}()

2021-01-20 Thread Andrii Nakryiko
On Tue, Jan 19, 2021 at 7:55 AM Björn Töpel wrote: > > From: Björn Töpel > > Add support for externally loaded XDP programs to > xdpxceiver/test_xsk.sh, so that bpf_redirect_xsk() and > bpf_redirect_map() can be exercised. > > Signed-off-by: Björn Töpel > --- > .../selftests/bpf/progs/xdpxceive

[PATCH] net: octeontx2: Make sure the buffer is 128 byte aligned

2021-01-20 Thread Kevin Hao
The octeontx2 hardware needs the buffer to be 128 byte aligned. But in the current implementation of napi_alloc_frag(), it can't guarantee the return address is 128 byte aligned even the request size is a multiple of 128 bytes, so we have to request an extra 128 bytes and use the PTR_ALIGN() to mak

Re: KASAN: vmalloc-out-of-bounds Read in bpf_trace_run7

2021-01-20 Thread syzbot
syzbot has bisected this issue to: commit 8b401f9ed2441ad9e219953927a842d24ed051fc Author: Yonghong Song Date: Thu May 23 21:47:45 2019 + bpf: implement bpf_send_signal() helper bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=123408e750 start commit: 7d68e382 bpf: P

Re: [PATCH v2 bpf-next 4/4] selftests/bpf: add dump type data tests to btf dump tests

2021-01-20 Thread Andrii Nakryiko
On Sun, Jan 17, 2021 at 2:21 PM Alan Maguire wrote: > > Test various type data dumping operations by comparing expected > format with the dumped string; an snprintf-style printf function > is used to record the string dumped. > > Signed-off-by: Alan Maguire > --- > tools/testing/selftests/bpf/pr

Re: [PATCH v2 bpf-next 3/4] libbpf: BTF dumper support for typed data

2021-01-20 Thread Andrii Nakryiko
On Sun, Jan 17, 2021 at 2:22 PM Alan Maguire wrote: > > Add a BTF dumper for typed data, so that the user can dump a typed > version of the data provided. > > The API is > > int btf_dump__emit_type_data(struct btf_dump *d, __u32 id, > const struct btf_dump_emit_type_da

Re: [net-next V8 03/14] devlink: Support add and delete devlink port

2021-01-20 Thread Saeed Mahameed
On Wed, 2021-01-20 at 01:05 -0800, Saeed Mahameed wrote: > From: Parav Pandit [...] > + /** > + * @port_new: Port add function. > + * > + * Should be used by device drivers to add a new port of a > specified > Sorry about the mess, this is not exactly what Jakub asked for. I w

Re: [patch net-next RFC 00/10] introduce line card support for modular switch

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 14:56:46 +0100 Andrew Lunn wrote: > > No, the FW does not know. The ASIC is not physically able to get the > > linecard type. Yes, it is odd, I agree. The linecard type is known to > > the driver which operates on i2c. This driver takes care of power > > management of the lineca

[PATCH v3 net-next 0/4] net: ipa: remove a build dependency

2021-01-20 Thread Alex Elder
(David/Jakub, please take these all through net-next if they are acceptable to you, once Rob has acked the binding. Rob, please ack if the binding looks OK to you.) Version 3 removes the "Fixes" tag from the first patch, and updates the addressee list to include some people I apparently missed.

[PATCH v3 net-next 1/4] net: ipa: remove a remoteproc dependency

2021-01-20 Thread Alex Elder
The IPA driver currently requires a DT property to be defined whose value is the phandle for the modem subsystem. This was needed to look up a remoteproc structure pointer used when registering for notifications in the original IPA notification mechanism. Remoteproc provides a more generic SSR no

[PATCH v3 net-next 2/4] dt-bindings: net: remove modem-remoteproc property

2021-01-20 Thread Alex Elder
The IPA driver uses the remoteproc SSR notifier now, rather than the temporary IPA notification system used initially. As a result it no longer needs a property identifying the modem subsystem DT node. Use GIC_SPI rather than 0 in the example interrupt definition. Signed-off-by: Alex Elder ---

[PATCH net 2/3] ibmvnic: remove unnecessary rmb() inside ibmvnic_poll

2021-01-20 Thread Lijun Pan
rmb() was introduced to load rx_scrq->msgs after calling pending_scrq(). Now since pending_scrq() itself already has dma_rmb() at the end of the function, rmb() is duplicated and can be removed. Fixes: ec20f36bb41a ("ibmvnic: Correctly re-enable interrupts in NAPI polling routine") Signed-off-by:

[PATCH net 1/3] ibmvnic: rework to ensure SCRQ entry reads are properly ordered

2021-01-20 Thread Lijun Pan
Move the dma_rmb() between pending_scrq() and ibmvnic_next_scrq() into the end of pending_scrq(), and explain why. Explain in detail why the dma_rmb() is placed at the end of ibmvnic_next_scrq(). Fixes: b71ec9522346 ("ibmvnic: Ensure that SCRQ entry reads are correctly ordered") Signed-off-by: Li

[PATCH net] ibmvnic: device remove has higher precedence over reset

2021-01-20 Thread Lijun Pan
Returning -EBUSY in ibmvnic_remove() does not actually hold the removal procedure since driver core doesn't care for the return value (see __device_release_driver() in drivers/base/dd.c calling dev->bus->remove()) though vio_bus_remove (in arch/powerpc/platforms/pseries/vio.c) records the return va

Re: [PATCHv3 net-next] ip_gre: remove CRC flag from dev features in gre_gso_segment

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 16 Jan 2021 12:44:11 +0800 you wrote: > This patch is to let it always do CRC checksum in sctp_gso_segment() > by removing CRC flag from the dev features in gre_gso_segment() for > SCTP over GRE, just as it does in

Re: [PATCH] net: stmmac: dwmac-meson8b: fix the RX delay validation

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 19 Jan 2021 21:24:24 +0100 you wrote: > When has_prg_eth1_rgmii_rx_delay is true then we support RX delays > between 0ps and 3000ps in 200ps steps. Swap the validation of the RX > delay based on the has_prg_eth1_rgm

Re: [PATCH v2 net-next ] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 19 Jan 2021 16:31:50 +0800 you wrote: > From: wenxu > > This patch add the TCA_FLOWER_KEY_CT_FLAGS_INVALID flag to > match the ct_state with invalid for conntrack. > > Signed-off-by: wenxu > > [...] Here is th

Re: [PATCH net-next] udp: not remove the CRC flag from dev features when need_csum is false

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 16 Jan 2021 13:59:17 +0800 you wrote: > In __skb_udp_tunnel_segment(), when it's a SCTP over VxLAN/GENEVE > packet and need_csum is false, which means the outer udp checksum > doesn't need to be computed, csum_start

[PATCH net 3/3] ibmvnic: Ensure that CRQ entry read/write are correctly ordered

2021-01-20 Thread Lijun Pan
Ensure that received Command-Response Queue (CRQ) entries are properly read/written in order by the driver. dma_rmb barrier has been added before accessing the CRQ descriptor to ensure the entire descriptor is read before processing. dma_wmb barrier is also added to ensure the entire descriptor is

[PATCH net 0/3] fixes the memory barrier for SCRQ/CRQ entry

2021-01-20 Thread Lijun Pan
This series rework/fix the memory barrier for SCRQ (Sub-Command-Response Queue) and CRQ (Command-Response Queue) entries. This series does not have merge conflict with Suka's https://lists.openwall.net/netdev/2021/01/08/89 Lijun Pan (3): ibmvnic: rework to ensure SCRQ entry reads are properly

[PATCH v5 net-next 05/10] net: mscc: ocelot: don't use NPI tag prefix for the CPU port module

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean Context: Ocelot switches put the injection/extraction frame header in front of the Ethernet header. When used in NPI mode, a DSA master would see junk instead of the destination MAC address, and it would most likely drop the packets. So the Ocelot frame header can have an op

[PATCH v5 net-next 06/10] net: dsa: document the existing switch tree notifiers and add a new one

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean The existence of dsa_broadcast has generated some confusion in the past: https://www.mail-archive.com/netdev@vger.kernel.org/msg365042.html So let's document the existing dsa_port_notify and dsa_broadcast functions and explain when each of them should be used. Also, in fac

[PATCH] mt7915: Convert to DEFINE_SHOW_ATTRIBUTE

2021-01-20 Thread dingsenjie
From: dingsenjie Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: dingsenjie --- .../net/wireless/mediatek/mt76/mt7915/debugfs.c| 36 -- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.

Re: [PATCH net] selftests/net: set link down before enslave

2021-01-20 Thread Hangbin Liu
On Wed, Jan 20, 2021 at 05:46:51PM -0800, Jakub Kicinski wrote: > On Wed, 20 Jan 2021 21:43:28 +0200 Ido Schimmel wrote: > > On Wed, Jan 20, 2021 at 10:38:47PM +0800, Hangbin Liu wrote: > > > Hi Ido, > > > > > > On Wed, Jan 20, 2021 at 12:42:10PM +0200, Ido Schimmel wrote: > > > > > diff --git a

Re: [PATCH net v4] net: lapb: Add locking to the lapb module

2021-01-20 Thread Xie He
On Wed, Jan 20, 2021 at 12:42 PM Xie He wrote: > > With this patch, there is still a problem that lapb_unregister may run > concurrently with other LAPB API functions (such as > lapb_data_received). This other LAPB API function can get the > lapb->lock after lapb->lock is released by lapb_unregist

Re: [PATCH net-next v7 3/3] net: add sysfs attribute to control napi threaded mode

2021-01-20 Thread Alexander Duyck
On Wed, Jan 20, 2021 at 10:07 AM Wei Wang wrote: > > On Wed, Jan 20, 2021 at 8:13 AM Alexander Duyck > wrote: > > > > On Tue, Jan 19, 2021 at 7:35 PM Wei Wang wrote: > > > > > > This patch adds a new sysfs attribute to the network device class. > > > Said attribute provides a per-device control

Re: [PATCH v5 net-next 05/10] net: mscc: ocelot: don't use NPI tag prefix for the CPU port module

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Context: Ocelot switches put the injection/extraction frame header in > front of the Ethernet header. When used in NPI mode, a DSA master would > see junk instead of the destination MAC address, and it would most > likely

Re: [PATCH v5 net-next 04/10] net: mscc: ocelot: reapply bridge forwarding mask on bonding join/leave

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Applying the bridge forwarding mask currently is done only on the STP > state changes for any port. But it depends on both STP state changes, > and bonding interface state changes. Export the bit that recalculates > the f

Re: [PATCH v5 net-next 06/10] net: dsa: document the existing switch tree notifiers and add a new one

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > The existence of dsa_broadcast has generated some confusion in the past: > https://www.mail-archive.com/netdev@vger.kernel.org/msg365042.html > > So let's document the existing dsa_port_notify and dsa_broadcast > functio

Re: [PATCH bpf-next v3] samples/bpf: Update build procedure for manually compiling LLVM and Clang

2021-01-20 Thread Nathan Chancellor
On Thu, Jan 21, 2021 at 01:27:35PM +0800, Tiezhu Yang wrote: > The current LLVM and Clang build procedure in samples/bpf/README.rst is > out of date. See below that the links are not accessible any more. > > $ git clone http://llvm.org/git/llvm.git > Cloning into 'llvm'... > fatal: unable to acces

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Kevin Hao
On Wed, Jan 20, 2021 at 09:13:20PM -0800, Jakub Kicinski wrote: > On Thu, 21 Jan 2021 13:09:10 +0800 Kevin Hao wrote: > > On Wed, Jan 20, 2021 at 08:59:14PM -0800, Jakub Kicinski wrote: > > > On Thu, 21 Jan 2021 12:20:35 +0800 Kevin Hao wrote: > > > > Hmm, why not? > > > > buf = napi_alloc_frag

Re: [PATCH net-next 3/5] net: ipa: have gsi_channel_update() return a value

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 16:03:59 -0600 Alex Elder wrote: > Have gsi_channel_update() return the first transaction in the > updated completed transaction list, or NULL if no new transactions > have been added. > > Signed-off-by: Alex Elder > @@ -1452,7 +1452,7 @@ void gsi_channel_doorbell(struct gsi_

Re: [PATCH v3 net-next 0/4] net: ipa: remove a build dependency

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 15:26:02 -0600 Alex Elder wrote: > (David/Jakub, please take these all through net-next if they are > acceptable to you, once Rob has acked the binding. Rob, please ack > if the binding looks OK to you.) > > Version 3 removes the "Fixes" tag from the first patch, and updates >

Re: [PATCH net-next] net: mhi: Set wwan device type

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 14:53:41 +0100 Loic Poulain wrote: > The 'wwan' devtype is meant for devices that require additional > configuration to be used, like WWAN specific APN setup over AT/QMI > commands, rmnet link creation, etc. This is the case for MHI (Modem > host Interface) netdev which targets

[PATCH bpf-next v3] samples/bpf: Update build procedure for manually compiling LLVM and Clang

2021-01-20 Thread Tiezhu Yang
The current LLVM and Clang build procedure in samples/bpf/README.rst is out of date. See below that the links are not accessible any more. $ git clone http://llvm.org/git/llvm.git Cloning into 'llvm'... fatal: unable to access 'http://llvm.org/git/llvm.git/': Maximum (20) redirects followed $ git

Re: [PATCH net-next v2 0/3] nexthop: More fine-grained policies for netlink message validation

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Wed, 20 Jan 2021 16:44:09 +0100 you wrote: > There is currently one policy that covers all attributes for next hop > object management. Actual validation is then done in code, which makes it > unobvious which attributes

Re: [PATCH net-next v2 0/4] net: inline rollback_registered() functions

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 19 Jan 2021 12:25:17 -0800 you wrote: > After recent changes to the error path of register_netdevice() > we no longer need a version of unregister_netdevice_many() which > does not set net_todo. We can inline the r

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Jakub Kicinski
On Thu, 21 Jan 2021 13:09:10 +0800 Kevin Hao wrote: > On Wed, Jan 20, 2021 at 08:59:14PM -0800, Jakub Kicinski wrote: > > On Thu, 21 Jan 2021 12:20:35 +0800 Kevin Hao wrote: > > > Hmm, why not? > > > buf = napi_alloc_frag(pool->rbsize + 128); > > > buf = PTR_ALIGN(buf, 128); > > > > I'd ke

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Kevin Hao
On Wed, Jan 20, 2021 at 08:59:14PM -0800, Jakub Kicinski wrote: > On Thu, 21 Jan 2021 12:20:35 +0800 Kevin Hao wrote: > > Hmm, why not? > > buf = napi_alloc_frag(pool->rbsize + 128); > > buf = PTR_ALIGN(buf, 128); > > I'd keep the aligning in the driver until there are more users > needing thi

Re: [PATCH net-next v2 0/4] net: inline rollback_registered() functions

2021-01-20 Thread Jakub Kicinski
On Tue, 19 Jan 2021 15:18:46 -0800 Edwin Peer wrote: > On Tue, Jan 19, 2021 at 12:32 PM Jakub Kicinski wrote: > > > After recent changes to the error path of register_netdevice() > > we no longer need a version of unregister_netdevice_many() which > > does not set net_todo. We can inline the roll

Re: [PATCH net-next] net: dsa: Fix off by one in dsa_loop_port_vlan_add()

2021-01-20 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 19 Jan 2021 17:53:35 +0300 you wrote: > The > comparison is intended to be >= to prevent reading beyond the > end of the ps->vlans[] array. It doesn't affect run time though because > the ps->vlans[] array has VLAN

[PATCH 1/1] vhost scsi: allocate vhost_scsi with GFP_NOWAIT to avoid delay

2021-01-20 Thread Dongli Zhang
The size of 'struct vhost_scsi' is order-10 (~2.3MB). It may take long time delay by kzalloc() to compact memory pages when there is a lack of high-order pages. As a result, there is latency to create a VM (with vhost-scsi) or to hotadd vhost-scsi-based storage. The prior commit 595cb754983d ("vho

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Jakub Kicinski
On Thu, 21 Jan 2021 12:20:35 +0800 Kevin Hao wrote: > Hmm, why not? > buf = napi_alloc_frag(pool->rbsize + 128); > buf = PTR_ALIGN(buf, 128); I'd keep the aligning in the driver until there are more users needing this but yes, I agree, aligning the page frag buffers seems like a much better f

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 18:10:59 -0800 Florian Fainelli wrote: > On 1/20/2021 5:51 PM, Marek Vasut wrote: > > On 1/21/21 2:31 AM, Jakub Kicinski wrote: > >> On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: > >>> KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > >>> circuit

Re: [PATCH v5 net-next 07/10] net: dsa: allow changing the tag protocol via the "tagging" device attribute

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Currently DSA exposes the following sysfs: > $ cat /sys/class/net/eno2/dsa/tagging > ocelot > > which is a read-only device attribute, introduced in the kernel as > commit 98cdb4807123 ("net: dsa: Expose tagging protocol

Re: [PATCH v5 net-next 08/10] net: dsa: felix: convert to the new .{set,del}_tag_protocol DSA API

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > In expectation of the new tag_ocelot_8021q tagger implementation, we > need to be able to do runtime switchover between one tagger and another. > So we must implement the .set_tag_protocol() and .del_tag_protocol() for >

Re: [PATCH net-next] net: ethtool: allow MAC drivers to override ethtool get_ts_info

2021-01-20 Thread Richard Cochran
On Thu, Jan 14, 2021 at 10:38:00PM +, Russell King - ARM Linux admin wrote: > So, I think the only way to prevent a regression with the code as > it is today is that we _never_ support PTP on Marvell PHYs - because > doing so _will_ break the existing MVPP2 driver's implementation and > cause

Re: [PATCHv15 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-01-20 Thread Hangbin Liu
Hi Maciej, On Wed, Jan 20, 2021 at 11:42:38PM +0100, Maciej Fijalkowski wrote: > > +static int dev_map_bpf_prog_run(struct bpf_prog *xdp_prog, > > + struct xdp_frame **frames, int n, > > + struct net_device *dev) > > +{ > > + struct xdp_txq_info

Re: [PATCH v5 net-next 09/10] net: dsa: add a second tagger for Ocelot switches based on tag_8021q

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > There are use cases for which the existing tagger, based on the NPI > (Node Processor Interface) functionality, is insufficient. > > Namely: > - Frames injected through the NPI port bypass the frame analyzer, so no > s

[PATCH net 4/4] ARM: axm55xx_defconfig: Disable PHY time stamping by default.

2021-01-20 Thread Richard Cochran
The NETWORK_PHY_TIMESTAMPING configuration option adds overhead into the networking stack. When enabled, all transmitted and received frames are subjected to extra tests to determine whether they just might be PTP frames to be presented to esoteric PHY time stamping drivers. However, no System on

[PATCH net 2/4] net: mvpp2: Remove unneeded Kconfig dependency.

2021-01-20 Thread Richard Cochran
The mvpp2 is an Ethernet driver, and it implements MAC style time stamping of PTP frames. It has no need of the expensive option to enable PHY time stamping. Remove the incorrect dependency. Signed-off-by: Richard Cochran Fixes: 91dd71950bd7 ("net: mvpp2: ptp: add TAI support") --- drivers/net

[PATCH net 3/4] ARM: socfpga_defconfig: Disable PHY time stamping by default.

2021-01-20 Thread Richard Cochran
The NETWORK_PHY_TIMESTAMPING configuration option adds overhead into the networking stack. When enabled, all transmitted and received frames are subjected to extra tests to determine whether they just might be PTP frames to be presented to esoteric PHY time stamping drivers. However, no System on

[PATCH net 0/4] Remove unneeded PHY time stamping option.

2021-01-20 Thread Richard Cochran
The NETWORK_PHY_TIMESTAMPING configuration option adds additional checks into the networking hot path, and it is only needed by two rather esoteric devices, namely the TI DP83640 PHYTER and the ZHAW InES 1588 IP core. Very few end users have these devices, and those that do have them are building

Re: [PATCH v2 bpf-next 2/4] libbpf: make skip_mods_and_typedefs available internally in libbpf

2021-01-20 Thread Andrii Nakryiko
On Sun, Jan 17, 2021 at 2:20 PM Alan Maguire wrote: > > btf_dump.c will need it for type-based data display. > > Signed-off-by: Alan Maguire > --- Given we make it into an internal API, let's call it btf_skip_mods_and_typedefs()? Otherwise all ok. Acked-by: Andrii Nakryiko > tools/lib/bpf/li

Re: [PATCH net-next v2 3/3] nexthop: Specialize rtm_nh_policy

2021-01-20 Thread David Ahern
On 1/20/21 8:44 AM, Petr Machata wrote: > This policy is currently only used for creation of new next hops and new > next hop groups. Rename it accordingly and remove the two attributes that > are not valid in that context: NHA_GROUPS and NHA_MASTER. > > For consistency with other policies, do not

Re: [PATCH net-next v2 2/3] nexthop: Use a dedicated policy for nh_valid_dump_req()

2021-01-20 Thread David Ahern
On 1/20/21 8:44 AM, Petr Machata wrote: > This function uses the global nexthop policy, but only accepts four > particular attributes. Create a new policy that only includes the four > supported attributes, and use it. Convert the loop to a series of ifs. > > Signed-off-by: Petr Machata > --- >

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Kevin Hao
On Wed, Jan 20, 2021 at 10:32:35AM +0530, sundeep.l...@gmail.com wrote: > From: Subbaraya Sundeep > > Octeontx2 hardware needs buffer pointers which are 128 byte > aligned. napi_alloc_frag() returns buffer pointers which are > not 128 byte aligned sometimes because if napi_alloc_skb() is > called

Re: [PATCH net-next v2 1/3] nexthop: Use a dedicated policy for nh_valid_get_del_req()

2021-01-20 Thread David Ahern
On 1/20/21 8:44 AM, Petr Machata wrote: > This function uses the global nexthop policy only to then bounce all > arguments except for NHA_ID. Instead, just create a new policy that > only includes the one allowed attribute. > > Signed-off-by: Petr Machata > --- > > Notes: > v2: > - Do no

Re: [PATCH v5 net-next 10/10] net: dsa: felix: perform switch setup for tag_8021q

2021-01-20 Thread Florian Fainelli
On 1/20/2021 6:36 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Unlike sja1105, the only other user of the software-defined tag_8021q.c > tagger format, the implementation we choose for the Felix DSA switch > driver preserves full functionality under a vlan_filtering bridge > (i.e. IP

"WARNING: refcount bug in qrtr_node_lookup" and "WARNING: refcount bug in qrtr_recvmsg" should share the same root cause

2021-01-20 Thread 慕冬亮
Dear kernel developers, I found that on the syzbot dashboard, “WARNING: refcount bug in qrtr_node_lookup”[1] and "WARNING: refcount bug in qrtr_recvmsg"[2] should share the same root cause. The reasons for the above statement: 1) the stack trace is the same, and this title difference is due to th

Re: [PATCH v2 bpf-next 1/4] libbpf: add btf_has_size() and btf_int() inlines

2021-01-20 Thread Andrii Nakryiko
On Sun, Jan 17, 2021 at 2:22 PM Alan Maguire wrote: > > BTF type data dumping will use them in later patches, and they > are useful generally when handling BTF data. > > Signed-off-by: Alan Maguire > --- > tools/lib/bpf/btf.h | 19 +++ > 1 file changed, 19 insertions(+) > > diff

Re: [PATCH 4/4] hv_netvsc: Restrict configurations on isolated guests

2021-01-20 Thread Andrea Parri
> > @@ -544,7 +545,8 @@ static int negotiate_nvsp_ver(struct hv_device > > *device, > > init_packet->msg.v2_msg.send_ndis_config.capability.ieee8021q = 1; > > > > if (nvsp_ver >= NVSP_PROTOCOL_VERSION_5) { > > - init_packet->msg.v2_msg.send_ndis_config.capability.sriov = > > 1; >

[PATCH net 1/4] net: dsa: mv88e6xxx: Remove bogus Kconfig dependency.

2021-01-20 Thread Richard Cochran
The mv88e6xxx is a DSA driver, and it implements DSA style time stamping of PTP frames. It has no need of the expensive option to enable PHY time stamping. Remove the bogus dependency. Signed-off-by: Richard Cochran Fixes: 2fa8d3af4bad ("net: dsa: mv88e6xxx: expose switch time as a PTP hardware

[PATCH v5 net-next 04/10] net: mscc: ocelot: reapply bridge forwarding mask on bonding join/leave

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean Applying the bridge forwarding mask currently is done only on the STP state changes for any port. But it depends on both STP state changes, and bonding interface state changes. Export the bit that recalculates the forwarding mask so that it could be reused, and call it when

[PATCH v5 net-next 00/10] tag_8021q for Ocelot switches

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean Changes in v5: - Split patch series in half, removing PTP bits. - Split previous monolithic patch "net: dsa: felix: add new VLAN-based tagger" into 3 smaller patches. - Updated the sysfs documentation - Made the tagger_lock per DSA switch tree instead of per DSA switch - U

[PATCH v5 net-next 01/10] net: dsa: tag_8021q: add helpers to deduce whether a VLAN ID is RX or TX VLAN

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean The sja1105 implementation can be blind about this, but the felix driver doesn't do exactly what it's being told, so it needs to know whether it is a TX or an RX VLAN, so it can install the appropriate type of TCAM rule. Signed-off-by: Vladimir Oltean Reviewed-by: Florian

[PATCH v5 net-next 02/10] net: mscc: ocelot: export VCAP structures to include/soc/mscc

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean The Felix driver will need to preinstall some VCAP filters for its tag_8021q implementation (outside of the tc-flower offload logic), so these need to be exported to the common includes. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v5: None.

[PATCH v5 net-next 03/10] net: mscc: ocelot: store a namespaced VCAP filter ID

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean We will be adding some private VCAP filters that should not interfere in any way with the filters added using tc-flower. So we need to allocate some IDs which will not be used by tc. Currently ocelot uses an u32 id derived from the flow cookie, which in itself is an unsigne

Re: [PATCH v2 net-next ] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-20 Thread wenxu
On 1/21/2021 9:09 AM, Cong Wang wrote: > On Wed, Jan 20, 2021 at 3:40 PM Marcelo Ricardo Leitner > wrote: >> On Wed, Jan 20, 2021 at 02:18:41PM -0800, Cong Wang wrote: >>> On Tue, Jan 19, 2021 at 12:33 AM wrote: diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index

[PATCH v5 net-next 08/10] net: dsa: felix: convert to the new .{set,del}_tag_protocol DSA API

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean In expectation of the new tag_ocelot_8021q tagger implementation, we need to be able to do runtime switchover between one tagger and another. So we must implement the .set_tag_protocol() and .del_tag_protocol() for the current NPI-based tagger. We move the felix_npi_port_in

Re: [PATCH RFC] tools: Factor Clang, LLC and LLVM utils definitions

2021-01-20 Thread Sedat Dilek
On Wed, Jan 20, 2021 at 11:36 PM Jiri Olsa wrote: > > On Sat, Jan 16, 2021 at 10:54:04AM +0100, Sedat Dilek wrote: > > When dealing with BPF/BTF/pahole and DWARF v5 I wanted to build bpftool. > > > > While looking into the source code I found duplicate assignments > > in misc tools for the LLVM ec

[PATCH v5 net-next 09/10] net: dsa: add a second tagger for Ocelot switches based on tag_8021q

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean There are use cases for which the existing tagger, based on the NPI (Node Processor Interface) functionality, is insufficient. Namely: - Frames injected through the NPI port bypass the frame analyzer, so no source address learning is performed, no TSN stream classificatio

[PATCH v5 net-next 07/10] net: dsa: allow changing the tag protocol via the "tagging" device attribute

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean Currently DSA exposes the following sysfs: $ cat /sys/class/net/eno2/dsa/tagging ocelot which is a read-only device attribute, introduced in the kernel as commit 98cdb4807123 ("net: dsa: Expose tagging protocol to user-space"), and used by libpcap since its commit 993db3800

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

2021-01-20 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the devicetree tree got a conflict in: Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml between commit: 19d9a846d9fc ("dt-binding: net: ti: k3-am654-cpsw-nuss: update bindings for am64x cpsw3g") from the net-next tree and commit: 0499

[PATCH v5 net-next 10/10] net: dsa: felix: perform switch setup for tag_8021q

2021-01-20 Thread Vladimir Oltean
From: Vladimir Oltean Unlike sja1105, the only other user of the software-defined tag_8021q.c tagger format, the implementation we choose for the Felix DSA switch driver preserves full functionality under a vlan_filtering bridge (i.e. IP termination works through the DSA user ports under all circ

rpc_xprt_debugfs_register() - atomic_inc_return() usage

2021-01-20 Thread Shuah Khan
Hi Anna and Trond, I came across the following while reviewing atomic_inc_return() usages that cast return value to unsigned rpc_xprt_debugfs_register()'s atomic_inc_return() usage looks a bit odd. - cur_id isn't initialized - id = (unsigned int)atomic_inc_return(&cur_id); Please note that id

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Florian Fainelli
On 1/20/2021 5:51 PM, Marek Vasut wrote: > On 1/21/21 2:31 AM, Jakub Kicinski wrote: >> On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: >>> KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended >>> circuit for interfacing with CPU/FPGA reset consisting of 10k pullup >>> resi

[PATCH] bpf: put file handler if no storage found

2021-01-20 Thread Pan Bian
Put file f if inode_storage_ptr() returns NULL. Fixes: 8ea636848aca ("bpf: Implement bpf_local_storage for inodes") Acked-by: KP Singh Signed-off-by: Pan Bian --- kernel/bpf/bpf_inode_storage.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/bpf_inode_storage

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Marek Vasut
On 1/21/21 2:31 AM, Jakub Kicinski wrote: On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended circuit for interfacing with CPU/FPGA reset consisting of 10k pullup resistor and 10uF capacitor to ground. This circuit takes ~100

Re: [PATCH v2 net-next 1/1] net: dsa: hellcreek: Add TAPRIO offloading support

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 08:18:15 +0100 Kurt Kanzenbach wrote: > >> + /* Schedule periodic schedule check */ > >> + schedule_delayed_work(&hellcreek_port->schedule_work, > >> +HELLCREEK_SCHEDULE_PERIOD); > > > > Why schedule this work every 2 seconds rather than scheduling it

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: > KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > circuit for interfacing with CPU/FPGA reset consisting of 10k pullup > resistor and 10uF capacitor to ground. This circuit takes ~100 ms to > rise enough to release the res

Re: [PATCH net-next] net: hns3: debugfs add dump tm info of nodes, priority and qset

2021-01-20 Thread Huazhong Tan
On 2021/1/19 11:43, Jakub Kicinski wrote: On Tue, 19 Jan 2021 11:14:51 +0800 Huazhong Tan wrote: On 2021/1/19 3:48, Jakub Kicinski wrote: On Mon, 18 Jan 2021 19:20:23 +0800 Huazhong Tan wrote: On 2021/1/17 10:23, Jakub Kicinski wrote: On Fri, 15 Jan 2021 15:09:29 +0800 Huazhong Tan wrote:

Re: [PATCH net] selftests/net: set link down before enslave

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 21:43:28 +0200 Ido Schimmel wrote: > On Wed, Jan 20, 2021 at 10:38:47PM +0800, Hangbin Liu wrote: > > Hi Ido, > > > > On Wed, Jan 20, 2021 at 12:42:10PM +0200, Ido Schimmel wrote: > > > > diff --git a/tools/testing/selftests/net/rtnetlink.sh > > > > b/tools/testing/selftests

Re: [PATCH 17/18] net: iosm: readme file

2021-01-20 Thread Dan Williams
On Wed, 2021-01-20 at 15:32 -0800, Jakub Kicinski wrote: > On Wed, 20 Jan 2021 20:34:51 +0100 Andrew Lunn wrote: > > On Sun, Jan 17, 2021 at 06:26:54PM +0100, Bjørn Mork wrote: > > > I was young and stupid. Now I'm not that young anymore ;-) > > > > We all make mistakes, when we don't have the k

Re: [PATCH 4/4] hv_netvsc: Restrict configurations on isolated guests

2021-01-20 Thread Jakub Kicinski
On Tue, 19 Jan 2021 18:58:41 +0100 Andrea Parri (Microsoft) wrote: > Restrict the NVSP protocol version(s) that will be negotiated with the > host to be NVSP_PROTOCOL_VERSION_61 or greater if the guest is running > isolated. Moreover, do not advertise the SR-IOV capability and ignore > NVSP_MSG_4_

Re: [PATCH v2 net-next ] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-20 Thread Marcelo Ricardo Leitner
On Wed, Jan 20, 2021 at 02:18:41PM -0800, Cong Wang wrote: > On Tue, Jan 19, 2021 at 12:33 AM wrote: > > diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c > > index 2d70ded..c565c7a 100644 > > --- a/net/core/flow_dissector.c > > +++ b/net/core/flow_dissector.c > > @@ -237,9 +237,8

Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-20 Thread Edwin Peer
On Wed, Jan 20, 2021 at 3:21 AM Danielle Ratson wrote: > + link_ksettings->link_mode = -1; > + err = dev->ethtool_ops->get_link_ksettings(dev, link_ksettings); > + if (err) > + return err; > + > + if (link_ksettings->link_mode != -1) { > + link_

Re: [PATCH 17/18] net: iosm: readme file

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 20:34:51 +0100 Andrew Lunn wrote: > On Sun, Jan 17, 2021 at 06:26:54PM +0100, Bjørn Mork wrote: > > I was young and stupid. Now I'm not that young anymore ;-) > > We all make mistakes, when we don't have the knowledge there are other > ways. That is partially what code review

Re: [PATCH net-next v3 1/7] ethtool: Extend link modes settings uAPI with lanes

2021-01-20 Thread Edwin Peer
On Wed, Jan 20, 2021 at 3:21 AM Danielle Ratson wrote: > -#define __DEFINE_LINK_MODE_PARAMS(_speed, _type, _duplex) \ > +#define __DEFINE_LINK_MODE_PARAMS(_speed, _type, _lanes, _duplex) \ > [ETHTOOL_LINK_MODE(_speed, _type, _duplex)] = { \ > .speed = SPEED_ ## _speed, \

Re: [PATCH net-next 3/3] net: dpaa2-mac: add backplane link mode support

2021-01-20 Thread Russell King - ARM Linux admin
On Wed, Jan 20, 2021 at 10:19:01PM +, Ioana Ciornei wrote: > On Tue, Jan 19, 2021 at 03:36:09PM +, Russell King wrote: > > Add support for backplane link mode, which is, according to discussions > > with NXP earlier in the year, is a mode where the OS (Linux) is able to > > manage the PCS a

Re: KASAN: vmalloc-out-of-bounds Read in bpf_trace_run7

2021-01-20 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:7d68e382 bpf: Permit size-0 datasec git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=1418c3c750 kernel config: https://syzkaller.appspot.com/x/.config?x=e0c7843b8af99dff dashboard link:

Re: [PATCH RFC] tools: Factor Clang, LLC and LLVM utils definitions

2021-01-20 Thread Jiri Olsa
On Sat, Jan 16, 2021 at 10:54:04AM +0100, Sedat Dilek wrote: > When dealing with BPF/BTF/pahole and DWARF v5 I wanted to build bpftool. > > While looking into the source code I found duplicate assignments > in misc tools for the LLVM eco system, e.g. clang and llvm-objcopy. > > Move the Clang, LL

Re: [PATCH net] team: postpone features update to avoid deadlock

2021-01-20 Thread Cong Wang
On Wed, Jan 20, 2021 at 4:56 AM Ivan Vecera wrote: > > To fix the problem __team_compute_features() needs to be postponed > for these cases. Is there any user-visible effect after deferring this feature change? Thanks.

Re: [PATCH bpf-next v9 0/3] bpf: misc performance improvements for cgroup hooks

2021-01-20 Thread Alexei Starovoitov
On Fri, Jan 15, 2021 at 8:35 AM Stanislav Fomichev wrote: > > First patch adds custom getsockopt for TCP_ZEROCOPY_RECEIVE > to remove kmalloc and lock_sock overhead from the dat path. > > Second patch removes kzalloc/kfree from getsockopt for the common cases. > > Third patch switches cgroup_bpf_e

Re: [PATCH net-next 3/3] net: dpaa2-mac: add backplane link mode support

2021-01-20 Thread Ioana Ciornei
On Tue, Jan 19, 2021 at 03:36:09PM +, Russell King wrote: > Add support for backplane link mode, which is, according to discussions > with NXP earlier in the year, is a mode where the OS (Linux) is able to > manage the PCS and Serdes itself. Indeed, DPMACs in TYPE_BACKPLANE can have both their

[PATCH net-next] sfc: reduce the number of requested xdp ev queues

2021-01-20 Thread Ivan Babrou
Without this change the driver tries to allocate too many queues, breaching the number of available msi-x interrupts on machines with many logical cpus and default adapter settings: Insufficient resources for 12 XDP event queues (24 other channels, max 32) Which in turn triggers EINVAL on XDP pro

Re: [PATCH v2 net-next ] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-20 Thread Cong Wang
On Tue, Jan 19, 2021 at 12:33 AM wrote: > diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c > index 2d70ded..c565c7a 100644 > --- a/net/core/flow_dissector.c > +++ b/net/core/flow_dissector.c > @@ -237,9 +237,8 @@ void skb_flow_dissect_meta(const struct sk_buff *skb, > void > sk

  1   2   3   4   >