-
Notifications
You must be signed in to change notification settings - Fork 117
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
[rfc1213] Interface MIB add l3 vlan interfaces & aggregate rif counters #133
Conversation
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Could you resolve the conflicts? |
@@ -264,6 +298,29 @@ def _get_counter(self, oid, table_name): | |||
mibs.logger.warning("SyncD 'COUNTERS_DB' missing attribute '{}'.".format(e)) | |||
return None | |||
|
|||
def aggregate_counters(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aggregate_counters [](start = 8, length = 18)
Is it only for Mellanox SKUs? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only be executed if COUNTERS DB contains the rif counters. If RIF counters is not supported/disabled we will have unchanged behavior.
@@ -283,7 +340,14 @@ def get_counter(self, sub_id, table_name): | |||
counter_value = 0 | |||
for lag_member in self.lag_name_if_name_map[self.oid_lag_name_map[oid]]: | |||
counter_value += self._get_counter(mibs.get_index(lag_member), table_name) | |||
|
|||
# import pdb; pdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove dead code #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
sai_lag_id = self.lag_sai_map[self.oid_lag_name_map[oid]] | ||
sai_lag_rif_id = self.port_rif_map[sai_lag_id] | ||
if sai_lag_rif_id in self.rif_port_map: | ||
_table_name = bytes(getattr(table_name, 'name', table_name), 'utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_table_name [](start = 16, length = 11)
leading underscore is for private class member. Could you use other name convention? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comments
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Retest this please |
Test can not pass until sonic-net/sonic-py-swsssdk#78 is merged. |
Retest this please |
Test did not pass even after sonic-net/sonic-py-swsssdk#78 merged. |
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Hi @qiluo-msft, I added the mock data for the test to pass. Can we go forward and merge this? |
…f counters (sonic-net#133)" This reverts commit 253f58e. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
…rs (#169) **- What I did** Rework based on #133 and feedback #148. **- How I did it** - merge #133 with upstream master. - Fix UnavailableDataError when RIF counters are not enabled. - Make RIF keys in maps unique in multi asic env. **- How to verify it** - Disable rif counters - restart swss - snmpwalk - Verify no UnavailableDataError in logs - Verify port counters are returned - Enable rif counters - snmpwalk - Verify no error in logs - Verify error in/out counters are aggregated for rif ports and portchannels - Verify VLAN RIF counters are present in the MIB. **- Description for the changelog** Added support for aggregated router interface counters and L3 VLAN counters to RFC1213 MIB.
- What I did
- How I did it
- How to verify it
- Description for the changelog
According to HLD
Implies #4655
Relies on #78