1. 22 Jun, 2023 11 commits
  2. 21 Jun, 2023 29 commits
    • renmingshuai's avatar
      selftests: tc-testing: add one test for flushing explicitly created chain · ca4fa874
      renmingshuai authored
      Add the test for additional reference to chains that are explicitly
      created by RTM_NEWCHAIN message.
      
      The test result:
      
       1..1
       ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0
        filter of the chain
      
      This is a follow up to commit c9a82bec ("net/sched: cls_api: Fix lockup on flushing explicitly created chain").
      Signed-off-by: default avatarMingshuai Ren <renmingshuai@huawei.com>
      Acked-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Acked-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Link: https://lore.kernel.org/r/20230620014939.2034054-1-renmingshuai@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ca4fa874
    • Krzysztof Kozlowski's avatar
      dt-bindings: net: micrel,ks8851: allow SPI device properties · 1ca09f57
      Krzysztof Kozlowski authored
      The Micrel KS8851 can be attached to SPI or parallel bus and the
      difference is expressed in compatibles.  Allow common SPI properties
      when this is a SPI variant and narrow the parallel memory bus properties
      to the second case.
      
      This fixes dtbs_check warning:
      
        qcom-msm8960-cdp.dtb: ethernet@0: Unevaluated properties are not allowed ('spi-max-frequency' was unexpected)
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Link: https://lore.kernel.org/r/20230619170134.65395-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1ca09f57
    • Krzysztof Kozlowski's avatar
      dt-bindings: net: bluetooth: qualcomm: document VDD_CH1 · 6a0a6dd8
      Krzysztof Kozlowski authored
      WCN3990 comes with two chains - CH0 and CH1 - where each takes VDD
      regulator.  It seems VDD_CH1 is optional (Linux driver does not care
      about it), so document it to fix dtbs_check warnings like:
      
        sdm850-lenovo-yoga-c630.dtb: bluetooth: 'vddch1-supply' does not match any of the regexes: 'pinctrl-[0-9]+'
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Link: https://lore.kernel.org/r/20230617165716.279857-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6a0a6dd8
    • Ravi Gunasekaran's avatar
      net: hsr: Disable promiscuous mode in offload mode · e748d0fd
      Ravi Gunasekaran authored
      When port-to-port forwarding for interfaces in HSR node is enabled,
      disable promiscuous mode since L2 frame forward happens at the
      offloaded hardware.
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230614114710.31400-1-r-gunasekaran@ti.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e748d0fd
    • Jakub Kicinski's avatar
      Merge branch 'leds-trigger-netdev-add-additional-modes' · ff9b63c8
      Jakub Kicinski authored
      Christian Marangi says:
      
      ====================
      leds: trigger: netdev: add additional modes
      
      This is a continue of [1]. It was decided to take a more gradual
      approach to implement LEDs support for switch and phy starting with
      basic support and then implementing the hw control part when we have all
      the prereq done.
      
      This should be the final part for the netdev trigger.
      I added net-next tag and added netdev mailing list since I was informed
      that this should be merged with netdev branch.
      
      We collect some info around and we found a good set of modes that are
      common in almost all the PHY and Switch.
      
      These modes are:
      - Modes for dedicated link speed(10, 100, 1000 mbps). Additional mode
        can be added later following this example.
      - Modes for half and full duplex.
      
      The original idea was to add hw control only modes.
      While the concept makes sense in practice it would results in lots of
      additional code and extra check to make sure we are setting correct modes.
      
      With the suggestion from Andrew it was pointed out that using the ethtool
      APIs we can actually get the current link speed and duplex and this
      effectively removed the problem of having hw control only modes since we
      can fallback to software.
      
      Since these modes are supported by software, we can skip providing an
      user for this in the LED driver to support hw control for these new modes
      (that will come right after this is merged) and prevent this to be another
      multi subsystem series.
      
      For link speed and duplex we use ethtool APIs.
      
      To call ethtool APIs, rtnl lock is needed but this can be skipped on
      handling netdev events as the lock is already held.
      
      [1] https://lore.kernel.org/lkml/20230216013230.22978-1-ansuelsmth@gmail.com/
      ====================
      
      Link: https://lore.kernel.org/r/20230619204700.6665-1-ansuelsmth@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ff9b63c8
    • Christian Marangi's avatar
      leds: trigger: netdev: expose hw_control status via sysfs · b655892f
      Christian Marangi authored
      Expose hw_control status via sysfs for the netdev trigger to give
      userspace better understanding of the current state of the trigger and
      the LED.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
      Acked-by: default avatarLee Jones <lee@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b655892f
    • Christian Marangi's avatar
      leds: trigger: netdev: add additional specific link duplex mode · f22f95b9
      Christian Marangi authored
      Add additional modes for specific link duplex. Use ethtool APIs to get the
      current link duplex and enable the LED accordingly. Under netdev event
      handler the rtnl lock is already held and is not needed to be set to
      access ethtool APIs.
      
      This is especially useful for PHY and Switch that supports LEDs hw
      control for specific link duplex.
      
      Add additional modes:
      - half_duplex: Turn on LED when link is half duplex
      - full_duplex: Turn on LED when link is full duplex
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Acked-by: default avatarLee Jones <lee@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f22f95b9
    • Christian Marangi's avatar
      leds: trigger: netdev: add additional specific link speed mode · d5e01266
      Christian Marangi authored
      Add additional modes for specific link speed. Use ethtool APIs to get the
      current link speed and enable the LED accordingly. Under netdev event
      handler the rtnl lock is already held and is not needed to be set to
      access ethtool APIs.
      
      This is especially useful for PHY and Switch that supports LEDs hw
      control for specific link speed. (example scenario a PHY that have 2 LED
      connected one green and one orange where the green is turned on with
      1000mbps speed and orange is turned on with 10mpbs speed)
      
      On mode set from sysfs we check if we have enabled split link speed mode
      and reject enabling generic link mode to prevent wrong and redundant
      configuration.
      
      Rework logic on the set baseline state to support these new modes to
      select if we need to turn on or off the LED.
      
      Add additional modes:
      - link_10: Turn on LED when link speed is 10mbps
      - link_100: Turn on LED when link speed is 100mbps
      - link_1000: Turn on LED when link speed is 1000mbps
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Acked-by: default avatarLee Jones <lee@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d5e01266
    • Ivan Vecera's avatar
      bnxt_en: Link representors to PCI device · 7ad7b702
      Ivan Vecera authored
      Link VF representors to parent PCI device to benefit from
      systemd defined naming scheme.
      
      Without this change the representor is visible as ethN.
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Link: https://lore.kernel.org/r/20230620144855.288443-1-ivecera@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7ad7b702
    • Jakub Kicinski's avatar
      Merge branch 'selftests-preparations-for-out-of-order-operations-patches-in-mlxsw' · f31b6c64
      Jakub Kicinski authored
      Petr Machata says:
      
      ====================
      selftests: Preparations for out-of-order-operations patches in mlxsw
      
      The mlxsw driver currently makes the assumption that the user applies
      configuration in a bottom-up manner. Thus netdevices need to be added to
      the bridge before IP addresses are configured on that bridge or SVI added
      on top of it. Enslaving a netdevice to another netdevice that already has
      uppers is in fact forbidden by mlxsw for this reason. Despite this safety,
      it is rather easy to get into situations where the offloaded configuration
      is just plain wrong.
      
      Over the course of the following several patchsets, mlxsw code is going to
      be adjusted to diminish the space of wrongly offloaded configurations.
      Ideally the offload state will reflect the actual state, regardless of the
      sequence of operation used to construct that state.
      
      Several selftests build configurations that will not be offloadable in the
      future on some systems. The reason is that what will get offloaded is the
      actual configuration, not the configuration steps.
      
      For example, when a port is added to a bridge that has an IP address, that
      bridge will get a RIF, which it would not have with the current code. But
      on Nvidia Spectrum-1 machines, MAC addresses of all RIFs need to have the
      same prefix, which the bridge will violate. The RIF thus couldn't be
      created, and the enslavement is therefore canceled, because it would lead
      to an unoffloadable configuration. This breaks some selftests.
      
      In this patchset, adjust selftests to avoid the configurations that mlxsw
      would be incapable of offloading, while maintaining relevance with regards
      to the feature that is being tested. There are generally two cases of
      fixes:
      
      - Disabling IPv6 autogen on bridges that do not participate in routing,
        either because of the abovementioned requirement to keep the same MAC
        prefix on all in-HW router interfaces, or, on 802.1ad bridges, because
        in-HW router interfaces are not supported at all.
      
      - Setting the bridge MAC address to what it will become after the first
        member port is attached, so that the in-HW router interface is created
        with a supported MAC address.
      
      The patchset is then split thus:
      
      - Patches #1-#7 adjust generic selftests
      - Patches #8-#16 adjust mlxsw-specific selftests
      ====================
      
      Link: https://lore.kernel.org/r/cover.1687265905.git.petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f31b6c64
    • Petr Machata's avatar
      selftests: mlxsw: one_armed_router: Use port MAC for bridge address · 664bc72d
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The bridge eventually inherits MAC address from its first member, after the
      enslavement is acked. A number of (mainly VXLAN) selftests already work
      around the problem by setting the MAC address to whatever it will
      eventually be anyway. Do the same for this selftest.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      664bc72d
    • Petr Machata's avatar
      selftests: mlxsw: vxlan: Disable IPv6 autogen on bridges · 55415775
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge (this holds
      for all bridges used here), the bridge MAC address does not have the same
      prefix as other interfaces in the system. On Nvidia Spectrum-1 machines all
      the RIFs have to have the same 38-bit MAC address prefix. Since the bridge
      does not obey this limitation, the RIF cannot be created, and the
      enslavement attempt is vetoed on the grounds of the configuration not being
      offloadable.
      
      The selftest itself however checks various aspects of VXLAN offloading and
      the bridges do not need to participate in routing traffic. The IP addresses
      or the RIFs are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridges in this selftest, thus exempting them from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      55415775
    • Petr Machata's avatar
      selftests: mlxsw: spectrum: q_in_vni_veto: Disable IPv6 autogen on a bridge · 08035d8e
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The selftest itself however checks vetoing of a different aspect of the
      configuration and the bridge does not need to participate in routing
      traffic. The IP address or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      08035d8e
    • Petr Machata's avatar
      selftests: mlxsw: qos_mc_aware: Disable IPv6 autogen on bridges · ea2d5f75
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge (this holds
      for both bridges used here), the bridge MAC address does not have the same
      prefix as other interfaces in the system. On Nvidia Spectrum-1 machines all
      the RIFs have to have the same 38-bit MAC address prefix. Since the bridge
      does not obey this limitation, the RIF cannot be created, and the
      enslavement attempt is vetoed on the grounds of the configuration not being
      offloadable.
      
      The selftest itself however checks traffic prioritization and scheduling,
      and the bridges serve for their L2 forwarding capabilities, and do not need
      to participate in routing traffic. The IP addresses or the RIFs are
      irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridges in this selftest, thus exempting them from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ea2d5f75
    • Petr Machata's avatar
      selftests: mlxsw: qos_ets_strict: Disable IPv6 autogen on bridges · ec7023e6
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge (this holds
      for both bridges used here), the bridge MAC address does not have the same
      prefix as other interfaces in the system. On Nvidia Spectrum-1 machines all
      the RIFs have to have the same 38-bit MAC address prefix. Since the bridge
      does not obey this limitation, the RIF cannot be created, and the
      enslavement attempt is vetoed on the grounds of the configuration not being
      offloadable.
      
      The selftest itself however checks traffic prioritization and scheduling,
      and the bridges serve for their L2 forwarding capabilities, and do not need
      to participate in routing traffic. The IP addresses or the RIFs are
      irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridges in this selftest, thus exempting them from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ec7023e6
    • Petr Machata's avatar
      selftests: mlxsw: qos_dscp_bridge: Disable IPv6 autogen on a bridge · 6349f9bb
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The selftest itself however checks DCB DSCP-based prioritization, and the
      bridge serves for its L2 forwarding capabilities, and does not need to
      participate in routing traffic. The IP address or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6349f9bb
    • Petr Machata's avatar
      selftests: mlxsw: mirror_gre_scale: Disable IPv6 autogen on a bridge · 32b3a7bf
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The selftest itself however checks how many mirroring sessions a machine is
      capable of offloading. The IP address or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      32b3a7bf
    • Petr Machata's avatar
      selftests: mlxsw: extack: Disable IPv6 autogen on bridges · a758dc46
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge (this holds
      for all bridges used here), the bridge MAC address does not have the same
      prefix as other interfaces in the system. On Nvidia Spectrum-1 machines all
      the RIFs have to have the same 38-bit MAC address prefix. Since the bridge
      does not obey this limitation, the RIF cannot be created, and the
      enslavement attempt is vetoed on the grounds of the configuration not being
      offloadable.
      
      The selftest itself however checks whether a different vetoed aspect of the
      configuration provides an extack. The IP address or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridges in this selftest, thus exempting them from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a758dc46
    • Petr Machata's avatar
      selftests: mlxsw: q_in_q_veto: Disable IPv6 autogen on bridges · 8cfdd300
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      The swp enslavement to the 802.1ad bridge is not allowed, because RIFs are
      not allowed to be created for 802.1ad bridges, but the address indicates
      one needs to be created. Thus the veto selftests fail already during the
      port enslavement. Then the attempt to create a VLAN on top of the same
      bridge is not vetoed, because the bridge is not related to mlxsw, and the
      selftest fails.
      
      Fix by disabling automatic IPv6 address generation for the bridges in this
      selftest, thus exempting them from the mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8cfdd300
    • Petr Machata's avatar
      selftests: forwarding: router_bridge: Use port MAC for bridge address · 5e71bf50
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The bridge eventually inherits MAC address from its first member, after the
      enslavement is acked. A number of (mainly VXLAN) selftests already work
      around the problem by setting the MAC address to whatever it will
      eventually be anyway. Do the same here.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5e71bf50
    • Petr Machata's avatar
      selftests: forwarding: mirror_gre_*: Use port MAC for bridge address · 8fd32576
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The bridge eventually inherits MAC address from its first member, after the
      enslavement is acked. A number of (mainly VXLAN) selftests already work
      around the problem by setting the MAC address to whatever it will
      eventually be anyway. Do the same for several mirror_gre selftests.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8fd32576
    • Petr Machata's avatar
      selftests: forwarding: mirror_gre_*: Disable IPv6 autogen on bridges · 92c3bb53
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      These two selftests however check mirroring traffic to a gretap netdevice.
      The bridge here does not participate in routing traffic and the IP address
      or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridges in these selftests, thus exempting them from mlxsw router
      attention. Since the bridges are only used for L2 forwarding, this change
      should not hinder usefulness of this selftest for testing SW datapath or HW
      datapaths in other devices.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      92c3bb53
    • Petr Machata's avatar
      selftests: forwarding: pedit_dsfield: Disable IPv6 autogen on a bridge · f61018dc
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The selftest itself however checks whether skbedit changes packet priority
      as appropriate. The bridge thus does not need to participate in routing
      traffic and the IP address or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Since the bridge is only used for L2 forwarding, this change should not
      hinder usefulness of this selftest for testing SW datapath or HW datapaths
      in other devices.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f61018dc
    • Petr Machata's avatar
      selftests: forwarding: skbedit_priority: Disable IPv6 autogen on a bridge · d7442b7d
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      At the time that the front panel port is enslaved to the bridge, the bridge
      MAC address does not have the same prefix as other interfaces in the
      system. On Nvidia Spectrum-1 machines all the RIFs have to have the same
      38-bit MAC address prefix. Since the bridge does not obey this limitation,
      the RIF cannot be created, and the enslavement attempt is vetoed on the
      grounds of the configuration not being offloadable.
      
      The selftest itself however checks operation of pedit on IPv4 and IPv6
      dsfield and its parts. The bridge thus does not need to participate in
      routing traffic and the IP address or the RIF are irrelevant.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Since the bridge is only used for L2 forwarding, this change should not
      hinder usefulness of this selftest for testing SW datapath or HW datapaths
      in other devices.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d7442b7d
    • Petr Machata's avatar
      selftests: forwarding: dual_vxlan_bridge: Disable IPv6 autogen on bridges · c8015333
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      This will cause this selftest to fail spuriously. The swp enslavement to
      the 802.1ad bridge is not allowed, because RIFs are not allowed to be
      created for 802.1ad bridges, but the address indicates one needs to be
      created.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c8015333
    • Petr Machata's avatar
      selftests: forwarding: q_in_vni: Disable IPv6 autogen on bridges · 8c3736ce
      Petr Machata authored
      In a future patch, mlxsw will start adding RIFs to uppers of front panel
      port netdevices, if they have an IP address.
      
      This will cause this selftest to fail spuriously. The swp enslavement to
      the 802.1ad bridge is not allowed, because RIFs are not allowed to be
      created for 802.1ad bridges, but the address indicates one needs to be
      created.
      
      Fix by disabling automatic IPv6 address generation for the HW-offloaded
      bridge in this selftest, thus exempting it from mlxsw router attention.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8c3736ce
    • Horatiu Vultur's avatar
      net: micrel: Change to receive timestamp in the frame for lan8841 · cc755495
      Horatiu Vultur authored
      Currently for each timestamp frame, the SW needs to go and read the
      received timestamp over the MDIO bus. But the HW has the capability
      to store the received nanoseconds part and the least significant two
      bits of the seconds in the reserved field of the PTP header. In this
      way we could save few MDIO transactions (actually a little more
      transactions because the access to the PTP registers are indirect)
      for each received frame.
      
      Instead of reading the rest of seconds part of the timestamp of the
      frame using MDIO transactions schedule PTP worker thread to read the
      seconds part every 500ms and then for each of the received frames use
      this information. Because if for example running with 512 frames per
      second, there is no point to read 512 times the second part.
      
      Doing all these changes will give a great CPU usage performance.
      Running ptp4l with logSyncInterval of -9 will give a ~60% CPU
      improvement.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc755495
    • Jakub Kicinski's avatar
      Merge branch 'net-stmmac-dwmac-qcom-ethqos-add-support-for-emac4' · 4cb13ff1
      Jakub Kicinski authored
      Bartosz Golaszewski says:
      
      ====================
      net: stmmac: dwmac-qcom-ethqos: add support for EMAC4
      
      Extend the dwmac-qcom-ethqos driver to support EMAC4. While at it: rework the
      code somewhat. The bindings have been reviewed by DT maintainers.
      
      This is a sub-series of [1] with only the patches targetting the net subsystem
      as they can go in independently.
      
      [1] https://lore.kernel.org/lkml/20230617001644.4e093326@kernel.org/T/
      ====================
      
      Link: https://lore.kernel.org/r/20230619092402.195578-1-brgl@bgdev.plSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4cb13ff1
    • Bartosz Golaszewski's avatar
      net: stmmac: dwmac-qcom-ethqos: add support for emac4 on sa8775p platforms · 8c4d92e8
      Bartosz Golaszewski authored
      sa8775p uses EMAC version 4, add the relevant defines, rename the
      has_emac3 switch to has_emac_ge_3 (has emac greater-or-equal than 3)
      and add the new compatible.
      Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8c4d92e8