Skip to content

Commit

Permalink
Use proper function name
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 7, 2023
1 parent b406372 commit 45d5398
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dash-pipeline/SAI/templates/saiapi.cpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static sai_status_t dash_sai_create_{{ table.name }}(
// Generate a SAI object ID and fill it as the P4 table key
auto mf = matchActionEntry->add_match();
mf->set_field_id({{table['keys'][0].id}});
objId = NextObjIndex((sai_object_type_t)SAI_OBJECT_TYPE_{{ table.name | upper}});
objId = NextObjectId((sai_object_type_t)SAI_OBJECT_TYPE_{{ table.name | upper}});
auto mf_exact = mf->mutable_exact();
{{table['keys'][0].field}}SetVal(objId, mf_exact, {{table['keys'][0].bitwidth}});
{% else %}
Expand Down
4 changes: 2 additions & 2 deletions dash-pipeline/SAI/templates/utils.cpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ bool InsertInTable(std::shared_ptr<p4::v1::TableEntry> entry, sai_object_type_t

if (*objId == 0)
{
*objId = NextObjIndex(objectType);
*objId = NextObjectId(objectType);
}

tableEntryMap.insert(std::make_pair(*objId, entry));

return true;
}

sai_object_id_t NextObjIndex(sai_object_type_t objectType)
sai_object_id_t NextObjectId(sai_object_type_t objectType)
{
DASH_LOG_ENTER();

Expand Down
2 changes: 1 addition & 1 deletion dash-pipeline/SAI/templates/utils.h.j2
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void u64SetMask(const sai_uint64_t &value, T &t, int bits = 64) {

grpc::StatusCode MutateTableEntry(std::shared_ptr<p4::v1::TableEntry>, p4::v1::Update_Type updateType);

sai_object_id_t NextObjIndex(sai_object_type_t objectType);
sai_object_id_t NextObjectId(sai_object_type_t objectType);

bool InsertInTable(std::shared_ptr<p4::v1::TableEntry> entry, sai_object_type_t objectType, sai_object_id_t *objId);

Expand Down

0 comments on commit 45d5398

Please sign in to comment.