• Ido Schimmel's avatar
    selftests: forwarding: Add bridge MDB test · b6d00da0
    Ido Schimmel authored
    Add a selftests that includes the following test cases:
    
    1. Configuration tests. Both valid and invalid configurations are
       tested across all entry types (e.g., L2, IPv4).
    
    2. Forwarding tests. Both host and port group entries are tested across
       all entry types.
    
    3. Interaction between user installed MDB entries and IGMP / MLD control
       packets.
    
    Example output:
    
    INFO: # Host entries configuration tests
    TEST: Common host entries configuration tests (IPv4)                [ OK ]
    TEST: Common host entries configuration tests (IPv6)                [ OK ]
    TEST: Common host entries configuration tests (L2)                  [ OK ]
    
    INFO: # Port group entries configuration tests - (*, G)
    TEST: Common port group entries configuration tests (IPv4 (*, G))   [ OK ]
    TEST: Common port group entries configuration tests (IPv6 (*, G))   [ OK ]
    TEST: IPv4 (*, G) port group entries configuration tests            [ OK ]
    TEST: IPv6 (*, G) port group entries configuration tests            [ OK ]
    
    INFO: # Port group entries configuration tests - (S, G)
    TEST: Common port group entries configuration tests (IPv4 (S, G))   [ OK ]
    TEST: Common port group entries configuration tests (IPv6 (S, G))   [ OK ]
    TEST: IPv4 (S, G) port group entries configuration tests            [ OK ]
    TEST: IPv6 (S, G) port group entries configuration tests            [ OK ]
    
    INFO: # Port group entries configuration tests - L2
    TEST: Common port group entries configuration tests (L2 (*, G))     [ OK ]
    TEST: L2 (*, G) port group entries configuration tests              [ OK ]
    
    INFO: # Forwarding tests
    TEST: IPv4 host entries forwarding tests                            [ OK ]
    TEST: IPv6 host entries forwarding tests                            [ OK ]
    TEST: L2 host entries forwarding tests                              [ OK ]
    TEST: IPv4 port group "exclude" entries forwarding tests            [ OK ]
    TEST: IPv6 port group "exclude" entries forwarding tests            [ OK ]
    TEST: IPv4 port group "include" entries forwarding tests            [ OK ]
    TEST: IPv6 port group "include" entries forwarding tests            [ OK ]
    TEST: L2 port entries forwarding tests                              [ OK ]
    
    INFO: # Control packets tests
    TEST: IGMPv3 MODE_IS_INCLUE tests                                   [ OK ]
    TEST: MLDv2 MODE_IS_INCLUDE tests                                   [ OK ]
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    b6d00da0
bridge_mdb.sh 37.9 KB