Skip to content

Commit 3f61a44

Browse files
author
Shuotian Cheng
authored
Change some error code to SAI_STATUS_ITEM_ALREADY_EXISTS (sonic-net#99)
1 parent e8ce8e5 commit 3f61a44

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

meta/sai_meta.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ sai_status_t meta_generic_validation_create(
14151415
{
14161416
SWSS_LOG_ERROR("object key %s already exists", key.c_str());
14171417

1418-
return SAI_STATUS_INVALID_PARAMETER;
1418+
return SAI_STATUS_ITEM_ALREADY_EXISTS;
14191419
}
14201420

14211421
break;
@@ -3371,7 +3371,7 @@ sai_status_t meta_sai_validate_fdb_entry(
33713371
{
33723372
SWSS_LOG_ERROR("object key %s already exists", key_fdb.c_str());
33733373

3374-
return SAI_STATUS_INVALID_PARAMETER;
3374+
return SAI_STATUS_ITEM_ALREADY_EXISTS;
33753375
}
33763376

33773377
return SAI_STATUS_SUCCESS;
@@ -3666,7 +3666,7 @@ sai_status_t meta_sai_validate_neighbor_entry(
36663666
{
36673667
SWSS_LOG_ERROR("object key %s already exists", key_neighbor.c_str());
36683668

3669-
return SAI_STATUS_INVALID_PARAMETER;
3669+
return SAI_STATUS_ITEM_ALREADY_EXISTS;
36703670
}
36713671

36723672
return SAI_STATUS_SUCCESS;
@@ -3908,7 +3908,7 @@ sai_status_t meta_sai_validate_vlan_id(
39083908
{
39093909
SWSS_LOG_ERROR("object key %s already exists", key_vlan.c_str());
39103910

3911-
return SAI_STATUS_INVALID_PARAMETER;
3911+
return SAI_STATUS_ITEM_ALREADY_EXISTS;
39123912
}
39133913

39143914
return SAI_STATUS_SUCCESS;
@@ -4218,7 +4218,7 @@ sai_status_t meta_sai_validate_route_entry(
42184218
{
42194219
SWSS_LOG_ERROR("object key %s already exists", key_route.c_str());
42204220

4221-
return SAI_STATUS_INVALID_PARAMETER;
4221+
return SAI_STATUS_ITEM_ALREADY_EXISTS;
42224222
}
42234223

42244224
return SAI_STATUS_SUCCESS;

0 commit comments

Comments
 (0)