Skip to content

Commit

Permalink
[bufferpool] Support for buffer pool type both (sonic-net#1735)
Browse files Browse the repository at this point in the history
This PR is fix for the issue sonic-net/sonic-buildimage#7497

Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>

What I did

Changes done to allow orchagent accepting "both" type for buffer pool
configuration.

Why I did it

Currently sonic supports only 'ingress' and 'egress' types of buffer pools.
Since some devices like DNX based switches only support buffer pool
type 'both', we are unable to create buffer pools for these devices.
This patch fixes this problem by enhancing buffer pool configuration to
accept "both" type.

How I verified it

In a switch that uses DNX arch based chips (like VOQ chassis using line cards with Jerico family of switches), the following configuration is applied

"BUFFER_POOL": {
        "lossless_pool": {
            "size": "12766208",
            "type": "both",
            "mode": "dynamic"
        }
 }
when the switch became operational, it was observed, there are no error logs indicating invalid parameter or failure of buffer pool creation.
  • Loading branch information
vganesan-nokia authored and raphaelt-nvidia committed Oct 5, 2021
1 parent e14a6fc commit 0659493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions orchagent/bufferorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ task_process_status BufferOrch::processBufferPool(KeyOpFieldsValuesTuple &tuple)
{
attr.value.u32 = SAI_BUFFER_POOL_TYPE_EGRESS;
}
else if (type == buffer_value_both)
{
attr.value.u32 = SAI_BUFFER_POOL_TYPE_BOTH;
}
else
{
SWSS_LOG_ERROR("Unknown pool type specified:%s", type.c_str());
Expand Down
1 change: 1 addition & 0 deletions orchagent/bufferorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const string buffer_static_th_field_name = "static_th";
const string buffer_profile_field_name = "profile";
const string buffer_value_ingress = "ingress";
const string buffer_value_egress = "egress";
const string buffer_value_both = "both";
const string buffer_profile_list_field_name = "profile_list";
const string buffer_headroom_type_field_name= "headroom_type";

Expand Down

0 comments on commit 0659493

Please sign in to comment.