Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread Jesper Dangaard Brouer
On Thu, 3 Sep 2020 18:07:05 -0700 Alexei Starovoitov wrote: > On Thu, Sep 03, 2020 at 10:58:45PM +0200, Lorenzo Bianconi wrote: > > Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify > > if shared_info area has been properly initialized for non-linear > > xdp buffers > > > > Sign

Re: [PATCH net-next 3/7] net: mvpp2: check first level interrupt status registers

2020-09-04 Thread Russell King - ARM Linux admin
On Thu, Sep 03, 2020 at 03:24:14AM +0200, Andrew Lunn wrote: > On Wed, Sep 02, 2020 at 05:11:46PM +0100, Russell King wrote: > > Check the first level interrupt status registers to determine how to > > further process the port interrupt. We will need this to know whether > > to invoke the link stat

[PATCH net-next v2 0/6] Marvell PP2.2 PTP support

2020-09-04 Thread Russell King - ARM Linux admin
Hi, This series adds PTP support for PP2.2 hardware to the mvpp2 driver. Tested on the Macchiatobin eth1 port. Note that on the Macchiatobin, eth0 uses a separate TAI block from eth1, and there is no hardware synchronisation between the two. drivers/net/ethernet/marvell/Kconfig| 6

[PATCH net-next v2 2/6] net: mvpp2: rename mis-named "link status" interrupt

2020-09-04 Thread Russell King
The link interrupt is used for way more than just the link status; it comes from a collection of units to do with the port. The Marvell documentation describes the interrupt as "GOP port X interrupt". Since we are adding PTP support, and the PTP interrupt uses this, rename it to be more inline wit

[PATCH net-next v2 4/6] net: mvpp2: ptp: add TAI support

2020-09-04 Thread Russell King
Add support for the TAI block in the mvpp2.2 hardware. Signed-off-by: Russell King --- drivers/net/ethernet/marvell/Kconfig | 6 + drivers/net/ethernet/marvell/mvpp2/Makefile | 3 +- drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 109 + .../net/ethernet/marvell/mvpp2/mvpp2_ma

[PATCH net-next v2 6/6] net: mvpp2: ptp: add support for transmit timestamping

2020-09-04 Thread Russell King
Add support for timestamping transmit packets. We allocate SYNC messages to queue 1, every other message to queue 0. Signed-off-by: Russell King --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 56 - .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 199 +- 2 files changed

[PATCH net-next v2 3/6] net: mvpp2: check first level interrupt status registers

2020-09-04 Thread Russell King
Check the first level interrupt status registers to determine how to further process the port interrupt. We will need this to know whether to invoke the link status processing and/or the PTP processing for both XLG and GMAC. Reviewed-by: Andrew Lunn Signed-off-by: Russell King --- drivers/net/e

[PATCH net-next v2 1/6] net: mvpp2: restructure "link status" interrupt handling

2020-09-04 Thread Russell King
The "link status" interrupt is used for more than just link status. Restructure mvpp2_link_status_isr() so we can add additional handling. Reviewed-by: Andrew Lunn Signed-off-by: Russell King --- .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 83 --- 1 file changed, 51 insertio

[PATCH net-next v2 5/6] net: mvpp2: ptp: add support for receive timestamping

2020-09-04 Thread Russell King
Add support for receive timestamping. When enabled, the hardware adds a timestamp into the receive queue descriptor for all received packets with no filtering. Hence, we can only support NONE or ALL receive filter modes. The timestamp in the receive queue contains two bit sof seconds and the full

Re: [PATCH v2 net-next 2/9] xdp: initialize xdp_buff mb bit to 0 in all XDP drivers

2020-09-04 Thread Jesper Dangaard Brouer
On Thu, 3 Sep 2020 22:58:46 +0200 Lorenzo Bianconi wrote: > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > index 0b675c34ce49..20c8fd3cd4a3 100644 > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > +++ b/drivers/net/ethernet/i

Re: [PATCH v2 net-next 0/9] mvneta: introduce XDP multi-buffer support

2020-09-04 Thread Lorenzo Bianconi
> Lorenzo Bianconi wrote: > > - Finalize XDP multi-buffer support for mvneta driver introducing the > > capability to map non-linear buffers on tx side. > > - Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify if > > shared_info area has been properly initialized. > > - Initiali

Re: [PATCH v2 net-next 0/9] mvneta: introduce XDP multi-buffer support

2020-09-04 Thread Lorenzo Bianconi
> On Thu, Sep 03, 2020 at 10:58:44PM +0200, Lorenzo Bianconi wrote: > > For the moment we have not implemented any self-test for the introduced the > > bpf > > helpers. We can address this in a follow up series if the proposed approach > > is accepted. > > selftest has to be part of the same patc

Re: [PATCH v2 net-next 6/9] bpf: helpers: add bpf_xdp_adjust_mb_header helper

2020-09-04 Thread Lorenzo Bianconi
> On Thu, Sep 03, 2020 at 10:58:50PM +0200, Lorenzo Bianconi wrote: > > +BPF_CALL_2(bpf_xdp_adjust_mb_header, struct xdp_buff *, xdp, > > + int, offset) > > +{ > > + void *data_hard_end, *data_end; > > + struct skb_shared_info *sinfo; > > + int frag_offset, frag_len; > > + u8 *addr; >

[net-next:master 68/116] ip_tunnel.c:undefined reference to `sysctl_fb_tunnels_only_for_init_net'

2020-09-04 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 3ab1270bfa1e8ae7db0d46fee90c5db2935ac91b commit: 316cdaa1158af17250397054f92bb339fbd8e282 [68/116] net: add option to not create fall-back tunnels in root-ns as well config: m68k-amcore_defconfig (attached a

Re: [PATCH v3 bpf-next 14/14] selftests/bpf: add __noinline variant of cls_redirect selftest

2020-09-04 Thread Lorenz Bauer
On Thu, 3 Sep 2020 at 21:36, Andrii Nakryiko wrote: > > As one of the most complicated and close-to-real-world programs, cls_redirect > is a good candidate to exercise libbpf's logic of handling bpf2bpf calls. So > add variant with using explicit __noinline for majority of functions except > few m

Re: [PATCH v2 net-next 2/9] xdp: initialize xdp_buff mb bit to 0 in all XDP drivers

2020-09-04 Thread Lorenzo Bianconi
> On Thu, 3 Sep 2020 22:58:46 +0200 > Lorenzo Bianconi wrote: > > > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > > b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > > index 0b675c34ce49..20c8fd3cd4a3 100644 > > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > > +++ b/driver

Re: [PATCH v2 net-next 6/9] bpf: helpers: add bpf_xdp_adjust_mb_header helper

2020-09-04 Thread Lorenzo Bianconi
On Sep 03, Alexei Starovoitov wrote: > On Thu, Sep 03, 2020 at 10:58:50PM +0200, Lorenzo Bianconi wrote: > > Introduce bpf_xdp_adjust_mb_header helper in order to adjust frame > > headers moving *offset* bytes from/to the second buffer to/from the > > first one. > > This helper can be used to move

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-04 Thread Yunsheng Lin
On 2020/9/4 9:30, John Fastabend wrote: > Cong Wang wrote: >> On Wed, Sep 2, 2020 at 7:22 PM Yunsheng Lin wrote: >>> >>> On 2020/9/3 9:48, Cong Wang wrote: On Wed, Sep 2, 2020 at 6:22 PM Yunsheng Lin wrote: > > On 2020/9/3 8:35, Cong Wang wrote: >> On Tue, Sep 1, 2020 at 11:35 PM

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-04 Thread Yunsheng Lin
On 2020/9/3 15:24, Eric Dumazet wrote: > > > On 9/2/20 6:14 PM, Yunsheng Lin wrote: > >> >> It seems semantics for some_qdisc_is_busy() is changed, which does not only >> do >> the checking, but also do the reseting? > > Yes, obviously, we would have to rename to a better name. > >> >> Also,

[PATCH v2] net: dsa: microchip: look for phy-mode in port nodes

2020-09-04 Thread Helmut Grohne
Documentation/devicetree/bindings/net/dsa/dsa.txt says that the phy-mode property should be specified on port nodes. However, the microchip drivers read it from the switch node. Let the driver use the per-port property and fall back to the old location with a warning. Fix in-tree users. Signed-o

Re: Exposing device ACL setting through devlink

2020-09-04 Thread Jiri Pirko
Thu, Sep 03, 2020 at 07:59:45PM CEST, tlfal...@linux.ibm.com wrote: >Hello, I am trying to expose MAC/VLAN ACL and pvid settings for IBM VNIC >devices to administrators through devlink (originally through sysfs files, but >that was rejected in favor of devlink). Could you give any tips on how you

[PATCH net v1 1/2] hinic: bump up the timeout of SET_FUNC_STATE cmd

2020-09-04 Thread Luo bin
We free memory regardless of the return value of SET_FUNC_STATE cmd in hinic_close function to avoid memory leak and this cmd may timeout when fw is busy with handling other cmds, so we bump up the timeout of this cmd to ensure it won't return failure. Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx

[PATCH net v1 0/2] hinic: BugFixes

2020-09-04 Thread Luo bin
The bugs fixed in this patchset have been present since the following commits: patch #1: Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") patch #2: Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Luo bin (2): hinic: bump up the timeout of SET_FUNC_STATE cmd hinic: bump up th

[PATCH net v1 2/2] hinic: bump up the timeout of UPDATE_FW cmd

2020-09-04 Thread Luo bin
Firmware erases the entire flash region which may take several seconds before flashing, so we bump up the timeout to ensure this cmd won't return failure. Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 4 +

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

2020-09-04 Thread Jiri Pirko
Fri, Sep 04, 2020 at 07:39:54AM CEST, sgout...@marvell.com wrote: > > >> -Original Message- >> From: Jakub Kicinski >> Sent: Friday, September 4, 2020 12:48 AM >> To: sundeep.l...@gmail.com >> Cc: da...@davemloft.net; netdev@vger.kernel.org; Sunil Kovvuri Goutham >> ; Subbaraya Sundeep Bha

Re: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-09-04 Thread Jiri Pirko
Thu, Sep 03, 2020 at 09:31:23PM CEST, k...@kernel.org wrote: >On Thu, 3 Sep 2020 07:54:39 +0200 Jiri Pirko wrote: >> Wed, Sep 02, 2020 at 05:23:58PM CEST, k...@kernel.org wrote: >> >On Wed, 2 Sep 2020 10:00:11 +0200 Jiri Pirko wrote: >> I didn't quite get the fact that you want to not show c

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

2020-09-04 Thread Sunil Kovvuri Goutham
> -Original Message- > From: Jiri Pirko > Sent: Friday, September 4, 2020 2:07 PM > To: Sunil Kovvuri Goutham > Cc: Jakub Kicinski ; sundeep.l...@gmail.com; > da...@davemloft.net; netdev@vger.kernel.org; Subbaraya Sundeep > Bhatta > Subject: Re: [EXT] Re: [net-next PATCH 0/2] Introduc

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-04 Thread Laura García Liébana
Hi, On Thu, Sep 3, 2020 at 7:00 AM John Fastabend wrote: > [...] > > I don't think it actualy improves performance at least I didn't observe > that. From the code its not clear why this would be the case either. As > a nit I would prefer that line removed from the commit message. > It hasn't bee

Re: [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command

2020-09-04 Thread Jiri Pirko
Thu, Sep 03, 2020 at 09:47:19PM CEST, k...@kernel.org wrote: >On Thu, 3 Sep 2020 07:57:29 +0200 Jiri Pirko wrote: >> Wed, Sep 02, 2020 at 05:30:25PM CEST, k...@kernel.org wrote: >> >On Wed, 2 Sep 2020 11:46:27 +0200 Jiri Pirko wrote: >> >> >? Do we need such change there too or keep it as is, eac

Re: [PATCHv2] selftests: rtnetlink: load fou module for kci_test_encap_fou()

2020-09-04 Thread Po-Hsu Lin
Hello David, do you need more information for this V2 patch? Thank you PHLin On Mon, Aug 17, 2020 at 10:53 AM Po-Hsu Lin wrote: > > The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh > needs the fou module to work. Otherwise it will fail with: > > $ ip netns exec "$testns" ip

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

2020-09-04 Thread syzbot
syzbot has bisected this issue to: commit 7b9eba7ba0c1b24df42b70b62d154b284befbccf Author: Leandro Dorileo Date: Mon Apr 8 17:12:17 2019 + net/sched: taprio: fix picos_per_byte miscalculation bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15464af990 start commit: f

[PATCH v14 00/10] Enable ptp_kvm for arm64

2020-09-04 Thread Jianyong Wu
Currently, we offen use ntp (sync time with remote network clock) to sync time in VM. But the precision of ntp is subject to network delay so it's difficult to sync time in a high precision. kvm virtual ptp clock (ptp_kvm) offers another way to sync time in VM, as the remote clock locates in the h

[PATCH v14 01/10] arm64: Probe for the presence of KVM hypervisor services during boot

2020-09-04 Thread Jianyong Wu
From: Will Deacon Although the SMCCC specification provides some limited functionality for describing the presence of hypervisor and firmware services, this is generally applicable only to functions designated as "Arm Architecture Service Functions" and no portable discovery mechanism is provided

[PATCH v14 02/10] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-09-04 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 29 +++-- 1 fi

[PATCH v14 07/10] arm64/kvm: Add hypercall service for kvm ptp.

2020-09-04 Thread Jianyong Wu
ptp_kvm will get this service through smccc call. The service offers wall time and counter cycle of host for guest. caller must explicitly determines which cycle of virtual counter or physical counter to return if it needs counter cycle. Signed-off-by: Jianyong Wu --- arch/arm64/kvm/Kconfig

[PATCH v14 04/10] ptp: Reorganize ptp_kvm module to make it arch-independent.

2020-09-04 Thread Jianyong Wu
Currently, ptp_kvm modules implementation is only for x86 which includs large part of arch-specific code. This patch move all of those code into new arch related file in the same directory. Signed-off-by: Jianyong Wu --- drivers/ptp/Makefile| 5 ++ drivers/ptp/ptp_kvm.h

[PATCH v14 06/10] clocksource: Add clocksource id for arm arch counter

2020-09-04 Thread Jianyong Wu
Add clocksource id for arm arch counter to let it be identified easily and elegantly in ptp_kvm implementation for arm. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/linux/clocksource_ids.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/c

[PATCH v14 03/10] smccc: Export smccc conduit get helper.

2020-09-04 Thread Jianyong Wu
Export arm_smccc_1_1_get_conduit then modules can use smccc helper which adopts it. Acked-by: Mark Rutland Signed-off-by: Jianyong Wu --- drivers/firmware/smccc/smccc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c index 4e80

[PATCH v14 10/10] arm64: Add kvm capability check extension for ptp_kvm

2020-09-04 Thread Jianyong Wu
Let userspace check if there is kvm ptp service in host. Before VMs migrate to another host, VMM may check if this cap is available to determine the next behavior. Signed-off-by: Jianyong Wu Suggested-by: Marc Zyngier --- arch/arm64/kvm/arm.c | 4 include/uapi/linux/kvm.h | 1 + 2 file

[PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64

2020-09-04 Thread Jianyong Wu
Currently, there is no mechanism to keep time sync between guest and host in arm64 virtualization environment. Time in guest will drift compared with host after boot up as they may both use third party time sources to correct their time respectively. The time deviation will be in order of milliseco

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

2020-09-04 Thread Jesper Dangaard Brouer
Multiple BPF-helpers that can manipulate/increase the size of the SKB uses __bpf_skb_max_len() as the max-length. This function limit size against the current net_device MTU (skb->dev->mtu). Often packets gets redirected to another net_device, that can have a larger MTU, and this is the MTU that s

[PATCH v14 05/10] time: Add mechanism to recognize clocksource in time_get_snapshot

2020-09-04 Thread Jianyong Wu
From: Thomas Gleixner System time snapshots are not conveying information about the current clocksource which was used, but callers like the PTP KVM guest implementation have the requirement to evaluate the clocksource type to select the appropriate mechanism. Introduce a clocksource id field in

[PATCH v14 09/10] doc: add ptp_kvm introduction for arm64 support

2020-09-04 Thread Jianyong Wu
ptp_kvm implementation depends on hypercall using SMCCC. So we introduce a new SMCCC service ID. This doc explain how we define and use this new ID. Signed-off-by: Jianyong Wu --- Documentation/virt/kvm/arm/ptp_kvm.rst | 72 ++ 1 file changed, 72 insertions(+) create mod

Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Vadym Kochan
Hi Willem, On Thu, Sep 03, 2020 at 05:22:24PM +0200, Willem de Bruijn wrote: > On Wed, Sep 2, 2020 at 5:37 PM Vadym Kochan wrote: > > > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > > wireless SMB depl

Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Vadym Kochan
On Thu, Sep 03, 2020 at 06:35:34PM +0300, Andy Shevchenko wrote: > On Thu, Sep 3, 2020 at 6:23 PM Willem de Bruijn > wrote: > > On Wed, Sep 2, 2020 at 5:37 PM Vadym Kochan > > wrote: > > ... > > > > +static int prestera_is_valid_mac_addr(struct prestera_port *port, u8 > > > *addr) > > > +{ >

Re: [PATCH net v6 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-09-04 Thread Vadym Kochan
On Thu, Sep 03, 2020 at 07:18:59PM +0200, Willem de Bruijn wrote: > On Wed, Sep 2, 2020 at 5:07 PM Vadym Kochan wrote: > > > > The following features are supported: > > > > - VLAN-aware bridge offloading > > - VLAN-unaware bridge offloading > > - FDB offloading (learning, ageing) > >

Re: [PATCH v2 net-next 6/9] bpf: helpers: add bpf_xdp_adjust_mb_header helper

2020-09-04 Thread Lorenzo Bianconi
> Lorenzo Bianconi wrote: > > Introduce bpf_xdp_adjust_mb_header helper in order to adjust frame > > headers moving *offset* bytes from/to the second buffer to/from the > > first one. > > This helper can be used to move headers when the hw DMA SG is not able > > to copy all the headers in the first

Re: [PATCH v2 net-next 7/9] bpf: helpers: add multibuffer support

2020-09-04 Thread Lorenzo Bianconi
> On Thu, Sep 03, 2020 at 10:58:51PM +0200, Lorenzo Bianconi wrote: > > From: Sameeh Jubran > > > > The implementation is based on this [0] draft by Jesper D. Brouer. > > > > Provided two new helpers: > > > > * bpf_xdp_get_frag_count() > > * bpf_xdp_get_frags_total_size() > > > > [0] xdp mb de

[PATCH net] cxgb4: Fix offset when clearing filter byte counters

2020-09-04 Thread Ganji Aravind
Pass the correct offset to clear the stale filter hit bytes counter. Otherwise, the counter starts incrementing from the stale information, instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Ganji Aravind --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_fi

Re: WARNING: ODEBUG bug in process_one_work (2)

2020-09-04 Thread Thomas Gleixner
On Wed, Sep 02 2020 at 11:18, syzbot wrote: Cc+: Relevant maintainers > Hello, > > syzbot found the following issue on: > > HEAD commit:4d41ead6 Merge tag 'block-5.9-2020-08-28' of git://git.ker.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1196ce619

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

2020-09-04 Thread Jiri Pirko
Fri, Sep 04, 2020 at 10:49:45AM CEST, sgout...@marvell.com wrote: > > >> -Original Message- >> From: Jiri Pirko >> Sent: Friday, September 4, 2020 2:07 PM >> To: Sunil Kovvuri Goutham >> Cc: Jakub Kicinski ; sundeep.l...@gmail.com; >> da...@davemloft.net; netdev@vger.kernel.org; Subbaraya

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

2020-09-04 Thread Sunil Kovvuri Goutham
> -Original Message- > From: Jiri Pirko > Sent: Friday, September 4, 2020 5:41 PM > To: Sunil Kovvuri Goutham > Cc: Jakub Kicinski ; sundeep.l...@gmail.com; > da...@davemloft.net; netdev@vger.kernel.org; Subbaraya Sundeep > Bhatta > Subject: Re: [EXT] Re: [net-next PATCH 0/2] Introduc

Re: [PATCH v2] net: dsa: microchip: look for phy-mode in port nodes

2020-09-04 Thread Alexandre Belloni
On 04/09/2020 10:14:42+0200, Helmut Grohne wrote: > Documentation/devicetree/bindings/net/dsa/dsa.txt says that the phy-mode > property should be specified on port nodes. However, the microchip > drivers read it from the switch node. > > Let the driver use the per-port property and fall back to th

[PATCH net-next] netfilter: ebt_stp: Remove unused macro BPDU_TYPE_TCN

2020-09-04 Thread Wang Hai
BPDU_TYPE_TCN is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- net/bridge/netfilter/ebt_stp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c index 0d6d20c9105e..

[PATCH net-next] caif: Remove duplicate macro SRVL_CTRL_PKT_SIZE

2020-09-04 Thread Wang Hai
Remove SRVL_CTRL_PKT_SIZE which is defined more than once. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- net/caif/cfsrvl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/caif/cfsrvl.c b/net/caif/cfsrvl.c index d0a4d0ac7045..9cef9496a707 100644 --- a/net/caif/cfsrvl.c +++ b/net/cai

[PATCH net-next] NFC: digital: Remove two unused macroes

2020-09-04 Thread Wang Hai
DIGITAL_NFC_DEP_REQ_RES_TAILROOM is never used after it was introduced. DIGITAL_NFC_DEP_REQ_RES_HEADROOM is no more used after below commit e8e7f4217564 ("NFC: digital: Remove useless call to skb_reserve()") Remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- net/nfc/digital_dep.c

[PATCH net-next] net/packet: Remove unused macro BLOCK_PRIV

2020-09-04 Thread Wang Hai
BPDU_TYPE_TCN is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- net/packet/af_packet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index da8254e680f9..c430672c6a67 100644 ---

Re: [PATCH bpf-next 1/2] libbpf: fix another __u64 cast in printf

2020-09-04 Thread Daniel Borkmann
On 9/4/20 6:16 AM, Andrii Nakryiko wrote: Another issue of __u64 needing either %lu or %llu, depending on the architecture. Fix with cast to `unsigned long long`. Fixes: 7e06aad52929 ("libbpf: Add multi-prog section support for struct_ops") Signed-off-by: Andrii Nakryiko Applied, thanks!

[PATCH net-next] rxrpc: Remove unused macro rxrpc_min_rtt_wlen

2020-09-04 Thread Wang Hai
rxrpc_min_rtt_wlen is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- net/rxrpc/rtt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/rtt.c b/net/rxrpc/rtt.c index 928d8b34a3ee..a056c9bcf1d6 100644 --- a/net/rxrpc/rtt.

[PATCH net-next] can: kvaser_pciefd: Remove unused macro KVASER_PCIEFD_KCAN_CTRL_EFRAME

2020-09-04 Thread Wang Hai
KVASER_PCIEFD_KCAN_CTRL_EFRAME is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/net/can/kvaser_pciefd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c

[PATCH net-next] can: peak_canfd: Remove unused macros

2020-09-04 Thread Wang Hai
CANFD_CLK_SEL_DIV_MASK and CANFD_OPTIONS_SET are never used after they were introduced. Remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/net/can/peak_canfd/peak_pciefd_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/can/peak_canfd/peak_pciefd_mai

[PATCH RFC 2/7] bridge: cfm: Add BRIDGE_CFM to Kconfig.

2020-09-04 Thread Henrik Bjoernlund
This makes it possible to include or exclude the CFM protocol according to 802.1Q section 12.14. Signed-off-by: Henrik Bjoernlund --- net/bridge/Kconfig | 11 +++ net/bridge/br_device.c | 3 +++ net/bridge/br_private.h | 3 +++ 3 files changed, 17 insertions(+) diff --git a/net

[PATCH RFC 1/7] net: bridge: extend the process of special frames

2020-09-04 Thread Henrik Bjoernlund
This patch extends the processing of frames in the bridge. Currently MRP frames needs special processing and the current implementation doesn't allow a nice way to process different frame types. Therefore try to improve this by adding a list that contains frame types that need special processing. T

[PATCH RFC 3/7] bridge: uapi: cfm: Added EtherType used by the CFM protocol.

2020-09-04 Thread Henrik Bjoernlund
This EtherType is used by all CFM protocal frames transmitted according to 802.1Q section 12.14. Signed-off-by: Henrik Bjoernlund --- include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index d6de2b16744

[PATCH RFC 0/7] net: bridge: cfm: Add support for Connectivity Fault Management(CFM)

2020-09-04 Thread Henrik Bjoernlund
Connectivity Fault Management (CFM) is defined in 802.1Q section 12.14. Connectivity Fault Management (CFM) comprises capabilities for detecting, verifying, and isolating connectivity failures in Virtual Bridged Networks. These capabilities can be used in networks operated by multiple independent

[PATCH RFC 4/7] bridge: cfm: Kernel space implementation of CFM.

2020-09-04 Thread Henrik Bjoernlund
This is the implementation of the CFM protocol according to 802.1Q section 12.14. Connectivity Fault Management (CFM) comprises capabilities for detecting, verifying, and isolating connectivity failures in Virtual Bridged Networks. These capabilities can be used in networks operated by multiple in

[PATCH RFC 7/7] bridge: cfm: Bridge port remove.

2020-09-04 Thread Henrik Bjoernlund
This is addition of CFM functionality to delete MEP instances on a port that is removed from the bridge. A MEP can only exist on a port that is related to a bridge. Signed-off-by: Henrik Bjoernlund --- net/bridge/br_cfm.c | 13 + net/bridge/br_if.c | 1 + net/bridge/br_pri

[PATCH RFC 6/7] bridge: cfm: Netlink Notifications.

2020-09-04 Thread Henrik Bjoernlund
This is the implementation of Netlink notifications out of CFM. Notifications are initiated whenever a state change happens in CFM. IFLA_BRIDGE_CFM: Points to the CFM information. IFLA_BRIDGE_CFM_MEP_STATUS_INFO: This indicate that the MEP instance status are following. IFLA_BRIDGE_CFM_C

[PATCH RFC 5/7] bridge: cfm: Netlink Interface.

2020-09-04 Thread Henrik Bjoernlund
This is the implementation of CFM netlink configuration and status information interface. Add new nested netlink attributes. These attributes are used by the user space to create/delete/configure CFM instances and get status. Also they are used by the kernel to notify the user space when changes i

Re: [PATCH net-next] net/packet: Remove unused macro BLOCK_PRIV

2020-09-04 Thread Willem de Bruijn
On Fri, Sep 4, 2020 at 3:09 PM Wang Hai wrote: > > BPDU_TYPE_TCN is never used after it was introduced. > So better to remove it. This comment does not cover the patch contents. Otherwise the patch looks good to me. > Reported-by: Hulk Robot > Signed-off-by: Wang Hai > --- > net/packet/af_pac

[PATCH] net/packet: fix overflow in tpacket_rcv

2020-09-04 Thread Stefan Nuernberger
From: Or Cohen Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is set, an out-of-bounds write will occur when calling virtio_

Re: [PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe

2020-09-04 Thread Andrew Lunn
> Just a bunch of questions. > > Actually, why is it necessary to have a full MDIO bus scan already during > probing peripherals? That is the Linux bus model. It does not matter what sort of bus it is, PCI, USB, MDIO, etc. When the bus driver is loaded, the bus is enumerated and drivers probe for

Re: [PATCH v2 net-next 6/9] bpf: helpers: add bpf_xdp_adjust_mb_header helper

2020-09-04 Thread Jesper Dangaard Brouer
On Fri, 4 Sep 2020 09:50:31 +0200 Lorenzo Bianconi wrote: > > On Thu, Sep 03, 2020 at 10:58:50PM +0200, Lorenzo Bianconi wrote: > > > +BPF_CALL_2(bpf_xdp_adjust_mb_header, struct xdp_buff *, xdp, > > > +int, offset) > > > +{ > > > + void *data_hard_end, *data_end; > > > + struct skb_shared

Re: [PATCH v2] net: dsa: microchip: look for phy-mode in port nodes

2020-09-04 Thread Andrew Lunn
> + dev_warn(dev->dev, > + "Using legacy switch \"phy-mode\" missing on > port %d node. Please update your device tree.\n", That message seems mangled. > + if (!p->interface) { > + if (dev->compat_in

Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-04 Thread Herbert Xu
On Fri, Sep 04, 2020 at 01:45:38PM +, Srujana Challa wrote: > > This block of code is used for LMT store operations. The LMT store operation > is specific to our platform, and this uses the "ldeor" instruction(which is > actually an LSE atomic instruction available on v8.1 CPUs) targeting the >

[PATCH bpf-next 5/6] ice, xsk: finish napi loop if AF_XDP Rx queue is full

2020-09-04 Thread Björn Töpel
From: Björn Töpel Make the AF_XDP zero-copy path aware that the reason for redirect failure was due to full Rx queue. If so, exit the napi loop as soon as possible (exit the softirq processing), so that the userspace AF_XDP process can hopefully empty the Rx queue. This mainly helps the "one core

[PATCH bpf-next 1/6] xsk: improve xdp_do_redirect() error codes

2020-09-04 Thread Björn Töpel
From: Björn Töpel The error codes returned by xdp_do_redirect() when redirecting a frame to an AF_XDP socket has not been very useful. A driver could not distinguish between different errors. Prior this change the following codes where used: Socket not bound or incorrect queue/netdev: EINVAL XDP

[PATCH bpf-next 6/6] ixgbe, xsk: finish napi loop if AF_XDP Rx queue is full

2020-09-04 Thread Björn Töpel
From: Björn Töpel Make the AF_XDP zero-copy path aware that the reason for redirect failure was due to full Rx queue. If so, exit the napi loop as soon as possible (exit the softirq processing), so that the userspace AF_XDP process can hopefully empty the Rx queue. This mainly helps the "one core

[PATCH bpf-next 2/6] xdp: introduce xdp_do_redirect_ext() function

2020-09-04 Thread Björn Töpel
From: Björn Töpel Introduce the xdp_do_redirect_ext() which returns additional information to the caller. For now, it is the type of map that the packet was redirected to. This enables the driver to have more fine-grained control, e.g. is the redirect fails due to full AF_XDP Rx queue (error cod

[PATCH bpf-next 4/6] i40e, xsk: finish napi loop if AF_XDP Rx queue is full

2020-09-04 Thread Björn Töpel
From: Björn Töpel Make the AF_XDP zero-copy path aware that the reason for redirect failure was due to full Rx queue. If so, exit the napi loop as soon as possible (exit the softirq processing), so that the userspace AF_XDP process can hopefully empty the Rx queue. This mainly helps the "one core

[PATCH bpf-next 3/6] xsk: introduce xsk_do_redirect_rx_full() helper

2020-09-04 Thread Björn Töpel
From: Björn Töpel The xsk_do_redirect_rx_full() helper can be used to check if a failure of xdp_do_redirect() was due to the AF_XDP socket had a full Rx ring. Signed-off-by: Björn Töpel --- include/net/xdp_sock_drv.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/net/xdp_

[PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-04 Thread Björn Töpel
This series addresses a problem that arises when AF_XDP zero-copy is enabled, and the kernel softirq Rx processing and userland process is running on the same core. In contrast to the two-core case, when the userland process/Rx softirq shares one core, it it very important that the kernel is not d

Re: [PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe

2020-09-04 Thread Andrew Lunn
On Thu, Sep 03, 2020 at 09:04:11PM -0700, Florian Fainelli wrote: > > > On 9/2/2020 9:39 PM, Florian Fainelli wrote: > > Hi all, > > > > This patch series takes care of enabling the Ethernet PHY clocks in > > DT-based systems (we have no way to do it for ACPI, and ACPI would > > likely keep all

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-04 Thread Björn Töpel
On 2020-09-04 15:53, Björn Töpel wrote: This series addresses a problem that arises when AF_XDP zero-copy is enabled, and the kernel softirq Rx processing and userland process is running on the same core. [...] @Maxim I'm not well versed in Mellanox drivers. Would this be relevant to mlx5

Re: [PATCH] net: fec: Fix PHY init after phy_reset_after_clk_enable()

2020-09-04 Thread Andrew Lunn
On Fri, Sep 04, 2020 at 12:45:44AM +0200, Marek Vasut wrote: > On 9/4/20 12:08 AM, Andrew Lunn wrote: > >>> b4 am 20200903043947.3272453-1-f.faine...@gmail.com > >> > >> That might be a fix for the long run, but I doubt there's any chance to > >> backport it all to stable, is there ? > > > > No. F

Re: [PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe

2020-09-04 Thread Adam Rudziński
W dniu 2020-09-04 o 15:45, Andrew Lunn pisze: Just a bunch of questions. Actually, why is it necessary to have a full MDIO bus scan already during probing peripherals? That is the Linux bus model. It does not matter what sort of bus it is, PCI, USB, MDIO, etc. When the bus driver is loaded, the

RE: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-04 Thread Srujana Challa
> Subject: Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT > engine > > On Fri, Aug 07, 2020 at 07:39:19PM +0530, Srujana Challa wrote: > > > > +#if defined(CONFIG_ARM64) > > +static inline long otx2_lmt_flush(void *ioreg) > > +{ > > + long result = 0; > > + > > + __asm__ v

Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Andrew Lunn
> > > +static int prestera_is_valid_mac_addr(struct prestera_port *port, u8 > > > *addr) > > > +{ > > > + if (!is_valid_ether_addr(addr)) > > > + return -EADDRNOTAVAIL; > > > + > > > + if (memcmp(port->sw->base_mac, addr, ETH_ALEN - 1)) > > > > Why ETH_ALEN - 1? > > > T

Re: [PATCH net-next] net: dsa: bcm_sf2: Ensure that MDIO diversion is used

2020-09-04 Thread Andrew Lunn
On Thu, Sep 03, 2020 at 09:00:13PM -0700, Florian Fainelli wrote: > > > On 9/3/2020 3:03 PM, Andrew Lunn wrote: > > > The firmware provides the Device Tree but here is the relevant section for > > > you pasted below. The problematic device is a particular revision of the > > > silicon (D0) which

RE: [EXT] Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-04 Thread Srujana Challa
> Subject: [EXT] Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 > CPT engine > > External Email > > -- > On Fri, Sep 04, 2020 at 01:45:38PM +, Srujana Challa wrote: > > > > This block of code is used for LMT st

Re: [PATCH] net/packet: fix overflow in tpacket_rcv

2020-09-04 Thread Greg Kroah-Hartman
On Fri, Sep 04, 2020 at 03:30:52PM +0200, Stefan Nuernberger wrote: > From: Or Cohen > > Using tp_reserve to calculate netoff can overflow as > tp_reserve is unsigned int and netoff is unsigned short. > > This may lead to macoff receving a smaller value then > sizeof(struct virtio_net_hdr), and

Re: [EXT] Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-04 Thread Herbert Xu
On Fri, Sep 04, 2020 at 02:14:34PM +, Srujana Challa wrote: > > Since LMT store is our platform specific, it cannot be generalized to all > ARM64. I'm not asking you to generalise it to all of ARM64. I'm asking you to move this into a header file under arch/arm64 that can then be shared by b

[PATCH net-next v3 0/6] net-next: dsa: mt7530: add support for MT7531

2020-09-04 Thread Landen Chao
This patch series adds support for MT7531. MT7531 is the next generation of MT7530 which could be found on Mediatek router platforms such as MT7622 or MT7629. It is also a 7-ports switch with 5 giga embedded phys, 2 cpu ports, and the same MAC logic of MT7530. Cpu port 6 only supports SGMII inter

Re: [PATCHv10 bpf-next 2/5] xdp: add a new helper for dev map multicast support

2020-09-04 Thread Daniel Borkmann
On 9/3/20 12:26 PM, Hangbin Liu wrote: [...] diff --git a/include/net/xdp.h b/include/net/xdp.h index 3814fb631d52..8453d477bb22 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -132,6 +132,7 @@ void xdp_warn(const char *msg, const char *func, const int line); #define XDP_WARN(msg) xd

[PATCH net-next v3 1/6] net: dsa: mt7530: Refine message in Kconfig

2020-09-04 Thread Landen Chao
Refine message in Kconfig with fixing typo and an explicit MT7621 support. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Reviewed-by: Florian Fainelli --- drivers/net/dsa/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/Kconfig b/drivers/n

[PATCH net-next v3 3/6] dt-bindings: net: dsa: add new MT7531 binding to support MT7531

2020-09-04 Thread Landen Chao
Add devicetree binding to support the compatible mt7531 switch as used in the MediaTek MT7531 switch. Signed-off-by: Sean Wang Signed-off-by: Landen Chao --- Documentation/devicetree/bindings/net/dsa/mt7530.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Docum

Re: [PATCH] net/packet: fix overflow in tpacket_rcv

2020-09-04 Thread Nuernberger, Stefan
On Fri, 2020-09-04 at 16:16 +0200, Greg Kroah-Hartman wrote: > On Fri, Sep 04, 2020 at 03:30:52PM +0200, Stefan Nuernberger wrote: > > > > From: Or Cohen > > > > Using tp_reserve to calculate netoff can overflow as > > tp_reserve is unsigned int and netoff is unsigned short. > > > > This may le

[PATCH net-next v3 6/6] arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board

2020-09-04 Thread Landen Chao
Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao --- .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64

[PATCH net-next v3 4/6] net: dsa: mt7530: Add the support of MT7531 switch

2020-09-04 Thread Landen Chao
Add new support for MT7531: MT7531 is the next generation of MT7530. It is also a 7-ports switch with 5 giga embedded phys, 2 cpu ports, and the same MAC logic of MT7530. Cpu port 6 only supports SGMII interface. Cpu port 5 supports either RGMII or SGMII in different HW sku, but cannot be muxed to

[PATCH net-next v3 2/6] net: dsa: mt7530: Extend device data ready for adding a new hardware

2020-09-04 Thread Landen Chao
Add a structure holding required operations for each device such as device initialization, PHY port read or write, a checker whether PHY interface is supported on a certain port, MAC port setup for either bus pad or a specific PHY interface. The patch is done for ready adding a new hardware MT7531

  1   2   3   >