1. 12 Oct, 2023 7 commits
  2. 11 Oct, 2023 26 commits
  3. 10 Oct, 2023 7 commits
    • Rob Herring's avatar
      atm: fore200e: Drop unnecessary of_match_device() · f0107b86
      Rob Herring authored
      It is not necessary to call of_match_device() in probe. If we made it to
      probe, then we've already successfully matched.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20231006214421.339445-1-robh@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f0107b86
    • Paolo Abeni's avatar
      Merge branch 'mlxsw-fix-wformat-truncation-warnings' · 000677f9
      Paolo Abeni authored
      Petr Machata says:
      
      ====================
      mlxsw: Fix -Wformat-truncation warnings
      
      Ido Schimmel writes:
      
      Commit 6d4ab2e9 ("extrawarn: enable format and stringop overflow
      warnings in W=1") enabled format warnings as part of W=1 builds,
      resulting in two new warnings in mlxsw. Fix both and target at net-next
      as the warnings are not indicative of actual bugs.
      ====================
      
      Link: https://lore.kernel.org/r/cover.1696600763.git.petrm@nvidia.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      000677f9
    • Ido Schimmel's avatar
      mlxsw: spectrum_ethtool: Fix -Wformat-truncation warning · 392ce2ab
      Ido Schimmel authored
      Ethtool stats strings cannot be longer than 32 characters
      ('ETH_GSTRING_LEN'), including the terminating null byte. The format
      string '%.29s_%.1d' can exceed this limitation if the per-TC counter
      name exceeds 28 characters. Together with the underscore, the two digits
      of the TC (bounded at 16) and the terminating null byte, more than 32
      characters will be used.
      
      Fix this by bounding the counter name at 28 characters which suppresses
      the following build warning [1]. This does not affect ethtool output
      since the longest counter name does not exceed this limitation.
      
      [1]
      drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c: In function ‘mlxsw_sp_port_get_strings’:
      drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:622:58: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
        622 |                 snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
            |                                                          ^
      In function ‘mlxsw_sp_port_get_tc_strings’,
          inlined from ‘mlxsw_sp_port_get_strings’ at drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:677:4:
      drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:622:17: note: ‘snprintf’ output between 3 and 33 bytes into a destination of size 32
        622 |                 snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        623 |                          mlxsw_sp_port_hw_tc_stats[i].str, tc);
            |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c: In function ‘mlxsw_sp_port_get_strings’:
      drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:622:58: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
        622 |                 snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
            |                                                          ^
      In function ‘mlxsw_sp_port_get_tc_strings’,
          inlined from ‘mlxsw_sp_port_get_strings’ at drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:677:4:
      drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:622:17: note: ‘snprintf’ output between 3 and 33 bytes into a destination of size 32
        622 |                 snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        623 |                          mlxsw_sp_port_hw_tc_stats[i].str, tc);
            |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Simon Horman <horms@kernel.org> # build-tested
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      392ce2ab
    • Ido Schimmel's avatar
      mlxsw: core_thermal: Fix -Wformat-truncation warning · 83b2d81b
      Ido Schimmel authored
      The name of a thermal zone device cannot be longer than 19 characters
      ('THERMAL_NAME_LENGTH - 1'). The format string 'mlxsw-lc%d-gearbox%d'
      can exceed this limitation if the maximum number of line cards and the
      maximum number of gearboxes on each line card cannot be represented
      using a single digit.
      
      This is not the case with current systems nor future ones. Therefore,
      increase the size of the result buffer beyond 'THERMAL_NAME_LENGTH' and
      suppress the following build warning [1].
      
      If this limitation is ever exceeded, we will know about it since the
      thermal core validates the thermal device's name during registration.
      
      [1]
      drivers/net/ethernet/mellanox/mlxsw/core_thermal.c: In function ‘mlxsw_thermal_gearboxes_init.constprop’:
      drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:543:71: error: ‘%d’ directive output may be truncated writing between 1 and 3 bytes into a region of size between 1 and 3
      [-Werror=format-truncation=]
        543 |                 snprintf(tz_name, sizeof(tz_name), "mlxsw-lc%d-gearbox%d",
            |                                                                       ^~
      In function ‘mlxsw_thermal_gearbox_tz_init’,
          inlined from ‘mlxsw_thermal_gearboxes_init.constprop’ at drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:611:9:
      drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:543:52: note: directive argument in the range [1, 255]
        543 |                 snprintf(tz_name, sizeof(tz_name), "mlxsw-lc%d-gearbox%d",
            |                                                    ^~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:543:17: note: ‘snprintf’ output between 19 and 23 bytes into a destination of size 20
        543 |                 snprintf(tz_name, sizeof(tz_name), "mlxsw-lc%d-gearbox%d",
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        544 |                          gearbox_tz->slot_index, gearbox_tz->module + 1);
            |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Simon Horman <horms@kernel.org> # build-tested
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      83b2d81b
    • Oleksij Rempel's avatar
      net: dsa: microchip: Fix uninitialized var in ksz9477_acl_move_entries() · 59fe6517
      Oleksij Rempel authored
      Address an issue in ksz9477_acl_move_entries() where, in the scenario
      (src_idx == dst_idx), ksz9477_validate_and_get_src_count() returns 0,
      leading to usage of uninitialized src_count and dst_count variables,
      which causes undesired behavior as it attempts to move ACL entries
      around.
      
      Fixes: 002841be ("net: dsa: microchip: Add partial ACL support for ksz9477 switches")
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Suggested-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Link: https://lore.kernel.org/r/20231006115822.144152-1-o.rempel@pengutronix.deSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      59fe6517
    • Paolo Abeni's avatar
      Merge branch 'tcp-save-flowlabel-and-use-for-receiver-repathing' · c41a38ef
      Paolo Abeni authored
      David Morley says:
      
      ====================
      tcp: save flowlabel and use for receiver repathing
      
      This patch series stores the last received ipv6 flowlabel. This last
      received flowlabel is then used to help decide whether a packet is
      likely an RTO retransmit or the result of a TLP. This new information
      is used to better inform the flowlabel change decision for data
      receivers.
      ====================
      
      Link: https://lore.kernel.org/r/20231006011841.3558307-1-morleyd.kernel@gmail.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      c41a38ef
    • David Morley's avatar
      tcp: change data receiver flowlabel after one dup · 93946301
      David Morley authored
      This commit changes the data receiver repath behavior to occur after
      receiving a single duplicate. This can help recover ACK connectivity
      quicker if a TLP was sent along a nonworking path.
      
      For instance, consider the case where we have an initially nonworking
      forward path and reverse path and subsequently switch to only working
      forward paths. Before this patch we would have the following behavior.
      
      +---------+--------+--------+----------+----------+----------+
      | Event   | For FL | Rev FL | FP Works | RP Works | Data Del |
      +---------+--------+--------+----------+----------+----------+
      | Initial | A      | 1      | N        | N        | 0        |
      +---------+--------+--------+----------+----------+----------+
      | TLP     | A      | 1      | N        | N        | 0        |
      +---------+--------+--------+----------+----------+----------+
      | RTO 1   | B      | 1      | Y        | N        | 1        |
      +---------+--------+--------+----------+----------+----------+
      | RTO 2   | C      | 1      | Y        | N        | 2        |
      +---------+--------+--------+----------+----------+----------+
      | RTO 3   | D      | 2      | Y        | Y        | 3        |
      +---------+--------+--------+----------+----------+----------+
      
      This patch gets rid of at least RTO 3, avoiding additional unnecessary
      repaths of a working forward path to a (potentially) nonworking one.
      
      In addition, this commit changes the behavior to avoid repathing upon
      rx of duplicate data if the local endpoint is in CA_Loss (in which
      case the RTOs will already be changing the outgoing flowlabel).
      Signed-off-by: default avatarDavid Morley <morleyd@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Tested-by: default avatarDavid Morley <morleyd@google.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      93946301