1. 06 Dec, 2022 1 commit
  2. 05 Dec, 2022 6 commits
    • Michael Walle's avatar
      net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet · 343a5d35
      Michael Walle authored
      Rename the temperature sensors macros to match the names in the
      datasheet.
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      343a5d35
    • Diana Wang's avatar
      nfp: add support for multicast filter · de624864
      Diana Wang authored
      Rewrite nfp_net_set_rx_mode() to implement interface to delivery
      mc address and operations to firmware by using general mailbox
      for filtering multicast packets.
      
      The operations include add mc address and delete mc address.
      And the limitation of mc addresses number is 1024 for each net
      device.
      
      User triggers adding mc address by using command below:
      ip maddress add <mc address> dev <interface name>
      
      User triggers deleting mc address by using command below:
      ip maddress del <mc address> dev <interface name>
      Signed-off-by: default avatarDiana Wang <na.wang@corigine.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de624864
    • ye xingchen's avatar
      net: ipa: use sysfs_emit() to instead of scnprintf() · 38db82e2
      ye xingchen authored
      Follow the advice of the Documentation/filesystems/sysfs.rst and show()
      should only use sysfs_emit() or sysfs_emit_at() when formatting the
      value to be returned to user space.
      Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
      Reviewed-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38db82e2
    • David S. Miller's avatar
      Merge tag 'rxrpc-next-20221201-b' of... · 27e521c5
      David S. Miller authored
      Merge tag 'rxrpc-next-20221201-b' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      David Howells says:
      
      ====================
      rxrpc: Increasing SACK size and moving away from softirq, parts 2 & 3
      
      Here are the second and third parts of patches in the process of moving
      rxrpc from doing a lot of its stuff in softirq context to doing it in an
      I/O thread in process context and thereby making it easier to support a
      larger SACK table.
      
      The full description is in the description for the first part[1] which is
      already in net-next.
      
      The second part includes some cleanups, adds some testing and overhauls
      some tracing:
      
       (1) Remove declaration of rxrpc_kernel_call_is_complete() as the
           definition is no longer present.
      
       (2) Remove the knet() and kproto() macros in favour of using tracepoints.
      
       (3) Remove handling of duplicate packets from recvmsg.  The input side
           isn't now going to insert overlapping/duplicate packets into the
           recvmsg queue.
      
       (4) Don't use the rxrpc_conn_parameters struct in the rxrpc_connection or
           rxrpc_bundle structs - rather put the members in directly.
      
       (5) Extract the abort code from a received abort packet right up front
           rather than doing it in multiple places later.
      
       (6) Use enums and symbol lists rather than __builtin_return_address() to
           indicate where a tracepoint was triggered for local, peer, conn, call
           and skbuff tracing.
      
       (7) Add a refcount tracepoint for the rxrpc_bundle struct.
      
       (8) Implement an in-kernel server for the AFS rxperf testing program to
           talk to (enabled by a Kconfig option).
      
      This is tagged as rxrpc-next-20221201-a.
      
      The third part introduces the I/O thread and switches various bits over to
      running there:
      
       (1) Fix call timers and call and connection workqueues to not hold refs on
           the rxrpc_call and rxrpc_connection structs to thereby avoid messy
           cleanup when the last ref is put in softirq mode.
      
       (2) Split input.c so that the call packet processing bits are separate
           from the received packet distribution bits.  Call packet processing
           gets bumped over to the call event handler.
      
       (3) Create a per-local endpoint I/O thread.  Barring some tiny bits that
           still get done in softirq context, all packet reception, processing
           and transmission is done in this thread.  That will allow a load of
           locking to be removed.
      
       (4) Perform packet processing and error processing from the I/O thread.
      
       (5) Provide a mechanism to process call event notifications in the I/O
           thread rather than queuing a work item for that call.
      
       (6) Move data and ACK transmission into the I/O thread.  ACKs can then be
           transmitted at the point they're generated rather than getting
           delegated from softirq context to some process context somewhere.
      
       (7) Move call and local processor event handling into the I/O thread.
      
       (8) Move cwnd degradation to after packets have been transmitted so that
           they don't shorten the window too quickly.
      
      A bunch of simplifications can then be done:
      
       (1) The input_lock is no longer necessary as exclusion is achieved by
           running the code in the I/O thread only.
      
       (2) Don't need to use sk->sk_receive_queue.lock to guard socket state
           changes as the socket mutex should suffice.
      
       (3) Don't take spinlocks in RCU callback functions as they get run in
           softirq context and thus need _bh annotations.
      
       (4) RCU is then no longer needed for the peer's error_targets list.
      
       (5) Simplify the skbuff handling in the receive path by dropping the ref
           in the basic I/O thread loop and getting an extra ref as and when we
           need to queue the packet for recvmsg or another context.
      
       (6) Get the peer address earlier in the input process and pass it to the
           users so that we only do it once.
      
      This is tagged as rxrpc-next-20221201-b.
      
      Changes:
      ========
      ver #2)
       - Added a patch to change four assertions into warnings in rxrpc_read()
         and fixed a checker warning from a __user annotation that should have
         been removed..
       - Change a min() to min_t() in rxperf as PAGE_SIZE doesn't seem to match
         type size_t on i386.
       - Three error handling issues in rxrpc_new_incoming_call():
         - If not DATA or not seq #1, should drop the packet, not abort.
         - Fix a goto that went to the wrong place, dropping a non-held lock.
         - Fix an rcu_read_lock that should've been an unlock.
      Tested-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Tested-by: kafs-testing+fedora36_64checkkafs-build-144@auristor.com
      Link: https://lore.kernel.org/r/166794587113.2389296.16484814996876530222.stgit@warthog.procyon.org.uk/ [1]
      Link: https://lore.kernel.org/r/166982725699.621383.2358362793992993374.stgit@warthog.procyon.org.uk/ # v1
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27e521c5
    • Bhadram Varka's avatar
      net: stmmac: tegra: Add MGBE support · d8ca1137
      Bhadram Varka authored
      Add support for the Multi-Gigabit Ethernet (MGBE/XPCS) IP found on
      NVIDIA Tegra234 SoCs.
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarBhadram Varka <vbhadram@nvidia.com>
      Co-developed-by: default avatarRevanth Kumar Uppala <ruppala@nvidia.com>
      Signed-off-by: default avatarRevanth Kumar Uppala <ruppala@nvidia.com>
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d8ca1137
    • Revanth Kumar Uppala's avatar
      net: stmmac: Power up SERDES after the PHY link · a46e9010
      Revanth Kumar Uppala authored
      The Tegra MGBE ethernet controller requires that the SERDES link is
      powered-up after the PHY link is up, otherwise the link fails to
      become ready following a resume from suspend. Add a variable to indicate
      that the SERDES link must be powered-up after the PHY link.
      Signed-off-by: default avatarRevanth Kumar Uppala <ruppala@nvidia.com>
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a46e9010
  3. 03 Dec, 2022 6 commits
    • David S. Miller's avatar
      Merge branch 'r8169-irq-coalesce' · 32163491
      David S. Miller authored
      Heiner Kallweit says:
      
      ====================
      net: add and use netdev_sw_irq_coalesce_default_on()
      
      There are reports about r8169 not reaching full line speed on certain
      systems (e.g. SBC's) with a 2.5Gbps link.
      There was a time when hardware interrupt coalescing was enabled per
      default, but this was changed due to ASPM-related issues on few systems.
      
      Meanwhile we have sysfs attributes for controlling kind of
      "software interrupt coalescing" on the GRO level. However most distros
      and users don't know about it. So lets set a conservative default for
      both involved parameters. Users can still override the defaults via
      sysfs. Don't enable these settings on the fast ethernet chip versions,
      they are slow enough.
      
      Even with these conservative setting interrupt load on my 1Gbps test
      system reduced significantly.
      
      Follow Jakub's suggestion and put this functionality into net core
      so that other MAC drivers can reuse it.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32163491
    • Heiner Kallweit's avatar
      r8169: enable GRO software interrupt coalescing per default · 42f66a44
      Heiner Kallweit authored
      There are reports about r8169 not reaching full line speed on certain
      systems (e.g. SBC's) with a 2.5Gbps link.
      There was a time when hardware interrupt coalescing was enabled per
      default, but this was changed due to ASPM-related issues on few systems.
      So let's use software interrupt coalescing instead and enable it
      using new function netdev_sw_irq_coalesce_default_on().
      
      Even with these conservative settings interrupt load on my 1Gbps test
      system reduced significantly.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42f66a44
    • Heiner Kallweit's avatar
      net: add netdev_sw_irq_coalesce_default_on() · d9360708
      Heiner Kallweit authored
      Add a helper for drivers wanting to set SW IRQ coalescing
      by default. The related sysfs attributes can be used to
      override the default values.
      
      Follow Jakub's suggestion and put this functionality into
      net core so that drivers wanting to use software interrupt
      coalescing per default don't have to open-code it.
      
      Note that this function needs to be called before the
      netdevice is registered.
      Suggested-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9360708
    • Lorenzo Bianconi's avatar
      net: ethernet: mtk_wed: fix sleep while atomic in mtk_wed_wo_queue_refill · 65e6af6c
      Lorenzo Bianconi authored
      In order to fix the following sleep while atomic bug always alloc pages
      with GFP_ATOMIC in mtk_wed_wo_queue_refill since page_frag_alloc runs in
      spin_lock critical section.
      
      [    9.049719] Hardware name: MediaTek MT7986a RFB (DT)
      [    9.054665] Call trace:
      [    9.057096]  dump_backtrace+0x0/0x154
      [    9.060751]  show_stack+0x14/0x1c
      [    9.064052]  dump_stack_lvl+0x64/0x7c
      [    9.067702]  dump_stack+0x14/0x2c
      [    9.071001]  ___might_sleep+0xec/0x120
      [    9.074736]  __might_sleep+0x4c/0x9c
      [    9.078296]  __alloc_pages+0x184/0x2e4
      [    9.082030]  page_frag_alloc_align+0x98/0x1ac
      [    9.086369]  mtk_wed_wo_queue_refill+0x134/0x234
      [    9.090974]  mtk_wed_wo_init+0x174/0x2c0
      [    9.094881]  mtk_wed_attach+0x7c8/0x7e0
      [    9.098701]  mt7915_mmio_wed_init+0x1f0/0x3a0 [mt7915e]
      [    9.103940]  mt7915_pci_probe+0xec/0x3bc [mt7915e]
      [    9.108727]  pci_device_probe+0xac/0x13c
      [    9.112638]  really_probe.part.0+0x98/0x2f4
      [    9.116807]  __driver_probe_device+0x94/0x13c
      [    9.121147]  driver_probe_device+0x40/0x114
      [    9.125314]  __driver_attach+0x7c/0x180
      [    9.129133]  bus_for_each_dev+0x5c/0x90
      [    9.132953]  driver_attach+0x20/0x2c
      [    9.136513]  bus_add_driver+0x104/0x1fc
      [    9.140333]  driver_register+0x74/0x120
      [    9.144153]  __pci_register_driver+0x40/0x50
      [    9.148407]  mt7915_init+0x5c/0x1000 [mt7915e]
      [    9.152848]  do_one_initcall+0x40/0x25c
      [    9.156669]  do_init_module+0x44/0x230
      [    9.160403]  load_module+0x1f30/0x2750
      [    9.164135]  __do_sys_init_module+0x150/0x200
      [    9.168475]  __arm64_sys_init_module+0x18/0x20
      [    9.172901]  invoke_syscall.constprop.0+0x4c/0xe0
      [    9.177589]  do_el0_svc+0x48/0xe0
      [    9.180889]  el0_svc+0x14/0x50
      [    9.183929]  el0t_64_sync_handler+0x9c/0x120
      [    9.188183]  el0t_64_sync+0x158/0x15c
      
      Fixes: 79968444 ("net: ethernet: mtk_wed: introduce wed wo support")
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Link: https://lore.kernel.org/r/67ca94bdd3d9eaeb86e52b3050fbca0bcf7bb02f.1669908312.git.lorenzo@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      65e6af6c
    • Eric Dumazet's avatar
      tcp: use 2-arg optimal variant of kfree_rcu() · 55fb80d5
      Eric Dumazet authored
      kfree_rcu(1-arg) should be avoided as much as possible,
      since this is only possible from sleepable contexts,
      and incurr extra rcu barriers.
      
      I wish the 1-arg variant of kfree_rcu() would
      get a distinct name, like kfree_rcu_slow()
      to avoid it being abused.
      
      Fixes: 459837b5 ("net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Reviewed-by: default avatarDmitry Safonov <dima@arista.com>
      Link: https://lore.kernel.org/r/20221202052847.2623997-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      55fb80d5
    • Jakub Kicinski's avatar
      Merge tag 'wireless-next-2022-12-02' of... · edd4e25a
      Jakub Kicinski authored
      Merge tag 'wireless-next-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
      
      Kalle Valo says:
      
      ====================
      wireless-next patches for v6.2
      
      Third set of patches for v6.2. mt76 has a new driver for mt7996 Wi-Fi 7
      devices and iwlwifi also got initial Wi-Fi 7 support. Otherwise
      smaller features and fixes.
      
      Major changes:
      
      ath10k
       - store WLAN firmware version in SMEM image table
      
      mt76
       - mt7996: new driver for MediaTek Wi-Fi 7 (802.11be) devices
       - mt7986, mt7915: enable Wireless Ethernet Dispatch (WED) offload support
       - mt7915: add ack signal support
       - mt7915: enable coredump support
       - mt7921: remain_on_channel support
       - mt7921: channel context support
      
      iwlwifi
       - enable Wi-Fi 7 Extremely High Throughput (EHT) PHY capabilities
       - 320 MHz channels support
      
      * tag 'wireless-next-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (144 commits)
        wifi: ath10k: fix QCOM_SMEM dependency
        wifi: mt76: mt7921e: add pci .shutdown() support
        wifi: mt76: mt7915: mmio: fix naming convention
        wifi: mt76: mt7996: add support to configure spatial reuse parameter set
        wifi: mt76: mt7996: enable ack signal support
        wifi: mt76: mt7996: enable use_cts_prot support
        wifi: mt76: mt7915: rely on band_idx of mt76_phy
        wifi: mt76: mt7915: enable per bandwidth power limit support
        wifi: mt76: mt7915: introduce mt7915_get_power_bound()
        mt76: mt7915: Fix PCI device refcount leak in mt7915_pci_init_hif2()
        wifi: mt76: do not send firmware FW_FEATURE_NON_DL region
        wifi: mt76: mt7921: Add missing __packed annotation of struct mt7921_clc
        wifi: mt76: fix coverity overrun-call in mt76_get_txpower()
        wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices
        wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power
        wifi: mt76: mt7915: fix band_idx usage
        wifi: mt76: mt7915: enable .sta_set_txpwr support
        wifi: mt76: mt7915: add basedband Txpower info into debugfs
        wifi: mt76: mt7915: add support to configure spatial reuse parameter set
        wifi: mt76: mt7915: add missing MODULE_PARM_DESC
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20221202214254.D0D3DC433C1@smtp.kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      edd4e25a
  4. 02 Dec, 2022 27 commits