Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202012] Fix IfHighSpeed UT issue on 202012 #297

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
748b545
[SNMP] Update description of entPhysicalDescr mib in case interface i…
liorghub Apr 5, 2021
946e5cf
Fix: SonicV2Connector behavior change: get_all will return empty dict…
qiluo-msft Jul 12, 2021
a4dd3bf
Non-block reading counters to tolerate corrupted/delayed counters in …
qiluo-msft Aug 4, 2021
c160c2b
CPU Spike because of redundant and flooded keyspace notifis handled (…
vivekrnv Aug 5, 2021
5c0d941
[201911][RFC1213]: Initialize lag oid map in reinit_data (#234)
SuvarnaMeenakshi Sep 17, 2021
60f5237
[multi-asic]: Udpate to use SonicDBConfig from swsscommon (#219)
SuvarnaMeenakshi Jun 30, 2021
414692f
LLDPLocalSystemDataUpdater Exception Log Handled (#249)
vivekrnv Apr 4, 2022
c75440b
Fix: not to use blocking get_all() after keys() (#255)
qiluo-msft May 2, 2022
13ddb0e
Fix: if routestr does not exist, skip (#257)
qiluo-msft May 5, 2022
792afe8
Don't cache the vlan-id if it is not valid from DB (#273)
zhenggen-xu Nov 14, 2022
00b4dc0
Remove error logging on "failed in fdb_vlanmac" (#272)
qiluo-msft Nov 14, 2022
e60a64c
Use github code scanning instead of LGTM (#274)
liushilongbuaa Nov 30, 2022
7147354
Fix: zero route may have empty nexthop (#276)
qiluo-msft Feb 15, 2023
fba50c6
[202012]: snmp vlan support per RFC1213 and added the missing support…
SuvarnaMeenakshi Mar 4, 2023
551898e
Revert "[202012]: snmp vlan support per RFC1213 and added the missing…
SuvarnaMeenakshi Mar 29, 2023
b292c01
Fix FdbUpdater crash when SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID attribute…
liuh-80 Aug 30, 2023
64f0def
Support interface speed for PortChannels (#262)
lukasstockner Sep 14, 2023
2cb8241
Add ifhighspeed UT (#296)
liuh-80 Oct 10, 2023
52021b0
Fix backup port rfc2863 UT to 202012 branch issue
liuh-80 Oct 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: not to use blocking get_all() after keys() (#255)
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().

Prevent unnecessary timeout of blocking get_all().
  • Loading branch information
qiluo-msft committed May 3, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c75440bb93ecea3d1a8d5299257e6acdf86adc52
4 changes: 2 additions & 2 deletions src/sonic_ax_impl/mibs/__init__.py
Original file line number Diff line number Diff line change
@@ -553,15 +553,15 @@ def dbs_get_all(dbs, db_name, _hash, *args, **kwargs):
result = {}
# If there are multiple namespaces, _hash might not be
# present in all namespace, ignore if not present in a
# specfic namespace.
# specific namespace.
if len(dbs) > 1:
tmp_kwargs = kwargs.copy()
tmp_kwargs['blocking'] = False
else:
tmp_kwargs = kwargs
for db_conn in dbs:
ns_result = db_conn.get_all(db_name, _hash, *args, **tmp_kwargs)
if ns_result is not None:
if ns_result:
result.update(ns_result)
return result

17 changes: 9 additions & 8 deletions src/sonic_ax_impl/mibs/ietf/rfc1213.py
Original file line number Diff line number Diff line change
@@ -150,14 +150,15 @@ def update_data(self):
ipnstr = routestr[len("ROUTE_TABLE:"):]
if ipnstr == "0.0.0.0/0":
ipn = ipaddress.ip_network(ipnstr)
ent = Namespace.dbs_get_all(self.db_conn, mibs.APPL_DB, routestr, blocking=True)
nexthops = ent["nexthop"]
for nh in nexthops.split(','):
# TODO: if ipn contains IP range, create more sub_id here
sub_id = ip2byte_tuple(ipn.network_address)
self.route_list.append(sub_id)
self.nexthop_map[sub_id] = ipaddress.ip_address(nh).packed
break # Just need the first nexthop
ent = Namespace.dbs_get_all(self.db_conn, mibs.APPL_DB, routestr, blocking=False)
if ent:
nexthops = ent["nexthop"]
for nh in nexthops.split(','):
# TODO: if ipn contains IP range, create more sub_id here
sub_id = ip2byte_tuple(ipn.network_address)
self.route_list.append(sub_id)
self.nexthop_map[sub_id] = ipaddress.ip_address(nh).packed
break # Just need the first nexthop

self.route_list.sort()

2 changes: 1 addition & 1 deletion src/sonic_ax_impl/mibs/ietf/rfc4363.py
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ def update_data(self):
mibs.logger.error("SyncD 'ASIC_DB' includes invalid FDB_ENTRY '{}': {}.".format(fdb_str, e))
continue

ent = Namespace.dbs_get_all(self.db_conn, mibs.ASIC_DB, s, blocking=True)
ent = Namespace.dbs_get_all(self.db_conn, mibs.ASIC_DB, s, blocking=False)
# Example output: oid:0x3a000000000608
bridge_port_id = ent["SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID"][6:]
if bridge_port_id not in self.if_bpid_map: