1. 01 Jan, 2024 7 commits
    • Maxime Chevallier's avatar
      net: sfp: Add helper to return the SFP bus name · dedd702a
      Maxime Chevallier authored
      Knowing the bus name is helpful when we want to expose the link topology
      to userspace, add a helper to return the SFP bus name.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dedd702a
    • Maxime Chevallier's avatar
      net: phy: add helpers to handle sfp phy connect/disconnect · 034fcc21
      Maxime Chevallier authored
      There are a few PHY drivers that can handle SFP modules through their
      sfp_upstream_ops. Introduce Phylib helpers to keep track of connected
      SFP PHYs in a netdevice's namespace, by adding the SFP PHY to the
      upstream PHY's netdev's namespace.
      
      By doing so, these SFP PHYs can be enumerated and exposed to users,
      which will be able to use their capabilities.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      034fcc21
    • Maxime Chevallier's avatar
      net: sfp: pass the phy_device when disconnecting an sfp module's PHY · 9c5625f5
      Maxime Chevallier authored
      Pass the phy_device as a parameter to the sfp upstream .disconnect_phy
      operation. This is preparatory work to help track phy devices across
      a net_device's link.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c5625f5
    • Maxime Chevallier's avatar
      net: phy: Introduce ethernet link topology representation · 02018c54
      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.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02018c54
    • David S. Miller's avatar
      Merge tag 'nf-next-23-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next · 109bf4cf
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      netfilter pull request 23-12-22
      
      The following patchset contains Netfilter updates for net-next:
      
      1) Add locking for NFT_MSG_GETSETELEM_RESET requests, to address a
         race scenario with two concurrent processes running a dump-and-reset
         which exposes negative counters to userspace, from Phil Sutter.
      
      2) Use GFP_KERNEL in pipapo GC, from Florian Westphal.
      
      3) Reorder nf_flowtable struct members, place the read-mostly parts
         accessed by the datapath first. From Florian Westphal.
      
      4) Set on dead flag for NFT_MSG_NEWSET in abort path,
         from Florian Westphal.
      
      5) Support filtering zone in ctnetlink, from Felix Huettner.
      
      6) Bail out if user tries to redefine an existing chain with different
         type in nf_tables.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      109bf4cf
    • David S. Miller's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 240436c0
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      bpf-next-for-netdev
      The following pull-request contains BPF updates for your *net-next* tree.
      
      We've added 22 non-merge commits during the last 3 day(s) which contain
      a total of 23 files changed, 652 insertions(+), 431 deletions(-).
      
      The main changes are:
      
      1) Add verifier support for annotating user's global BPF subprogram arguments
         with few commonly requested annotations for a better developer experience,
         from Andrii Nakryiko.
      
         These tags are:
           - Ability to annotate a special PTR_TO_CTX argument
           - Ability to annotate a generic PTR_TO_MEM as non-NULL
      
      2) Support BPF verifier tracking of BPF_JNE which helps cases when the compiler
         transforms (unsigned) "a > 0" into "if a == 0 goto xxx" and the like, from
         Menglong Dong.
      
      3) Fix a warning in bpf_mem_cache's check_obj_size() as reported by LKP, from Hou Tao.
      
      4) Re-support uid/gid options when mounting bpffs which had to be reverted with
         the prior token series revert to avoid conflicts, from Daniel Borkmann.
      
      5) Fix a libbpf NULL pointer dereference in bpf_object__collect_prog_relos() found
         from fuzzing the library with malformed ELF files, from Mingyi Zhang.
      
      6) Skip DWARF sections in libbpf's linker sanity check given compiler options to
         generate compressed debug sections can trigger a rejection due to misalignment,
         from Alyssa Ross.
      
      7) Fix an unnecessary use of the comma operator in BPF verifier, from Simon Horman.
      
      8) Fix format specifier for unsigned long values in cpustat sample, from Colin Ian King.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      240436c0
    • Luiz Angelo Daros de Luca's avatar
      net: mdio: get/put device node during (un)registration · cff9c565
      Luiz Angelo Daros de Luca authored
      The __of_mdiobus_register() function was storing the device node in
      dev.of_node without increasing its reference count. It implicitly relied
      on the caller to maintain the allocated node until the mdiobus was
      unregistered.
      
      Now, __of_mdiobus_register() will acquire the node before assigning it,
      and of_mdiobus_unregister_callback() will be called at the end of
      mdio_unregister().
      
      Drivers can now release the node immediately after MDIO registration.
      Some of them are already doing that even before this patch.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cff9c565
  2. 29 Dec, 2023 6 commits
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2023-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 92de776d
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2023-12-20
      
      mlx5 Socket direct support and management PF profile.
      
      Tariq Says:
      ===========
      Support Socket-Direct multi-dev netdev
      
      This series adds support for combining multiple devices (PFs) of the
      same port under one netdev instance. Passing traffic through different
      devices belonging to different NUMA sockets saves cross-numa traffic and
      allows apps running on the same netdev from different numas to still
      feel a sense of proximity to the device and achieve improved
      performance.
      
      We achieve this by grouping PFs together, and creating the netdev only
      once all group members are probed. Symmetrically, we destroy the netdev
      once any of the PFs is removed.
      
      The channels are distributed between all devices, a proper configuration
      would utilize the correct close numa when working on a certain app/cpu.
      
      We pick one device to be a primary (leader), and it fills a special
      role.  The other devices (secondaries) are disconnected from the network
      in the chip level (set to silent mode). All RX/TX traffic is steered
      through the primary to/from the secondaries.
      
      Currently, we limit the support to PFs only, and up to two devices
      (sockets).
      
      ===========
      
      Armen Says:
      ===========
      Management PF support and module integration
      
      This patch rolls out comprehensive support for the Management Physical
      Function (MGMT PF) within the mlx5 driver. It involves updating the
      mlx5 interface header to introduce necessary definitions for MGMT PF
      and adding a new management PF netdev profile, which will allow the host
      side to communicate with the embedded linux on Blue-field devices.
      
      ===========
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      92de776d
    • Ido Schimmel's avatar
      genetlink: Use internal flags for multicast groups · cd4d7263
      Ido Schimmel authored
      As explained in commit e0378187 ("drop_monitor: Require
      'CAP_SYS_ADMIN' when joining "events" group"), the "flags" field in the
      multicast group structure reuses uAPI flags despite the field not being
      exposed to user space. This makes it impossible to extend its use
      without adding new uAPI flags, which is inappropriate for internal
      kernel checks.
      
      Solve this by adding internal flags (i.e., "GENL_MCAST_*") and convert
      the existing users to use them instead of the uAPI flags.
      
      Tested using the reproducers in commit 44ec98ea ("psample: Require
      'CAP_NET_ADMIN' when joining "packets" group") and commit e0378187
      ("drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group").
      
      No functional changes intended.
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarMat Martineau <martineau@kernel.org>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd4d7263
    • Greg Kroah-Hartman's avatar
      iucv: make iucv_bus const · f732ba4a
      Greg Kroah-Hartman authored
      Now that the driver core can properly handle constant struct bus_type,
      move the iucv_bus variable to be a constant structure as well, placing
      it into read-only memory which can not be modified at runtime.
      
      Cc: Wenjia Zhang <wenjia@linux.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: linux-s390@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f732ba4a
    • Jonathan Corbet's avatar
      ethtool: reformat kerneldoc for struct ethtool_fec_stats · 1271ca00
      Jonathan Corbet authored
      The kerneldoc comment for struct ethtool_fec_stats attempts to describe the
      "total" and "lanes" fields of the ethtool_fec_stat substructure in a way
      leading to these warnings:
      
        ./include/linux/ethtool.h:424: warning: Excess struct member 'lane' description in 'ethtool_fec_stats'
        ./include/linux/ethtool.h:424: warning: Excess struct member 'total' description in 'ethtool_fec_stats'
      
      Reformat the comment to retain the information while eliminating the
      warnings.
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1271ca00
    • Jonathan Corbet's avatar
      ethtool: reformat kerneldoc for struct ethtool_link_settings · d0c3891d
      Jonathan Corbet authored
      The kernel doc comments for struct ethtool_link_settings includes
      documentation for three fields that were never present there, leading to
      these docs-build warnings:
      
        ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'supported' description in 'ethtool_link_settings'
        ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'advertising' description in 'ethtool_link_settings'
        ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'lp_advertising' description in 'ethtool_link_settings'
      
      Remove the entries to make the warnings go away.  There was some
      information there on how data in >link_mode_masks is formatted; move that
      to the body of the comment to preserve it.
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0c3891d
    • Jonathan Corbet's avatar
      net: sock: remove excess structure-member documentation · 144377c3
      Jonathan Corbet authored
      Remove a couple of kerneldoc entries for struct members that do not exist,
      addressing these warnings:
      
        ./include/net/sock.h:548: warning: Excess struct member '__sk_flags_offset' description in 'sock'
        ./include/net/sock.h:548: warning: Excess struct member 'sk_padding' description in 'sock'
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      144377c3
  3. 27 Dec, 2023 11 commits
  4. 26 Dec, 2023 16 commits