Fix sFlow sampling-rate and admin-state#1728
Conversation
…ed but there are local sampling-rate configurations. Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
|
@prsunny @dgsudharsan Please review this PR. |
|
@venkatmahalingam can you please verify if this can be taken to 202012? |
@liat-grozovik Cherry-pick to 202012 works fine if we do it in the PR merge order i.e first Vivek's commit and then this PR commit. |
Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
|
This pull request introduces 1 alert when merging 2efe415 into b962a60 - view on LGTM.com new alerts:
|
|
@dgsudharsan, please review |
|
The PR is failing on VS test
|
Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
Yes, looking into the failures. |
cfgmgr/sflowmgr.cpp
Outdated
| // If the Local Conf is already present, dont't override it even though the speed is changed | ||
| if (new_port || (speed_change && !m_sflowPortConfMap[key].local_conf)) | ||
| if (new_port || (speed_change && | ||
| !(m_sflowPortConfMap[key].local_rate_cfg || m_sflowPortConfMap[key].local_admin_cfg))) |
There was a problem hiding this comment.
This can be removed "|| m_sflowPortConfMap[key].local_admin_cfg" as the rate update based on speed change is only blocked if there is any local_rate_cfg. It doesn't depend on local_admin_cfg.
Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
|
@prsunny @dgsudharsan @vivekreddynv This PR is ready to merge, please review and approve the same. Also, the below PRs for SONiC CLI & HLD changes. |
|
@prsunny @venkatmahalingam Request for cherry-pick to 202012 |
* Fixed incorrect interface admin-status when 'all' interface is disabled but there are local sampling-rate configurations. Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
In order to include the following commits: d29a49a 2021-08-25 [ACL] Match TCP protocol while matching TCP_FLAG (sonic-net/sonic-swss#1854) 2569ad9 2021-08-25 Fix sFlow sampling-rate and admin-state (sonic-net/sonic-swss#1728) 8908a8f 2021-08-19 Change rif_rates.lua and port_rates.lua scripts to calculate rates correct (sonic-net/sonic-swss#1848) b42c2fb 2021-08-19 [VS Test] Skip flaky tests (sonic-net/sonic-swss#1875)
* Fixed incorrect interface admin-status when 'all' interface is disabled but there are local sampling-rate configurations. Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
* Fixed incorrect interface admin-status when 'all' interface is disabled but there are local sampling-rate configurations. Signed-off-by: Venkatesan Mahalingam <venkatesan_mahalinga@dell.com>
Fixed incorrect interface admin-status when 'all' interface is disabled but there are local sampling-rate configurations.
The original changes are present in the PR
Signed-off-by: Venkatesan Mahalingam venkatesan_mahalinga@dell.com
What I did
Fixed a bug where the interface sFlow admin-status is not correct if the user configures a custom sFlow sampling-rate. (UT performed here)
As a side-effect of this fix, users can now restore the default sFlow sampling-rate with the default option using: config sflow interface sampling-rate Ethernet4 default
This is not tested here but will be tested when the config script update PR is submitted to sonic-utilities. The sFlow corresponding HLD and command-line reference will also be updated.
Why I did it
If the user ONLY configures a custom (local) sFlow sampling-rate for a interface, the interface's admin-status should still adhere to the global interface admin-status.
How I verified it