Skip to content

Commit

Permalink
[syncd] Addressing PR comments sonic-net#1373
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Dancejic <[email protected]>
  • Loading branch information
Ndancejic committed May 24, 2024
1 parent 6eefaeb commit e79dbb8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ AC_PROG_LIBTOOL
AC_HEADER_STDC
AM_PATH_PYTHON3
AX_PYTHON3_DEVEL
AX_CODE_COVERAGE
AX_ADD_AM_MACRO_STATIC([])

AM_CONDITIONAL(SONIC_ASIC_PLATFORM_BAREFOOT, test x$CONFIGURED_PLATFORM = xbarefoot)
Expand All @@ -28,6 +29,10 @@ AM_CONDITIONAL(DEBUG, test x$debug = xtrue)

AM_COND_IF([DEBUG], AC_SUBST(DBGFLAGS, "-ggdb -DDEBUG"), AC_SUBST(DBGFLAGS, "-g"))

AM_COND_IF([DEBUG],
[AM_COND_IF([CODE_COVERAGE_ENABLED],
AC_MSG_ERROR("Flag conflict --enable-debug 'DEBUG' and --enable-code-coverage 'NDEBUG'"))])

AC_ARG_WITH(sai,
[ --with-sai=vs compiling against specific SAI],
[case "${withval}" in
Expand Down
3 changes: 0 additions & 3 deletions syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,6 @@ sai_status_t Syncd::processBulkCreateEntry(
attr_lists.data(),
mode,
statuses.data());

}
break;

Expand Down Expand Up @@ -1339,7 +1338,6 @@ sai_status_t Syncd::processBulkRemoveEntry(
entries.data(),
mode,
statuses.data());

}
break;

Expand Down Expand Up @@ -1633,7 +1631,6 @@ sai_status_t Syncd::processBulkSetEntry(
attr_lists.data(),
mode,
statuses.data());

}
break;

Expand Down
8 changes: 3 additions & 5 deletions syncd/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,6 @@ void test_bulk_neighbor_set()
std::vector<sai_neighbor_entry_t> neighbors;
std::vector<sai_attribute_t> attrs;

uint32_t index = 15;

sai_attribute_t swattr;

swattr.id = SAI_SWITCH_ATTR_INIT_SWITCH;
Expand All @@ -714,7 +712,7 @@ void test_bulk_neighbor_set()
std::vector<const sai_attribute_t *> neighbor_attrs_array;
std::vector<uint32_t> neighbor_attrs_count;

for (uint32_t i = index; i < index + count; ++i)
for (uint32_t i = 0; i < count; ++i)
{
sai_neighbor_entry_t neighbor_entry;

Expand Down Expand Up @@ -771,13 +769,13 @@ void test_bulk_neighbor_set()
ASSERT_SUCCESS("Failed to create neighbor # %zu", j);
}

for (uint32_t i = index; i < index + count; ++i)
for (uint32_t i = 0; i < count; ++i)
{
sai_attribute_t attr;
attr.id = SAI_NEIGHBOR_ENTRY_ATTR_PACKET_ACTION;
attr.value.s32 = SAI_PACKET_ACTION_FORWARD;

status = sai_neighbor_api->set_neighbor_entry_attribute(&neighbors[i - index], &attr);
status = sai_neighbor_api->set_neighbor_entry_attribute(&neighbors[i], &attr);

attrs.push_back(attr);

Expand Down

0 comments on commit e79dbb8

Please sign in to comment.