Skip to content

[sub intf] ecmp hardware convergence acceleration at parent port oper status changes#1492

Merged
lguohan merged 12 commits intosonic-net:masterfrom
wendani:sub_intf_nhg
Nov 26, 2020
Merged

[sub intf] ecmp hardware convergence acceleration at parent port oper status changes#1492
lguohan merged 12 commits intosonic-net:masterfrom
wendani:sub_intf_nhg

Conversation

@wendani
Copy link
Contributor

@wendani wendani commented Nov 1, 2020

What I did
Take sub port interface into ecmp acceleration account when a next hop object goes through a local sub port interface.

References:

Why I did it
Enhance sub port interface feature out of the responsibility as a designer.

How I verified it
vs test:

  1. test_sub_port_intf_nhg_accel

Create multi-next-hop route entry. Next hop object goes through a local sub port interface. Bring oper status down parent port of a next hop object, and verify that the # of next hop group members changes correctly accordingly.

Before the change, all four sub test cases fail:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_sub_port_intf.py:682: in _test_sub_port_intf_nhg_accel
    nhg_oid, nhop_num, create_intf_on_parent_port)
test_sub_port_intf.py:605: in check_nhg_members_on_parent_port_oper_status_change
    ((nhop_num - 1) - i) * 2)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=2,                 received=3 (('oid:0x2d0000000005c3', 'oid:0x2d0000000005c4', 'oid:0x2d0000000005c2')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=4,                 received=5 (('oid:0x2d0000000005cc', 'oid:0x2d0000000005ca', 'oid:0x2d0000000005cd', 'oid:0x2d0000000005c9', 'oid:0x2d0000000005cb')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=2,                 received=3 (('oid:0x2d0000000005c7', 'oid:0x2d0000000005c5', 'oid:0x2d0000000005c6')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=4,                 received=5 (('oid:0x2d0000000005cf', 'oid:0x2d0000000005cd', 'oid:0x2d0000000005cc', 'oid:0x2d0000000005d0', 'oid:0x2d0000000005ce')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError
  1. test_sub_port_intf_oper_down_with_pending_neigh_route_tasks

Test case to mimic the race described in #579 between a parent port oper status down event and buffered neigh, ecmp route entry events:

Create sub port interface. Bring parent port oper status down. Mimic buffered neigh event by creating next hop object that goes through a sub port interface. Mimic buffered route entry event by creating a multi-next-hop route entry. Verify the # of next hop group members created. Specifically, next hop group member is not created on next hop object that goes through a sub port interface whose parent port is oper status down.

Before the change, all four sub test cases fail:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_sub_port_intf.py:788: in _test_sub_port_intf_oper_down_with_pending_neigh_route_tasks
    (nhop_num - 1) - i if create_intf_on_parent_port == False else ((nhop_num - 1) - i) * 2)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=2,                 received=3 (('oid:0x2d0000000005c4', 'oid:0x2d0000000005c2', 'oid:0x2d0000000005c3')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=4,                 received=5 (('oid:0x2d0000000005ca', 'oid:0x2d0000000005cc', 'oid:0x2d0000000005cb', 'oid:0x2d0000000005c8', 'oid:0x2d0000000005c9')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=2,                 received=3 (('oid:0x2d0000000005c7', 'oid:0x2d0000000005c5', 'oid:0x2d0000000005c6')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError


>               received={len(result)} ({result}), table=\"{table_name}\""
E           AssertionError: Unexpected number of keys: expected=4,                 received=5 (('oid:0x2d0000000005cf', 'oid:0x2d0000000005cb', 'oid:0x2d0000000005cc', 'oid:0x2d0000000005ce', 'oid:0x2d0000000005cd')), table="ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER"

dvslib/dvs_database.py:328: AssertionError

Details if related
Contains and thus after #1479

@wendani
Copy link
Contributor Author

wendani commented Nov 7, 2020

retest vs please

@wendani
Copy link
Contributor Author

wendani commented Nov 25, 2020

retest vs please

@lguohan lguohan merged commit a1d6300 into sonic-net:master Nov 26, 2020
daall pushed a commit to daall/sonic-swss that referenced this pull request Dec 7, 2020
… status changes (sonic-net#1492)

Take sub port interface into ecmp acceleration account when a next hop object goes through a local sub port interface.

Signed-off-by: Wenda Ni <[email protected]>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
… status changes (sonic-net#1492)

Take sub port interface into ecmp acceleration account when a next hop object goes through a local sub port interface.

Signed-off-by: Wenda Ni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants