1. 23 Aug, 2024 3 commits
    • Maxime Chevallier's avatar
      net: phy: Introduce ethernet link topology representation · 38496878
      Maxime Chevallier authored
      Link topologies containing multiple network PHYs attached to the same
      net_device can be found when using a PHY as a media converter for use
      with an SFP connector, on which an SFP transceiver containing a PHY can
      be used.
      
      With the current model, the transceiver's PHY can't be used for
      operations such as cable testing, timestamping, macsec offload, etc.
      
      The reason being that most of the logic for these configuration, coming
      from either ethtool netlink or ioctls tend to use netdev->phydev, which
      in multi-phy systems will reference the PHY closest to the MAC.
      
      Introduce a numbering scheme allowing to enumerate PHY devices that
      belong to any netdev, which can in turn allow userspace to take more
      precise decisions with regard to each PHY's configuration.
      
      The numbering is maintained per-netdev, in a phy_device_list.
      The numbering works similarly to a netdevice's ifindex, with
      identifiers that are only recycled once INT_MAX has been reached.
      
      This prevents races that could occur between PHY listing and SFP
      transceiver removal/insertion.
      
      The identifiers are assigned at phy_attach time, as the numbering
      depends on the netdevice the phy is attached to. The PHY index can be
      re-used for PHYs that are persistent.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Tested-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38496878
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 761d527d
      Jakub Kicinski authored
      Cross-merge networking fixes after downstream PR.
      
      No conflicts.
      
      Adjacent changes:
      
      drivers/net/ethernet/broadcom/bnxt/bnxt.h
        c948c097 ("bnxt_en: Don't clear ntuple filters and rss contexts during ethtool ops")
        f2878cde ("bnxt_en: Add support to call FW to update a VNIC")
      
      Link: https://patch.msgid.link/20240822210125.1542769-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      761d527d
    • Jakub Kicinski's avatar
      Merge branch 'unmask-upper-dscp-bits-part-1' · bfc52dee
      Jakub Kicinski authored
      Ido Schimmel says:
      
      ====================
      Unmask upper DSCP bits - part 1
      
      tl;dr - This patchset starts to unmask the upper DSCP bits in the IPv4
      flow key in preparation for allowing IPv4 FIB rules to match on DSCP.
      No functional changes are expected.
      
      The TOS field in the IPv4 flow key ('flowi4_tos') is used during FIB
      lookup to match against the TOS selector in FIB rules and routes.
      
      It is currently impossible for user space to configure FIB rules that
      match on the DSCP value as the upper DSCP bits are either masked in the
      various call sites that initialize the IPv4 flow key or along the path
      to the FIB core.
      
      In preparation for adding a DSCP selector to IPv4 and IPv6 FIB rules, we
      need to make sure the entire DSCP value is present in the IPv4 flow key.
      This patchset starts to unmask the upper DSCP bits in the various places
      that invoke the core FIB lookup functions directly (patches #1-#7) and
      in the input route path (patches #8-#12). Future patchsets will do the
      same in the output route path.
      
      No functional changes are expected as commit 1fa3314c ("ipv4:
      Centralize TOS matching") moved the masking of the upper DSCP bits to
      the core where 'flowi4_tos' is matched against the TOS selector.
      ====================
      
      Link: https://patch.msgid.link/20240821125251.1571445-1-idosch@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bfc52dee
  2. 22 Aug, 2024 37 commits