Skip to content

Commit

Permalink
Fix return status in case of duplicate entry and update zlog-cfg
Browse files Browse the repository at this point in the history
Return BF_ALREADY_EXISTS in case of duplicate table entry and
BF_OBJECT_NOT_FOUND in case if entry is not found.
Update zlog-cfg to include krnlmon, ovs-p4rt and infrap4d

Signed-off-by: Nupur Uttarwar <[email protected]>
  • Loading branch information
nupuruttarwar committed Nov 21, 2022
1 parent 01a7d98 commit c583853
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pipe_mgr/shared/features/pipe_mgr_mat.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int pipe_mgr_mat_ent_add(u32 sess_hdl,

if (exists) {
LOG_ERROR("duplicate entry found in table = %s", tbl->ctx.name);
status = BF_UNEXPECTED;
status = BF_ALREADY_EXISTS;
goto cleanup;
}
}
Expand Down Expand Up @@ -594,7 +594,7 @@ int pipe_mgr_mat_ent_del_by_match_spec(u32 sess_hdl,
if (!exists) {
LOG_ERROR("entry not found in table = %s",
tbl->ctx.name);
status = BF_UNEXPECTED;
status = BF_OBJECT_NOT_FOUND;
goto cleanup;
}
}
Expand Down
10 changes: 8 additions & 2 deletions zlog-cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ BF_PAL.DEBUG "p4_driver.log", 5M * 5 ;file_format
BF_PM.ERROR >stdout;console_format
BF_PM.DEBUG "p4_driver.log", 5M * 5 ;file_format

BF_BFRT.ERROR >stdout;console_format
BF_BFRT.DEBUG "p4_driver.log", 5M * 5 ;file_format
KRNLMON.ERROR >stdout;console_format
KRNLMON.DEBUG "krnlmon.log", 5M * 5 ;file_format

OVSP4RT.ERROR >stdout;console_format
OVSP4RT.DEBUG "ovsp4rt.log", 5M * 5 ;file_format

INFRAP4D.ERROR >stdout;console_format
INFRAP4D.DEBUG "infrap4d.log", 5M * 5 ;file_format

*.ERROR >syslog , LOG_USER

0 comments on commit c583853

Please sign in to comment.