1. 19 Jul, 2023 10 commits
  2. 17 Jul, 2023 24 commits
  3. 14 Jul, 2023 6 commits
    • Jesper Dangaard Brouer's avatar
      gve: trivial spell fix Recive to Receive · 68af9000
      Jesper Dangaard Brouer authored
      Spotted this trivial spell mistake while casually reading
      the google GVE driver code.
      Signed-off-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68af9000
    • David S. Miller's avatar
      Merge branch 'mlxsw-rif-pvid' · 382d7dcf
      David S. Miller authored
      Petr Machata says:
      
      ====================
      mlxsw: Manage RIF across PVID changes
      
      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.
      
      As an example, take a front panel port, configure an IP address: it gets a
      RIF. Now enslave the port to the bridge, and the RIF is gone. Remove the
      port from the bridge again, but the RIF never comes back. There is a number
      of similar situations, where changing the configuration there and back
      utterly breaks the offload.
      
      The situation is going to be made better by implementing a range of replays
      and post-hoc offloads.
      
      In this patch set, address the ordering issues related to creation of
      bridge RIFs. Currently, mlxsw has several shortcomings with regards to RIF
      handling due to PVID changes:
      
      - In order to cause RIF for a bridge device to be created, the user is
        expected first to set PVID, then to add an IP address. The reverse
        ordering is disallowed, which is not very user-friendly.
      
      - When such bridge gets a VLAN upper whose VID was the same as the existing
        PVID, and this VLAN netdevice gets an IP address, a RIF is created for
        this netdevice. The new RIF is then assigned to the 802.1Q FID for the
        given VID. This results in a working configuration. However, then, when
        the VLAN netdevice is removed again, the RIF for the bridge itself is
        never reassociated to the PVID.
      
      - PVID cannot be changed once the bridge has uppers. Presumably this is
        because the driver does not manage RIFs properly in face of PVID changes.
        However, as the previous point shows, it is still possible to get into
        invalid configurations.
      
      This patch set addresses these issues and relaxes some of the ordering
      requirements that mlxsw had. The patch set proceeds as follows:
      
      - In patch #1, pass extack to mlxsw_sp_br_ban_rif_pvid_change()
      
      - To relax ordering between setting PVID and adding an IP address to a
        bridge, mlxsw must be able to request that a RIF is created with a given
        VLAN ID, instead of trying to deduce it from the current netdevice
        settings, which do not reflect the user-requested values yet. This is
        done in patches #2 and #3.
      
      - Similarly, mlxsw_sp_inetaddr_bridge_event() will need to make decisions
        based on the user-requested value of PVID, not the current value. Thus in
        patches #4 and #5, add a new argument which carries the requested PVID
        value.
      
      - Finally in patch #6 relax the ban on PVID changes when a bridge has
        uppers. Instead, add the logic necessary for creation of a RIF as a
        result of PVID change.
      
      - Relevant selftests are presented afterwards. In patch #7 a preparatory
        helper is added to lib.sh. Patches #8, #9, #10 and #11 include selftests
        themselves.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      382d7dcf
    • Petr Machata's avatar
      selftests: router_bridge_pvid_vlan_upper: Add a new selftest · 9cbb3da4
      Petr Machata authored
      This tests whether addition and deletion of a VLAN upper that coincides
      with the current PVID setting throws off forwarding.
      
      This selftests is specifically geared towards offloading drivers. In
      particular, mlxsw used to fail this selftest, and an earlier patch in this
      patchset fixes the issue. However, there's nothing HW-specific in the test
      itself (it absolutely is supposed to pass on SW datapath), and therefore it
      is put into the generic forwarding directory.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9cbb3da4
    • Petr Machata's avatar
      selftests: router_bridge_vlan_upper_pvid: Add a new selftest · b0307b77
      Petr Machata authored
      This tests whether changes to PVID that coincide with an existing VLAN
      upper throw off forwarding. This selftests is specifically geared towards
      offloading drivers, but since there's nothing HW-specific in the test
      itself (it absolutely is supposed to pass on SW datapath), it is put into
      the generic forwarding directory.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0307b77
    • Petr Machata's avatar
      selftests: router_bridge_vlan: Add PVID change test · d4172a93
      Petr Machata authored
      Add an alternative path involving VLAN 777 instead of the current 555. Then
      add tests that verify that marking 777 as PVID makes the 555 path not work,
      and the 777 path work.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4172a93
    • Petr Machata's avatar
      selftests: router_bridge: Add tests to remove and add PVID · c7203a29
      Petr Machata authored
      This test relies on PVID being configured on the bridge itself. Thus when
      it is deconfigured, the system should lose the ability to forward traffic.
      Later when it is added again, the ability to forward traffic should be
      regained. Add tests to exercise these configuration changes and verify
      results.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7203a29