[crmorch]: neighbor used counter increased twice#472
[crmorch]: neighbor used counter increased twice#472prsunny merged 2 commits intosonic-net:masterfrom
Conversation
|
can you sign the cla? |
| gCrmOrch->decCrmResUsedCounter(CrmResourceType::CRM_IPV6_NEIGHBOR); | ||
| } | ||
|
|
||
| if (neighbor_entry.ip_address.addr_family == SAI_IP_ADDR_FAMILY_IPV4) |
There was a problem hiding this comment.
Looks like a previous review comment on this got missed half-way.
Suggest to keep this here and remove the increment counter above addNextHop. You need not decrement the counter if addNextHop failed.
There was a problem hiding this comment.
I thought same as you said at the beginning, but then found when failed both addNextHop and remove_neighbor_entry we should add increment there, that is less readability.
|
We have a testcase to verify the used counter but since the check was |
|
why is this bug not caught by the virtual switch test? Is it possible to add virtual switch to catch this issue? |
|
@lguohan, VS test also checks |
* [crmorch]: neighbor used counter increased twice
* [crmorch]: neighbor used counter increased twice
* [sonic-utilities] managementVRF cli support(l3mdev) This commit adds CLI support for management VRF using l3dev. mVRF can be enabled using config vrf add mgmt and deleted using config vrf del mgmt. Show commands for management VRF are added which displays the linux command output, will update show command display after concluding what would be the output for the show commands. Added cli to configure management interface(eth0), config interface ip eth0 add can be used to configure eth0 ip and config ip eth0 remove is used to remove eth0 ip. New cli config/show commands: config vrf add mgmt config vrf del mgmt config interface eth0 ip add ip/mask gatewayIP config interface eth0 ip remove ip/mask show mgmt-vrf show mgmt-vrf route show mgmt-vrf addresses show mgmt-vrf interfaces Signed-off-by: Harish Venkatraman <[email protected]>
* [crmorch]: neighbor used counter increased twice
…ic-net#501) * [crmorch]: neighbor used counter increased twice
…-net#472) Signed-off-by: Danny Allen [email protected]
What I did
Modified crmorch stats for neighbor used counter. Increase it just after create neighbor entry success. Decrease it when remove neighbor entry success in case of add nexthop failure.
Why I did it
Test found bug.
How I verified it
By code walkthrough I found neighbor used counter increased both before and after add nexthop.
Details if related
before add ipv4 neighbor,the value of crm_stats_ipv4_neighbor_used is 8
3) "crm_stats_ipv4_neighbor_used"
4) "8"
after add one ipv4 neighbor,the value of crm_stats_ipv4_neighbor_used is 10
3) "crm_stats_ipv4_neighbor_used"
4) "10"