Skip to content

Commit

Permalink
Adjust debug info
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Sun <stephens@nvidia.com>
  • Loading branch information
stephenxs committed Jul 27, 2023
1 parent 85ba8e3 commit 8ba2c65
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions orchagent/pfcwdorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ void PfcWdSwOrch<DropHandler, ForwardHandler>::doTask(swss::NotificationConsumer
if (!info.empty())
{
info.pop_back();
info = "(" + info + ")";
}

sai_object_id_t queueId = SAI_NULL_OBJECT_ID;
Expand Down Expand Up @@ -958,13 +957,26 @@ void PfcWdSwOrch<DropHandler, ForwardHandler>::report_pfc_storm(
{ "queue_id", to_string(id) },
{ "port_id", to_string(entry->portId) }};

SWSS_LOG_NOTICE(
"PFC Watchdog detected PFC storm on port %s, queue index %d, queue id 0x%" PRIx64 " and port id 0x%" PRIx64 "%s.",
if (info.empty())
{
SWSS_LOG_NOTICE(
"PFC Watchdog detected PFC storm on port %s, queue index %d, queue id 0x%" PRIx64 " and port id 0x%" PRIx64,
entry->portAlias.c_str(),
entry->index,
id,
entry->portId);
}
else
{
SWSS_LOG_NOTICE(
"PFC Watchdog detected PFC storm on port %s, queue index %d, queue id 0x%" PRIx64 " and port id 0x%" PRIx64 ", additional info: %s.",
entry->portAlias.c_str(),
entry->index,
id,
entry->portId,
info.c_str());
params["additional_info"] = info;
}

event_publish(g_events_handle, "pfc-storm", &params);
}
Expand Down

0 comments on commit 8ba2c65

Please sign in to comment.