-
Notifications
You must be signed in to change notification settings - Fork 531
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
[202205] Enhance orchagent and buffer manager in error handling (#2414) #2449
Merged
liat-grozovik
merged 1 commit into
sonic-net:202205
from
stephenxs:enhance-buffer-mgr-orch-202205
Sep 19, 2022
Merged
[202205] Enhance orchagent and buffer manager in error handling (#2414) #2449
liat-grozovik
merged 1 commit into
sonic-net:202205
from
stephenxs:enhance-buffer-mgr-orch-202205
Sep 19, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What I did Enhance orchagent and buffer manager Buffer manager: do not insert buffer queue into cache if the profile is illegal, which prevents an empty string from being inserted into APPL_DB during initialization. orchagent: handle the case that a field referencing other objects is an empty string. There had been such logic that was broken by a PR last year. Signed-off-by: Stephen Sun stephens@nvidia.com Why I did it Enhance the error handling logic. In most cases, a user will not encounter such scenarios in a production environment because it's the front-ends' (eg. CLI) responsibility to identify the wrong configuration and prevent them from being inserted to CONFIG_DB. However, in some cases, like a wrong config_db.json composed and copied to the switch, front-ends can not prevent that. How I verified it Manual and mock tests. Details if related For the improvement in buffer manager: previously, the logic was: declare a reference portQueue to m_portQueueLookup[port][queues] and then assign fvValue(i) to portQueue.running_profile_name But [] operation on C++ map has a side-effect -- it will insert a new element into the map if there wasn't one. In case the validation check in checkBufferProfileDirection failed and there was not one in the map, the portQueue.running_profile_name will keep empty. This is not what we want. In case there was an item configured in the map, we should not remove it on failure because we want to prevent the user from being affected by misconfiguration and alert user to correct the error. There is log in checkBufferProfileDirection Now it is improved in this way: Avoid using reference and initialize m_portQueueLookup[port][queues] only if there is a valid egress profile configured
stephenxs
changed the title
Enhance orchagent and buffer manager in error handling (#2414)
[202205] Enhance orchagent and buffer manager in error handling (Cherry-pick #2414)
Sep 14, 2022
liat-grozovik
changed the title
[202205] Enhance orchagent and buffer manager in error handling (Cherry-pick #2414)
[202205] Enhance orchagent and buffer manager in error handling (#2414)
Sep 14, 2022
liat-grozovik
approved these changes
Sep 19, 2022
dgsudharsan
added a commit
to dgsudharsan/sonic-buildimage
that referenced
this pull request
Sep 21, 2022
Update sonic-swss submodule pointer to include the following: * 8eea92e [202205][counters] Revert PR sonic-net#2432 for the buffer queue/pg counters improvement ([sonic-net#2462](sonic-net/sonic-swss#2462)) * 5d8636a [202205] Enhance orchagent and buffer manager in error handling (sonic-net#2414) ([sonic-net#2449](sonic-net/sonic-swss#2449)) * aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (sonic-net#2392) ([sonic-net#2455](sonic-net/sonic-swss#2455)) * 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450)) * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432)) Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
7 tasks
prsunny
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Sep 21, 2022
Update sonic-swss submodule pointer to include the following: * 8eea92e [202205][counters] Revert PR #2432 for the buffer queue/pg counters improvement ([#2462](sonic-net/sonic-swss#2462)) * 5d8636a [202205] Enhance orchagent and buffer manager in error handling (#2414) ([#2449](sonic-net/sonic-swss#2449)) * aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (#2392) ([#2455](sonic-net/sonic-swss#2455)) * 04ce7be check state_db for po before sending ARP/ND pkts (#2444) ([#2450](sonic-net/sonic-swss#2450)) * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (#2431) ([#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([#2432](sonic-net/sonic-swss#2432))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick #2414 to 202205.
What I did
Enhance orchagent and buffer manager
APPL_DB
during initialization.There had been such logic that was broken by a PR last year.
Signed-off-by: Stephen Sun stephens@nvidia.com
Why I did it
Enhance the error handling logic.
In most cases, a user will not encounter such scenarios in a production environment because it's the front-ends' (eg. CLI) responsibility to identify the wrong configuration and prevent them from being inserted to
CONFIG_DB
.However, in some cases, like a wrong
config_db.json
composed and copied to the switch, front-ends can not prevent that.How I verified it
Manual and mock tests.
Details if related
For the improvement in buffer manager:
portQueue
tom_portQueueLookup[port][queues]
and then assignfvValue(i)
toportQueue.running_profile_name
[]
operation on C++ map has a side-effect -- it will insert a new element into the map if there wasn't one. In case the validation check incheckBufferProfileDirection
failed and there was not one in the map, theportQueue.running_profile_name
will keep empty. This is not what we want.checkBufferProfileDirection
m_portQueueLookup[port][queues]
only if there is a valid egress profile configured