1. 19 Apr, 2024 17 commits
  2. 18 Apr, 2024 23 commits
    • Jakub Kicinski's avatar
      selftests: net: set the exit code correctly in Python tests · 4fa6bd4b
      Jakub Kicinski authored
      Test cases need to exit with non-zero status if they failed,
      we currently don't do that:
      
        # KTAP version 1
        # 1..3
        # # At /root/ksft-net-drv/drivers/net/./ping.py line 18:
        # # Check failed 1 != 2
        # not ok 1 ping.test_v4
        # ok 2 ping.test_v6
        # ok 3 ping.test_tcp
        # # Totals: pass:2 fail:1 xfail:0 xpass:0 skip:0 error:0
        ok 1 selftests: drivers/net: ping.py
        ^^^^
      
      It's a bit tempting to make the exit part of ksft_run(),
      but that only works well for very trivial setups. We can
      revisit this later, if people forget to call ksft_exit().
      
      Link: https://lore.kernel.org/r/20240417231146.2435572-3-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4fa6bd4b
    • Jakub Kicinski's avatar
      selftests: net: fix counting totals when some checks fail · 655614ea
      Jakub Kicinski authored
      Totals currently only pay attention to exceptions, if check fails
      (say ksft_eq()) the test case will be counted as pass:
      
        # At /ksft/drivers/net/./ping.py line 18:
        # Check failed 1 != 2
        not ok 1 ping.test_v4
        ok 2 ping.test_v6
        ok 3 ping.test_tcp
        # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
                  ^^^^^^^^^^^^^
      
      Pay attention to the result.
      
      Fixes: b86761ff ("selftests: net: add scaffolding for Netlink tests in Python")
      Link: https://lore.kernel.org/r/20240417231146.2435572-2-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      655614ea
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 41e3ddb2
      Jakub Kicinski authored
      Cross-merge networking fixes after downstream PR.
      
      Conflicts:
      
      include/trace/events/rpcgss.h
        386f4a73 ("trace: events: cleanup deprecated strncpy uses")
        a4833e3a ("SUNRPC: Fix rpcgss_context trace event acceptor field")
      
      Adjacent changes:
      
      drivers/net/ethernet/intel/ice/ice_tc_lib.c
        2cca35f5 ("ice: Fix checking for unsupported keys on non-tunnel device")
        784feaa6 ("ice: Add support for PFCP hardware offload in switchdev")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      41e3ddb2
    • Linus Torvalds's avatar
      Merge tag 'net-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7586c850
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "A little calmer than usual, probably just the timing of sub-tree PRs.
      
        Including fixes from netfilter.
      
        Current release - regressions:
      
         - inet: bring NLM_DONE out to a separate recv() again, fix user space
           which assumes multiple recv()s will happen and gets blocked forever
      
         - drv: mlx5:
             - restore mistakenly dropped parts in register devlink flow
             - use channel mdev reference instead of global mdev instance for
               coalescing
             - acquire RTNL lock before RQs/SQs activation/deactivation
      
        Previous releases - regressions:
      
         - net: change maximum number of UDP segments to 128, fix virtio
           compatibility with Windows peers
      
         - usb: ax88179_178a: avoid writing the mac address before first
           reading
      
        Previous releases - always broken:
      
         - sched: fix mirred deadlock on device recursion
      
         - netfilter:
             - br_netfilter: skip conntrack input hook for promisc packets
             - fixes removal of duplicate elements in the pipapo set backend
             - various fixes for abort paths and error handling
      
         - af_unix: don't peek OOB data without MSG_OOB
      
         - drv: flower: fix fragment flags handling in multiple drivers
      
         - drv: ravb: fix jumbo frames and packet stats accounting
      
        Misc:
      
         - kselftest_harness: fix Clang warning about zero-length format
      
         - tun: limit printing rate when illegal packet received by tun dev"
      
      * tag 'net-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (46 commits)
        net: ethernet: ti: am65-cpsw-nuss: cleanup DMA Channels before using them
        net: usb: ax88179_178a: avoid writing the mac address before first reading
        net: ravb: Fix RX byte accounting for jumbo packets
        net: ravb: Fix GbEth jumbo packet RX checksum handling
        net: ravb: Allow RX loop to move past DMA mapping errors
        net: ravb: Count packets instead of descriptors in R-Car RX path
        net: ethernet: mtk_eth_soc: fix WED + wifi reset
        net:usb:qmi_wwan: support Rolling modules
        selftests: kselftest_harness: fix Clang warning about zero-length format
        net/sched: Fix mirred deadlock on device recursion
        netfilter: nf_tables: fix memleak in map from abort path
        netfilter: nf_tables: restore set elements when delete set fails
        netfilter: nf_tables: missing iterator type in lookup walk
        s390/ism: Properly fix receive message buffer allocation
        net: dsa: mt7530: fix port mirroring for MT7988 SoC switch
        net: dsa: mt7530: fix mirroring frames received on local port
        tun: limit printing rate when illegal packet received by tun dev
        ice: Fix checking for unsupported keys on non-tunnel device
        ice: tc: allow zero flags in parsing tc flower
        ice: tc: check src_vsi in case of traffic from VF
        ...
      7586c850
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 360a348f
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - use -ENOTSUPP consistently in Intel GPIO drivers
      
       - don't include dt-bindings headers in gpio-swnode code
      
       - add missing of device table to gpio-lpc32xx and fix autoloading
      
      * tag 'gpio-fixes-for-v6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: swnode: Remove wrong header inclusion
        gpio: lpc32xx: fix module autoloading
        gpio: crystalcove: Use -ENOTSUPP consistently
        gpio: wcove: Use -ENOTSUPP consistently
      360a348f
    • Siddharth Vadapalli's avatar
      net: ethernet: ti: am65-cpsw-nuss: cleanup DMA Channels before using them · c24cd679
      Siddharth Vadapalli authored
      The TX and RX DMA Channels used by the driver to exchange data with CPSW
      are not guaranteed to be in a clean state during driver initialization.
      The Bootloader could have used the same DMA Channels without cleaning them
      up in the event of failure. Thus, reset and disable the DMA Channels to
      ensure that they are in a clean state before using them.
      
      Fixes: 93a76530 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
      Reported-by: default avatarSchuyler Patton <spatton@ti.com>
      Signed-off-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
      Reviewed-by: default avatarRoger Quadros <rogerq@kernel.org>
      Link: https://lore.kernel.org/r/20240417095425.2253876-1-s-vadapalli@ti.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c24cd679
    • Jose Ignacio Tornos Martinez's avatar
      net: usb: ax88179_178a: avoid writing the mac address before first reading · 56f78615
      Jose Ignacio Tornos Martinez authored
      After the commit d2689b6a ("net: usb: ax88179_178a: avoid two
      consecutive device resets"), reset operation, in which the default mac
      address from the device is read, is not executed from bind operation and
      the random address, that is pregenerated just in case, is direclty written
      the first time in the device, so the default one from the device is not
      even read. This writing is not dangerous because is volatile and the
      default mac address is not missed.
      
      In order to avoid this and keep the simplification to have only one
      reset and reduce the delays, restore the reset from bind operation and
      remove the reset that is commanded from open operation. The behavior is
      the same but everything is ready for usbnet_probe.
      
      Tested with ASIX AX88179 USB Gigabit Ethernet devices.
      Restore the old behavior for the rest of possible devices because I don't
      have the hardware to test.
      
      cc: stable@vger.kernel.org # 6.6+
      Fixes: d2689b6a ("net: usb: ax88179_178a: avoid two consecutive device resets")
      Reported-by: default avatarJarkko Palviainen <jarkko.palviainen@gmail.com>
      Signed-off-by: default avatarJose Ignacio Tornos Martinez <jtornosm@redhat.com>
      Link: https://lore.kernel.org/r/20240417085524.219532-1-jtornosm@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      56f78615
    • Linus Torvalds's avatar
      Merge tag 'random-6.9-rc5-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random · e4add020
      Linus Torvalds authored
      Pull random number generator fixes from Jason Donenfeld:
      
       - The input subsystem contributes entropy in some places where a
         spinlock is held, but the entropy accounting code only handled
         callers being in an interrupt or non-atomic process context, but not
         atomic process context. We fix this by removing an optimization and
         just calling queue_work() unconditionally.
      
       - Greg accidently sent up a patch not intended for his tree and that
         had been nack'd, so that's now reverted.
      
      * tag 'random-6.9-rc5-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
        Revert "vmgenid: emit uevent when VMGENID updates"
        random: handle creditable entropy from atomic process context
      e4add020
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.9-3' of... · c2d88559
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Ilpo Järvinen:
      
       - amd/pmf: Add SPS notifications quirk (+ quirk support)
      
       - amd/pmf: Lower Smart PC check message severity
      
       - x86/ISST: New HW support
      
       - x86/intel-uncore-freq: Bump minor version to avoid "unsupported" message
      
       - amd/pmc: New BIOS version still needs Spurious IRQ1 quirk
      
      * tag 'platform-drivers-x86-v6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86/amd/pmc: Extend Framework 13 quirk to more BIOSes
        platform/x86/intel-uncore-freq: Increase minor number support
        platform/x86: ISST: Add Granite Rapids-D to HPM CPU list
        platform/x86/amd: pmf: Add quirk for ROG Zephyrus G14
        platform/x86/amd: pmf: Add infrastructure for quirking supported funcs
        platform/x86/amd: pmf: Decrease error message to debug
      c2d88559
    • Jason A. Donenfeld's avatar
      Revert "vmgenid: emit uevent when VMGENID updates" · 3aadf100
      Jason A. Donenfeld authored
      This reverts commit ad6bcdad. I had
      nak'd it, and Greg said on the thread that it links that he wasn't going
      to take it either, especially since it's not his code or his tree, but
      then, seemingly accidentally, it got pushed up some months later, in
      what looks like a mistake, with no further discussion in the linked
      thread. So revert it, since it's clearly not intended.
      
      Fixes: ad6bcdad ("vmgenid: emit uevent when VMGENID updates")
      Cc: stable@vger.kernel.org
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Link: https://lore.kernel.org/r/20230531095119.11202-2-bchalios@amazon.esSigned-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      3aadf100
    • Liang Chen's avatar
      virtio_net: Support RX hash XDP hint · aa37f891
      Liang Chen authored
      The RSS hash report is a feature that's part of the virtio specification.
      Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost
      (still a work in progress as per [1]) support this feature. While the
      capability to obtain the RSS hash has been enabled in the normal path,
      it's currently missing in the XDP path. Therefore, we are introducing
      XDP hints through kfuncs to allow XDP programs to access the RSS hash.
      
      1.
      https://lore.kernel.org/all/20231015141644.260646-1-akihiko.odaki@daynix.com/#rSigned-off-by: default avatarLiang Chen <liangchen.linux@gmail.com>
      Acked-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Reviewed-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Link: https://lore.kernel.org/r/20240417071822.27831-1-liangchen.linux@gmail.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      aa37f891
    • Paolo Abeni's avatar
      Merge tag 'nf-24-04-18' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · ac1a21db
      Paolo Abeni authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      Patch #1 amends a missing spot where the set iterator type is unset.
      	 This is fixing a issue in the previous pull request.
      
      Patch #2 fixes the delete set command abort path by restoring state
               of the elements. Reverse logic for the activate (abort) case
      	 otherwise element state is not restored, this requires to move
      	 the check for active/inactive elements to the set iterator
      	 callback. From the deactivate path, toggle the next generation
      	 bit and from the activate (abort) path, clear the next generation
      	 bitmask.
      
      Patch #3 skips elements already restored by delete set command from the
      	 abort path in case there is a previous delete element command in
      	 the batch. Check for the next generation bit just like it is done
      	 via set iteration to restore maps.
      
      netfilter pull request 24-04-18
      
      * tag 'nf-24-04-18' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nf_tables: fix memleak in map from abort path
        netfilter: nf_tables: restore set elements when delete set fails
        netfilter: nf_tables: missing iterator type in lookup walk
      ====================
      
      Link: https://lore.kernel.org/r/20240418010948.3332346-1-pablo@netfilter.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      ac1a21db
    • Paolo Abeni's avatar
      Merge branch 'net-ipa-header-hygiene' · 576fedf8
      Paolo Abeni authored
      Alex Elder says:
      
      ====================
      net: ipa: header hygiene
      
      The end result of this series is that the list of files included in
      every IPA source file will be maintained in sorted order.  This
      imposes some consistency that was previously not possible.
      
      If an IPA header file requires a symbol or type declared in another
      header, that other header must be included.  E.g., if bool or u32
      type is used in a function declaration in an IPA header file, the
      IPA header must include <linux/types.h>.
      
      If a type used is just a struct or union *pointer* or enum type (and
      no members within these types are needed), then these types only need
      to be *declared* within the header that uses it.
      
      This is sufficient, but in addition, this series removes includes of
      files that aren't necessary, as well as unneeded type declarations.
      ====================
      
      Link: https://lore.kernel.org/r/20240416231018.389520-1-elder@linaro.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      576fedf8
    • Alex Elder's avatar
      net: ipa: sort all includes · 88412277
      Alex Elder authored
      Establish the rule that header files are always included in sorted
      (POSIX local) order.  Standard and private headers are separated by
      a blank line.
      
      Similarly, sort all forward-declarations for structures.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      88412277
    • Alex Elder's avatar
      net: ipa: more include file cleanup · f60e5fb6
      Alex Elder authored
      All of the config data files and all of the register definition
      files (plus a few others) use GSI_EE_AP, which is defined in
      "ipa_version.h".  Include that header where it's needed.
      
      All of the IPA register definition files include "../ipa.h", though
      none of them need anything defined there.  Similarly, all of the GSI
      register definition files include "../gsi.h", but don't need anything
      defined there.  Remove these unnneded includes.
      
      All of the configuration data files include "../gsi.h", though none
      of them need anything defined there, so remove these includes.
      
      Remove other includes of local header files that are not required.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f60e5fb6
    • Alex Elder's avatar
      net: ipa: eliminate unneeded struct declarations · 11606196
      Alex Elder authored
      As definitions in headers have been moved around, some of the
      struct and enum declarations found in header files have become
      no longer necessary and can be removed.  Remove these unneeded
      declarations.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      11606196
    • Alex Elder's avatar
      net: ipa: add some needed struct declarations · 81186959
      Alex Elder authored
      Declare some structure types in a few header files where functions
      declared therein use them:
        - Functions are declared in "gsi_private.h" that use gsi, gsi_ring, and
          gsi_trans structure pointers.
        - A gsi_trans struct pointer is passed to two functions
          declared in "ipa_endpoint.h"
        - In "ipa_interrupt.h", a platform_device pointer is passed in the
          declaration for ipa_interrupt_init().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      81186959
    • Alex Elder's avatar
      net: ipa: include "ipa_interrupt.h" where needed · a53c85f3
      Alex Elder authored
      The IPA structure contains an ipa_interrupt structure pointer, and
      that structure is declared in "ipa.h".  There is no need to include
      "ipa_interrupt.h" in that header file.
      
      Instead, include "ipa_interrupt.h" in the three source files (in
      addition to "ipa_main.c") that actually use the functions that are
      declared there.
      
      Similarly, three files use symbols defined in "ipa_reg.h" but do not
      include that file; include it.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      a53c85f3
    • Alex Elder's avatar
      net: ipa: remove unneeded standard includes · 8c044024
      Alex Elder authored
      Some IPA header files include one or more other standard header
      files despite not directly needing anything defined in the included
      files.  Remove these unnecessary includes.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      8c044024
    • Alex Elder's avatar
      net: ipa: include some standard header files · ff39eefd
      Alex Elder authored
      Some IPA header files use types defined in <linux/types.h>, but do
      not include that file:
        - In "ipa_mem.h", the ipa_mem structure has u16 and u32 fields
        - In "ipa_power.h", ipa_power_retention() takes a bool argument,
          and ipa_core_clock_rate() returns u32
        - In "ipa_version.h", ipa_version_supported() returns bool
      Include it in these files to satisfy their dependencies.
      
      The ipa_qmi structure (defined in "ipa_qmi.h") contains a work
      structure, so include <linux/workqueue.h> in there.
      
      All of the data and register definition files, as well as "reg.h",
      use the ARRAY_SIZE() macro.  Include <linux/array_size.h> everywhere
      it's used.
      
      Similarly, all register definition files (and a few others) use the
      GENMASK() macro, so include <linux/bits.h> to ensure it's defined
      where used.  BIT() becomes available by including this file also.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      ff39eefd
    • Nick Child's avatar
      ibmvnic: Return error code on TX scrq flush fail · 5cb431dc
      Nick Child authored
      In ibmvnic_xmit() if ibmvnic_tx_scrq_flush() returns H_CLOSED then
      it will inform upper level networking functions to disable tx
      queues. H_CLOSED signals that the connection with the vnic server is
      down and a transport event is expected to recover the device.
      
      Previously, ibmvnic_tx_scrq_flush() was hard-coded to return success.
      Therefore, the queues would remain active until ibmvnic_cleanup() is
      called within do_reset().
      
      The problem is that do_reset() depends on the RTNL lock. If several
      ibmvnic devices are resetting then there can be a long wait time until
      the last device can grab the lock. During this time the tx/rx queues
      still appear active to upper level functions.
      
      FYI, we do make a call to netif_carrier_off() outside the RTNL lock but
      its calls to dev_deactivate() are also dependent on the RTNL lock.
      
      As a result, large amounts of retransmissions were observed in a short
      period of time, eventually leading to ETIMEOUT. This was specifically
      seen with HNV devices, likely because of even more RTNL dependencies.
      
      Therefore, ensure the return code of ibmvnic_tx_scrq_flush() is
      propagated to the xmit function to allow for an earlier (and lock-less)
      response to a transport event.
      Signed-off-by: default avatarNick Child <nnac123@linux.ibm.com>
      Link: https://lore.kernel.org/r/20240416164128.387920-1-nnac123@linux.ibm.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      5cb431dc
    • Zheng Li's avatar
      neighbour: guarantee the localhost connections be established successfully... · eabf425b
      Zheng Li authored
      neighbour: guarantee the localhost connections be established successfully even the ARP table is full
      
      Inter-process communication on localhost should be established successfully
      even the ARP table is full, many processes on server machine use the
      localhost to communicate such as command-line interface (CLI),
      servers hope all CLI commands can be executed successfully even the arp
      table is full. Right now CLI commands got timeout when the arp table is
      full. Set the parameter of exempt_from_gc to be true for LOOPBACK net
      device to keep localhost neigh in arp table, not removed by gc.
      
      the steps of reproduced:
      server with "gc_thresh3 = 1024" setting, ping server from more than 1024
      same netmask Lan IPv4 addresses, run "ssh localhost" on console interface,
      then the command will get timeout.
      Signed-off-by: default avatarZheng Li <James.Z.Li@Dell.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/20240416095343.540-1-lizheng043@gmail.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      eabf425b
    • Paolo Abeni's avatar
      Merge branch 'ravb-ethernet-driver-bugfixes' · d10a7f55
      Paolo Abeni authored
      Paul Barker says:
      
      ====================
      ravb Ethernet driver bugfixes
      
      These patches fix bugs found during recent work on the ravb driver.
      
      Patches 1 & 2 affect the R-Car code paths so have been tested on an
      R-Car M3N Salvator-XS board - this is the only R-Car board I currently
      have access to.
      
      Patches 2, 3 & 4 affect the GbEth code paths so have been tested on
      RZ/G2L and RZ/G2UL SMARC EVK boards.
      
      Changes v2->v3:
        * Incorporate feedback from Niklas and add Reviewed-by tag to patch
          "net: ravb: Count packets instead of descriptors in R-Car RX path".
      Changes v1->v2:
        * Fixed typos in commit message of patch
          "net: ravb: Allow RX loop to move past DMA mapping errors".
        * Added Sergey's Reviewed-by tags.
        * Expanded Cc list as Patchwork complained that I had missed people.
        * Trimmed the call trace in accordance with the docs [1] in patch
          "net: ravb: Fix GbEth jumbo packet RX checksum handling".
      
      [1]: https://docs.kernel.org/process/submitting-patches.html#backtraces-in-commit-messages
      ====================
      
      Link: https://lore.kernel.org/r/20240416120254.2620-1-paul.barker.ct@bp.renesas.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      d10a7f55