Skip to content

Commit

Permalink
[FC] remove FC delay status field
Browse files Browse the repository at this point in the history
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
  • Loading branch information
stepanblyschak committed Oct 11, 2024
1 parent 8bd7dc6 commit 4bdcf41
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 85 deletions.
10 changes: 1 addition & 9 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ def enable_counter_group(db, name):
info = {}
info['FLEX_COUNTER_STATUS'] = 'enable'
db.mod_entry("FLEX_COUNTER_TABLE", name, info)
else:
entry_info.update({"FLEX_COUNTER_DELAY_STATUS":"false"})
db.mod_entry("FLEX_COUNTER_TABLE", name, entry_info)

def enable_rates():
# set the default interval for rates
Expand All @@ -39,7 +36,7 @@ def enable_rates():
def enable_counters():
db = swsscommon.ConfigDBConnector()
db.connect()
default_enabled_counters = ['PORT', 'RIF', 'QUEUE', 'PFCWD', 'PG_WATERMARK', 'PG_DROP',
default_enabled_counters = ['PORT', 'RIF', 'QUEUE', 'PFCWD', 'PG_WATERMARK', 'PG_DROP',
'QUEUE_WATERMARK', 'BUFFER_POOL_WATERMARK', 'PORT_BUFFER_DROP', 'ACL']
dpu_counters = ["ENI"]

Expand All @@ -52,11 +49,6 @@ def enable_counters():
for key in dpu_counters:
enable_counter_group(db, key)

# Set FLEX_COUNTER_DELAY_STATUS to false for those non-default counters
keys = db.get_keys('FLEX_COUNTER_TABLE')
for key in keys:
if key not in default_enabled_counters:
enable_counter_group(db, key)
enable_rates()


Expand Down
1 change: 0 additions & 1 deletion files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "enable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
Expand Down
2 changes: 0 additions & 2 deletions src/sonic-config-engine/config_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def generate_common_config(data):
data['FLEX_COUNTER_TABLE'] = {
'ACL': {
'FLEX_COUNTER_STATUS': 'disable',
'FLEX_COUNTER_DELAY_STATUS': 'true',
'POLL_INTERVAL': '10000'
}
}
Expand Down Expand Up @@ -270,4 +269,3 @@ def get_available_config():
def generate_sample_config(data, setting_name):
data = generate_common_config(data)
return _sample_generators[setting_name.lower()](data)

2 changes: 0 additions & 2 deletions src/sonic-config-engine/data/l1intf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
Expand All @@ -30,4 +29,3 @@

}
}

1 change: 0 additions & 1 deletion src/sonic-config-engine/data/l2switch.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
Expand Down
1 change: 0 additions & 1 deletion src/sonic-config-engine/data/l3intf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
Expand Down
2 changes: 0 additions & 2 deletions src/sonic-config-engine/tests/data/rsyslog/config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_DELAY_STATUS": "false",
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
}
Expand Down Expand Up @@ -911,4 +910,3 @@
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_DELAY_STATUS": "true",
"FLEX_COUNTER_STATUS": "disable",
"POLL_INTERVAL": "10000"
}
Expand Down
57 changes: 0 additions & 57 deletions src/sonic-yang-models/yang-models/sonic-flex_counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -63,19 +60,13 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
}

container ENI {
/* ENI_STAT_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -86,19 +77,13 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
}

container PG_DROP {
/* PG_DROP_STAT_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -109,9 +94,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -122,9 +104,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -135,19 +114,13 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
}

container PORT_BUFFER_DROP {
/* PORT_BUFFER_DROP_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -158,9 +131,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -171,9 +141,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -184,9 +151,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -197,19 +161,13 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
}

container ACL {
/* ACL_STAT_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -220,9 +178,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -233,9 +188,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -246,9 +198,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -259,9 +208,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand All @@ -272,9 +218,6 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
Expand Down

0 comments on commit 4bdcf41

Please sign in to comment.