Re: [PATCH/RFC net-next v3] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-27 Thread Jakub Kicinski
On Fri, 23 Oct 2020 13:28:34 -0700 Moritz Fischer wrote: > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > b/drivers/net/ethernet/dec/tulip/de2104x.c > index d9f6c19940ef..ea7442cc8e75 100644 > --- a/drivers/net/ethernet/dec/tulip/de2104x.c > +++ b/drivers/net/ethernet/dec/tulip/de2104x.c

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

2020-10-27 Thread Badel, Laurent
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 flag for the LAN8720 chip. The ref clock is passed to the SMSC driver through a new

[PATCH net 1/4] net:phy:smsc: enable PHY_RST_AFTER_CLK_EN if ref clock is not set

2020-10-27 Thread Badel, Laurent
Subject: [PATCH net 1/4] net:phy:smsc: enable PHY_RST_AFTER_CLK_EN if ref clock is not set Description: for compatibility, restore PHY_RST_AFTER_CLK_EN flag for LAN8720, but clear it if the driver successfully retrieves a reference to the ref clk. This ensures compatibility for systems that rel

[PATCH 4/4] net:phy: fix phy_reset_after_clk_enable()

2020-10-27 Thread Badel, Laurent
Subject: [PATCH 4/4] net:phy: fix phy_reset_after_clk_enable() Description: Resetting PHY chip during operation has the effect of reverting all configuration registers to default. Therefore, fully re-configure the PHY after a reset. Also, avoid resetting the PHY if the reset is already asserted,

Re: [PATCH net] chelsio/chtls: fix deadlock issue

2020-10-27 Thread Jakub Kicinski
On Mon, 26 Oct 2020 01:05:39 +0530 Vinay Kumar Yadav wrote: > In chtls_pass_establish() we hold child socket lock using bh_lock_sock > and we are again trying bh_lock_sock in add_to_reap_list, causing deadlock. > Remove bh_lock_sock in add_to_reap_list() as lock is already held. > > Fixes: cc35c88

[PATCH net 3/4] net:phy: add phy_device_reset_status() support

2020-10-27 Thread Badel, Laurent
Subject: [PATCH net 3/4] net:phy: add phy_device_reset_status() support Description: add support to query the status of the reset line of an MDIO device. Signed-off-by: Laurent Badel --- drivers/net/phy/mdio_device.c | 18 ++ include/linux/mdio.h | 1 + include/linu

[PATCH v5 2/3] dt-bindings: net: Add 5GBASER phy interface mode

2020-10-27 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

[PATCH v5 1/3] net: phy: Add 5GBASER interface mode

2020-10-27 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

Re: [PATCH net] chelsio/chtls: fix memory leaks in CPL handlers

2020-10-27 Thread Jakub Kicinski
On Mon, 26 Oct 2020 01:12:29 +0530 Vinay Kumar Yadav wrote: > CPL handler functions chtls_pass_open_rpl() and > chtls_close_listsrv_rpl() should return CPL_RET_BUF_DONE > so that caller function will do skb free to avoid leak. > > Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") > S

[PATCH v5 0/3] Add support for mv88e6393x family of Marvell

2020-10-27 Thread Pavana Sharma
Updated patchset. Pavana Sharma (3): net: phy: Add 5GBASER interface mode dt-bindings: net: Add 5GBASER phy interface mode net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell .../bindings/net/ethernet-controller.yaml | 2 + drivers/net/dsa/mv88e6xxx/chip.c

Re: [PATCH net,v2] chelsio/chtls: fix memory leaks

2020-10-27 Thread Jakub Kicinski
On Mon, 26 Oct 2020 01:19:36 +0530 Vinay Kumar Yadav wrote: > Correct skb refcount in alloc_ctrl_skb(), causing skb memleak > when chtls_send_abort() called with NULL skb. > Also race between user context and softirq causing memleak, > consider the call sequence scenario Sounds like two separate f

Re: [PATCH net v2] ravb: Fix bit fields checking in ravb_hwtstamp_get()

2020-10-27 Thread Jakub Kicinski
On Mon, 26 Oct 2020 05:21:30 -0500 Andrew Gabbasov wrote: > In the function ravb_hwtstamp_get() in ravb_main.c with the existing > values for RAVB_RXTSTAMP_TYPE_V2_L2_EVENT (0x2) and RAVB_RXTSTAMP_TYPE_ALL > (0x6) > > if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT) > config.rx_fil

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

2020-10-27 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) Signed-off-by: Pavana Sh

[PATCH net 2/4] net:phy:smsc: expand documentation of clocks property

2020-10-27 Thread Badel, Laurent
Subject: [PATCH net 2/4] net:phy:smsc: expand documentation of clocks property Description: The ref clock is managed differently when added to the DT entry for SMSC PHY. Thus, specify this more clearly in the documentation. Signed-off-by: Laurent Badel --- Documentation/devicetree/bindings/net

Re: [PATCH net 5/5] net: ipa: avoid going past end of resource group array

2020-10-27 Thread Willem de Bruijn
On Tue, Oct 27, 2020 at 12:38 PM Alex Elder wrote: > > The minimum and maximum limits for resources assigned to a given > resource group are programmed in pairs, with the limits for two > groups set in a single register. > > If the number of supported resource groups is odd, only half of the > reg

Re: [PATCH 1/2 net] devlink: Fix some error codes

2020-10-27 Thread Jakub Kicinski
On Mon, 26 Oct 2020 11:00:59 +0300 Dan Carpenter wrote: > devlink_nl_region_notify_build() where it leads to a NULL dereference in > the caller. > > Fixes: 544e7c33ec2f ("net: devlink: Add support for port regions") > Signed-off-by: Dan Carpenter Applied both, thanks Dan!

Re: [PATCH] net: microchip: Remove unneeded variable ret

2020-10-27 Thread Jakub Kicinski
On Fri, 23 Oct 2020 09:21:07 + Xu Wang wrote: > Remove unneeded variable ret used to store return value. > > Signed-off-by: Xu Wang Applied.

Re: [PATCH] vxge: remove unnecessary cast in kfree()

2020-10-27 Thread Jakub Kicinski
On Fri, 23 Oct 2020 16:55:33 +0800 Xu Wang wrote: > Remove unnecessary cast in the argument to kfree. > > Signed-off-by: Xu Wang Applied.

Re: checkpatch.pl broke in net-next

2020-10-27 Thread Jacob Keller
On 10/27/2020 4:03 PM, Jakub Kicinski wrote: > On Tue, 27 Oct 2020 15:56:35 -0700 Jacob Keller wrote: >> Hi Jakub, >> >> It looks like net-next just pulled in a change to checkpatch.pl which >> causes it to break: >> >> $ ./scripts/checkpatch.pl >> Global symbol "$gitroot" requires explicit pack

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

2020-10-27 Thread Daniel Borkmann
On 10/27/20 9:57 PM, Ard Biesheuvel wrote: 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 causing trouble on

Re: checkpatch.pl broke in net-next

2020-10-27 Thread Jakub Kicinski
On Tue, 27 Oct 2020 15:56:35 -0700 Jacob Keller wrote: > Hi Jakub, > > It looks like net-next just pulled in a change to checkpatch.pl which > causes it to break: > > $ ./scripts/checkpatch.pl > Global symbol "$gitroot" requires explicit package name (did you forget > to declare "my $gitroot"?) a

[PATCH net-next 04/15] net: mlx5: Replace in_irq() usage.

2020-10-27 Thread Sebastian Andrzej Siewior
mlx5_eq_async_int() uses in_irq() to decide whether eq::lock needs to be acquired and released with spin_[un]lock() or the irq saving/restoring variants. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be

[PATCH net-next 14/15] net: dpaa: Replace in_irq() usage.

2020-10-27 Thread Sebastian Andrzej Siewior
The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI scheduling is required or packet processing. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed

checkpatch.pl broke in net-next

2020-10-27 Thread Jacob Keller
Hi Jakub, It looks like net-next just pulled in a change to checkpatch.pl which causes it to break: $ ./scripts/checkpatch.pl Global symbol "$gitroot" requires explicit package name (did you forget to declare "my $gitroot"?) at ./scripts/checkpatch.pl line 980. Execution of ./scripts/checkpatch.p

[PATCH net-next 10/15] net: zd1211rw: Remove in_atomic() usage.

2020-10-27 Thread Sebastian Andrzej Siewior
The usage of in_atomic() in driver code is deprecated as it can not always detect all states where it is not allowed to sleep. All callers are in premptible thread context and all functions invoke core functions which have checks for invalid calling contexts already. Signed-off-by: Sebastian Andr

[PATCH net-next 12/15] net: rtlwifi: Remove in_interrupt() usage in halbtc_send_bt_mp_operation()

2020-10-27 Thread Sebastian Andrzej Siewior
halbtc_send_bt_mp_operation() uses in_interrupt() to determine if it is safe to invoke wait_for_completion(). The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveye

[PATCH net-next 11/15] net: rtlwifi: Remove in_interrupt() usage in is_any_client_connect_to_ap().

2020-10-27 Thread Sebastian Andrzej Siewior
is_any_client_connect_to_ap() is using in_interrupt() to determine whether it should acquire the lock prior accessing the list. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the

[PATCH net-next 15/15] crypto: caam: Replace in_irq() usage.

2020-10-27 Thread Sebastian Andrzej Siewior
The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI scheduling is required or packet processing. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed

[PATCH net-next 13/15] soc/fsl/qbman: Add an argument to signal if NAPI processing is required.

2020-10-27 Thread Sebastian Andrzej Siewior
dpaa_eth_napi_schedule() and caam_qi_napi_schedule() schedule NAPI if invoked from: - Hard interrupt context - Any context which is not serving soft interrupts Any context which is not serving soft interrupts includes hard interrupts so the in_irq() check is redundant. caam_qi_napi_schedule() h

[PATCH net-next 06/15] net: airo: Invoke airo_read_wireless_stats() directly

2020-10-27 Thread Sebastian Andrzej Siewior
airo_get_wireless_stats() is the iw_handler_if::get_wireless_stats() callback of this driver. This callback was not allowed to sleep until commit a160ee69c6a46 ("wext: let get_wireless_stats() sleep") in v2.6.32. airo still delegates the readout to a thread, which is not longer necessary. Invoke

[PATCH net-next 09/15] net: hostap: Remove in_atomic() check.

2020-10-27 Thread Sebastian Andrzej Siewior
hostap_get_wireless_stats() is the iw_handler_if::get_wireless_stats() callback of this driver. This callback was not allowed to sleep until commit a160ee69c6a46 ("wext: let get_wireless_stats() sleep") in v2.6.32. Remove the therefore pointless in_atomic() check. Signed-off-by: Sebastian Andrzej

[PATCH net-next 08/15] net: airo: Replace in_atomic() usage.

2020-10-27 Thread Sebastian Andrzej Siewior
issuecommand() is using in_atomic() to decide if it is safe to invoke schedule() while waiting for the command to be accepted. Usage of in_atomic() for this is only half correct as it can not detect all condition where it is not allowed to schedule(). Also Linus clearly requested that code which c

[PATCH net-next 07/15] net: airo: Always use JOB_STATS and JOB_EVENT

2020-10-27 Thread Sebastian Andrzej Siewior
issuecommand() is using in_atomic() to decide if it is safe to invoke schedule() while waiting for the command to be accepted. Usage of in_atomic() for this is only half correct as it can not detect all condition where it is not allowed to schedule(). Also Linus clearly requested that code which c

Re: [PATCH bpf v2] bpf: zero-fill re-used per-cpu map element

2020-10-27 Thread Andrii Nakryiko
On Tue, Oct 27, 2020 at 3:15 PM David Verbeiren wrote: > > Zero-fill element values for all other cpus than current, just as > when not using prealloc. This is the only way the bpf program can > ensure known initial values for all cpus ('onallcpus' cannot be > set when coming from the bpf program)

[PATCH net-next 00/15] in_interrupt() cleanup, part 2

2020-10-27 Thread Sebastian Andrzej Siewior
Folks, in the discussion about preempt count consistency across kernel configurations: https://lore.kernel.org/r/20200914204209.256266...@linutronix.de/ Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so th

[PATCH net-next 01/15] net: orinoco: Remove BUG_ON(in_interrupt/irq())

2020-10-27 Thread Sebastian Andrzej Siewior
The usage of in_irq()/in_interrupt() in drivers is phased out and the BUG_ON()'s based on those are not covering all contexts in which these functions cannot be called. Aside of that BUG_ON() should only be used as last resort, which is clearly not the case here. A broad variety of checks in the

[PATCH net-next 05/15] net: tlan: Replace in_irq() usage

2020-10-27 Thread Sebastian Andrzej Siewior
The driver uses in_irq() to determine if the tlan_priv::lock has to be acquired in tlan_mii_read_reg() and tlan_mii_write_reg(). The interrupt handler acquires the lock outside of these functions so the in_irq() check is meant to prevent a lock recursion deadlock. But this check is incorrect when

[PATCH net-next 03/15] net: forcedeth: Replace context and lock check with a lockdep_assert()

2020-10-27 Thread Sebastian Andrzej Siewior
nv_update_stats() triggers a WARN_ON() when invoked from hard interrupt context because the locks in use are not hard interrupt safe. It also has an assert_spin_locked() which was the lock check before the lockdep era. Lockdep has way broader locking correctness checks and covers both issues, so r

[PATCH net-next 02/15] net: neterion: s2io: Replace in_interrupt() for context detection

2020-10-27 Thread Sebastian Andrzej Siewior
wait_for_cmd_complete() uses in_interrupt() to detect whether it is safe to sleep or not. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument pas

Re: [PATCH net] mptcp: add missing memory scheduling in the rx path

2020-10-27 Thread Mat Martineau
On Tue, 27 Oct 2020, Paolo Abeni wrote: When moving the skbs from the subflow into the msk receive queue, we must schedule there the required amount of memory. Try to borrow the required memory from the subflow, if needed, so that we leverage the existing TCP heuristic. Fixes: 6771bfd9ee24 ("m

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Andrew Lunn
Hi Tobias > All LAG configuration is cached in `struct dsa_lag`s. I realize that > the standard M.O. of DSA is to read back information from hardware > when required. With LAGs this becomes very tricky though. For example, > the change of a link state on one switch will require re-balancing of > L

Re: [RFC PATCH net-next] net: use a dedicated tracepoint for kfree_skb_list()

2020-10-27 Thread Marcelo Ricardo Leitner
On Fri, Oct 23, 2020 at 10:52:14PM +0200, Davide Caratti wrote: > kfree_skb_list() calls kfree_skb(), thus triggering as many dropwatch > events as the number of skbs in the list. This can disturb the analysis > of packet drops, e.g. with fragmented echo requests generated by ICMP > sockets, or wit

Re: [PATCH v2 1/1] powerpc/vnic: Extend "failover pending" window

2020-10-27 Thread ljp
On 2020-10-23 19:02, Sukadev Bhattiprolu wrote: Lijun Pan [l...@linux.vnet.ibm.com] wrote: On Oct 19, 2020, at 2:52 PM, Sukadev Bhattiprolu <[1]suka...@linux.ibm.com> wrote: From 67f8977f636e462a1cd1eadb28edd98ef4f2b756 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu <[2]suka..

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Vladimir Oltean
On Tue, Oct 27, 2020 at 09:53:45PM +0100, Tobias Waldekranz wrote: > So all FROM_CPU packets to a given device/port will always travel > through the same set of ports. Ah, this is the part that didn't click for me. For the simple case where you have a multi-CPU port system: S

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

2020-10-27 Thread Ard Biesheuvel
On Tue, 27 Oct 2020 at 23:03, Nick Desaulniers wrote: > > On Tue, Oct 27, 2020 at 2:50 PM Ard Biesheuvel wrote: > > > > On Tue, 27 Oct 2020 at 22:20, Nick Desaulniers > > wrote: > > > > > > On Tue, Oct 27, 2020 at 1:57 PM Ard Biesheuvel wrote: > > > > > > > > diff --git a/include/linux/compile

[PATCH bpf v2] bpf: zero-fill re-used per-cpu map element

2020-10-27 Thread David Verbeiren
Zero-fill element values for all other cpus than current, just as when not using prealloc. This is the only way the bpf program can ensure known initial values for all cpus ('onallcpus' cannot be set when coming from the bpf program). The scenario is: bpf program inserts some elements in a per-cpu

[PATCH net v3] ibmvnic: fix ibmvnic_set_mac

2020-10-27 Thread Lijun Pan
Jakub Kicinski brought up a concern in ibmvnic_set_mac(). ibmvnic_set_mac() does this: ether_addr_copy(adapter->mac_addr, addr->sa_data); if (adapter->state != VNIC_PROBED) rc = __ibmvnic_set_mac(netdev, addr->sa_data); So if state == VNIC_PROBED, the user can assi

Re: [PATCH 4/4] net: dsa: mv88e6xxx: Support serdes ports on MV88E6123/6131

2020-10-27 Thread Andrew Lunn
On Tue, Oct 27, 2020 at 08:56:09PM +, Chris Packham wrote: > > On 24/10/20 11:42 am, Andrew Lunn wrote: > >> +int mv88e6123_serdes_get_regs_len(struct mv88e6xxx_chip *chip, int port) > >> +{ > >> + if (mv88e6xxx_serdes_get_lane(chip, port) == 0) > >> + return 0; > >> + > >> + return

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

2020-10-27 Thread Alexander Ovechkin
But ip6_tnl_encap assigns to proto number of outer protocol (i.e. = protocol that encapsulates our original packet). Setting inner_ipproto = to this value makes no sense.=20 For example in case of ipv6 inside MPLS inside fou6 encapsulation we = have following packet structure: +--+ <--

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

2020-10-27 Thread Jakub Kicinski
On Tue, 27 Oct 2020 16:51:14 +0200 Ido Schimmel wrote: > From: Ido Schimmel > > With the ioctl interface, when autoneg is enabled, but without > specifying speed, duplex or link modes, the advertised link modes are > set to the supported link modes by the ethtool user space utility. > With the n

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

2020-10-27 Thread Alexander Ovechkin
> 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 to avoid setting the inner protocol to IPPROTO_MPLS? Currently skb->inner_protocol is used before call of ip6_tnl_xmit. Can you please

Re: [PATCH v2 net] net/sched: act_mpls: Add softdep on mpls_gso.ko

2020-10-27 Thread David Ahern
On 10/27/20 3:39 PM, Guillaume Nault wrote: > On Tue, Oct 27, 2020 at 10:28:29AM -0700, Cong Wang wrote: >> On Mon, Oct 26, 2020 at 4:23 AM Guillaume Nault wrote: >>> >>> TCA_MPLS_ACT_PUSH and TCA_MPLS_ACT_MAC_PUSH might be used on gso >>> packets. Such packets will thus require mpls_gso.ko for se

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

2020-10-27 Thread Ard Biesheuvel
On Tue, 27 Oct 2020 at 22:20, Nick Desaulniers wrote: > > On Tue, Oct 27, 2020 at 1:57 PM Ard Biesheuvel wrote: > > > > Commit 3193c0836f203 ("bpf: Disable GCC -fgcse optimization for > > ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a > > function scope __attribute__((optimiz

Re: [PATCH net-next 01/11] atm: horizon: shut up clang null pointer arithmetic warning

2020-10-27 Thread Xie He
On Tue, Oct 27, 2020 at 6:24 AM Arnd Bergmann wrote: > > Ah, of course. I had looked up the types but mixed up the memmap > and HDW definitions, but then got confused trying to understand the > logic in wr_mem() that operates on bytes but expands them into > multiples of 4. I think wr_mem() doesn

Re: [PATCH v2 net] net/sched: act_mpls: Add softdep on mpls_gso.ko

2020-10-27 Thread Guillaume Nault
On Tue, Oct 27, 2020 at 10:28:29AM -0700, Cong Wang wrote: > On Mon, Oct 26, 2020 at 4:23 AM Guillaume Nault wrote: > > > > TCA_MPLS_ACT_PUSH and TCA_MPLS_ACT_MAC_PUSH might be used on gso > > packets. Such packets will thus require mpls_gso.ko for segmentation. > > Any reason not to call request

Re: [PATCH net 2/2] dpaa_eth: fix the RX headroom size alignment

2020-10-27 Thread Willem de Bruijn
On Tue, Oct 27, 2020 at 11:04 AM Camelia Groza wrote: > > The headroom reserved for received frames needs to be aligned to an > RX specific value. There is currently a discrepancy between the values > used in the Ethernet driver and the values passed to the FMan. > Coincidentally, the resulting al

[RFC] wimax: move out to staging

2020-10-27 Thread Arnd Bergmann
From: Arnd Bergmann There are no known users of this driver as of October 2020, and it will be removed unless someone turns out to still need it in future releases. According to https://en.wikipedia.org/wiki/List_of_WiMAX_networks, there have been many public wimax networks, but it appears that

Re: [PATCH v7 2/2] net: Add mhi-net driver

2020-10-27 Thread Willem de Bruijn
On Tue, Oct 27, 2020 at 4:33 AM Loic Poulain wrote: > > This patch adds a new network driver implementing MHI transport for > network packets. Packets can be in any format, though QMAP (rmnet) > is the usual protocol (flow control + PDN mux). > > It support two MHI devices, IP_HW0 which is, the pa

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-27 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH v7 1/2] bus: mhi: Add mhi_queue_is_full function

2020-10-27 Thread Willem de Bruijn
On Tue, Oct 27, 2020 at 4:33 AM Loic Poulain wrote: > > This function can be used by client driver to determine whether it's > possible to queue new elements in a channel ring. > > Signed-off-by: Loic Poulain > --- > v1->v5: not part of the series > v6: Add this commit, used for stopping TX que

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

2020-10-27 Thread Ard Biesheuvel
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 causing trouble on x86 builds, and was not expected to have any

Re: [PATCH 4/4] net: dsa: mv88e6xxx: Support serdes ports on MV88E6123/6131

2020-10-27 Thread Chris Packham
On 24/10/20 11:42 am, Andrew Lunn wrote: >> +int mv88e6123_serdes_get_regs_len(struct mv88e6xxx_chip *chip, int port) >> +{ >> +if (mv88e6xxx_serdes_get_lane(chip, port) == 0) >> +return 0; >> + >> +return 26 * sizeof(u16); >> +} > Hi Chris > > Where did 26 come from? In the 88

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Tobias Waldekranz
On Tue, Oct 27, 2020 at 22:02, Vladimir Oltean wrote: > On Tue, Oct 27, 2020 at 08:37:58PM +0100, Tobias Waldekranz wrote: >> >> In order for this to work on transmit, we need to add forward offloading >> >> to the bridge so that we can, for example, send one FORWARD from the CPU >> >> to send an

Re: [tipc-discussion] [net v3 1/1] tipc: fix memory leak caused by tipc_buf_append()

2020-10-27 Thread Cong Wang
On Tue, Oct 27, 2020 at 1:09 PM Tung Nguyen wrote: > > Commit ed42989eab57 ("tipc: fix the skb_unshare() in tipc_buf_append()") > replaced skb_unshare() with skb_copy() to not reduce the data reference > counter of the original skb intentionally. This is not the correct > way to handle the cloned

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Vladimir Oltean
On Tue, Oct 27, 2020 at 08:37:58PM +0100, Tobias Waldekranz wrote: > >> In order for this to work on transmit, we need to add forward offloading > >> to the bridge so that we can, for example, send one FORWARD from the CPU > >> to send an ARP broadcast to swp1..4 instead of four FROM_CPUs. [...]

[PATCH] socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled

2020-10-27 Thread Christian Eggers
[ Upstream commit 4e3bbb33e6f36e4b05be1b1b9b02e3dd5aaa3e69 ] SOCK_TSTAMP_NEW (timespec64 instead of timespec) is also used for hardware time stamps (configured via SO_TIMESTAMPING_NEW). User space (ptp4l) first configures hardware time stamping via SO_TIMESTAMPING_NEW which sets SOCK_TSTAMP_NEW.

[PATCH] net: dsa: microchip: fix race condition

2020-10-27 Thread Christian Eggers
[ Upstream commit 8098bd69bc4e925070313b1b95d03510f4f24738 ] Between queuing the delayed work and finishing the setup of the dsa ports, the process may sleep in request_module() (via phy_device_create()) and the queued work may be executed prior to the switch net devices being registered. In ksz_m

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Tobias Waldekranz
On Tue, Oct 27, 2020 at 21:00, Vladimir Oltean wrote: > On Tue, Oct 27, 2020 at 07:25:16PM +0100, Tobias Waldekranz wrote: >> > 1) trunk user ports, with team/bonding controlling it >> > 2) trunk DSA ports, i.e. the ports between switches in a D in DSA setup >> > 3) trunk CPU ports. > [...] >> I t

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Tobias Waldekranz
On Tue, Oct 27, 2020 at 21:04, Vladimir Oltean wrote: > On Tue, Oct 27, 2020 at 07:33:37PM +0100, Marek Behun wrote: >> > In order for this to work on transmit, we need to add forward offloading >> > to the bridge so that we can, for example, send one FORWARD from the CPU >> > to send an ARP broad

Re: [PATCH 6/8] drm: atomic: use krealloc_array()

2020-10-27 Thread Daniel Vetter
On Tue, Oct 27, 2020 at 01:17:23PM +0100, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Use the helper that checks for overflows internally instead of manually > calculating the size of the new array. > > Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Vetter I don't expect

Re: [PATCH v4 1/3] Add support for mv88e6393x family of Marvell.

2020-10-27 Thread kernel test robot
Hi Pavana, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on linux/master v5.10-rc1 next-20201027] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

[PATCH net-next 4/4] net: mlx5: add xdp tx return bulking support

2020-10-27 Thread Lorenzo Bianconi
Convert mlx5 driver to xdp_return_frame_bulk APIs. XDP_REDIRECT (upstream codepath): 8.5Mpps XDP_REDIRECT (upstream codepath + bulking APIs): 10.1Mpps Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Vladimir Oltean
On Tue, Oct 27, 2020 at 07:33:37PM +0100, Marek Behun wrote: > > In order for this to work on transmit, we need to add forward offloading > > to the bridge so that we can, for example, send one FORWARD from the CPU > > to send an ARP broadcast to swp1..4 instead of four FROM_CPUs. > > Wouldn't thi

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

2020-10-27 Thread Lorenzo Bianconi
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/page_pool.h | 26 ++ net/core/page_pool.c| 33 +

[PATCH net-next 3/4] net: mvpp2: add xdp tx return bulking support

2020-10-27 Thread Lorenzo Bianconi
Convert mvpp2 driver to xdp_return_frame_bulk APIs. XDP_REDIRECT (upstream codepath): 1.79Mpps XDP_REDIRECT (upstream codepath + bulking APIs): 1.93Mpps Tested-by: Matteo Croce Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 - 1 file changed, 4 inse

[PATCH net-next 1/4] net: xdp: introduce bulking for xdp tx return path

2020-10-27 Thread Lorenzo Bianconi
Introduce bulking capability in xdp tx return path (XDP_REDIRECT). xdp_return_frame is usually run inside the driver NAPI tx completion loop so it is possible batch it. Current implementation considers only page_pool memory model. Convert mvneta driver to xdp_return_frame_bulk APIs. Suggested-by:

[PATCH net-next 0/4] xdp: introduce bulking for page_pool tx return path

2020-10-27 Thread Lorenzo Bianconi
xdp_return_frame and page_pool_put_page are usually run inside the driver NAPI tx completion loop so it is possible batch them. Introduce bulking capability in xdp tx return path (XDP_REDIRECT). Convert mvneta, mvpp2 and mlx5 drivers to xdp_return_frame_bulk APIs. Lorenzo Bianconi (4): net: xdp:

Re: [RFC bpf-next 13/16] libbpf: Add trampoline batch attach support

2020-10-27 Thread Jiri Olsa
On Mon, Oct 26, 2020 at 04:15:48PM -0700, Andrii Nakryiko wrote: > On Sun, Oct 25, 2020 at 12:12 PM Jiri Olsa wrote: > > > > On Fri, Oct 23, 2020 at 01:09:26PM -0700, Andrii Nakryiko wrote: > > > On Thu, Oct 22, 2020 at 2:03 AM Jiri Olsa wrote: > > > > > > > > Adding trampoline batch attach suppo

[PATCH net-next 09/16] selftests: net: bridge: add test for igmpv3 exc -> allow report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action EXCLUDE (X,Y) ALLOW (A) EXCLUDE (X+A,Y-A) (A)=GMI Signed-off-by: Nikolay Aleksandrov --- .../selftests/net/forwarding/bridge_igmp.sh | 83

[PATCH net-next 08/16] selftests: net: bridge: add test for igmpv3 inc -> to_exclude report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action INCLUDE (A)TO_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B)

[PATCH net-next 05/16] selftests: net: bridge: add tests for igmpv3 is_include and inc -> allow reports

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov First we test is_include/include mode then we build on that with allow effectively achieving: state reportresult action INCLUDE (A)ALLOW (B)INCLUDE (A+B) (B)=GMI Signed-off-by: Nikolay Aleksandrov --- .../selftests

[PATCH net-next 13/16] selftests: net: bridge: add test for igmpv3 inc -> block report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action INCLUDE (A)BLOCK (B) INCLUDE (A) Send Q(G,A*B) Signed-off-by: Nikolay Aleksandrov --- .../selftests/net/forwarding/bridge_igmp.sh | 33

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Vladimir Oltean
On Tue, Oct 27, 2020 at 07:25:16PM +0100, Tobias Waldekranz wrote: > > 1) trunk user ports, with team/bonding controlling it > > 2) trunk DSA ports, i.e. the ports between switches in a D in DSA setup > > 3) trunk CPU ports. [...] > I think that (2) and (3) are essentially the same problem, i.e. cr

[PATCH net-next 15/16] selftests: net: bridge: add test for igmpv3 exclude timeout

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Test that when a group in exclude mode expires it changes mode to include and the blocked entries are deleted. Signed-off-by: Nikolay Aleksandrov --- .../selftests/net/forwarding/bridge_igmp.sh | 49 ++- 1 file changed, 48 insertions(+), 1 deletion(-

[PATCH net-next 02/16] selftests: net: bridge: igmp: add support for packet source address

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Add support for one more argument which specifies the source address to use. It will be later used for IGMPv3 S,G entry testing. Signed-off-by: Nikolay Aleksandrov --- .../testing/selftests/net/forwarding/bridge_igmp.sh | 13 +++-- 1 file changed, 7 insertions

[PATCH net-next 12/16] selftests: net: bridge: add test for igmpv3 exc -> to_exclude report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action EXCLUDE (X,Y) TO_EX (A) EXCLUDE (A-Y,Y*A)(A-X-Y)=Group Timer Delete (X-A)

[PATCH net-next 06/16] selftests: net: bridge: add test for igmpv3 inc -> is_include report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action INCLUDE (A)IS_IN (B) INCLUDE (A+B)(B)=GMI Signed-off-by: Nikolay Aleksandrov --- .../selftests/net/forwarding/bridge_igmp.sh | 25 +

[PATCH net-next 16/16] selftests: net: bridge: add test for igmpv3 *,g auto-add

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov When we have *,G ports in exclude mode and a new S,G,port is added the kernel has to automatically create an S,G entry for each exclude port to get proper forwarding. Signed-off-by: Nikolay Aleksandrov --- .../selftests/net/forwarding/bridge_igmp.sh | 31 +++

[PATCH net-next 14/16] selftests: net: bridge: add test for igmpv3 exc -> block report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action EXCLUDE (X,Y) BLOCK (A) EXCLUDE (X+(A-Y),Y) (A-X-Y)=Group Timer Send Q(G,A-Y) Signed-off-by: Nikolay

[PATCH net-next 10/16] selftests: net: bridge: add test for igmpv3 exc -> is_include report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action EXCLUDE (X,Y) IS_IN (A) EXCLUDE (X+A,Y-A) (A)=GMI Signed-off-by: Nikolay Aleksandrov --- .../selftests/net/forwarding/bridge_igmp.sh | 27 ++

[PATCH net-next 11/16] selftests: net: bridge: add test for igmpv3 exc -> is_exclude report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action EXCLUDE (X,Y) IS_EX (A) EXCLUDE (A-Y,Y*A)(A-X-Y)=GMI Delete (X-A)

[PATCH net-next 03/16] selftests: net: bridge: igmp: check for specific udp ip protocol

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov We have to specifically check for udp protocol in addition to the mac address because in IGMPv3 tests group-specific queries will use the same mac address. Signed-off-by: Nikolay Aleksandrov --- tools/testing/selftests/net/forwarding/bridge_igmp.sh | 2 +- 1 file chan

[PATCH net-next 01/16] selftests: net: bridge: rename current igmp tests to igmpv2

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov To prepare the bridge_igmp.sh for IGMPv3 we need to rename the current test to IGMPv2. Signed-off-by: Nikolay Aleksandrov --- tools/testing/selftests/net/forwarding/bridge_igmp.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tes

[PATCH net-next 00/16] selftests: net: bridge: add tests for IGMPv3

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, This set adds tests for the bridge's new IGMPv3 support. The tests use precooked packets which are sent via mausezahn and the resulting state after each test is checked for proper X,Y sets, (*,G) source list, source list entry timers, (S,G) existence and flags, packe

[PATCH net-next 04/16] selftests: net: bridge: igmp: add IGMPv3 entries' state helpers

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Add helpers which will be used in subsequent tests, they are: - check_sg_entries: check for proper source list and S,G entry existence - check_sg_fwding: check for proper traffic forwarding/blocking - check_sg_state: check for proper blocked/forwarding entry state

[PATCH net-next 07/16] selftests: net: bridge: add test for igmpv3 inc -> is_exclude report

2020-10-27 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The test checks for the following case: state reportresult action INCLUDE (A)IS_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B)

Re: [tipc-discussion] [net v2 1/1] tipc: fix memory leak caused by tipc_buf_append()

2020-10-27 Thread Cong Wang
On Tue, Oct 27, 2020 at 11:21 AM Cong Wang wrote: > > On Mon, Oct 26, 2020 at 3:46 AM Tung Nguyen > wrote: > > > > Commit ed42989eab57 ("fix the skb_unshare() in tipc_buf_append()") > > replaced skb_unshare() with skb_copy() to not reduce the data reference > > counter of the original skb intenti

Re: [RFC PATCH 0/4] net: dsa: link aggregation support

2020-10-27 Thread Marek Behun
> In order for this to work on transmit, we need to add forward offloading > to the bridge so that we can, for example, send one FORWARD from the CPU > to send an ARP broadcast to swp1..4 instead of four FROM_CPUs. Wouldn't this be solved if the CPU master interface was a bonding interface?

[PATCH v3] net: phy: leds: Deduplicate link LED trigger registration

2020-10-27 Thread Andy Shevchenko
Refactor phy_led_trigger_register() and deduplicate its functionality when registering LED trigger for link. Signed-off-by: Andy Shevchenko Reviewed-by: Andrew Lunn --- v3: rebased on top of v5.10-rc1 drivers/net/phy/phy_led_triggers.c | 15 +-- 1 file changed, 5 insertions(+), 10 d

Re: [PATCH v3 RESEND] net: mii: Report advertised link capabilities when autonegotiation is off

2020-10-27 Thread Andrew Lunn
On Tue, Oct 27, 2020 at 12:43:17PM +0100, Łukasz Stelmach wrote: > Unify the set of information returned by mii_ethtool_get_link_ksettings(), > mii_ethtool_gset() and phy_ethtool_ksettings_get(). Make the mii_*() > functions report advertised settings when autonegotiation if disabled. > > Suggeste

  1   2   3   >