Open bingwang-ms opened 3 years ago
I tested this manually and could observe counters being updated correctly. May be is it related to polling interval? I did the learn/flush after setting polling interval.
admin@str2-acs-02:~$ show mac
No. Vlan MacAddress Port Type
----- ------ ------------ ------ ------
Total number of entries 0
admin@str2-acs-02:~$ crm show resources fdb
Resource Name Used Count Available Count
--------------- ------------ -----------------
fdb_entry 0 32767
admin@str2-acs-02:~$ show mac
No. Vlan MacAddress Port Type
----- ------ ----------------- --------- -------
1 1000 98:03:9B:03:22:01 Ethernet4 Dynamic
Total number of entries 1
admin@str2-acs-02:~$ crm show resources fdb
Resource Name Used Count Available Count
--------------- ------------ -----------------
fdb_entry 1 32766
admin@str2-acs-02:~$ fdbclear
FDB entries are cleared.
admin@str2-acs-02:~$ show mac
No. Vlan MacAddress Port Type
----- ------ ------------ ------ ------
Total number of entries 0
admin@str2-acs-02:~$ crm show resources fdb
Resource Name Used Count Available Count
--------------- ------------ -----------------
fdb_entry 0 32767
The issue shouldn't be caused by polling interval because I have set it to 1 second. The issue is not consistently repro. I only encountered twice when debugging test_crm_fdb.
I just repro. Can you try to run test_crm_fdb_entry
continuously and see if it repro?
admin@str2-7050cx3-acs-01:~$ crm show summary
Polling Interval: 1 second(s)
admin@str2-7050cx3-acs-01:~$ fdbshow
No. Vlan MacAddress Port Type
----- ------ ------------ ------ ------
Total number of entries 0
admin@str2-7050cx3-acs-01:~$ crm show resources fdb
Resource Name Used Count Available Count
--------------- ------------ -----------------
fdb_entry 1 32767
admin@str2-7050cx3-acs-01:~$ fdbshow
No. Vlan MacAddress Port Type
----- ------ ------------ ------ ------
Total number of entries 0
I think it is not a issue, because TD3 internal used 1 fdb counter:
drivshell>l2 show l2 show mac=00:e0:ec:cc:1b:a2 vlan=1 GPORT=0x0 modid=0 port=0/cpu0 Static CPU
it is not show in sonic show mac, but it can show in crm.
Description
crm show resources fdb
gives incorrect FDB entry count. It returns1
although there is no FDB. The polling interval has been set to1
second.Steps to reproduce the issue: The issue is not consistently repro.
test_crm_fdb_entry
.Describe the results you received:
crm show resources fdb
should return 0 if no FDB entry exists.Describe the results you expected:
crm show resources fdb
should return 1.Additional information you deem important (e.g. issue happens only occasionally):