1. 21 Feb, 2021 2 commits
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 7ddfe9a6
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There are only two left-over remaining non-urgent ARM SoC bug fixes:
      
         - A build fix for the Atmel SAM9 platform to allow building with the
           clang integrated assembler
      
         - A DT fix for ethernet on Intel SoCFPGA, this has been broken since
           it was added in v5.4"
      
      * tag 'arm-fixes-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: at91: use proper asm syntax in pm_suspend
        arm64: dts: agilex: fix phy interface bit shift for gmac1 and gmac2
      7ddfe9a6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 51e6d178
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Here is what we have this merge window:
      
         1) Support SW steering for mlx5 Connect-X6Dx, from Yevgeny Kliteynik.
      
         2) Add RSS multi group support to octeontx2-pf driver, from Geetha
            Sowjanya.
      
         3) Add support for KS8851 PHY. From Marek Vasut.
      
         4) Add support for GarfieldPeak bluetooth controller from Kiran K.
      
         5) Add support for half-duplex tcan4x5x can controllers.
      
         6) Add batch skb rx processing to bcrm63xx_enet, from Sieng Piaw
            Liew.
      
         7) Rework RX port offload infrastructure, particularly wrt, UDP
            tunneling, from Jakub Kicinski.
      
         8) Add BCM72116 PHY support, from Florian Fainelli.
      
         9) Remove Dsa specific notifiers, they are unnecessary. From Vladimir
            Oltean.
      
        10) Add support for picosecond rx delay in dwmac-meson8b chips. From
            Martin Blumenstingl.
      
        11) Support TSO on xfrm interfaces from Eyal Birger.
      
        12) Add support for MP_PRIO to mptcp stack, from Geliang Tang.
      
        13) Support BCM4908 integrated switch, from Rafał Miłecki.
      
        14) Support for directly accessing kernel module variables via module
            BTF info, from Andrii Naryiko.
      
        15) Add DASH (esktop and mobile Architecture for System Hardware)
            support to r8169 driver, from Heiner Kallweit.
      
        16) Add rx vlan filtering to dpaa2-eth, from Ionut-robert Aron.
      
        17) Add support for 100 base0x SFP devices, from Bjarni Jonasson.
      
        18) Support link aggregation in DSA, from Tobias Waldekranz.
      
        19) Support for bitwidse atomics in bpf, from Brendan Jackman.
      
        20) SmartEEE support in at803x driver, from Russell King.
      
        21) Add support for flow based tunneling to GTP, from Pravin B Shelar.
      
        22) Allow arbitrary number of interconnrcts in ipa, from Alex Elder.
      
        23) TLS RX offload for bonding, from Tariq Toukan.
      
        24) RX decap offklload support in mac80211, from Felix Fietkou.
      
        25) devlink health saupport in octeontx2-af, from George Cherian.
      
        26) Add TTL attr to SCM_TIMESTAMP_OPT_STATS, from Yousuk Seung
      
        27) Delegated actionss support in mptcp, from Paolo Abeni.
      
        28) Support receive timestamping when doin zerocopy tcp receive. From
            Arjun Ray.
      
        29) HTB offload support for mlx5, from Maxim Mikityanskiy.
      
        30) UDP GRO forwarding, from Maxim Mikityanskiy.
      
        31) TAPRIO offloading in dsa hellcreek driver, from Kurt Kanzenbach.
      
        32) Weighted random twos choice algorithm for ipvs, from Darby Payne.
      
        33) Fix netdev registration deadlock, from Johannes Berg.
      
        34) Various conversions to new tasklet api, from EmilRenner Berthing.
      
        35) Bulk skb allocations in veth, from Lorenzo Bianconi.
      
        36) New ethtool interface for lane setting, from Danielle Ratson.
      
        37) Offload failiure notifications for routes, from Amit Cohen.
      
        38) BCM4908 support, from Rafał Miłecki.
      
        39) Support several new iwlwifi chips, from Ihab Zhaika.
      
        40) Flow drector support for ipv6 in i40e, from Przemyslaw Patynowski.
      
        41) Support for mhi prrotocols, from Loic Poulain.
      
        42) Optimize bpf program stats.
      
        43) Implement RFC6056, for better port randomization, from Eric
            Dumazet.
      
        44) hsr tag offloading support from George McCollister.
      
        45) Netpoll support in qede, from Bhaskar Upadhaya.
      
        46) 2005/400g speed support in bonding 3ad mode, from Nikolay
            Aleksandrov.
      
        47) Netlink event support in mptcp, from Florian Westphal.
      
        48) Better skbuff caching, from Alexander Lobakin.
      
        49) MRP (Media Redundancy Protocol) offloading in DSA and a few
            drivers, from Horatiu Vultur.
      
        50) mqprio saupport in mvneta, from Maxime Chevallier.
      
        51) Remove of_phy_attach, no longer needed, from Florian Fainelli"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1766 commits)
        octeontx2-pf: Fix otx2_get_fecparam()
        cteontx2-pf: cn10k: Prevent harmless double shift bugs
        net: stmmac: Add PCI bus info to ethtool driver query output
        ptp: ptp_clockmatrix: clean-up - parenthesis around a == b are unnecessary
        ptp: ptp_clockmatrix: Simplify code - remove unnecessary `err` variable.
        ptp: ptp_clockmatrix: Coding style - tighten vertical spacing.
        ptp: ptp_clockmatrix: Clean-up dev_*() messages.
        ptp: ptp_clockmatrix: Remove unused header declarations.
        ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.
        ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.
        net: stmmac: dwmac-sun8i: Add a shutdown callback
        net: stmmac: dwmac-sun8i: Minor probe function cleanup
        net: stmmac: dwmac-sun8i: Use reset_control_reset
        net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check
        net: stmmac: dwmac-sun8i: Return void from PHY unpower
        r8169: use macro pm_ptr
        net: mdio: Remove of_phy_attach()
        net: mscc: ocelot: select PACKING in the Kconfig
        net: re-solve some conflicts after net -> net-next merge
        net: dsa: tag_rtl4_a: Support also egress tags
        ...
      51e6d178
  2. 17 Feb, 2021 24 commits
  3. 16 Feb, 2021 14 commits
    • David S. Miller's avatar
      Merge branch 'broadcom-next' · c544fcb4
      David S. Miller authored
      Robert Hancock says:
      
      ====================
      Broadcom PHY driver updates
      
      Updates to the Broadcom PHY driver related to use with copper SFP modules.
      
      Changed since v3:
      -fixed kerneldoc error
      
      Changed since v2:
      -Create flag for PHY on SFP module and use that rather than accessing
       attached_dev directly in PHY driver
      
      Changed since v1:
      -Reversed conditional to reduce indentation
      -Added missing setting of MII_BCM54XX_AUXCTL_MISC_WREN in
       MII_BCM54XX_AUXCTL_SHDWSEL_MISC register
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c544fcb4
    • Robert Hancock's avatar
      net: phy: broadcom: Do not modify LED configuration for SFP module PHYs · b5d007e2
      Robert Hancock authored
      bcm54xx_config_init was modifying the PHY LED configuration to enable link
      and activity indications. However, some SFP modules (such as Bel-Fuse
      SFP-1GBT-06) have no LEDs but use the LED outputs to control the SFP LOS
      signal, and modifying the LED settings will cause the LOS output to
      malfunction. Skip this configuration for PHYs which are bound to an SFP
      bus.
      Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5d007e2
    • Robert Hancock's avatar
      net: phy: Add is_on_sfp_module flag and phy_on_sfp helper · b834489b
      Robert Hancock authored
      Add a flag and helper function to indicate that a PHY device is part of
      an SFP module, which is set on attach. This can be used by PHY drivers
      to handle SFP-specific quirks or behavior.
      Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b834489b
    • Robert Hancock's avatar
      net: phy: broadcom: Set proper 1000BaseX/SGMII interface mode for BCM54616S · 3afd0218
      Robert Hancock authored
      The default configuration for the BCM54616S PHY may not match the desired
      mode when using 1000BaseX or SGMII interface modes, such as when it is on
      an SFP module. Add code to explicitly set the correct mode using
      programming sequences provided by Bel-Fuse:
      
      https://www.belfuse.com/resources/datasheets/powersolutions/ds-bps-sfp-1gbt-05-series.pdf
      https://www.belfuse.com/resources/datasheets/powersolutions/ds-bps-sfp-1gbt-06-series.pdfSigned-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3afd0218
    • Sven Van Asbroeck's avatar
      lan743x: sync only the received area of an rx ring buffer · 966df6de
      Sven Van Asbroeck authored
      On cpu architectures w/o dma cache snooping, dma_unmap() is a
      is a very expensive operation, because its resulting sync
      needs to invalidate cpu caches.
      
      Increase efficiency/performance by syncing only those sections
      of the lan743x's rx ring buffers that are actually in use.
      Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Reviewed-by: default avatarBryan Whitehead <Bryan.Whitehead@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      966df6de
    • Sven Van Asbroeck's avatar
      lan743x: boost performance on cpu archs w/o dma cache snooping · a8db76d4
      Sven Van Asbroeck authored
      The buffers in the lan743x driver's receive ring are always 9K,
      even when the largest packet that can be received (the mtu) is
      much smaller. This performs particularly badly on cpu archs
      without dma cache snooping (such as ARM): each received packet
      results in a 9K dma_{map|unmap} operation, which is very expensive
      because cpu caches need to be invalidated.
      
      Careful measurement of the driver rx path on armv7 reveals that
      the cpu spends the majority of its time waiting for cache
      invalidation.
      
      Optimize by keeping the rx ring buffer size as close as possible
      to the mtu. This limits the amount of cache that requires
      invalidation.
      
      This optimization would normally force us to re-allocate all
      ring buffers when the mtu is changed - a disruptive event,
      because it can only happen when the network interface is down.
      
      Remove the need to re-allocate all ring buffers by adding support
      for multi-buffer frames. Now any combination of mtu and ring
      buffer size will work. When the mtu changes from mtu1 to mtu2,
      consumed buffers of size mtu1 are lazily replaced by newly
      allocated buffers of size mtu2.
      
      These optimizations double the rx performance on armv7.
      Third parties report 3x rx speedup on armv8.
      
      Tested with iperf3 on a freescale imx6qp + lan7430, both sides
      set to mtu 1500 bytes, measure rx performance:
      
      Before:
      [ ID] Interval           Transfer     Bandwidth       Retr
      [  4]   0.00-20.00  sec   550 MBytes   231 Mbits/sec    0
      After:
      [ ID] Interval           Transfer     Bandwidth       Retr
      [  4]   0.00-20.00  sec  1.33 GBytes   570 Mbits/sec    0
      Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Reviewed-by: default avatarBryan Whitehead <Bryan.Whitehead@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8db76d4
    • Vladimir Oltean's avatar
      net: enetc: fix destroyed phylink dereference during unbind · 3af409ca
      Vladimir Oltean authored
      The following call path suggests that calling unregister_netdev on an
      interface that is up will first bring it down.
      
      enetc_pf_remove
      -> unregister_netdev
         -> unregister_netdevice_queue
            -> unregister_netdevice_many
               -> dev_close_many
                  -> __dev_close_many
                     -> enetc_close
                        -> enetc_stop
                           -> phylink_stop
      
      However, enetc first destroys the phylink instance, then calls
      unregister_netdev. This is already dissimilar to the setup (and error
      path teardown path) from enetc_pf_probe, but more than that, it is buggy
      because it is invalid to call phylink_stop after phylink_destroy.
      
      So let's first unregister the netdev (and let the .ndo_stop events
      consume themselves), then destroy the phylink instance, then free the
      netdev.
      
      Fixes: 71b77a7a ("enetc: Migrate to PHYLINK and PCS_LYNX")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3af409ca
    • David S. Miller's avatar
      Merge branch 'net-mvneta-implement-basic-MQPrio-support' · 80fea53d
      David S. Miller authored
      Maxime Chevallier says:
      
      ====================
      net: mvneta: implement basic MQPrio support
      
      This is V2 for the MQPrio support in mvneta.
      
      This small series adds basic support for mqprio offloading, by having
      the rx queueing mirroring the TCs based on VLAN prio fields.
      
      This was tested on Armada 3700, and proves useful to make sure
      high-priority traffic has a better chance not getting dropped when
      there's lots of packets incoming.
      
      The first patch of the series deals with the per-cpu interrupts on the
      armada 3700. Since they don't work, there were already some patches
      applied to keep all queue mappings to CPU0, but there still were some
      remaining mappings left to be dealt with.
      
      The second patch implements the MQPrio offloading for the receive path.
      
      Changes in V2 :
       - Add a Fixes tag for the first patch
       - Fix some warnings and the xmas tree in the second patch
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80fea53d
    • Maxime Chevallier's avatar
      net: mvneta: Implement mqprio support · 4906887a
      Maxime Chevallier authored
      Implement a basic MQPrio support, inserting rules in RX that translate
      the TC to prio mapping into vlan prio to queues.
      
      The TX logic stays the same as when we don't offload the qdisc.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4906887a
    • Maxime Chevallier's avatar
      net: mvneta: Remove per-cpu queue mapping for Armada 3700 · cf9bf871
      Maxime Chevallier authored
      According to Errata #23 "The per-CPU GbE interrupt is limited to Core
      0", we can't use the per-cpu interrupt mechanism on the Armada 3700
      familly.
      
      This is correctly checked for RSS configuration, but the initial queue
      mapping is still done by having the queues spread across all the CPUs in
      the system, both in the init path and in the cpu_hotplug path.
      
      Fixes: 2636ac3c ("net: mvneta: Add network support for Armada 3700 SoC")
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf9bf871
    • Vlad Buslov's avatar
      net: sched: fix police ext initialization · 396d7f23
      Vlad Buslov authored
      When police action is created by cls API tcf_exts_validate() first
      conditional that calls tcf_action_init_1() directly, the action idr is not
      updated according to latest changes in action API that require caller to
      commit newly created action to idr with tcf_idr_insert_many(). This results
      such action not being accessible through act API and causes crash reported
      by syzbot:
      
      ==================================================================
      BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline]
      BUG: KASAN: null-ptr-deref in atomic_read include/asm-generic/atomic-instrumented.h:27 [inline]
      BUG: KASAN: null-ptr-deref in __tcf_idr_release net/sched/act_api.c:178 [inline]
      BUG: KASAN: null-ptr-deref in tcf_idrinfo_destroy+0x129/0x1d0 net/sched/act_api.c:598
      Read of size 4 at addr 0000000000000010 by task kworker/u4:5/204
      
      CPU: 0 PID: 204 Comm: kworker/u4:5 Not tainted 5.11.0-rc7-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Workqueue: netns cleanup_net
      Call Trace:
       __dump_stack lib/dump_stack.c:79 [inline]
       dump_stack+0x107/0x163 lib/dump_stack.c:120
       __kasan_report mm/kasan/report.c:400 [inline]
       kasan_report.cold+0x5f/0xd5 mm/kasan/report.c:413
       check_memory_region_inline mm/kasan/generic.c:179 [inline]
       check_memory_region+0x13d/0x180 mm/kasan/generic.c:185
       instrument_atomic_read include/linux/instrumented.h:71 [inline]
       atomic_read include/asm-generic/atomic-instrumented.h:27 [inline]
       __tcf_idr_release net/sched/act_api.c:178 [inline]
       tcf_idrinfo_destroy+0x129/0x1d0 net/sched/act_api.c:598
       tc_action_net_exit include/net/act_api.h:151 [inline]
       police_exit_net+0x168/0x360 net/sched/act_police.c:390
       ops_exit_list+0x10d/0x160 net/core/net_namespace.c:190
       cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:604
       process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275
       worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
       kthread+0x3b1/0x4a0 kernel/kthread.c:292
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
      ==================================================================
      Kernel panic - not syncing: panic_on_warn set ...
      CPU: 0 PID: 204 Comm: kworker/u4:5 Tainted: G    B             5.11.0-rc7-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Workqueue: netns cleanup_net
      Call Trace:
       __dump_stack lib/dump_stack.c:79 [inline]
       dump_stack+0x107/0x163 lib/dump_stack.c:120
       panic+0x306/0x73d kernel/panic.c:231
       end_report+0x58/0x5e mm/kasan/report.c:100
       __kasan_report mm/kasan/report.c:403 [inline]
       kasan_report.cold+0x67/0xd5 mm/kasan/report.c:413
       check_memory_region_inline mm/kasan/generic.c:179 [inline]
       check_memory_region+0x13d/0x180 mm/kasan/generic.c:185
       instrument_atomic_read include/linux/instrumented.h:71 [inline]
       atomic_read include/asm-generic/atomic-instrumented.h:27 [inline]
       __tcf_idr_release net/sched/act_api.c:178 [inline]
       tcf_idrinfo_destroy+0x129/0x1d0 net/sched/act_api.c:598
       tc_action_net_exit include/net/act_api.h:151 [inline]
       police_exit_net+0x168/0x360 net/sched/act_police.c:390
       ops_exit_list+0x10d/0x160 net/core/net_namespace.c:190
       cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:604
       process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275
       worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
       kthread+0x3b1/0x4a0 kernel/kthread.c:292
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
      Kernel Offset: disabled
      
      Fix the issue by calling tcf_idr_insert_many() after successful action
      initialization.
      
      Fixes: 0fedc63f ("net_sched: commit action insertions together")
      Reported-by: syzbot+151e3e714d34ae4ce7e8@syzkaller.appspotmail.com
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      396d7f23
    • David S. Miller's avatar
      Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux · 44c32039
      David S. Miller authored
      Saeed Mahameed says:
      ====================
      pull-request: mlx5-next 2021-02-16
      
      The patches in this pr are already submitted and reviewed through the
      netdev and rdma mailing lists.
      
      The series includes mlx5 HW bits and definitions for mlx5 real time clock
      translation and handling in the mlx5 driver clock module to enable and
      support such mode [1]
      
      [1] https://patchwork.kernel.org/project/netdevbpf/patch/20210212223042.449816-7-saeed@kernel.org/
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44c32039
    • Gary Guo's avatar
      drivers: net: xilinx_emaclite: remove arch limitation · 18af77c5
      Gary Guo authored
      The changes made in eccd5403 is enough for xilinx_emaclite to run
      without problem on 64-bit systems. I have tested it on a Xilinx
      FPGA with RV64 softcore. The architecture limitation in Kconfig
      seems no longer necessary.
      
      A small change is included to print address with %lx instead of
      casting to int and print with %x.
      Signed-off-by: default avatarGary Guo <gary@garyguo.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18af77c5
    • David S. Miller's avatar
      Merge branch 'bridge-mrp-Extend-br_mrp_switchdev_' · 43d42e65
      David S. Miller authored
      Horatiu Vulturv says:
      
      ====================
      bridge: mrp: Extend br_mrp_switchdev_*
      
      This patch series extends MRP switchdev to allow the SW to have a better
      understanding if the HW can implement the MRP functionality or it needs
      to help the HW to run it. There are 3 cases:
      - when HW can't implement at all the functionality.
      - when HW can implement a part of the functionality but needs the SW
        implement the rest. For example if it can't detect when it stops
        receiving MRP Test frames but it can copy the MRP frames to CPU to
        allow the SW to determine this.  Another example is generating the MRP
        Test frames. If HW can't do that then the SW is used as backup.
      - when HW can implement completely the functionality.
      
      So, initially the SW tries to offload the entire functionality in HW, if
      that fails it tries offload parts of the functionality in HW and use the
      SW as helper and if also this fails then MRP can't run on this HW.
      
      Based on these new calls, implement the switchdev for Ocelot driver. This
      is an example where the HW can't run completely the functionality but it
      can help the SW to run it, by trapping all MRP frames to CPU.
      
      Also this patch series adds MRP support to DSA and implements the Felix
      driver which just reuse the Ocelot functions. This part was just compiled
      tested because I don't have any HW on which to do the actual tests.
      
      v4:
       - remove ifdef MRP from include/net/switchdev.h
       - move MRP implementation for Ocelot in a different file such that
         Felix driver can use it.
       - extend DSA with MRP support
       - implement MRP support for Felix.
      v3:
       - implement the switchdev calls needed by Ocelot driver.
      v2:
       - fix typos in comments and in commit messages
       - remove some of the comments
       - move repeated code in helper function
       - fix issue when deleting a node when sw_backup was true
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43d42e65