1. 26 Jul, 2023 5 commits
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · b57e0d48
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      ice: switchdev bridge offload
      
      Wojciech Drewek says:
      
      Linux bridge provides ability to learn MAC addresses and vlans
      detected on bridge's ports. As a result of this, FDB (forward data base)
      entries are created and they can be offloaded to the HW. By adding
      VF's port representors to the bridge together with the uplink netdev,
      we can learn VF's and link partner's MAC addresses. This is achieved
      by slow/exception-path, where packets that do not match any filters
      (FDB entries in this case) are send to the bridge ports.
      
      Driver keeps track of the netdevs added to the bridge
      by listening for NETDEV_CHANGEUPPER event. We distinguish two types
      of bridge ports: uplink port and VF's representor port. Linux
      bridge always learns src MAC of the packet on rx path. With the
      current slow-path implementation, it means that we will learn
      VF's MAC on port repr (when the VF transmits the packet) and
      link partner's MAC on uplink (when we receive it on uplink from LAN).
      
      The driver is notified about learning of the MAC/VLAN by
      SWITCHDEV_FDB_{ADD|DEL}_TO_DEVICE events. This is followed by creation
      of the HW filter. The direction of the filter is based on port
      type (uplink or VF repr). In case of the uplink, rule forwards
      the packets to the LAN (matching on link partner's MAC). When the
      notification is received on VF repr then the rule forwards the
      packets to the associated VF (matching on VF's MAC).
      
      This approach would not work on its own however. This is because if
      one of the directions is offloaded, then the bridge would not be able
      to learn the other one. If the egress rule is added (learned on uplink)
      then the response from the VF will be sent directly to the LAN.
      The packet will not got through slow-path, it would not be seen on
      VF's port repr. Because of that, the bridge would not learn VF's MAC.
      
      This is solved by introducing guard rule. It prevents forward rule from
      working until the opposite direction is offloaded.
      
      Aging is not fully supported yet, aging time is static for now. The
      follow up submissions will introduce counters that will allow us to
      keep track if the rule is actually being used or not.
      
      A few fixes/changes are needed for this feature to work with ice driver.
      These are introduced in first 5 patches.
      Reviewed-by: default avatarVlad Buslov <vladbu@nvidia.com>
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
        ice: add tracepoints for the switchdev bridge
        ice: implement static version of ageing
        ice: implement bridge port vlan
        ice: Add VLAN FDB support in switchdev mode
        ice: Add guard rule when creating FDB in switchdev
        ice: Switchdev FDB events support
        ice: Implement basic eswitch bridge setup
        ice: Unset src prune on uplink VSI
        ice: Disable vlan pruning for uplink VSI
        ice: Don't tx before switchdev is fully configured
        ice: Prohibit rx mode change in switchdev mode
        ice: Skip adv rules removal upon switchdev release
      ====================
      
      Link: https://lore.kernel.org/r/20230724161152.2177196-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b57e0d48
    • Johannes Zink's avatar
      net: stmmac: correct MAC propagation delay · 20bf98c9
      Johannes Zink authored
      The IEEE1588 Standard specifies that the timestamps of Packets must be
      captured when the PTP message timestamp point (leading edge of first
      octet after the start of frame delimiter) crosses the boundary between
      the node and the network. As the MAC latches the timestamp at an
      internal point, the captured timestamp must be corrected for the
      additional path latency, as described in the publicly available
      datasheet [1].
      
      This patch only corrects for the MAC-Internal delay, which can be read
      out from the MAC_Ingress_Timestamp_Latency register, since the Phy
      framework currently does not support querying the Phy ingress and egress
      latency. The Closs Domain Crossing Circuits errors as indicated in [1]
      are already being accounted in the stmmac_get_tx_hwtstamp() function and
      are not corrected here.
      
      As the Latency varies for different link speeds and MII
      modes of operation, the correction value needs to be updated on each
      link state change.
      
      As the delay also causes a phase shift in the timestamp counter compared
      to the rest of the network, this correction will also reduce phase error
      when generating PPS outputs from the timestamp counter.
      
      [1] i.MX8MP Reference Manual, rev.1 Section 11.7.2.5.3 "Timestamp
      correction"
      Signed-off-by: default avatarJohannes Zink <j.zink@pengutronix.de>
      Link: https://lore.kernel.org/r/20230719-stmmac_correct_mac_delay-v2-1-3366f38ee9a6@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      20bf98c9
    • Russell King (Oracle)'s avatar
      net: mdio_bus: validate "addr" for mdiobus_is_registered_device() · 09bd2d7d
      Russell King (Oracle) authored
      mdiobus_is_registered_device() doesn't checking that "addr" was valid
      before dereferencing bus->mdio_map[]. Extract the code that checks
      this from mdiobus_get_phy(), and use it here as well.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/E1qNxvu-00111m-1V@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      09bd2d7d
    • Alexandra Winter's avatar
      s390/lcs: Remove FDDI option · 8540336a
      Alexandra Winter authored
      The last s390 machine that supported FDDI was z900 ('7th generation',
      released in 2000). The oldest machine generation currently supported by
      the Linux kernel is MARCH_Z10 (released 2008). If there is still a usecase
      for connecting a Linux on s390 instance to a LAN Channel Station (LCS), it
      can only do so via Ethernet.
      
      Randy Dunlap[1] found that LCS over FDDI has never worked, when FDDI
      was compiled as module. Instead of fixing that, remove the FDDI option
      from the lcs driver.
      
      While at it, make the CONFIG_LCS description a bit more helpful.
      
      References:
      [1] https://lore.kernel.org/netdev/20230621213742.8245-1-rdunlap@infradead.org/Signed-off-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
      Acked-by: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230724131546.3597001-1-wintera@linux.ibm.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8540336a
    • Zhengchao Shao's avatar
      net: remove redundant NULL check in remove_xps_queue() · f080864a
      Zhengchao Shao authored
      There are currently two paths that call remove_xps_queue():
      1. __netif_set_xps_queue -> remove_xps_queue
      2. clean_xps_maps -> remove_xps_queue_cpu -> remove_xps_queue
      There is no need to check dev_maps in remove_xps_queue() because
      dev_maps has been checked on these two paths.
      Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
      Link: https://lore.kernel.org/r/20230724023735.2751602-1-shaozhengchao@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f080864a
  2. 25 Jul, 2023 11 commits
  3. 24 Jul, 2023 24 commits