1. Feb 15, 2024
  2. Feb 14, 2024
    • Arnd Bergmann's avatar
      ethernet: cpts: fix function pointer cast warnings · 9b23fceb
      Arnd Bergmann authored
      clang-16 warns about the mismatched prototypes for the devm_* callbacks:
      
      drivers/net/ethernet/ti/cpts.c:691:12: error: cast from 'void (*)(struct clk_hw *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
        691 |                                        (void(*)(void *))clk_hw_unregister_mux,
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      include/linux/device.h:406:34: note: expanded from macro 'devm_add_action_or_reset'
        406 |         __devm_add_action_or_reset(dev, action, data, #action)
            |                                         ^~~~~~
      drivers/net/ethernet/ti/cpts.c:703:12: error: cast from 'void (*)(struct device_node *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
        703 |                                        (void(*)(void *))of_clk_del_provider,
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      include/linux/device.h:406:34: note: expanded from macro 'devm_add_action_or_reset'
        406 |         __devm_add_action_or_reset(dev, action, data, #action)
      
      Use separate helper functions for this instead, using the expected prototypes
      with a void* argument.
      
      Fixes: a3047a81
      
       ("net: ethernet: ti: cpts: add support for ext rftclk selection")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b23fceb
    • Arnd Bergmann's avatar
      bnad: fix work_queue type mismatch · 5d07e432
      Arnd Bergmann authored
      clang-16 warns about a function pointer cast:
      
      drivers/net/ethernet/brocade/bna/bnad.c:1995:4: error: cast from 'void (*)(struct delayed_work *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
       1995 |                         (work_func_t)bnad_tx_cleanup);
      drivers/net/ethernet/brocade/bna/bnad.c:2252:4: error: cast from 'void (*)(void *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
       2252 |                         (work_func_t)(bnad_rx_cleanup));
      
      The problem here is mixing up work_struct and delayed_work, which relies
      the former being the first member of the latter.
      
      Change the code to use consistent types here to address the warning and
      make it more robust against workqueue interface changes.
      
      Side note: the use of a delayed workqueue for cleaning up TX descriptors
      is probably a bad idea since this introduces a noticeable delay. The
      driver currently does not appear to use BQL, but if one wanted to add
      that, this would have to be changed as well.
      
      Fixes: 01b54b14
      
       ("bna: tx rx cleanup fix")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d07e432
    • Dmitry Antipov's avatar
      net: smc: fix spurious error message from __sock_release() · 6cf9ff46
      Dmitry Antipov authored
      Commit 67f562e3 ("net/smc: transfer fasync_list in case of fallback")
      leaves the socket's fasync list pointer within a container socket as well.
      When the latter is destroyed, '__sock_release()' warns about its non-empty
      fasync list, which is a dangling pointer to previously freed fasync list
      of an underlying TCP socket. Fix this spurious warning by nullifying
      fasync list of a container socket.
      
      Fixes: 67f562e3
      
       ("net/smc: transfer fasync_list in case of fallback")
      Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cf9ff46
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · d9a31cda
      David S. Miller authored
      
      
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2024-02-12 (i40e)
      
      This series contains updates to i40e driver only.
      
      Ivan Vecera corrects the looping value used while waiting for queues to
      be disabled as well as an incorrect mask being used for DCB
      configuration.
      
      Maciej resolves an issue related to XDP traffic; removing a double call to
      i40e_pf_rxq_wait() and accounting for XDP rings when stopping rings.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9a31cda
    • Subbaraya Sundeep's avatar
      octeontx2-af: Remove the PF_FUNC validation for NPC transmit rules · 858b3113
      Subbaraya Sundeep authored
      NPC transmit side mcam rules can use the pcifunc (in packet metadata
      added by hardware) of transmitting device for mcam lookup similar to
      the channel of receiving device at receive side.
      The commit 18603683 ("octeontx2-af: Remove channel verification
      while installing MCAM rules") removed the receive side channel
      verification to save hardware MCAM filters while switching packets
      across interfaces but missed removing transmit side checks.
      This patch removes transmit side rules validation.
      
      Fixes: 18603683
      
       ("octeontx2-af: Remove channel verification while installing MCAM rules")
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      858b3113
    • Jakub Kicinski's avatar
      Merge branch 'selftests-net-more-pmtu-sh-fixes' · 1e41f11f
      Jakub Kicinski authored
      Paolo Abeni says:
      
      ====================
      selftests: net: more pmtu.sh fixes
      
      The mentioned test is still flaky, unusally enough in 'fast'
      environments.
      
      Patch 2/2 [try to] address the existing issues, while patch 1/2
      introduces more strict tests for the existing net helpers, to hopefully
      prevent future pain.
      ====================
      
      Link: https://lore.kernel.org/r/cover.1707731086.git.pabeni@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1e41f11f
    • Paolo Abeni's avatar
      selftests: net: more pmtu.sh fixes · 20622dc9
      Paolo Abeni authored
      The netdev CI is reporting failures for the pmtu test:
      
        [  115.929264] br0: port 2(vxlan_a) entered forwarding state
        # 2024/02/08 17:33:22 socat[7871] E bind(7, {AF=10 [0000:0000:0000:0000:0000:0000:0000:0000]:50000}, 28): Address already in use
        # 2024/02/08 17:33:22 socat[7877] E write(7, 0x5598fb6ff000, 8192): Connection refused
        # TEST: IPv6, bridged vxlan4: PMTU exceptions                         [FAIL]
        # File size 0 mismatches exepcted value in locally bridged vxlan test
      
      The root cause is apparently a socket created by a previous iteration
      of the relevant loop still lasting in LAST_ACK state.
      
      Note that even the file size check is racy, the receiver process dumping
      the file could still be running in background
      
      Allow the listener to bound on the same local port via SO_REUSEADDR and
      collect file output file size only after the listener completion.
      
      Fixes: 136a1b43
      
       ("selftests: net: test vxlan pmtu exceptions with tcp")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Link: https://lore.kernel.org/r/4f51c11a1ce7ca7a4dabd926cffff63dadac9ba1.1707731086.git.pabeni@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      20622dc9
    • Paolo Abeni's avatar
      selftests: net: more strict check in net_helper · a71d0908
      Paolo Abeni authored
      The helper waiting for a listener port can match any socket whose
      hexadecimal representation of source or destination addresses
      matches that of the given port.
      
      Additionally, any socket state is accepted.
      
      All the above can let the helper return successfully before the
      relevant listener is actually ready, with unexpected results.
      
      So far I could not find any related failure in the netdev CI, but
      the next patch is going to make the critical event more easily
      reproducible.
      
      Address the issue matching the port hex only vs the relevant socket
      field and additionally checking the socket state for TCP sockets.
      
      Fixes: 3bdd9fd2
      
       ("selftests/net: synchronize udpgro tests' tx and rx connection")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Link: https://lore.kernel.org/r/192b3dbc443d953be32991d1b0ca432bd4c65008.1707731086.git.pabeni@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a71d0908
    • Paolo Abeni's avatar
      selftests: net: cope with slow env in so_txtime.sh test · a7ee79b9
      Paolo Abeni authored
      The mentioned test is failing in slow environments:
      
        # SO_TXTIME ipv4 clock monotonic
        # ./so_txtime: recv: timeout: Resource temporarily unavailable
        not ok 1 selftests: net: so_txtime.sh # exit=1
      
      Tuning the tolerance in the test binary is error-prone and doomed
      to failures is slow-enough environment.
      
      Just resort to suppress any error in such cases. Note to suppress
      them we need first to refactor a bit the code moving it to explicit
      error handling.
      
      Fixes: af5136f9
      
       ("selftests/net: SO_TXTIME with ETF and FQ")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Link: https://lore.kernel.org/r/2142d9ed4b5c5aa07dd1b455779625d91b175373.1707730902.git.pabeni@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a7ee79b9
    • Paolo Abeni's avatar
      selftests: net: cope with slow env in gro.sh test · e58779f4
      Paolo Abeni authored
      The gro self-tests sends the packets to be aggregated with
      multiple write operations.
      
      When running is slow environment, it's hard to guarantee that
      the GRO engine will wait for the last packet in an intended
      train.
      
      The above causes almost deterministic failures in our CI for
      the 'large' test-case.
      
      Address the issue explicitly ignoring failures for such case
      in slow environments (KSFT_MACHINE_SLOW==true).
      
      Fixes: 7d157501
      
       ("selftests/net: GRO coalesce test")
      Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Link: https://lore.kernel.org/r/97d3ba83f5a2bfeb36f6bc0fb76724eb3dafb608.1707729403.git.pabeni@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e58779f4
  3. Feb 13, 2024
  4. Feb 12, 2024