Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci-test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
# os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Remove unused software
Expand Down
32 changes: 16 additions & 16 deletions pkgsrc/switch-p4-16/api/common/pal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1803,14 +1803,14 @@ switch_status_t speed_set(switch_object_id_t port_handle,
port_lane_list.v_set(lane_list);
status = switch_store::attribute_set(port_handle, port_lane_list);
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_PORT,
"{}.{}: lane_list failure port_handle {} speed {} status {}",
__func__,
__LINE__,
port_handle,
port_lane_list,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_PORT,
// "{}.{}: lane_list failure port_handle {} speed {} status {}",
// __func__,
// __LINE__,
// port_handle,
// port_lane_list,
// status);
}

switch_enum_t _link_pause = {0};
Expand Down Expand Up @@ -3526,14 +3526,14 @@ switch_status_t after_port_create(const switch_object_id_t object_id,
port_lane_list.v_set(lane_list);
status = switch_store::attribute_set(object_id, port_lane_list);
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_PORT,
"{}.{}: lane_list failure port_handle {} speed {} status {}",
__func__,
__LINE__,
object_id,
port_lane_list,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_PORT,
// "{}.{}: lane_list failure port_handle {} speed {} status {}",
// __func__,
// __LINE__,
// object_id,
// port_lane_list,
// status);
}

status |= switch_store::v_get(device_hdl, SWITCH_DEVICE_ATTR_DEV_ID, device);
Expand Down
124 changes: 62 additions & 62 deletions pkgsrc/switch-p4-16/api/common/qos_pdfixed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3024,15 +3024,15 @@ static void update_internal_ppg(const switch_object_id_t object_id,
switch_status_t temp_status = SWITCH_STATUS_SUCCESS;
temp_status = switch_store::attribute_set(object_id, attr);
if (temp_status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
"{}.{}: Failure to update internal ppg {} attr {}"
"status {}",
__func__,
__LINE__,
object_id,
attr,
temp_status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
// "{}.{}: Failure to update internal ppg {} attr {}"
// "status {}",
// __func__,
// __LINE__,
// object_id,
// attr,
// temp_status);
}
status.set_value(temp_status);
return;
Expand Down Expand Up @@ -3152,16 +3152,16 @@ switch_status_t before_ppg_create_add_internal_ports_ppg(
internal_ppg_create.join();
status = ppg_status.get();
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
"{}:{}: Failed to add internal ppg for port {} corresponding "
"to external port {} with attrs {}",
__func__,
__LINE__,
port,
port_handle,
attrs,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
// "{}:{}: Failed to add internal ppg for port {} corresponding "
// "to external port {} with attrs {}",
// __func__,
// __LINE__,
// port,
// port_handle,
// attrs,
// status);
goto cleanup;
}
switch_object_id_t internal_ppg_handle{oid.get()};
Expand Down Expand Up @@ -3236,17 +3236,17 @@ switch_status_t before_ppg_update_update_internal_ports_ppg(
if (ppg_handle.data) ppg_handles.push_back(ppg_handle);
}
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
"{}.{}: Failure to update attr {} for internal ppgs "
"corresponding to external port {} ppg {}"
"status {}",
__func__,
__LINE__,
attr,
port_handle,
object_id,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
// "{}.{}: Failure to update attr {} for internal ppgs "
// "corresponding to external port {} ppg {}"
// "status {}",
// __func__,
// __LINE__,
// attr,
// port_handle,
// object_id,
// status);
}
if (ppg_handles.empty()) return status;
// Attribute Set
Expand All @@ -3259,17 +3259,17 @@ switch_status_t before_ppg_update_update_internal_ports_ppg(
status |= update_status.get();
}
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
"{}.{}: Failure to update attr {} for internal ppgs "
"corresponding to external port {} ppg {}"
"status {}",
__func__,
__LINE__,
attr,
port_handle,
object_id,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_PORT_PRIORITY_GROUP,
// "{}.{}: Failure to update attr {} for internal ppgs "
// "corresponding to external port {} ppg {}"
// "status {}",
// __func__,
// __LINE__,
// attr,
// port_handle,
// object_id,
// status);
}
return status;
}
Expand Down Expand Up @@ -3297,17 +3297,17 @@ switch_status_t after_scheduler_added_to_queue(
queue_handle);
}
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_QUEUE,
"{}.{}: Failure to update attr {} for a queue {} "
"corresponding to port {}"
"status {}",
__func__,
__LINE__,
attr,
queue_handle,
port_handle,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_QUEUE,
// "{}.{}: Failure to update attr {} for a queue {} "
// "corresponding to port {}"
// "status {}",
// __func__,
// __LINE__,
// attr,
// queue_handle,
// port_handle,
// status);
}
}
return status;
Expand Down Expand Up @@ -3361,16 +3361,16 @@ switch_status_t before_scheduler_removed_from_queue(
0 /* min_rate */);

if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OBJECT_TYPE_QUEUE,
"{}.{}: Failure to detach scheduler from a queue {} "
"corresponding to port {}"
"status {}",
__func__,
__LINE__,
queue_handle,
port_handle,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OBJECT_TYPE_QUEUE,
// "{}.{}: Failure to detach scheduler from a queue {} "
// "corresponding to port {}"
// "status {}",
// __func__,
// __LINE__,
// queue_handle,
// port_handle,
// status);
}
}
}
Expand Down
32 changes: 16 additions & 16 deletions pkgsrc/switch-p4-16/s3/bf_rt_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,12 +1335,12 @@ switch_status_t _ActionEntry::set_arg(const bf_rt_field_id_t field_id,
return bf_rt_status_xlate(rc);
}

SWITCH_DEBUG_LOG(switch_log(
SWITCH_API_LEVEL_DEBUG,
SWITCH_OT_NONE,
"arg: {} -> {}",
dataFieldNameGetInternal(table, field_id, _action_id, indirect),
key));
// SWITCH_DEBUG_LOG(switch_log(
// SWITCH_API_LEVEL_DEBUG,
// SWITCH_OT_NONE,
// "arg: {} -> {}",
// dataFieldNameGetInternal(table, field_id, _action_id, indirect),
// key));
return status;
}

Expand Down Expand Up @@ -1412,16 +1412,16 @@ switch_status_t _ActionEntry::set_arg(const bf_rt_field_id_t field_id,

rc = table_data->setValue(field_id, key);
if (rc != BF_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OT_NONE,
"{}.{}:{}: rc: {} failed setValue: \"{}.{}\" key {}",
__NS__,
__func__,
__LINE__,
bf_err_str(rc),
tableNameGetInternal(table),
dataFieldNameGetInternal(table, field_id, _action_id, indirect),
key);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OT_NONE,
// "{}.{}:{}: rc: {} failed setValue: \"{}.{}\" key {}",
// __NS__,
// __func__,
// __LINE__,
// bf_err_str(rc),
// tableNameGetInternal(table),
// dataFieldNameGetInternal(table, field_id, _action_id, indirect),
// key);
return bf_rt_status_xlate(rc);
}
return status;
Expand Down
38 changes: 19 additions & 19 deletions pkgsrc/switch-p4-16/s3/record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,23 +403,23 @@ void record_file_replay(std::string replay_file) {
auto status =
switch_store::object_create(object_type, attrs, object_handle);
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OT_NONE,
"Create failed for {} {} status {}",
object_type,
attrs,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OT_NONE,
// "Create failed for {} {} status {}",
// object_type,
// attrs,
// status);
}
} break;
case 's': {
auto status = switch_store::attribute_set(object_id, *attrs.begin());
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OT_NONE,
"Set failed for {} {} {}",
object_id,
*attrs.begin(),
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OT_NONE,
// "Set failed for {} {} {}",
// object_id,
// attrs,
// status);
}
} break;
break;
Expand All @@ -437,13 +437,13 @@ void record_file_replay(std::string replay_file) {
attr_w attr(0);
auto status = switch_store::attribute_get(object_id, attr_id, attr);
if (status != SWITCH_STATUS_SUCCESS) {
switch_log(SWITCH_API_LEVEL_ERROR,
SWITCH_OT_NONE,
"Get failed for {} {} {} status {}",
object_id,
attr_id,
attr,
status);
// switch_log(SWITCH_API_LEVEL_ERROR,
// SWITCH_OT_NONE,
// "Get failed for {} {} {} status {}",
// object_id,
// attr_id,
// attr,
// status);
}
} break;
case 'n':
Expand Down
14 changes: 7 additions & 7 deletions pkgsrc/switch-p4-16/s3/smi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ switch_status_t smi_object_create_attr_check(
const switch_attr_flags_t &flags = get_flags(object_type, attr.id_get());
if (flags.is_internal || flags.is_read_only) {
status = SWITCH_STATUS_INVALID_PARAMETER;
switch_log(SWITCH_API_LEVEL_ERROR,
object_type,
"{}:{}: ot={}, create attrs {}",
__func__,
__LINE__,
model_info->get_object_name_from_type(object_type),
attrs);
// switch_log(SWITCH_API_LEVEL_ERROR,
// object_type,
// "{}:{}: ot={}, create attrs {}",
// __func__,
// __LINE__,
// model_info->get_object_name_from_type(object_type),
// attrs);
switch_log(SWITCH_API_LEVEL_ERROR,
object_type,
"{}:{}: ot={}, incorrect flags status={} attr {} "
Expand Down
Loading
Loading