Skip to content
  1. Jun 23, 2023
  2. Jun 22, 2023
    • Jakub Kicinski's avatar
      Merge branch 'mptcp-expose-more-info-and-small-improvements' · 98e95872
      Jakub Kicinski authored
      Matthieu Baerts says:
      
      ====================
      mptcp: expose more info and small improvements
      
      Patch 1-3/9 track and expose some aggregated data counters at the MPTCP
      level: the number of retransmissions and the bytes that have been
      transferred. The first patch prepares the work by moving where snd_una
      is updated for fallback sockets while the last patch adds some tests to
      cover the new code.
      
      Patch 4-6/9 introduce a new getsockopt for SOL_MPTCP: MPTCP_FULL_INFO.
      This new socket option allows to combine info from MPTCP_INFO,
      MPTCP_TCPINFO and MPTCP_SUBFLOW_ADDRS socket options into one. It can be
      needed to have all info in one because the path-manager can close and
      re-create subflows between getsockopt() and fooling the accounting. The
      first patch introduces a unique subflow ID to easily detect when
      subflows are being re-created with the same 5-tuple while the last patch
      adds some tests to cover the new code.
      
      Please note that patch 5/9 ("mptcp: introduce MPTCP_FULL_INFO getsockopt")
      can reveal a bug that were there for a bit of time, see [1]. A fix has
      recently been fixed to netdev for the -net tree: "mptcp: ensure listener
      is unhashed before updating the sk status", see [2]. There is no
      conflicts between the two patches but it might be better to apply this
      series after the one for -net and after having merged "net" into
      "net-next".
      
      Patch 7/9 is similar to commit 47867f0a ("selftests: mptcp: join:
      skip check if MIB counter not supported") recently applied in the -net
      tree but here it adapts the new code that is only in net-next (and it
      fixes a merge conflict resolution which didn't have any impact).
      
      Patch 8 and 9/9 are two simple refactoring. One to consolidate the
      transition to TCP_CLOSE in mptcp_do_fastclose() and avoid duplicated
      code. The other one reduces the scope of an argument passed to
      mptcp_pm_alloc_anno_list() function.
      
      Link: https://github.com/multipath-tcp/mptcp_net-next/issues/407 [1]
      Link: https://lore.kernel.org/netdev/20230620-upstream-net-20230620-misc-fixes-for-v6-4-v1-0-f36aa5eae8b9@tessares.net/ [2]
      ====================
      
      Link: https://lore.kernel.org/r/20230620-upstream-net-next-20230620
      
      -mptcp-expose-more-info-and-misc-v1-0-62b9444bfd48@tessares.net
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      98e95872
    • Geliang Tang's avatar
      mptcp: pass addr to mptcp_pm_alloc_anno_list · 528cb5f2
      Geliang Tang authored
      
      
      Pass addr parameter to mptcp_pm_alloc_anno_list() instead of entry. We
      can reduce the scope, e.g. in mptcp_pm_alloc_anno_list(), we only access
      "entry->addr", we can then restrict to the pointer to "addr" then.
      
      Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      528cb5f2
    • Paolo Abeni's avatar
      mptcp: consolidate transition to TCP_CLOSE in mptcp_do_fastclose() · bbd49d11
      Paolo Abeni authored
      
      
      The MPTCP code always set the msk state to TCP_CLOSE before
      calling performing the fast-close. Move such state transition in
      mptcp_do_fastclose() to avoid some code duplication.
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bbd49d11
    • Matthieu Baerts's avatar
      selftests: mptcp: join: skip check if MIB counter not supported (part 2) · 00079f18
      Matthieu Baerts authored
      Selftests are supposed to run on any kernels, including the old ones not
      supporting all MPTCP features.
      
      One of them is the MPTCP MIB counters introduced in commit fc518953
      ("mptcp: add and use MIB counter infrastructure") and more later. The
      MPTCP Join selftest heavily relies on these counters.
      
      If a counter is not supported by the kernel, it is not displayed when
      using 'nstat -z'. We can then detect that and skip the verification. A
      new helper (get_counter()) has been added recently in the -net tree to
      do the required checks and return an error if the counter is not
      available.
      
      This commit is similar to the one with the same title applied in the
      -net tree but it modifies code only present in net-next for the moment,
      see the Fixes commit below.
      
      While at it, we can also remove the use of ${extra_msg} variable which
      is never assigned in chk_rm_tx_nr() function and use 'echo' without '-n'
      parameter.
      
      Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
      Fixes: 0639fa23
      
       ("selftests: mptcp: add explicit check for new mibs")
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      00079f18
    • Paolo Abeni's avatar
      selftests: mptcp: add MPTCP_FULL_INFO testcase · aa723d5b
      Paolo Abeni authored
      
      
      Add a testcase explicitly triggering the newly introduce
      MPTCP_FULL_INFO getsockopt.
      
      Link: https://github.com/multipath-tcp/mptcp_net-next/issues/388
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Co-developed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      aa723d5b
    • Paolo Abeni's avatar
      mptcp: introduce MPTCP_FULL_INFO getsockopt · 49243207
      Paolo Abeni authored
      
      
      Some user-space applications want to monitor the subflows utilization.
      
      Dumping the per subflow tcp_info is not enough, as the PM could close
      and re-create the subflows under-the-hood, fooling the accounting.
      Even checking the src/dst addresses used by each subflow could not
      be enough, because new subflows could re-use the same address/port of
      the just closed one.
      
      This patch introduces a new socket option, allow dumping all the relevant
      information all-at-once (everything, everywhere...), in a consistent
      manner.
      
      Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/388
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      49243207
    • Paolo Abeni's avatar
      mptcp: add subflow unique id · 6f06b4d4
      Paolo Abeni authored
      
      
      The user-space need to properly account the data received/sent by
      individual subflows. When additional subflows are created and/or
      closed during the MPTCP socket lifetime, the information currently
      exposed via MPTCP_TCPINFO are not enough: subflows are identified only
      by the sequential position inside the info dumps, and that will change
      with the above mentioned events.
      
      To solve the above problem, this patch introduces a new subflow
      identifier that is unique inside the given MPTCP socket scope.
      
      The initial subflow get the id 1 and the other subflows get incremental
      values at join time.
      
      Link: https://github.com/multipath-tcp/mptcp_net-next/issues/388
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6f06b4d4
    • Paolo Abeni's avatar
      selftests: mptcp: explicitly tests aggregate counters · 5dcff89e
      Paolo Abeni authored
      
      
      Update the existing sockopt test-case to do some basic checks
      on the newly added counters.
      
      Link: https://github.com/multipath-tcp/mptcp_net-next/issues/385
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5dcff89e
    • Paolo Abeni's avatar
      mptcp: track some aggregate data counters · 38967f42
      Paolo Abeni authored
      
      
      Currently there are no data transfer counters accounting for all
      the subflows used by a given MPTCP socket. The user-space can compute
      such figures aggregating the subflow info, but that is inaccurate
      if any subflow is closed before the MPTCP socket itself.
      
      Add the new counters in the MPTCP socket itself and expose them
      via the existing diag and sockopt. While touching mptcp_diag_fill_info(),
      acquire the relevant locks before fetching the msk data, to ensure
      better data consistency
      
      Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/385
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      38967f42
    • Paolo Abeni's avatar
      mptcp: move snd_una update earlier for fallback socket · c026d33b
      Paolo Abeni authored
      
      
      That will avoid an unneeded conditional in both the fast-path
      and in the fallback case and will simplify a bit the next
      patch.
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c026d33b
    • David Arinzon's avatar
      net: ena: Fix rst format issues in readme · 5dfbbaa2
      David Arinzon authored
      
      
      This patch fixes a warning in the ena documentation
      file identified by the kernel automatic tools.
      The patch also adds a missing newline between
      sections.
      
      Signed-off-by: default avatarDavid Arinzon <darinzon@amazon.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202306171804.U7E92zoE-lkp@intel.com/
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230620133544.32584-1-darinzon@amazon.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5dfbbaa2
    • Abel Wu's avatar
      inet: Cleanup on charging memory for newly accepted sockets · 53bf9164
      Abel Wu authored
      
      
      If there is no net-memcg associated with the sock, don't bother
      calculating its memory usage for charge.
      
      Signed-off-by: default avatarAbel Wu <wuyun.abel@bytedance.com>
      Link: https://lore.kernel.org/r/20230620092712.16217-1-wuyun.abel@bytedance.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      53bf9164
    • 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.com
      Signed-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.org
      Signed-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.org
      Signed-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.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