[PATCHv5 net-next 01/16] udp: check udp sock encap_type in __udp_lib_err

2020-10-29 Thread Xin Long
There is a chance that __udp4/6_lib_lookup() returns a udp encap sock in __udp_lib_err(), like the udp encap listening sock may use the same port as remote encap port, in which case it should go to __udp4/6_lib_err_encap() for more validation before processing the icmp packet. This patch is to che

[PATCH bpf-next 2/2] bpf: Avoid hashtab deadlock with map_locked

2020-10-29 Thread Song Liu
If a hashtab is accessed in both non-NMI and NMI context, the system may deadlock on bucket->lock. Fix this issue with percpu counter map_locked. map_locked rejects concurrent access to the same bucket from the same CPU. To reduce memory overhead, map_locked is not added per bucket. Instead, 8 perc

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Jason Wang
On 2020/10/28 下午10:20, Eli Cohen wrote: Both irq_bypass_register_producer() and irq_bypass_unregister_producer() require process context to run. Change the call context lock from spinlock to mutex to protect the setup process to avoid deadlocks. Fixes: 265a0ad8731d ("vhost: introduce vhost_vri

[PATCH bpf-next 1/2] bpf: use separate lockdep class for each hashtab

2020-10-29 Thread Song Liu
If a hashtab is accessed in both NMI and non-NMI contexts, it may cause deadlock in bucket->lock. LOCKDEP NMI warning highlighted this issue: ./test_progs -t stacktrace [ 74.828970] [ 74.828971] [ 74.828972] WARNING: inconsistent lock state [ 74.828973] 5.

[PATCHv5 net-next 00/16] sctp: Implement RFC6951: UDP Encapsulation of SCTP

2020-10-29 Thread Xin Long
Description From the RFC: The Main Reasons: o To allow SCTP traffic to pass through legacy NATs, which do not provide native SCTP support as specified in [BEHAVE] and [NATSUPP]. o To allow SCTP to be implemented on hosts that do not provide direct access to the IP la

[PATCHv5 net-next 02/16] udp6: move the mss check after udp gso tunnel processing

2020-10-29 Thread Xin Long
For some protocol's gso, like SCTP, it's using GSO_BY_FRAGS for gso_size. When using UDP to encapsulate its packet, it will return error in udp6_ufo_fragment() as skb->len < gso_size, and it will never go to the gso tunnel processing. So we should move this check after udp gso tunnel processing, t

Re: [PATCH 20/33] docs: ABI: testing: make the files compatible with ReST output

2020-10-29 Thread Mauro Carvalho Chehab
Hi Richard, Em Wed, 28 Oct 2020 10:44:27 -0700 Richard Cochran escreveu: > On Wed, Oct 28, 2020 at 03:23:18PM +0100, Mauro Carvalho Chehab wrote: > > > diff --git a/Documentation/ABI/testing/sysfs-uevent > > b/Documentation/ABI/testing/sysfs-uevent > > index aa39f8d7bcdf..d0893dad3f38 100644 >

[PATCHv5 net-next 04/16] sctp: create udp4 sock and add its encap_rcv

2020-10-29 Thread Xin Long
This patch is to add the functions to create/release udp4 sock, and set the sock's encap_rcv to process the incoming udp encap sctp packets. In sctp_udp_rcv(), as we can see, all we need to do is fix the transport header for sctp_rcv(), then it would implement the part of rfc6951#section-5.4: "W

[PATCHv5 net-next 03/16] udp: support sctp over udp in skb_udp_tunnel_segment

2020-10-29 Thread Xin Long
For the gso of sctp over udp packets, sctp_gso_segment() will be called in skb_udp_tunnel_segment(), we need to set transport_header to sctp header. As all the current HWs can't handle both crc checksum and udp checksum at the same time, the crc checksum has to be done in sctp_gso_segment() by rem

Re: [PATCH net-next 2/4] net: page_pool: add bulk support for ptr_ring

2020-10-29 Thread Ilias Apalodimas
On Tue, Oct 27, 2020 at 08:04:08PM +0100, Lorenzo Bianconi wrote: > Introduce the capability to batch page_pool ptr_ring refill since it is > usually run inside the driver NAPI tx completion loop. > > Suggested-by: Jesper Dangaard Brouer > Signed-off-by: Lorenzo Bianconi > --- > include/net/pag

[RFC PATCH net-next] net: ethernet: mediatek: support setting MTU

2020-10-29 Thread DENG Qingfang
MT762x HW supports frame length up to 2048 (maximum length on GDM), so allow setting MTU up to 2030. Signed-off-by: DENG Qingfang --- I only tested this on MT7621, no sure if it is applicable for other SoCs especially MT7628, which has an old IP. --- drivers/net/ethernet/mediatek/mtk_eth_soc.c

[PATCHv5 net-next 07/16] sctp: add encap_port for netns sock asoc and transport

2020-10-29 Thread Xin Long
encap_port is added as per netns/sock/assoc/transport, and the latter one's encap_port inherits the former one's by default. The transport's encap_port value would mostly decide if one packet should go out with udp encapsulated or not. This patch also allows users to set netns' encap_port by sysct

Re: [PATCH v5 3/3] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2020-10-29 Thread kernel test robot
Hi Pavana, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on net-next/master net/master linus/master sparc-next/master v5.10-rc1 next-20201028] [If your patch is applied to the wrong git tree, kindly drop us a note. And

[v2 net-next PATCH 01/10] octeontx2-af: Update get/set resource count functions

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep Since multiple blocks of same type are present in 98xx, modify functions which get resource count and which update resource count to work with individual block address instead of block type. Reviewed-by: Jesse Brandeburg Signed-off-by: Subbaraya Sundeep Signed-off-by: S

[v2 net-next PATCH 05/10] octeontx2-af: Setup MCE context for assigned NIX

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep Initialize MCE context for the assigned NIX0/1 block for a CGX mapped PF. Modified rvu_nix_aq_enq_inst function to work with nix_hw so that MCE contexts for both NIX blocks can be inited. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Rakes

Re: [PATCHv2 iproute2-next 0/5] iproute2: add libbpf support

2020-10-29 Thread Andrii Nakryiko
On Wed, Oct 28, 2020 at 7:33 PM David Ahern wrote: > > On 10/28/20 8:27 PM, Andrii Nakryiko wrote: > > On Wed, Oct 28, 2020 at 7:06 PM Hangbin Liu wrote: > >> > >> On Wed, Oct 28, 2020 at 05:02:34PM -0600, David Ahern wrote: > >>> fails to compile on Ubuntu 20.10: > >>> > >>> root@u2010-sfo3:~/ip

[v2 net-next PATCH 07/10] octeontx2-af: Mbox changes for 98xx

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep This patch puts together all mailbox changes for 98xx silicon: Attach -> Modify resource attach mailbox handler to request LFs from a block address out of multiple blocks of same type. If a PF/VF need LFs from two blocks of same type then attach mbox should be called twic

[v2 net-next PATCH 02/10] octeontx2-af: Manage new blocks in 98xx

2020-10-29 Thread sundeep . lkml
From: Rakesh Babu AF manages the tasks of allocating, freeing LFs from RVU blocks to PF and VFs. With new NIX1 and CPT1 blocks in 98xx, this patch adds support for handling new blocks too. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Rakesh Babu Signed-of

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

2020-10-29 Thread Vishwanath Pai
On 10/28/20 10:37 PM, Yunsheng Lin wrote: > On 2020/10/29 4:04, Vishwanath Pai wrote: >> On 10/28/20 1:47 PM, Cong Wang wrote: >>> On Wed, Oct 28, 2020 at 8:37 AM Pai, Vishwanath wrote: Hi, We noticed some problems when testing the latest 5.4 LTS kernel and traced it back t

[v2 net-next PATCH 10/10] octeontx2-af: Display CGX, NIX and PF map in debugfs.

2020-10-29 Thread sundeep . lkml
From: Rakesh Babu Unlike earlier silicon variants, OcteonTx2 98xx silicon has 2 NIX blocks and each of the CGX is mapped to either of the NIX blocks. Each NIX block supports 100G. Mapping btw NIX blocks and CGX is done by firmware based on CGX speed config to have a maximum possible network bandw

[PATCHv5 net-next 05/16] sctp: create udp6 sock and set its encap_rcv

2020-10-29 Thread Xin Long
This patch is to add the udp6 sock part in sctp_udp_sock_start/stop(). udp_conf.use_udp6_rx_checksums is set to true, as: "The SCTP checksum MUST be computed for IPv4 and IPv6, and the UDP checksum SHOULD be computed for IPv4 and IPv6" says in rfc6951#section-5.3. v1->v2: - Add pr_err()

[PATCHv5 net-next 08/16] sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt

2020-10-29 Thread Xin Long
This patch is to implement: rfc6951#section-6.1: Get or Set the Remote UDP Encapsulation Port Number with the param of the struct: struct sctp_udpencaps { sctp_assoc_t sue_assoc_id; struct sockaddr_storage sue_address; uint16_t sue_port; }; the encap_port of sock, assoc or tra

[PATCHv5 net-next 09/16] sctp: allow changing transport encap_port by peer packets

2020-10-29 Thread Xin Long
As rfc6951#section-5.4 says: "After finding the SCTP association (which includes checking the verification tag), the UDP source port MUST be stored as the encapsulation port for the destination address the SCTP packet is received from (see Section 5.1). When a non-encapsulated SCTP

Re: [PATCH v6 2/4] net: phy: Add 5GBASER interface mode

2020-10-29 Thread Marek Behun
On Thu, 29 Oct 2020 15:42:00 +1000 Pavana Sharma wrote: > Add new mode supported by MV88E6393 family. > This commit message isn't ideal. It infers that the Amethyst is first such device to implement this mode, which is not true. The 5gbase-r mode is supported by various other hardware, for exam

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Eli Cohen
On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > On 2020/10/28 下午10:20, Eli Cohen wrote: > > Both irq_bypass_register_producer() and irq_bypass_unregister_producer() > > require process context to run. Change the call context lock from > > spinlock to mutex to protect the setup proc

[v2 net-next PATCH 08/10] octeontx2-pf: Calculate LBK link instead of hardcoding

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep CGX links are followed by LBK links but number of CGX and LBK links varies between platforms. Hence get the number of links present in hardware from AF and use it to calculate LBK link number. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by:

[PATCHv5 net-next 15/16] sctp: handle the init chunk matching an existing asoc

2020-10-29 Thread Xin Long
This is from Section 4 of draft-tuexen-tsvwg-sctp-udp-encaps-cons-03, and it requires responding with an abort chunk with an error cause when the udp source port of the received init chunk doesn't match the encap port of the transport. Signed-off-by: Xin Long --- net/sctp/sm_statefuns.c | 50 +++

[PATCHv5 net-next 06/16] sctp: add encap_err_lookup for udp encap socks

2020-10-29 Thread Xin Long
As it says in rfc6951#section-5.5: "When receiving ICMP or ICMPv6 response packets, there might not be enough bytes in the payload to identify the SCTP association that the SCTP packet triggering the ICMP or ICMPv6 packet belongs to. If a received ICMP or ICMPv6 packet cannot be relate

[PATCHv5 net-next 10/16] sctp: add udphdr to overhead when udp_port is set

2020-10-29 Thread Xin Long
sctp_mtu_payload() is for calculating the frag size before making chunks from a msg. So we should only add udphdr size to overhead when udp socks are listening, as only then sctp can handle the incoming sctp over udp packets and outgoing sctp over udp packets will be possible. Note that we can't d

[v2 net-next PATCH 04/10] octeontx2-af: Map NIX block from CGX connection

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep Firmware configures NIX block mapping for all CGXs to achieve maximum throughput. This patch reads the configuration and create mapping between RVU PF and NIX blocks. And for LBK VFs assign NIX0 for even numbered VFs and NIX1 for odd numbered VFs. Signed-off-by: Subbaraya

Re: [PATCH v6 3/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2020-10-29 Thread Marek Behun
On Thu, 29 Oct 2020 15:42:29 +1000 Pavana Sharma wrote: > The Marvell 88E6393X device is a single-chip integration of a 11-port > Ethernet switch with eight integrated Gigabit Ethernet (GbE) transceivers > and three 10-Gigabit interfaces. > > This patch adds functionalities specific to mv88e6393

Re: [PATCH net] ip6_tunnel: set inner ipproto before ip6_tnl_encap.

2020-10-29 Thread Alexander Ovechkin
On 28 Oct 2020, at 01:53 UTC Willem de Bruijn wrote: > On Tue, Oct 27, 2020 at 5:52 PM Alexander Ovechkin > wrote: > > > > > But it was moved on purpose to avoid setting the inner protocol to > > > IPPROTO_MPLS. That needs to use skb->inner_protocol to further segment. > > And why do we need t

Re: [PATCH] net: dsa: mt7530: support setting MTU

2020-10-29 Thread DENG Qingfang
On Thu, Oct 29, 2020 at 2:31 AM Vladimir Oltean wrote: > > On Thu, Oct 29, 2020 at 02:12:21AM +0800, DENG Qingfang wrote: > > MT7530/7531 has a global RX packet length register, which can be used > > to set MTU. > > > > Signed-off-by: DENG Qingfang > > --- > > Reviewed-by: Vladimir Oltean > > Al

[PATCHv5 net-next 14/16] sctp: add the error cause for new encapsulation port restart

2020-10-29 Thread Xin Long
This patch is to add the function to make the abort chunk with the error cause for new encapsulation port restart, defined on Section 4.4 in draft-tuexen-tsvwg-sctp-udp-encaps-cons-03. v1->v2: - no change. v2->v3: - no need to call htons() when setting nep.cur_port/new_port. Signed-off-by: Xi

Re: [PATCHv2 iproute2-next 0/5] iproute2: add libbpf support

2020-10-29 Thread David Ahern
On 10/28/20 8:45 PM, Hangbin Liu wrote: > On Wed, Oct 28, 2020 at 08:20:55PM -0600, David Ahern wrote: root@u2010-sfo3:~/iproute2.git# make -j 4 ... /usr/bin/ld: ../lib/libutil.a(bpf_libbpf.o): in function `load_bpf_object': bpf_libbpf.c:(.text+0x3cb): undefined reference to >>>

[PATCHv5 net-next 16/16] sctp: enable udp tunneling socks

2020-10-29 Thread Xin Long
This patch is to enable udp tunneling socks by calling sctp_udp_sock_start() in sctp_ctrlsock_init(), and sctp_udp_sock_stop() in sctp_ctrlsock_exit(). Also add sysctl udp_port to allow changing the listening sock's port by users. Wit this patch, the whole sctp over udp feature can be enabled and

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

2020-10-29 Thread Yunsheng Lin
On 2020/9/18 3:26, Cong Wang wrote: > On Fri, Sep 11, 2020 at 1:13 AM Yunsheng Lin wrote: >> >> On 2020/9/11 4:07, Cong Wang wrote: >>> On Tue, Sep 8, 2020 at 4:06 AM Yunsheng Lin wrote: Currently there is concurrent reset and enqueue operation for the same lockless qdisc when ther

Re: [PATCHv2 iproute2-next 0/5] iproute2: add libbpf support

2020-10-29 Thread Andrii Nakryiko
On Wed, Oct 28, 2020 at 7:34 PM Stephen Hemminger wrote: > > On Wed, 28 Oct 2020 19:27:20 -0700 > Andrii Nakryiko wrote: > > > On Wed, Oct 28, 2020 at 7:06 PM Hangbin Liu wrote: > > > > > > On Wed, Oct 28, 2020 at 05:02:34PM -0600, David Ahern wrote: > > > > fails to compile on Ubuntu 20.10: > >

Re: [PATCH v6 0/4] Add support for mv88e6393x family of Marvell

2020-10-29 Thread Marek Behun
On Thu, 29 Oct 2020 15:40:25 +1000 Pavana Sharma wrote: > Updated patchset. > > Split the patch to separate mv88e6393 changes from refactoring > serdes_get_lane. > Update Documentation before adding new mode. Pavana, the patch adding support for Amethyst has to be the last in the series. The pa

Re: [PATCH net-next 2/4] net: page_pool: add bulk support for ptr_ring

2020-10-29 Thread Ilias Apalodimas
Hi Lorenzo, On Tue, Oct 27, 2020 at 08:04:08PM +0100, Lorenzo Bianconi wrote: > Introduce the capability to batch page_pool ptr_ring refill since it is > usually run inside the driver NAPI tx completion loop. > > Suggested-by: Jesper Dangaard Brouer > Signed-off-by: Lorenzo Bianconi > --- > i

[v2 net-next PATCH 09/10] octeontx2-af: Display NIX1 also in debugfs

2020-10-29 Thread sundeep . lkml
From: Rakesh Babu If NIX1 block is also implemented then add a new directory for NIX1 in debugfs root. Stats of NIX1 block can be read/writen from/to the files in directory "/sys/kernel/debug/octeontx2/nix1/". Signed-off-by: Rakesh Babu Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Gou

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Arvind Sankar
On Wed, Oct 28, 2020 at 04:20:01PM -0700, Alexei Starovoitov wrote: > On Thu, Oct 29, 2020 at 12:10:52AM +0100, Ard Biesheuvel wrote: > > On Wed, 28 Oct 2020 at 23:59, Alexei Starovoitov > > wrote: > > > > > > On Wed, Oct 28, 2020 at 11:15:04PM +0100, Ard Biesheuvel wrote: > > > > On Wed, 28 Oct 2

[PATCH bpf-next 0/2] bpf: safeguard hashtab locking in NMI context

2020-10-29 Thread Song Liu
LOCKDEP NMI warning highlighted potential deadlock of hashtab in NMI context: [ 74.828971] [ 74.828972] WARNING: inconsistent lock state [ 74.828973] 5.9.0-rc8+ #275 Not tainted [ 74.828974] [ 74.828975] inconsistent {INIT

Re: [PATCHv2 iproute2-next 0/5] iproute2: add libbpf support

2020-10-29 Thread Hangbin Liu
On Wed, Oct 28, 2020 at 08:20:55PM -0600, David Ahern wrote: > >> root@u2010-sfo3:~/iproute2.git# make -j 4 > >> ... > >> /usr/bin/ld: ../lib/libutil.a(bpf_libbpf.o): in function `load_bpf_object': > >> bpf_libbpf.c:(.text+0x3cb): undefined reference to > >> `bpf_program__section_name' > >> /usr/bi

[PATCHv5 net-next 11/16] sctp: call sk_setup_caps in sctp_packet_transmit instead

2020-10-29 Thread Xin Long
sk_setup_caps() was originally called in Commit 90017accff61 ("sctp: Add GSO support"), as: "We have to refresh this in case we are xmiting to more than one transport at a time" This actually happens in the loop of sctp_outq_flush_transports(), and it shouldn't be tied to gso, so move it out

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Eli Cohen
On Thu, Oct 29, 2020 at 03:39:24PM +0800, Jason Wang wrote: > > On 2020/10/29 下午3:37, Eli Cohen wrote: > > On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > > On 2020/10/28 下午10:20, Eli Cohen wrote: > > > > Both irq_bypass_register_producer() and irq_bypass_unregister_producer() > >

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Jason Wang
On 2020/10/29 下午3:37, Eli Cohen wrote: On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: On 2020/10/28 下午10:20, Eli Cohen wrote: Both irq_bypass_register_producer() and irq_bypass_unregister_producer() require process context to run. Change the call context lock from spinlock to mut

[v2 net-next PATCH 00/10] Support for OcteonTx2 98xx silcion

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep OcteonTx2 series of silicons have multiple variants, the 98xx variant has two network interface controllers (NIX blocks) each of which supports upto 100Gbps. Similarly 98xx supports two crypto blocks (CPT) to double the crypto performance. The current RVU drivers support a

[v2 net-next PATCH 03/10] octeontx2-af: Initialize NIX1 block

2020-10-29 Thread sundeep . lkml
From: Rakesh Babu This patch modifies NIX functions to operate with nix_hw context so that existing functions can be used for both NIX0 and NIX1 blocks. And the NIX blocks present in the system are initialized during driver init and freed during exit. Signed-off-by: Rakesh Babu Signed-off-by: S

[PATCHv5 net-next 13/16] sctp: support for sending packet over udp6 sock

2020-10-29 Thread Xin Long
This one basically does the similar things in sctp_v6_xmit as does for udp4 sock in the last patch, just note that: 1. label needs to be calculated, as it's the param of udp_tunnel6_xmit_skb(). 2. The 'nocheck' param of udp_tunnel6_xmit_skb() is false, as required by RFC. v1->v2:

[v2 net-next PATCH 06/10] octeontx2-af: Add NIX1 interfaces to NPC

2020-10-29 Thread sundeep . lkml
From: Subbaraya Sundeep On 98xx silicon, NPC block has additional mcam entries, counters and NIX1 interfaces. Extended set of registers are present for the new mcam entries and counters. This patch does the following: - updates the register accessing macros to use extended set if present. - con

[PATCHv5 net-next 12/16] sctp: support for sending packet over udp4 sock

2020-10-29 Thread Xin Long
This patch does what the rfc6951#section-5.3 says for ipv4: "Within the UDP header, the source port MUST be the local UDP encapsulation port number of the SCTP stack, and the destination port MUST be the remote UDP encapsulation port number maintained for the association and the destina

RE: [PATCH V4 0/6] can: flexcan: add stop mode support for i.MX8QM

2020-10-29 Thread Joakim Zhang
Gentle Ping... @shawn...@kernel.org, Could you please help review patch 1/6 and 5/6 in this patch set? Best Regards, Joakim Zhang > -Original Message- > From: Joakim Zhang > Sent: 2020年10月21日 13:33 > To: m...@pengutronix.de; robh...@kernel.org; shawn...@kernel.org; > s.ha...@pengutron

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Jason Wang
On 2020/10/29 下午3:50, Eli Cohen wrote: On Thu, Oct 29, 2020 at 03:39:24PM +0800, Jason Wang wrote: On 2020/10/29 下午3:37, Eli Cohen wrote: On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: On 2020/10/28 下午10:20, Eli Cohen wrote: Both irq_bypass_register_producer() and irq_bypass_un

[PATCH net v2 2/2] gianfar: Account for Tx PTP timestamp in the skb headroom

2020-10-29 Thread Claudiu Manoil
When PTP timestamping is enabled on Tx, the controller inserts the Tx timestamp at the beginning of the frame buffer, between SFD and the L2 frame header. This means that the skb provided by the stack is required to have enough headroom otherwise it needs to be reallocated. This patch is requestin

[PATCH v6 3/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2020-10-29 Thread Pavana Sharma
The Marvell 88E6393X device is a single-chip integration of a 11-port Ethernet switch with eight integrated Gigabit Ethernet (GbE) transceivers and three 10-Gigabit interfaces. This patch adds functionalities specific to mv88e6393x family (88E6393X, 88E6193X and 88E6191X) Co-developed-by: Ashkan

[PATCH v6 0/4] Add support for mv88e6393x family of Marvell

2020-10-29 Thread Pavana Sharma
Updated patchset. Split the patch to separate mv88e6393 changes from refactoring serdes_get_lane. Update Documentation before adding new mode. > Is the 6191X part of the 6193 family? Not the 6390, like the 6191 is? > Or do we have the 6191 in the wrong family? >> +MV88E6193X, > You don't ad

[PATCH v6 4/4] net: dsa: mv88e6xxx: Change serdes lane parameter from u8 to int

2020-10-29 Thread Pavana Sharma
Returning 0 is no more an error case with MV88E6393 family which has serdes lane numbers 0, 9 or 10. So with this change .serdes_get_lane will return lane number or error (-ENODEV). Signed-off-by: Pavana Sharma --- drivers/net/dsa/mv88e6xxx/chip.c | 28 +- drivers/net/dsa/mv88e6xxx/chi

Re: [PATCH net 0/4] Restore and fix PHY reset for SMSC LAN8720

2020-10-29 Thread Marco Felsch
Hi, thanks for your patches :) On 20-10-27 23:25, Badel, Laurent wrote: > Subject: [PATCH net 0/4] Restore and fix PHY reset for SMSC LAN8720 > > Description: > A recent patchset [1] added support in the SMSC PHY driver for managing > the ref clock and therefore removed the PHY_RST_AFTER_CLK_EN

[PATCH v6 2/4] net: phy: Add 5GBASER interface mode

2020-10-29 Thread Pavana Sharma
Add new mode supported by MV88E6393 family. Signed-off-by: Pavana Sharma --- include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index 3a09d2bf69ea..9de7c57cfd38 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -107,6

[PATCH v6 1/4] dt-bindings: net: Add 5GBASER phy interface mode

2020-10-29 Thread Pavana Sharma
Add 5GBASE-R phy interface mode supported by mv88e6393 family. Signed-off-by: Pavana Sharma --- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/dev

Re: [PATCH] net: dsa: mt7530: support setting MTU

2020-10-29 Thread DENG Qingfang
On Thu, Oct 29, 2020 at 4:11 PM Jonathan McDowell wrote: > > On Thu, Oct 29, 2020 at 11:32:36AM +0800, DENG Qingfang wrote: > > On Thu, Oct 29, 2020 at 2:31 AM Vladimir Oltean wrote: > > > > > > On Thu, Oct 29, 2020 at 02:12:21AM +0800, DENG Qingfang wrote: > ... > > > > +static int > > > > +mt75

Re: [RFC PATCH 4/4] net: dsa: tag_edsa: support reception of packets from lag devices

2020-10-29 Thread Tobias Waldekranz
On Thu Oct 29, 2020 at 2:08 AM CET, Vladimir Oltean wrote: > On Wed, Oct 28, 2020 at 11:31:58PM +0100, Tobias Waldekranz wrote: > > The thing is, unlike L2 where the hardware will add new neighbors to > > its FDB autonomously, every entry in the hardware FIB is under the > > strict control of the C

Re: [PATCHv2 iproute2-next 0/5] iproute2: add libbpf support

2020-10-29 Thread Hangbin Liu
On Wed, Oct 28, 2020 at 09:00:41PM -0600, David Ahern wrote: > >>> You need to update libbpf to latest version. > >> > >> nope. you need to be able to handle this. Ubuntu 20.10 was just > >> released, and it has a version of libbpf. If you are going to integrate > >> libbpf into other packages like

[PATCH nf 0/2] route_me_harder routing loop with tunnels

2020-10-29 Thread Jason A. Donenfeld
Hi Pablo, This series fixes a bug in the route_me_harder family of functions with regards to tunnel interfaces. The first patch contains an addition to the wireguard test suite; I normally send my wireguard patches through Dave's tree, but I thought it'd be nice to send these together here because

[PATCH nf 1/2] wireguard: selftests: check that route_me_harder packets use the right sk

2020-10-29 Thread Jason A. Donenfeld
If netfilter changes the packet mark, the packet is rerouted. The ip_route_me_harder family of functions fails to use the right sk, opting to instead use skb->sk, resulting in a routing loop when used with tunnels. With the next change fixing this issue in netfilter, test for the relevant condition

[PATCH nf 2/2] netfilter: use actual socket sk rather than skb sk when routing harder

2020-10-29 Thread Jason A. Donenfeld
If netfilter changes the packet mark when mangling, the packet is rerouted using the route_me_harder set of functions. Prior to this commit, there's one big difference between route_me_harder and the ordinary initial routing functions, described in the comment above __ip_queue_xmit(): /* Note:

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Geert Uytterhoeven
On Wed, Oct 28, 2020 at 6:15 PM Ard Biesheuvel wrote: > Commit 3193c0836 ("bpf: Disable GCC -fgcse optimization for > ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a > function scope __attribute__((optimize("-fno-gcse"))), to disable a > GCC specific optimization that was causi

[PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-10-29 Thread Claudiu Manoil
When PTP timestamping is enabled on Tx, the controller inserts the Tx timestamp at the beginning of the frame buffer, between SFD and the L2 frame header. This means that the skb provided by the stack is required to have enough headroom otherwise a new skb needs to be created by the driver to acco

Re: [PATCH] net: dsa: mt7530: support setting MTU

2020-10-29 Thread Jonathan McDowell
On Thu, Oct 29, 2020 at 11:32:36AM +0800, DENG Qingfang wrote: > On Thu, Oct 29, 2020 at 2:31 AM Vladimir Oltean wrote: > > > > On Thu, Oct 29, 2020 at 02:12:21AM +0800, DENG Qingfang wrote: ... > > > +static int > > > +mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) > > > +{

Re: [PATCH bpf] xsk: fix possible memory leak at socket close

2020-10-29 Thread Björn Töpel
On Wed, 28 Oct 2020 at 08:32, Magnus Karlsson wrote: > > From: Magnus Karlsson > > Fix a possible memory leak at xsk socket close that is caused by the > refcounting of the umem object being wrong. The reference count of the > umem was decremented only after the pool had been freed. Note that if

RE: [PATCH] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread David Laight
From: Ard Biesheuvel > Sent: 27 October 2020 20:57 > > Commit 3193c0836f203 ("bpf: Disable GCC -fgcse optimization for > ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a > function scope __attribute__((optimize("-fno-gcse"))), to disable a > GCC specific optimization that was ca

Re: [PATCH net] r8169: fix operation under forced interrupt threading

2020-10-29 Thread Heiner Kallweit
On 29.10.2020 00:29, Jakub Kicinski wrote: > On Wed, 28 Oct 2020 13:17:58 +0100 Heiner Kallweit wrote: >> On 28.10.2020 12:43, Serge Belyshev wrote: For several network drivers it was reported that using __napi_schedule_irqoff() is unsafe with forced threading. One way to fix this is

Re: [RFC PATCH net-next v3] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-10-29 Thread Michal Kubecek
On Wed, Oct 28, 2020 at 07:34:36PM +0200, Ido Schimmel wrote: > On Wed, Oct 28, 2020 at 01:53:39AM +0100, Michal Kubecek wrote: > > On Tue, Oct 27, 2020 at 02:53:05PM -0700, Jakub Kicinski wrote: > > > > > > I did not look at the legacy code but I'm confused by what you wrote. > > > > > > IIUC fo

[PATCH net] r8169: fix issue with forced threading in combination with shared interrupts

2020-10-29 Thread Heiner Kallweit
As reported by Serge flag IRQF_NO_THREAD causes an error if the interrupt is actually shared and the other driver(s) don't have this flag set. This situation can occur if a PCI(e) legacy interrupt is used in combination with forced threading. There's no good way to deal with this properly, therefor

Re: [PATCH nf 2/2] netfilter: use actual socket sk rather than skb sk when routing harder

2020-10-29 Thread Florian Westphal
Jason A. Donenfeld wrote: > If netfilter changes the packet mark when mangling, the packet is > rerouted using the route_me_harder set of functions. Prior to this > commit, there's one big difference between route_me_harder and the > ordinary initial routing functions, described in the comment abo

[PATCH net 1/1] stmmac: intel: Fix kernel panic on pci probe

2020-10-29 Thread Wong Vee Khee
The commit "stmmac: intel: Adding ref clock 1us tic for LPI cntr" introduced a regression which leads to the kernel panic duing loading of the dwmac_intel module. Move the code block after pci resources is obtained. Fixes: b4c5f83ae3f3 ("stmmac: intel: Adding ref clock 1us tic for LPI cntr") Cc:

Re: [RFC bpf-next 07/16] kallsyms: Use rb tree for kallsyms name search

2020-10-29 Thread Jiri Olsa
On Wed, Oct 28, 2020 at 02:15:02PM -0700, Alexei Starovoitov wrote: > On Wed, Oct 28, 2020 at 07:25:34PM +0100, Jiri Olsa wrote: > > On Thu, Oct 22, 2020 at 10:21:29AM +0200, Jiri Olsa wrote: > > > The kallsyms_expand_symbol function showed in several bpf related > > > profiles, because it's doing

Re: [RFC bpf-next 07/16] kallsyms: Use rb tree for kallsyms name search

2020-10-29 Thread Jiri Olsa
On Wed, Oct 28, 2020 at 03:40:46PM -0700, Andrii Nakryiko wrote: > On Wed, Oct 28, 2020 at 3:29 PM Jiri Olsa wrote: > > > > On Thu, Oct 22, 2020 at 10:21:29AM +0200, Jiri Olsa wrote: > > > The kallsyms_expand_symbol function showed in several bpf related > > > profiles, because it's doing linear s

Re: [PATCH net] r8169: fix operation under forced interrupt threading

2020-10-29 Thread Thomas Gleixner
On Thu, Oct 29 2020 at 09:42, Heiner Kallweit wrote: > On 29.10.2020 00:29, Jakub Kicinski wrote: >> Other handles may take spin_locks, which will sleep on RT. >> >> I guess we may need to switch away from the _irqoff() variant for >> drivers with IRQF_SHARED after all :( >> > Right. Unfortunatel

[PATCH] drivers: net: phy: Fix spelling in comment defalut to default

2020-10-29 Thread Bhaskar Chowdhury
Fixed spelling in comment like below: s/defalut/default/p This is in linux-next. Signed-off-by: Bhaskar Chowdhury --- drivers/net/phy/marvell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 5aec673a0120..77540f5d

[PATCH net-next 03/19] net: phy: make .ack_interrupt() optional

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei As a first step into making phylib and all PHY drivers to actually have support for shared IRQs, make the .ack_interrupt() callback optional. After all drivers have been moved to implement the generic interrupt handle, the phy_drv_supports_irq() check will be changed again to

[PATCH net-next 01/19] net: phy: export phy_error and phy_trigger_machine

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei These functions are currently used by phy_interrupt() to either signal an error condition or to trigger the link state machine. In an attempt to actually support shared PHY IRQs, export these two functions so that the actual PHY drivers can use them. Cc: Alexandru Ardelean C

[PATCH net-next 00/19] net: phy: add support for shared interrupts (part 1)

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei This patch set aims to actually add support for shared interrupts in phylib and not only for multi-PHY devices. While we are at it, streamline the interrupt handling in phylib. For a bit of context, at the moment, there are multiple phy_driver ops that deal with this subject:

[PATCH net-next 11/19] net: phy: broadcom: implement generic .handle_interrupt() callback

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_

[PATCH net-next 08/19] net: phy: mscc: remove the use of .ack_interrupt()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupt

[PATCH net-next 15/19] net: phy: davicom: implement generic .handle_interrupt() calback

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Eli Cohen
On Thu, Oct 29, 2020 at 04:08:24PM +0800, Jason Wang wrote: > > On 2020/10/29 下午3:50, Eli Cohen wrote: > > On Thu, Oct 29, 2020 at 03:39:24PM +0800, Jason Wang wrote: > > > On 2020/10/29 下午3:37, Eli Cohen wrote: > > > > On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > > > > On 2020/

[PATCH net-next 17/19] net: phy: add genphy_handle_interrupt_no_ack()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei It seems there are cases where the interrupts are handled by another entity (ie an IRQ controller embedded inside the PHY) and do not need any other interraction from phylib. For this kind of PHYs, like the RTL8366RB, add the genphy_handle_interrupt_no_ack() function which jus

[PATCH net-next 16/19] net: phy: davicom: remove the use of .ack_interrupt()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupt

[PATCH net-next 14/19] net: phy: cicada: remove the use of .ack_interrupt()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupt

[PATCH net-next 19/19] net: phy: realtek: remove the use of .ack_interrupt()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupt

[PATCH net-next 18/19] net: phy: realtek: implement generic .handle_interrupt() callback

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_

[PATCH net-next 13/19] net: phy: cicada: implement the generic .handle_interrupt() callback

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_

[PATCH net-next 09/19] net: phy: aquantia: implement generic .handle_interrupt() callback

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_

[PATCH net-next 06/19] net: phy: mscc: use phy_trigger_machine() to notify link change

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei According to the comment describing the phy_mac_interrupt() function, it it intended to be used by MAC drivers which have noticed a link change thus its use in the mscc PHY driver is improper and, most probably, was added just because phy_trigger_machine() was not exported. No

[PATCH net-next 10/19] net: phy: aquantia: remove the use of .ack_interrupt()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupt

[PATCH net-next 02/19] net: phy: add a shutdown procedure

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In case of a board which uses a shared IRQ we can easily end up with an IRQ storm after a forced reboot. For example, a 'reboot -f' will trigger a call to the .shutdown() callbacks of all devices. Because phylib does not implement that hook, the PHY is not quiesced, thus it c

[PATCH net-next 05/19] net: phy: at803x: remove the use of .ack_interrupt()

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupt

[PATCH net-next 07/19] net: phy: mscc: implement generic .handle_interrupt() callback

2020-10-29 Thread Ioana Ciornei
From: Ioana Ciornei In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_

  1   2   3   4   >