Skip to content
  1. Jun 22, 2023
    • 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.com
      
      
      Signed-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.com
      
      
      Signed-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.com
      
      
      Signed-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.com
      
      
      Signed-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
  2. Jun 21, 2023