-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mlxsw-rif-mac-prefixes'
Ido Schimmel says: ==================== mlxsw: Support multiple RIF MAC prefixes Currently, mlxsw enforces that all the netdevs used as router interfaces (RIFs) have the same MAC prefix (e.g., same 38 MSBs in Spectrum-1). Otherwise, an error is returned to user space with extack. This patchset relaxes the limitation through the use of RIF MAC profiles. A RIF MAC profile is a hardware entity that represents a particular MAC prefix which multiple RIFs can reference. Therefore, the number of possible MAC prefixes is no longer one, but the number of profiles supported by the device. The ability to change the MAC of a particular netdev is useful, for example, for users who use the netdev to connect to an upstream provider that performs MAC filtering. Currently, such users are either forced to negotiate with the provider or change the MAC address of all other netdevs so that they share the same prefix. Patchset overview: Patches #1-#3 are preparations. Patch #4 adds actual support for RIF MAC profiles. Patch #5 exposes RIF MAC profiles as a devlink resource, so that user space has visibility into the maximum number of profiles and current occupancy. Useful for debugging and testing (next 3 patches). Patches #6-#8 add both scale and functional tests. Patch #9 removes tests that validated the previous limitation. It is now covered by patch #6 for devices that support a single profile. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- x86_vmware_for_v6.0_rc1
- x86_vdso_for_v6.3_rc1
- x86_vdso_for_v5.19_rc1
- x86_vdso_for_v5.17_rc1
- x86_urgent_for_6.4-rc4
- x86_urgent_for_v6.4_rc6
- x86_urgent_for_v6.4_rc2
- x86_urgent_for_v6.3
- x86_urgent_for_v6.3_rc7
- x86_urgent_for_v6.3_rc6
- x86_urgent_for_v6.3_rc4
- x86_urgent_for_v6.3_rc3
- x86_urgent_for_v6.3_rc2
- x86_urgent_for_v6.2_rc7
- x86_urgent_for_v6.2_rc6
- x86_urgent_for_v6.2_rc4
- x86_urgent_for_v6.2_rc2
- x86_urgent_for_v6.1_rc7
- x86_urgent_for_v6.1_rc6
- x86_urgent_for_v6.1_rc4
- x86_urgent_for_v6.0
- x86_urgent_for_v6.0_rc2
- x86_urgent_for_v6.0-rc8
- x86_urgent_for_v5.19
- x86_urgent_for_v5.19_rc8
- x86_urgent_for_v5.19_rc7
- x86_urgent_for_v5.19_rc6
- x86_urgent_for_v5.18_rc5
- x86_urgent_for_v5.18_rc2
- x86_urgent_for_v5.17_rc8
- x86_urgent_for_v5.17_rc5
- x86_urgent_for_v5.17_rc4
- x86_urgent_for_v5.17_rc2
- x86_urgent_for_v5.16_rc8
- x86_urgent_for_v5.16_rc7
- x86_urgent_for_v5.16_rc4
- x86_timers_for_v6.1_rc1
- x86_tdx_for_6.4
- x86_tdx_for_6.3
- x86_tdx_for_6.2
- x86_tdx_for_v5.19_rc1
- x86_splitlock_for_6.2
- x86_splitlock_for_v5.19_rc1
- x86_shstk_for_6.4
- x86_sgx_for_6.2
- x86_sgx_for_v6.1_rc1
- x86_sgx_for_v6.0-2022-08-03.1
- x86_sgx_for_v5.18_rc1
- x86_sgx_for_v5.17_rc1
- x86_sev_for_v6.4_rc1
- x86_sev_for_v6.2
- x86_sev_for_v5.19_rc1
- x86_sev_for_v5.18_rc1
- x86_sev_for_v5.17_rc1
- x86_platform_for_v6.1_rc1
- x86_platform_for_v5.19_rc1
- x86_platform_for_v5.17_rc1
- x86_paravirt_for_v6.4_rc1
- x86_paravirt_for_v6.2
- x86_paravirt_for_v6.1_rc1
- x86_paravirt_for_v5.18_rc1
- x86_paravirt_for_v5.17_rc1
- x86_mm_for_6.4
- x86_mm_for_6.2_v2
- x86_mm_for_v6.1_rc1
- x86_mm_for_v6.0_rc1
- x86_mm_for_v5.19_rc1
- x86_mm_for_v5.17_rc1
- x86_misc_for_v6.4_rc1
- x86_misc_for_v6.1_rc1
- x86_misc_for_v6.0_rc1
- x86_misc_for_v5.19_rc1
- x86_misc_for_v5.18_rc1
- x86_misc_for_v5.17_rc1
- x86_microcode_for_v6.3_rc1
- x86_microcode_for_v6.2
- x86_microcode_for_v6.1_rc1
- x86_microcode_for_v5.19_rc1
- x86_kdump_for_v6.0_rc1
- x86_kdump_for_v5.19_rc1
- x86_fpu_for_6.4
- x86_fpu_for_6.2
- x86_fpu_for_v6.0_rc1
- x86_fpu_for_v5.19_rc1
- x86_fpu_for_v5.17_rc1
- x86_cpu_for_v6.4_rc1
- x86_cpu_for_v6.3_rc1
- x86_cpu_for_v6.2
- x86_cpu_for_v6.1_rc1
- x86_cpu_for_v6.0_rc1
- x86_cpu_for_v5.19_rc1
- x86_cpu_for_v5.18_rc1
- x86_cpu_for_v5.17_rc1
- x86_core_for_5.18_rc1
- x86_core_for_v6.2
- x86_core_for_v6.1_rc1
- x86_core_for_v6.0_rc1
- x86_core_for_v5.19_rc1
- x86_core_for_v5.17_rc1
- x86_cleanups_for_v6.4_rc1
- x86_cleanups_for_v6.1_rc1
- x86_cleanups_for_v6.0_rc1
- x86_cleanups_for_v5.19_rc1
- x86_cleanups_for_v5.18_rc1
- x86_cleanups_for_v5.17_rc1
- x86_cc_for_v5.18_rc1
- x86_cache_for_6.4
- x86_cache_for_6.2
- x86_cache_for_v6.3_rc1
- x86_cache_for_v6.1_rc1
- x86_cache_for_v5.17_rc1
- x86_build_for_v6.0_rc1
- x86_build_for_v5.19_rc1
- x86_build_for_v5.18_rc1
- x86_build_for_v5.17_rc1
- x86_build_for_v5.17_rc1-p2
- x86_boot_for_v6.2
- x86_asm_for_v6.2
- x86_asm_for_v6.1_rc1
- x86_asm_for_v5.19_rc1
- x86_apic_for_v6.1_rc1
- x86_apic_for_v5.19_rc1
- x86_alternatives_for_v6.3_rc1
- x86_alternatives_for_v6.2
- x86_acpi_for_v6.4_rc1
- x86-urgent-2023-05-28
- x86-urgent-2023-03-05
- x86-urgent-2023-02-19
- x86-urgent-2023-02-11
- x86-urgent-2023-01-04
- x86-urgent-2022-12-12
- x86-urgent-2022-08-28
- x86-urgent-2022-08-13
- x86-urgent-2022-08-06
- x86-urgent-2022-06-19
- x86-urgent-2022-06-05
- x86-urgent-2022-05-15
- x86-urgent-2022-05-08
- x86-urgent-2022-04-17
- x86-urgent-2022-04-03
- x86-urgent-2021-11-28
- x86-urgent-2021-11-21
- x86-platform-2023-02-20
- x86-pasid-2022-03-21
- x86-mm-2023-02-20
- x86-mm-2022-06-05
- x86-misc-2022-12-10
- x86-microcode-2022-06-05
- x86-irq-2022-05-23
- x86-fpu-2023-02-20
- x86-core-2023-02-20
- x86-cleanups-2023-02-20
- x86-cleanups-2022-12-10
- x86-cleanups-2022-06-05
- x86-build-2023-02-20
- x86-boot-2023-02-20
- x86-boot-2022-06-05
- x86-asm-2023-02-20
- x86-apic-2023-04-24
- x86-apic-2022-12-10
- v6.9-rc4
- v6.9-rc3
- v6.9-rc2
- v6.9-rc1
- v6.8.6
- v6.8.5
- v6.8.4
- v6.8.3
- v6.8.2
- v6.8.1
- v6.8
- v6.8-rc7
- v6.8-rc6
- v6.8-rc5
- v6.8-rc4
- v6.8-rc3
- v6.8-rc2
- v6.8-rc1
- v6.7.12
- v6.7.11
- v6.7.10
- v6.7.9
- v6.7.8
- v6.7.7
- v6.7.6
- v6.7.5
- v6.7.4
- v6.7.3
- v6.7.2
- v6.7.1
- v6.7
- v6.7-rc8
- v6.7-rc7
- v6.7-rc6
- v6.7-rc5
- v6.7-rc4
- v6.7-rc3
- v6.7-rc2
- v6.7-rc1
- v6.6.27
- v6.6.26
- v6.6.25
- v6.6.24
- v6.6.23
- v6.6.22
- v6.6.21
- v6.6.20
- v6.6.19
- v6.6.18
- v6.6.17
- v6.6.16
- v6.6.15
- v6.6.14
- v6.6.13
- v6.6.12
- v6.6.11
- v6.6.10
- v6.6.9
- v6.6.8
- v6.6.7
- v6.6.6
- v6.6.5
- v6.6.4
- v6.6.3
- v6.6.2
- v6.6.1
- v6.6
- v6.6-rc7
- v6.6-rc6
- v6.6-rc5
- v6.6-rc4
- v6.6-rc3
- v6.6-rc2
- v6.6-rc1
- v6.5.13
- v6.5.12
- v6.5.11
- v6.5.10
- v6.5.9
- v6.5.8
- v6.5.7
- v6.5.6
- v6.5.5
- v6.5.4
- v6.5.3
- v6.5.2
- v6.5.1
- v6.5
- v6.5-rc7
- v6.5-rc6
- v6.5-rc5
- v6.5-rc4
- v6.5-rc3
- v6.5-rc2
- v6.5-rc1
- v6.4.16
- v6.4.15
- v6.4.14
- v6.4.13
- v6.4.12
- v6.4.11
- v6.4.10
- v6.4.9
- v6.4.8
- v6.4.7
- v6.4.6
- v6.4.5
- v6.4.4
- v6.4.3
- v6.4.2
- v6.4.1
- v6.4
- v6.4-rc7
- v6.4-rc6
- v6.4-rc5
- v6.4-rc4
- v6.4-rc3
- v6.4-rc2
- v6.4-rc1
- v6.3.13
- v6.3.12
- v6.3.11
- v6.3.10
- v6.3.9
- v6.3.8
- v6.3.7
- v6.3.6
- v6.3.5
- v6.3.4
- v6.3.3
- v6.3.2
- v6.3.1
- v6.3
- v6.3-rc7
- v6.3-rc6
- v6.3-rc5
- v6.3-rc4
- v6.3-rc3
- v6.3-rc2
- v6.3-rc1
- v6.2.16
- v6.2.15
- v6.2.14
- v6.2.13
- v6.2.12
- v6.2.11
- v6.2.10
- v6.2.9
- v6.2.8
- v6.2.7
- v6.2.6
- v6.2.5
- v6.2.4
- v6.2.3
- v6.2.2
- v6.2.1
- v6.2
- v6.2-rc8
- v6.2-rc7
- v6.2-rc6
- v6.2-rc5
- v6.2-rc4
- v6.2-rc3
- v6.2-rc2
- v6.2-rc1
- v6.1.86
- v6.1.85
- v6.1.84
- v6.1.83
- v6.1.82
- v6.1.81
- v6.1.80
- v6.1.79
- v6.1.78
- v6.1.77
- v6.1.76
- v6.1.75
- v6.1.74
- v6.1.73
- v6.1.72
- v6.1.71
- v6.1.70
- v6.1.69
- v6.1.68
- v6.1.67
- v6.1.66
- v6.1.65
- v6.1.64
- v6.1.63
- v6.1.62
- v6.1.61
- v6.1.60
- v6.1.59
- v6.1.58
- v6.1.57
- v6.1.56
- v6.1.55
- v6.1.54
- v6.1.53
- v6.1.52
- v6.1.51
- v6.1.50
- v6.1.49
- v6.1.48
- v6.1.47
- v6.1.46
- v6.1.45
- v6.1.44
- v6.1.43
- v6.1.42
- v6.1.41
- v6.1.40
- v6.1.39
- v6.1.38
- v6.1.37
- v6.1.36
- v6.1.35
- v6.1.34
- v6.1.33
- v6.1.32
- v6.1.31
- v6.1.30
- v6.1.29
- v6.1.28
- v6.1.27
- v6.1.26
- v6.1.25
- v6.1.24
- v6.1.23
- v6.1.22
- v6.1.21
- v6.1.20
- v6.1.19
- v6.1.18
- v6.1.17
- v6.1.16
- v6.1.15
- v6.1.14
- v6.1.13
- v6.1.12
- v6.1.11
- v6.1.10
- v6.1.9
- v6.1.8
- v6.1.7
- v6.1.6
- v6.1.5
- v6.1.4
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1
- v6.1-rc8
- v6.1-rc7
- v6.1-rc6
- v6.1-rc5
- v6.1-rc4
- v6.1-rc3
- v6.1-rc2
- v6.1-rc1
- v6.0.19
- v6.0.18
- v6.0.17
- v6.0.16
- v6.0.15
- v6.0.14
- v6.0.13
- v6.0.12
- v6.0.11
- v6.0.10
- v6.0.9
- v6.0.8
- v6.0.7
- v6.0.6
- v6.0.5
- v6.0.4
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0
- v6.0-rc7
- v6.0-rc6
- v6.0-rc5
- v6.0-rc4
- v6.0-rc3
- v6.0-rc2
- v6.0-rc1
- v5.19.17
- v5.19.16
- v5.19.15
- v5.19.14
- v5.19.13
- v5.19.12
- v5.19.11
- v5.19.10
- v5.19.9
- v5.19.8
- v5.19.7
- v5.19.6
- v5.19.5
- v5.19.4
- v5.19.3
- v5.19.2
- v5.19.1
- v5.19
- v5.19-rc8
- v5.19-rc7
- v5.19-rc6
- v5.19-rc5
- v5.19-rc4
- v5.19-rc3
- v5.19-rc2
- v5.19-rc1
- v5.18.19
- v5.18.18
- v5.18.17
- v5.18.16
- v5.18.15
- v5.18.14
- v5.18.13
- v5.18.12
- v5.18.11
- v5.18.10
- v5.18.9
- v5.18.8
- v5.18.7
- v5.18.6
- v5.18.5
- v5.18.4
- v5.18.3
- v5.18.2
- v5.18.1
- v5.18
- v5.18-rc7
- v5.18-rc6
- v5.18-rc5
- v5.18-rc4
- v5.18-rc3
- v5.18-rc2
- v5.18-rc2-mpi.0
- v5.18-rc1
- v5.18-rc1-mpi.0
- v5.17.15
- v5.17.14
- v5.17.13
- v5.17.12
- v5.17.11
- v5.17.10
- v5.17.9
- v5.17.8
- v5.17.7
- v5.17.6
- v5.17.5
- v5.17.4
- v5.17.3
- v5.17.2
- v5.17.2-mpi.0
- v5.17.1
- v5.17.1-mpi.0
- v5.17
- v5.17-rc8
- v5.17-rc8-mpi.0
- v5.17-rc7
- v5.17-rc7-mpi.0
- v5.17-rc6
- v5.17-rc6-mpi.0
- v5.17-rc5
- v5.17-rc5-mpi.0
- v5.17-rc4
- v5.17-rc3
- v5.17-rc2
- v5.17-rc1
- v5.17-mpi.0
- v5.16.20
- v5.16.19
- v5.16.18
- v5.16.17
- v5.16.16
- v5.16.15
- v5.16.14
- v5.16.13
- v5.16.12
- v5.16.11
- v5.16.10
- v5.16.9
- v5.16.8
- v5.16.7
- v5.16.6
- v5.16.5
- v5.16.4
- v5.16.3
- v5.16.2
- v5.16.1
- v5.16
- v5.16-rc8
- v5.16-rc7
- v5.16-rc6
- v5.16-rc5
- v5.16-rc4
- v5.16-rc3
- v5.16-rc2
- v5.16-rc1
- unmap-fix-20230629
- timers-urgent-2023-02-19
- timers-urgent-2023-01-12
- timers-urgent-2022-08-13
- timers-urgent-2022-05-08
- timers-urgent-2022-04-17
- timers-urgent-2021-12-12
- timers-core-2023-04-28
- timers-core-2023-04-24
- timers-core-2023-02-20
- timers-core-2022-12-10
- timers-core-2022-10-05
- timers-core-2022-08-01
- timers-core-2022-06-05
- timers-core-2022-05-23
- timers-core-2022-03-21
- timers-core-2022-01-13
- timers_urgent_for_v6.4_rc2
- timers_urgent_for_v6.1_rc8
- timers_urgent_for_v6.1_rc7
- timers_urgent_for_v5.16_rc6
- timers_urgent_for_v5.16_rc4
- thermal-6.6-rc1
- thermal-6.6-rc1-3
- thermal-6.6-rc1-2
- thermal-6.5-rc4
- thermal-6.5-rc1
- thermal-6.4-rc8
- thermal-6.4-rc4
- thermal-6.4-rc1
- thermal-6.4-rc1-3
- thermal-6.4-rc1-2
- thermal-6.3-rc7
- thermal-6.3-rc5
- thermal-6.3-rc4
- thermal-6.3-rc2
- thermal-6.3-rc1
- thermal-6.3-rc1-2
- thermal-6.2-rc6
- thermal-6.2-rc5
- thermal-6.2-rc3
- thermal-6.2-rc1
- thermal-6.2-rc1-2
- thermal-6.1-rc2
- thermal-6.1-rc1
- thermal-6.1-rc1-2
- thermal-6.0-rc3
- thermal-5.20-rc1
- thermal-5.20-rc1-2
- thermal-5.19-rc5
- thermal-5.19-rc1
- thermal-5.19-rc1-2
- thermal-5.18-rc8
- thermal-5.18-rc5
- thermal-5.18-rc1
- thermal-5.17-rc7
- thermal-5.17-rc6
- thermal-5.17-rc1
- thermal-5.17-rc1-2
- thermal-5.16-rc5
- thermal-5.16-rc2
- thermal-5.16-rc1-2
- tai-for-tracing
- tags/kvm-6.2-2
- tags/kvm-6.2-1
- tags/kvm-6.1-2
- tags/kvm-5.18-2
- smp-urgent-2022-04-17
- smp-core-2023-04-27
- smp-core-2022-12-10
- smp-core-2022-05-23
- sched-urgent-2023-02-17
- sched-urgent-2023-01-12
- sched-urgent-2022-08-06
- sched-urgent-2022-06-19
- sched-urgent-2022-06-05
- sched-urgent-2022-05-15
- sched-urgent-2021-12-12
- sched-urgent-2021-11-28
- sched-rt-2022-10-05
- sched-psi-2022-10-14
- sched-core-2023-04-27
- sched-core-2023-02-20
- sched-core-2022-12-12
- sched-core-2022-10-07
- sched-core-2022-08-01
- sched-core-2022-05-23
- sched-core-2022-03-22
- sched-core-2022-03-21
- sched_urgent_for_v6.4_rc2
- sched_urgent_for_v6.3_rc7
- sched_urgent_for_v6.3_rc4
- sched_urgent_for_v6.2_rc6
- sched_urgent_for_v6.1_rc6
- sched_urgent_for_v6.1_rc2
- sched_urgent_for_v5.19_rc8
- sched_urgent_for_v5.18_rc4
- sched_urgent_for_v5.18_rc2
- sched_urgent_for_v5.17_rc5
- sched_urgent_for_v5.17_rc4
- sched_urgent_for_v5.17_rc2
- sched_urgent_for_v5.17_rc2_p2
- sched_urgent_for_v5.16_rc4
- sched_urgent_for_v5.16_rc1
- sched_core_for_v5.17_rc1
- rocm-5.5.1
- rocm-5.5.0
- rocm-5.4.4
- rocm-5.4.3
- rocm-5.4.2
- rocm-5.4.1
- rocm-5.4.0
- rocm-5.3.3
- rocm-5.3.2
- rocm-5.3.1
- rocm-5.3.0
- rocm-5.2.3
- rocm-5.2.1
- rocm-5.2.0
- ras_urgent_for_v6.3_rc3
- ras_core_for_v6.4_rc1
- ras_core_for_v6.3_rc1
- ras_core_for_v6.2
- ras_core_for_v6.1_rc1
- ras_core_for_v6.0_rc1
- ras_core_for_v5.19_rc1
- ras_core_for_v5.18_rc1
- ras_core_for_v5.17_rc1
- pnp-5.18-rc1
- pm-6.6-rc1
- pm-6.6-rc1-3
- pm-6.6-rc1-2
- pm-6.5-rc6
- pm-6.5-rc5
- pm-6.5-rc4
- pm-6.5-rc3
- pm-6.5-rc2
- pm-6.5-rc1
- pm-6.5-rc1-2
- pm-6.4-rc4
- pm-6.4-rc3
- pm-6.4-rc1
- pm-6.4-rc1-2
- pm-6.3-rc7
- pm-6.3-rc3
- pm-6.3-rc1
- pm-6.3-rc1-2
- pm-6.2-rc9
- pm-6.2-rc8
- pm-6.2-rc4
- pm-6.2-rc1
- pm-6.1-rc7
- pm-6.1-rc3
- pm-6.1-rc2
- pm-6.1-rc1
- pm-6.1-rc1-2
- pm-6.0-rc7
- pm-6.0-rc3
- pm-5.20-rc1
- pm-5.20-rc1-2
- pm-5.19-rc9
- pm-5.19-rc7
- pm-5.19-rc6
- pm-5.19-rc5
- pm-5.19-rc4
- pm-5.19-rc2
- pm-5.19-rc1
- pm-5.19-rc1-2
- pm-5.18-rc5
- pm-5.18-rc1
- pm-5.18-rc1-2
- pm-5.17-rc6
- pm-5.17-rc2
- pm-5.17-rc1
- pm-5.17-rc1-2
- pm-5.16-rc7
- pm-5.16-rc5
- pm-5.16-rc4
- pm-5.16-rc3
- pm-5.16-rc2
- pm-5.16-rc1-2
- perf-urgent-2023-05-28
- perf-urgent-2023-01-12
- perf-urgent-2023-01-06
- perf-urgent-2022-10-02
- perf-urgent-2022-08-28
- perf-urgent-2022-08-21
- perf-urgent-2022-08-06
- perf-urgent-2022-06-05
- perf-urgent-2021-11-28
- perf-urgent-2021-11-21
- perf-core-2023-04-27
- perf-core-2023-02-20
- perf-core-2022-12-12
- perf-core-2022-10-07
- perf-core-2022-08-01
- perf-core-2022-06-05
- perf-core-2022-05-23
- perf-core-2022-03-21
- perf_urgent_for_v6.4_rc2
- perf_urgent_for_v6.3_rc6
- perf_urgent_for_v6.3_rc4
- perf_urgent_for_v6.3_rc3
- perf_urgent_for_v6.2_rc7
- perf_urgent_for_v6.2_rc6
- perf_urgent_for_v6.2_rc4
- perf_urgent_for_v6.2_rc2
- perf_urgent_for_v6.1_rc8
- perf_urgent_for_v6.1_rc7
- perf_urgent_for_v6.1_rc6
- perf_urgent_for_v6.1_rc4
- perf_urgent_for_v6.1_rc3
- perf_urgent_for_v6.1_rc2
- perf_urgent_for_v5.19_rc8
- perf_urgent_for_v5.19_rc7
- perf_urgent_for_v5.18_rc4
- perf_urgent_for_v5.18_rc2
- perf_urgent_for_v5.17_rc4
- perf_urgent_for_v5.17_rc3
- perf_urgent_for_v5.17_rc2
- perf_urgent_for_v5.17_rc2_p2
- perf_urgent_for_v5.16_rc1
- perf_core_for_v5.17_rc1
- objtool-urgent-2023-05-28
- objtool-urgent-2022-06-19
- objtool-urgent-2022-06-05
- objtool-core-2023-04-27
- objtool-core-2023-03-02
- objtool-core-2022-10-07
- objtool-core-2022-05-23
- objtool_urgent_for_v6.1_rc7
- objtool_urgent_for_v6.1_rc2
- objtool_urgent_for_v5.18_rc5
- objtool_urgent_for_v5.17_rc4
- objtool_urgent_for_v5.17_rc3
- objtool_urgent_for_v5.16_rc7
- next-20230912
- next-20230809
- next-20230803
- next-20230801
- next-20230724
- next-20230721
- next-20230718
- next-20230717
- next-20230714
- next-20230706
- next-20230620
- next-20230608
- next-20230512
- next-20230511
- next-20230508
- next-20230504
- next-20230426
- next-20230419
- next-20230411
- next-20230405
- next-20230324
- next-20230320
- next-20230302
- next-20230228
- next-20230217
- next-20230208
- next-20230206
- next-20230203
- next-20230123
- next-20230105
- next-20221226
- next-20221220
- next-20221202
- next-20221129
- next-20221014
- next-20221013
- next-20220930
- next-20220927
- next-20220916
- next-20220804
- next-20220728
- next-20220722
- next-20220715
- next-20220714
- next-20220711
- next-20220707
- next-20220701
- next-20220513
- next-20220428
- next-20220419
- next-20220414
- next-20220405
- next-20220318
- next-20220315
- next-20220310
- next-20220225
- next-20220223
- next-20220215
- next-20220211
- next-20220204
- next-20220202
- next-20220128
- next-20220117
- next-20220105
- next-20211224
- next-20211217
- next-20211206
- next-20211130
- md-next-20230825
- md-next-20230817
- md-next-20230814-resend
- md-next-20230729
- md-next-20230623
- md-next-20230613
- md-next-2023-04-28
- md-fixes-20230630
- md-fixes-2023-05-24
- md-fixes-2023-03-29
- mariux-6.12.40-484
- mariux-6.12.29-483
- mariux-6.12.27-482
- mariux-6.12.23-481
- mariux-6.12.23-480
- mariux-6.12.11-479
- mariux-6.6.35-477
- mariux-6.6.27-472
- mariux-6.6.26-471
- mariux-6.6.25-470
- mariux-6.6.24-469
- mariux-6.6.23-468
- mariux-6.6.22-467
- mariux-6.6.22-466
- mariux-6.6.22-465
- mariux-6.6.21-464
- mariux-6.6.20-463
- mariux-6.6.19-462
- mariux-6.6.12-461
- mariux-6.6.11-460
- mariux-6.5.2-455
- mariux-6.5.2-452
- mariux-6.5.2-451
- mariux-6.1.53-458
- mariux-6.1.52-456
- mariux-6.1.39-450
- mariux-6.1.7-446
- locking-urgent-2023-02-11
- locking-urgent-2022-06-19
- locking-urgent-2022-05-08
- locking-urgent-2021-11-28
- locking-urgent-2021-11-14
- locking-core-2023-05-05
- locking-core-2023-02-20
- locking-core-2022-12-12
- locking-core-2022-10-07
- locking-core-2022-08-01
- locking-core-2022-05-23
- locking-core-2022-03-21
- locking_urgent_for_v6.4_rc2
- locking_urgent_for_v6.2_rc2
- locking_urgent_for_v6.1_rc6
- locking_urgent_for_v5.19
- locking_urgent_for_v5.18_rc2
- locking_urgent_for_v5.17_rc5
- locking_urgent_for_v5.16_rc6
- locking_core_for_v5.17_rc1
- linux-5.17.y
- libata-5.16-rc6
- libata-5.16-rc5
- libata-5.16-rc4
- libata-5.16-rc2
- libata-5.16-rc1-p2
- kvm-5.20-2
- kvm-5.20-1
- kvm-5.19-1
- kvm-5.18-1
- kvm-5.17-2
- kvm-5.16-2
- irq-urgent-2023-05-28
- irq-urgent-2023-03-05
- irq-urgent-2023-02-19
- irq-urgent-2022-08-21
- irq-urgent-2022-06-19
- irq-urgent-2022-05-15
- irq-urgent-2022-05-08
- irq-urgent-2022-04-17
- irq-urgent-2022-04-10
- irq-urgent-2022-02-27
- irq-urgent-2022-02-13
- irq-urgent-2021-12-12
- irq-urgent-2021-11-14
- irq-msi-2022-01-13
- irq-core-2023-04-24
- irq-core-2023-02-20
- irq-core-2022-12-10
- irq-core-2022-10-12
- irq-core-2022-08-01
- irq-core-2022-05-23
- irq-core-2022-03-21
- irq-core-2022-01-13
- irq-api-2022-02-21
- irq_urgent_for_v6.4_rc5
- irq_urgent_for_v6.3
- irq_urgent_for_v6.2_rc6
- irq_urgent_for_v6.0
- irq_urgent_for_v5.19_rc6
- irq_urgent_for_v5.18_rc5
- irq_urgent_for_v5.17_rc3
- irq_urgent_for_v5.17_rc2
- irq_urgent_for_v5.17_rc2_p2
- irq_urgent_for_v5.16_rc6
- hwmon-for-v6.3
- hwmon-for-v6.3-rc4
- hwmon-for-v6.3-rc3
- hwmon-for-v6.2
- hwmon-for-v6.2-rc1
- hwmon-for-v6.1
- hwmon-for-v6.1-rc8
- hwmon-for-v6.1-rc4
- hwmon-for-v6.1-rc2
- hwmon-for-v6.0-rc5
- hwmon-for-v6.0-rc4
- hwmon-for-v5.20
- hwmon-for-v5.19-rc5
- hwmon-for-v5.19-rc3
- hwmon-for-v5.19-rc1
- hwmon-for-v5.18
- hwmon-for-v5.18-rc7
- hwmon-for-v5.18-rc6
- hwmon-for-v5.17
- hwmon-for-v5.17-rc6
- hwmon-for-v5.17-rc2
- hwmon-for-v5.16-rc7
- hwmon-for-v5.16-rc5
- hwmon-fixes-for-v6.0-rc1
- for-linus-6.0
- for-linus-5.17
- for-linus
- devprop-5.19-rc1
- devprop-5.18-rc1
- devprop-5.17-rc1
- core-urgent-2023-01-12
- core-urgent-2022-05-08
- core-urgent-2022-04-03
- core-entry-2023-04-24
- core-debugobjects-2023-05-28
- core-debugobjects-2023-05-06
- core-debugobjects-2023-04-24
- core-debugobjects-2022-12-10
- core-debugobjects-2022-05-23
- core-core-2022-05-23
- core-core-2022-03-21
- core_urgent_for_v6.3_rc4
- core_urgent_for_v6.2_rc4
- core_urgent_for_v5.16_rc6
- core_entry_for_v5.17_rc1
- core_core_for_v5.17_rc1
- ata-6.6-rc1
- ata-6.5-rc5
- ata-6.5-rc4
- ata-6.5-rc3
- ata-6.5-rc1
- ata-6.4-rc7
- ata-6.4-rc5
- ata-6.4-rc3
- ata-6.4-rc1
- ata-6.3-rc7
- ata-6.3-rc3
- ata-6.3-rc1
- ata-6.3-fix
- ata-6.2-rc8
- ata-6.2-rc7
- ata-6.2-rc4
- ata-6.2-rc2
- ata-6.2-rc1
- ata-6.1-rc8
- ata-6.1-rc5
- ata-6.1-rc4
- ata-6.1-rc2
- ata-6.1-rc1
- ata-6.0-rc7
- ata-6.0-rc2
- ata-5.20-rc1
- ata-5.19-rc5
- ata-5.19-rc4
- ata-5.19-rc2
- ata-5.19-rc1
- ata-5.18-rc4
- ata-5.18-rc2
- ata-5.18-rc1
- ata-5.17-rc6
- ata-5.17-rc4
- ata-5.17-rc4-2
- ata-5.17-rc3
- ata-5.17-rc2
- ata-5.17-rc2-revert
- ata-5.17-rc1
- ata-5.17-rc1-part2
- amd-drm-next-6.4-2023-03-31
- amd-drm-next-6.4-2023-03-17
- amd-drm-next-6.3-2023-02-17
- amd-drm-next-6.3-2023-02-03
- amd-drm-next-6.3-2023-01-27
- amd-drm-next-6.3-2023-01-20
- amd-drm-next-6.3-2023-01-13
- amd-drm-next-6.3-2023-01-06
- amd-drm-next-6.2-2022-12-07
- amd-drm-next-6.2-2022-12-02
- amd-drm-next-6.2-2022-11-25
- amd-drm-next-6.2-2022-11-18
- amd-drm-next-6.2-2022-11-11
- amd-drm-next-6.2-2022-11-04
- amd-drm-next-6.1-2022-09-30
- amd-drm-next-6.1-2022-09-23
- amd-drm-next-6.1-2022-09-16
- amd-drm-next-6.1-2022-09-08
- amd-drm-next-5.20-2022-08-17
- amd-drm-next-5.20-2022-07-29
- amd-drm-next-5.20-2022-07-26
- amd-drm-next-5.20-2022-07-14
- amd-drm-next-5.20-2022-07-05
- amd-drm-next-5.19-2022-05-26
- amd-drm-next-5.19-2022-05-26-2
- amd-drm-next-5.19-2022-05-18
- amd-drm-next-5.19-2022-05-11
- amd-drm-next-5.19-2022-04-29
- amd-drm-next-5.19-2022-04-22
- amd-drm-next-5.19-2022-04-15
- amd-drm-next-5.18-2022-03-25
- amd-drm-next-5.18-2022-03-18
- amd-drm-next-5.18-2022-03-09
- amd-drm-next-5.18-2022-03-07
- amd-drm-next-5.18-2022-02-25
- amd-drm-next-5.18-2022-02-18
- amd-drm-next-5.18-2022-02-11
- amd-drm-next-5.18-2022-02-11-1
- amd-drm-next-5.17-2022-01-12
- amd-drm-next-5.17-2021-12-30
- amd-drm-next-5.17-2021-12-16
- amd-drm-next-5.17-2021-12-10
- amd-drm-next-5.17-2021-12-02
- amd-drm-fixes-6.3-2023-03-30
- amd-drm-fixes-6.3-2023-03-29
- amd-drm-fixes-6.3-2023-03-23
- amd-drm-fixes-6.3-2023-03-15
- amd-drm-fixes-6.3-2023-03-09
- amd-drm-fixes-6.3-2023-03-02
- amd-drm-fixes-6.2-2023-02-15
- amd-drm-fixes-6.2-2023-02-09
- amd-drm-fixes-6.2-2023-02-08
- amd-drm-fixes-6.2-2023-02-01
- amd-drm-fixes-6.2-2023-01-25
- amd-drm-fixes-6.2-2023-01-19
- amd-drm-fixes-6.2-2023-01-11
- amd-drm-fixes-6.2-2023-01-04
- amd-drm-fixes-6.2-2022-12-21
- amd-drm-fixes-6.2-2022-12-15
- amd-drm-fixes-6.1-2022-12-07
- amd-drm-fixes-6.1-2022-12-01
- amd-drm-fixes-6.1-2022-11-23
- amd-drm-fixes-6.1-2022-11-16
- amd-drm-fixes-6.1-2022-11-09
- amd-drm-fixes-6.1-2022-11-02
- amd-drm-fixes-6.1-2022-10-26-1
- amd-drm-fixes-6.1-2022-10-20
- amd-drm-fixes-6.1-2022-10-19
- amd-drm-fixes-6.1-2022-10-12
- amd-drm-fixes-6.0-2022-09-30-1
- amd-drm-fixes-6.0-2022-09-29
- amd-drm-fixes-6.0-2022-09-21
- amd-drm-fixes-6.0-2022-09-14
- amd-drm-fixes-6.0-2022-09-07
- amd-drm-fixes-6.0-2022-08-31
- amd-drm-fixes-6.0-2022-08-25
- amd-drm-fixes-6.0-2022-08-17
- amd-drm-fixes-5.19-2022-07-20
- amd-drm-fixes-5.19-2022-07-15
- amd-drm-fixes-5.19-2022-07-13
- amd-drm-fixes-5.19-2022-07-06
- amd-drm-fixes-5.19-2022-06-29
- amd-drm-fixes-5.19-2022-06-22
- amd-drm-fixes-5.19-2022-06-15
- amd-drm-fixes-5.19-2022-06-08
- amd-drm-fixes-5.18-2022-05-18
- amd-drm-fixes-5.18-2022-05-11
- amd-drm-fixes-5.18-2022-05-04
- amd-drm-fixes-5.18-2022-04-27
- amd-drm-fixes-5.18-2022-04-13
- amd-drm-fixes-5.18-2022-04-06
- amd-drm-fixes-5.17-2022-03-02
- amd-drm-fixes-5.17-2022-02-23
- amd-drm-fixes-5.17-2022-02-16
- amd-drm-fixes-5.17-2022-02-09
- amd-drm-fixes-5.17-2022-02-02
- amd-drm-fixes-5.17-2022-01-26
- amd-drm-fixes-5.17-2022-01-19
- amd-drm-fixes-5.16-2021-12-31
- amd-drm-fixes-5.16-2021-12-29
- amd-drm-fixes-5.16-2021-12-15
- amd-drm-fixes-5.16-2021-12-08
- amd-drm-fixes-5.16-2021-12-01
- amd-drm-fixes-5.16-2021-11-24
- amd-drm-fixes-5.16-2021-11-17
- acpi-6.6-rc1
- acpi-6.5-rc8
- acpi-6.5-rc6
- acpi-6.5-rc1
- acpi-6.5-rc1-3
- acpi-6.5-rc1-2
- acpi-6.4-rc8
- acpi-6.4-rc3
- acpi-6.4-rc1
- acpi-6.4-rc1-3
- acpi-6.4-rc1-2
- acpi-6.3-rc7
- acpi-6.3-rc6
- acpi-6.3-rc5
- acpi-6.3-rc4
- acpi-6.3-rc3
- acpi-6.3-rc1
- acpi-6.3-rc1-2
- acpi-6.2-rc6
- acpi-6.2-rc5
- acpi-6.2-rc4
- acpi-6.2-rc2
- acpi-6.2-rc1
- acpi-6.2-rc1-2
- acpi-6.1-rc4
- acpi-6.1-rc3
- acpi-6.1-rc2
- acpi-6.1-rc1
- acpi-6.1-rc1-2
- acpi-6.0-rc3
- acpi-5.20-rc1
- acpi-5.20-rc1-2
- acpi-5.19-rc8
- acpi-5.19-rc7
- acpi-5.19-rc6
- acpi-5.19-rc1
- acpi-5.19-rc1-2
- acpi-5.18-rc5
- acpi-5.18-rc2
- acpi-5.18-rc1
- acpi-5.18-rc1-2
- acpi-5.17-rc9
- acpi-5.17-rc5
- acpi-5.17-rc4
- acpi-5.17-rc3
- acpi-5.17-rc1
- acpi-5.17-rc1-3
- acpi-5.17-rc1-2
- acpi-5.16-rc5
- acpi-5.16-rc3
- acpi-5.16-rc2
- acpi-5.16-rc1-2
- Ubuntu-unstable-6.5.0-4.4
- Ubuntu-unstable-6.5.0-2.2
- Ubuntu-unstable-6.5.0-1.1
- Ubuntu-unstable-6.4.0-8.8
- Ubuntu-unstable-6.4.0-5.5
- Ubuntu-unstable-6.3.0-2.2
- Ubuntu-unstable-6.3.0-1.1
- Ubuntu-unstable-6.1.0-9.9
- Ubuntu-lowlatency-6.2.0-1014.14
- Ubuntu-lowlatency-6.2.0-1010.10
- Ubuntu-lowlatency-6.2.0-1009.9
- Ubuntu-lowlatency-6.2.0-1008.8
- Ubuntu-lowlatency-6.2.0-1005.5
- Ubuntu-lowlatency-6.2.0-1004.4
- Ubuntu-lowlatency-6.2.0-1003.3
- Ubuntu-lowlatency-6.2.0-1002.2
- Ubuntu-lowlatency-6.2.0-1001.1
- Ubuntu-lowlatency-6.1.0-1001.1
- Ubuntu-6.2.0-34.34
- Ubuntu-6.2.0-32.32
- Ubuntu-6.2.0-30.30
- Ubuntu-6.2.0-27.28
- Ubuntu-6.2.0-26.26
- Ubuntu-6.2.0-25.25
- Ubuntu-6.2.0-23.23
- Ubuntu-6.2.0-21.21
- Ubuntu-6.2.0-20.20
- Ubuntu-6.2.0-19.19
- Ubuntu-6.2.0-18.18
- Ubuntu-6.2.0-17.17
- Ubuntu-6.1.0-16.16
- Ubuntu-6.1.0-15.15
- Ubuntu-6.1.0-14.14
- Ubuntu-6.1.0-13.13
- Ubuntu-6.1.0-12.12
Showing
14 changed files
with
778 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
tools/testing/selftests/drivers/net/mlxsw/rif_mac_profile_scale.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
# Test for RIF MAC profiles resource. The test adds VLAN netdevices according to | ||
# the maximum number of RIF MAC profiles, sets each of them with a random | ||
# MAC address, and checks that eventually the number of occupied RIF MAC | ||
# profiles equals the maximum number of RIF MAC profiles. | ||
|
||
|
||
RIF_MAC_PROFILE_NUM_NETIFS=2 | ||
|
||
rif_mac_profiles_create() | ||
{ | ||
local count=$1; shift | ||
local should_fail=$1; shift | ||
local batch_file="$(mktemp)" | ||
|
||
for ((i = 1; i <= count; i++)); do | ||
vlan=$(( i*10 )) | ||
m=$(( i*11 )) | ||
|
||
cat >> $batch_file <<-EOF | ||
link add link $h1 name $h1.$vlan \ | ||
address 00:$m:$m:$m:$m:$m type vlan id $vlan | ||
address add 192.0.$m.1/24 dev $h1.$vlan | ||
EOF | ||
done | ||
|
||
ip -b $batch_file &> /dev/null | ||
check_err_fail $should_fail $? "RIF creation" | ||
|
||
rm -f $batch_file | ||
} | ||
|
||
rif_mac_profile_test() | ||
{ | ||
local count=$1; shift | ||
local should_fail=$1; shift | ||
|
||
rif_mac_profiles_create $count $should_fail | ||
|
||
occ=$(devlink -j resource show $DEVLINK_DEV \ | ||
| jq '.[][][] | select(.name=="rif_mac_profiles") |.["occ"]') | ||
|
||
[[ $occ -eq $count ]] | ||
check_err_fail $should_fail $? "Attempt to use $count profiles (actual result $occ)" | ||
} | ||
|
||
rif_mac_profile_setup_prepare() | ||
{ | ||
h1=${NETIFS[p1]} | ||
h2=${NETIFS[p2]} | ||
|
||
# Disable IPv6 on the two interfaces to avoid IPv6 link-local addresses | ||
# being generated and RIFs being created. | ||
sysctl_set net.ipv6.conf.$h1.disable_ipv6 1 | ||
sysctl_set net.ipv6.conf.$h2.disable_ipv6 1 | ||
|
||
ip link set $h1 up | ||
ip link set $h2 up | ||
} | ||
|
||
rif_mac_profile_cleanup() | ||
{ | ||
pre_cleanup | ||
|
||
ip link set $h2 down | ||
ip link set $h1 down | ||
|
||
sysctl_restore net.ipv6.conf.$h2.disable_ipv6 | ||
sysctl_restore net.ipv6.conf.$h1.disable_ipv6 | ||
} |
213 changes: 213 additions & 0 deletions
213
tools/testing/selftests/drivers/net/mlxsw/rif_mac_profiles.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
lib_dir=$(dirname $0)/../../../net/forwarding | ||
|
||
ALL_TESTS=" | ||
mac_profile_test | ||
" | ||
NUM_NETIFS=4 | ||
source $lib_dir/lib.sh | ||
source $lib_dir/tc_common.sh | ||
source $lib_dir/devlink_lib.sh | ||
|
||
h1_create() | ||
{ | ||
simple_if_init $h1 192.0.2.1/24 | ||
ip route add 198.51.100.0/24 vrf v$h1 nexthop via 192.0.2.2 | ||
|
||
tc qdisc add dev $h1 ingress | ||
} | ||
|
||
h1_destroy() | ||
{ | ||
tc qdisc del dev $h1 ingress | ||
|
||
ip route del 198.51.100.0/24 vrf v$h1 | ||
simple_if_fini $h1 192.0.2.1/24 | ||
} | ||
|
||
h2_create() | ||
{ | ||
simple_if_init $h2 198.51.100.1/24 | ||
ip route add 192.0.2.0/24 vrf v$h2 nexthop via 198.51.100.2 | ||
|
||
tc qdisc add dev $h2 ingress | ||
} | ||
|
||
h2_destroy() | ||
{ | ||
tc qdisc del dev $h2 ingress | ||
|
||
ip route del 192.0.2.0/24 vrf v$h2 | ||
simple_if_fini $h2 198.51.100.1/24 | ||
} | ||
|
||
router_create() | ||
{ | ||
ip link set dev $rp1 up | ||
ip link set dev $rp2 up | ||
|
||
tc qdisc add dev $rp1 clsact | ||
tc qdisc add dev $rp2 clsact | ||
ip address add 192.0.2.2/24 dev $rp1 | ||
ip address add 198.51.100.2/24 dev $rp2 | ||
} | ||
|
||
router_destroy() | ||
{ | ||
ip address del 198.51.100.2/24 dev $rp2 | ||
ip address del 192.0.2.2/24 dev $rp1 | ||
tc qdisc del dev $rp2 clsact | ||
tc qdisc del dev $rp1 clsact | ||
|
||
ip link set dev $rp2 down | ||
ip link set dev $rp1 down | ||
} | ||
|
||
setup_prepare() | ||
{ | ||
h1=${NETIFS[p1]} | ||
rp1=${NETIFS[p2]} | ||
|
||
rp2=${NETIFS[p3]} | ||
h2=${NETIFS[p4]} | ||
|
||
vrf_prepare | ||
|
||
h1_create | ||
h2_create | ||
|
||
router_create | ||
|
||
forwarding_enable | ||
} | ||
|
||
cleanup() | ||
{ | ||
pre_cleanup | ||
|
||
forwarding_restore | ||
|
||
router_destroy | ||
|
||
h2_destroy | ||
h1_destroy | ||
|
||
vrf_cleanup | ||
} | ||
|
||
h1_to_h2() | ||
{ | ||
local test_name=$@; shift | ||
local smac=$(mac_get $rp2) | ||
|
||
RET=0 | ||
|
||
# Replace neighbour to avoid first packet being forwarded in software | ||
ip neigh replace dev $rp2 198.51.100.1 lladdr $(mac_get $h2) | ||
|
||
# Add a filter to ensure that packets are forwarded in hardware. Cannot | ||
# match on source MAC because it is not set in eACL after routing | ||
tc filter add dev $rp2 egress proto ip pref 1 handle 101 \ | ||
flower skip_sw ip_proto udp src_port 12345 dst_port 54321 \ | ||
action pass | ||
|
||
# Add a filter to ensure that packets are received with the correct | ||
# source MAC | ||
tc filter add dev $h2 ingress proto ip pref 1 handle 101 \ | ||
flower skip_sw src_mac $smac ip_proto udp src_port 12345 \ | ||
dst_port 54321 action pass | ||
|
||
$MZ $h1 -a own -b $(mac_get $rp1) -t udp "sp=12345,dp=54321" \ | ||
-A 192.0.2.1 -B 198.51.100.1 -c 10 -p 100 -d 1msec -q | ||
|
||
tc_check_packets "dev $rp2 egress" 101 10 | ||
check_err $? "packets not forwarded in hardware" | ||
|
||
tc_check_packets "dev $h2 ingress" 101 10 | ||
check_err $? "packets not forwarded with correct source mac" | ||
|
||
log_test "h1->h2: $test_name" | ||
|
||
tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower | ||
tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower | ||
ip neigh del dev $rp2 198.51.100.1 lladdr $(mac_get $h2) | ||
} | ||
|
||
h2_to_h1() | ||
{ | ||
local test_name=$@; shift | ||
local rp1_mac=$(mac_get $rp1) | ||
|
||
RET=0 | ||
|
||
ip neigh replace dev $rp1 192.0.2.1 lladdr $(mac_get $h1) | ||
|
||
tc filter add dev $rp1 egress proto ip pref 1 handle 101 \ | ||
flower skip_sw ip_proto udp src_port 54321 dst_port 12345 \ | ||
action pass | ||
|
||
tc filter add dev $h1 ingress proto ip pref 1 handle 101 \ | ||
flower skip_sw src_mac $rp1_mac ip_proto udp src_port 54321 \ | ||
dst_port 12345 action pass | ||
|
||
$MZ $h2 -a own -b $(mac_get $rp2) -t udp "sp=54321,dp=12345" \ | ||
-A 198.51.100.1 -B 192.0.2.1 -c 10 -p 100 -d 1msec -q | ||
|
||
tc_check_packets "dev $rp1 egress" 101 10 | ||
check_err $? "packets not forwarded in hardware" | ||
|
||
tc_check_packets "dev $h1 ingress" 101 10 | ||
check_err $? "packets not forwarded with correct source mac" | ||
|
||
log_test "h2->h1: $test_name" | ||
|
||
tc filter del dev $h1 ingress protocol ip pref 1 handle 101 flower | ||
tc filter del dev $rp1 egress protocol ip pref 1 handle 101 flower | ||
ip neigh del dev $rp1 192.0.2.1 lladdr $(mac_get $h1) | ||
} | ||
|
||
smac_test() | ||
{ | ||
local test_name=$@; shift | ||
|
||
# Test that packets forwarded to $h2 via $rp2 are forwarded with the | ||
# current source MAC of $rp2 | ||
h1_to_h2 $test_name | ||
|
||
# Test that packets forwarded to $h1 via $rp1 are forwarded with the | ||
# current source MAC of $rp1. This MAC is never changed during the test, | ||
# but given the shared nature of MAC profile, the point is to see that | ||
# changes to the MAC of $rp2 do not affect that of $rp1 | ||
h2_to_h1 $test_name | ||
} | ||
|
||
mac_profile_test() | ||
{ | ||
local rp2_mac=$(mac_get $rp2) | ||
|
||
# Test behavior when the RIF backing $rp2 is transitioned to use | ||
# a new MAC profile | ||
ip link set dev $rp2 addr 00:11:22:33:44:55 | ||
smac_test "new mac profile" | ||
|
||
# Test behavior when the MAC profile used by the RIF is edited | ||
ip link set dev $rp2 address 00:22:22:22:22:22 | ||
smac_test "edit mac profile" | ||
|
||
# Restore original MAC | ||
ip link set dev $rp2 addr $rp2_mac | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
setup_prepare | ||
setup_wait | ||
|
||
mac_profiles=$(devlink_resource_size_get rif_mac_profiles) | ||
if [[ $mac_profiles -ne 1 ]]; then | ||
tests_run | ||
fi | ||
|
||
exit $EXIT_STATUS |
117 changes: 117 additions & 0 deletions
117
tools/testing/selftests/drivers/net/mlxsw/rif_mac_profiles_occ.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
lib_dir=$(dirname $0)/../../../net/forwarding | ||
|
||
ALL_TESTS=" | ||
rif_mac_profile_edit_test | ||
" | ||
NUM_NETIFS=2 | ||
source $lib_dir/lib.sh | ||
source $lib_dir/devlink_lib.sh | ||
|
||
setup_prepare() | ||
{ | ||
h1=${NETIFS[p1]} | ||
h2=${NETIFS[p2]} | ||
|
||
# Disable IPv6 on the two interfaces to avoid IPv6 link-local addresses | ||
# being generated and RIFs being created | ||
sysctl_set net.ipv6.conf.$h1.disable_ipv6 1 | ||
sysctl_set net.ipv6.conf.$h2.disable_ipv6 1 | ||
|
||
ip link set $h1 up | ||
ip link set $h2 up | ||
} | ||
|
||
cleanup() | ||
{ | ||
pre_cleanup | ||
|
||
ip link set $h2 down | ||
ip link set $h1 down | ||
|
||
sysctl_restore net.ipv6.conf.$h2.disable_ipv6 | ||
sysctl_restore net.ipv6.conf.$h1.disable_ipv6 | ||
|
||
# Reload in order to clean all the RIFs and RIF MAC profiles created | ||
devlink_reload | ||
} | ||
|
||
create_max_rif_mac_profiles() | ||
{ | ||
local count=$1; shift | ||
local batch_file="$(mktemp)" | ||
|
||
for ((i = 1; i <= count; i++)); do | ||
vlan=$(( i*10 )) | ||
m=$(( i*11 )) | ||
|
||
cat >> $batch_file <<-EOF | ||
link add link $h1 name $h1.$vlan \ | ||
address 00:$m:$m:$m:$m:$m type vlan id $vlan | ||
address add 192.0.$m.1/24 dev $h1.$vlan | ||
EOF | ||
done | ||
|
||
ip -b $batch_file &> /dev/null | ||
rm -f $batch_file | ||
} | ||
|
||
rif_mac_profile_replacement_test() | ||
{ | ||
local h1_10_mac=$(mac_get $h1.10) | ||
|
||
RET=0 | ||
|
||
ip link set $h1.10 address 00:12:34:56:78:99 | ||
check_err $? | ||
|
||
log_test "RIF MAC profile replacement" | ||
|
||
ip link set $h1.10 address $h1_10_mac | ||
} | ||
|
||
rif_mac_profile_shared_replacement_test() | ||
{ | ||
local count=$1; shift | ||
local i=$((count + 1)) | ||
local vlan=$(( i*10 )) | ||
local m=11 | ||
|
||
RET=0 | ||
|
||
# Create a VLAN netdevice that has the same MAC as the first one. | ||
ip link add link $h1 name $h1.$vlan address 00:$m:$m:$m:$m:$m \ | ||
type vlan id $vlan | ||
ip address add 192.0.$m.1/24 dev $h1.$vlan | ||
|
||
# MAC replacement should fail because all the MAC profiles are in use | ||
# and the profile is shared between multiple RIFs | ||
m=$(( i*11 )) | ||
ip link set $h1.$vlan address 00:$m:$m:$m:$m:$m &> /dev/null | ||
check_fail $? | ||
|
||
log_test "RIF MAC profile shared replacement" | ||
|
||
ip link del dev $h1.$vlan | ||
} | ||
|
||
rif_mac_profile_edit_test() | ||
{ | ||
local count=$(devlink_resource_size_get rif_mac_profiles) | ||
|
||
create_max_rif_mac_profiles $count | ||
|
||
rif_mac_profile_replacement_test | ||
rif_mac_profile_shared_replacement_test $count | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
setup_prepare | ||
setup_wait | ||
|
||
tests_run | ||
|
||
exit $EXIT_STATUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
source ../rif_mac_profile_scale.sh | ||
|
||
rif_mac_profile_get_target() | ||
{ | ||
local should_fail=$1 | ||
local target | ||
|
||
target=$(devlink_resource_size_get rif_mac_profiles) | ||
|
||
if ((! should_fail)); then | ||
echo $target | ||
else | ||
echo $((target + 1)) | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tools/testing/selftests/drivers/net/mlxsw/spectrum/rif_mac_profile_scale.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
source ../rif_mac_profile_scale.sh | ||
|
||
rif_mac_profile_get_target() | ||
{ | ||
local should_fail=$1 | ||
local target | ||
|
||
target=$(devlink_resource_size_get rif_mac_profiles) | ||
|
||
if ((! should_fail)); then | ||
echo $target | ||
else | ||
echo $((target + 1)) | ||
fi | ||
} |