Skip to content

Commit

Permalink
Spell check fixes (sonic-net#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
liat-grozovik authored Feb 2, 2021
1 parent 373be80 commit b39e746
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion lib/src/NotificationFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ std::shared_ptr<Notification> NotificationFactory::deserialize(
if (name == SAI_SWITCH_NOTIFICATION_NAME_SWITCH_STATE_CHANGE)
return std::make_shared<NotificationSwitchStateChange>(serializedNotification);

SWSS_LOG_ERROR("unknow notification: '%s', FIXME", name.c_str());
SWSS_LOG_ERROR("unknown notification: '%s', FIXME", name.c_str());

return nullptr;
}
6 changes: 3 additions & 3 deletions lib/src/RedisRemoteSaiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ sai_status_t RedisRemoteSaiInterface::waitForQueryAattributeEnumValuesCapability
const std::string &capability_str = fvValue(values[0]);
const uint32_t num_capabilities = std::stoi(fvValue(values[1]));

SWSS_LOG_DEBUG("Received payload: capabilites = '%s', count = %d", capability_str.c_str(), num_capabilities);
SWSS_LOG_DEBUG("Received payload: capabilities = '%s', count = %d", capability_str.c_str(), num_capabilities);

enumValuesCapability->count = num_capabilities;

Expand All @@ -1119,7 +1119,7 @@ sai_status_t RedisRemoteSaiInterface::waitForQueryAattributeEnumValuesCapability
{
if (num_capabilities != i + 1)
{
SWSS_LOG_WARN("Query returned less attributes than expected: expected %d, recieved %d", num_capabilities, i+1);
SWSS_LOG_WARN("Query returned less attributes than expected: expected %d, received %d", num_capabilities, i+1);
}

break;
Expand Down Expand Up @@ -1897,7 +1897,7 @@ sai_status_t RedisRemoteSaiInterface::sai_redis_notify_syncd(

case SAI_REDIS_NOTIFY_SYNCD_INSPECT_ASIC:

SWSS_LOG_NOTICE("inspec ASIC SUCCEEDED");
SWSS_LOG_NOTICE("inspect ASIC SUCCEEDED");

break;

Expand Down
4 changes: 2 additions & 2 deletions lib/src/VirtualObjectIdManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static_assert(SAI_REDIS_OBJECT_ID_BITS_SIZE == SAI_OBJECT_ID_BITS_SIZE, "redis o
* This condition must be met, since we need to be able to encode SAI object
* type in object id on defined number of bits.
*/
static_assert(SAI_OBJECT_TYPE_EXTENSIONS_MAX < SAI_REDIS_OBJECT_TYPE_MAX, "redis max object type value must be greater than supported SAI max objeect type value");
static_assert(SAI_OBJECT_TYPE_EXTENSIONS_MAX < SAI_REDIS_OBJECT_TYPE_MAX, "redis max object type value must be greater than supported SAI max object type value");

/*
* Current OBJECT ID format:
Expand Down Expand Up @@ -220,7 +220,7 @@ sai_object_id_t VirtualObjectIdManager::allocateNewObjectId(

if ((objectType <= SAI_OBJECT_TYPE_NULL) || (objectType >= SAI_OBJECT_TYPE_EXTENSIONS_MAX))
{
SWSS_LOG_THROW("invalid objct type: %d", objectType);
SWSS_LOG_THROW("invalid object type: %d", objectType);
}

if (objectType == SAI_OBJECT_TYPE_SWITCH)
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ZeroMQChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void ZeroMQChannel::notificationThreadFunction()

if (rc >= ZMQ_RESPONSE_BUFFER_SIZE)
{
SWSS_LOG_WARN("zmq_recv message was turncated (over %d bytes, received %d), increase buffer size, message DROPPED",
SWSS_LOG_WARN("zmq_recv message was truncated (over %d bytes, received %d), increase buffer size, message DROPPED",
ZMQ_RESPONSE_BUFFER_SIZE,
rc);

Expand Down Expand Up @@ -299,7 +299,7 @@ sai_status_t ZeroMQChannel::wait(

if (rc >= ZMQ_RESPONSE_BUFFER_SIZE)
{
SWSS_LOG_THROW("zmq_recv message was turncated (over %d bytes, recived %d), increase buffer size, message DROPPED",
SWSS_LOG_THROW("zmq_recv message was truncated (over %d bytes, received %d), increase buffer size, message DROPPED",
ZMQ_RESPONSE_BUFFER_SIZE,
rc);
}
Expand Down
2 changes: 1 addition & 1 deletion meta/AttrKeyMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ std::string AttrKeyMap::constructKey(
default:

// NOTE: only primitive types should be considered as keys
SWSS_LOG_THROW("FATAL: atribute %s marked as key, but have invalid serialization type, FIXME",
SWSS_LOG_THROW("FATAL: attribute %s marked as key, but have invalid serialization type, FIXME",
md->attridname);
}

Expand Down
10 changes: 5 additions & 5 deletions meta/Meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@ sai_status_t Meta::bulkCreate(
{
if (attr_list[idx] == nullptr)
{
SWSS_LOG_ERROR("pointer to attr list at ondex %u is NULL", idx);
SWSS_LOG_ERROR("pointer to attribute list at index %u is NULL", idx);

return SAI_STATUS_INVALID_PARAMETER;
}
Expand Down Expand Up @@ -3059,7 +3059,7 @@ bool Meta::meta_is_object_in_default_state(

if (!m_oids.objectReferenceExists(oid))
{
SWSS_LOG_WARN("object %s refrence not exists, bug!",
SWSS_LOG_WARN("object %s reference not exists, bug!",
sai_serialize_object_id(oid).c_str());
return false;
}
Expand Down Expand Up @@ -4917,7 +4917,7 @@ sai_status_t Meta::meta_generic_validation_set(
{
if (meta_unittests_get_and_erase_set_readonly_flag(md))
{
META_LOG_NOTICE(md, "readonly attribute is allowd to be set (unittests enabled)");
META_LOG_NOTICE(md, "readonly attribute is allowed to be set (unittests enabled)");
}
else
{
Expand Down Expand Up @@ -7222,7 +7222,7 @@ void Meta::meta_sai_on_fdb_event_single(

if (m_saiObjectCollection.objectExists(meta_key_fdb))
{
SWSS_LOG_WARN("object key %s alearedy exists, but received LEARNED event",
SWSS_LOG_WARN("object key %s already exists, but received LEARNED event",
sai_serialize_object_meta_key(meta_key_fdb).c_str());
break;
}
Expand Down Expand Up @@ -7312,7 +7312,7 @@ void Meta::meta_sai_on_fdb_event_single(

if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("object key %s FDB MOVE event, SET validateion failed on attr.id = %d",
SWSS_LOG_ERROR("object key %s FDB MOVE event, SET validation failed on attr.id = %d",
sai_serialize_object_meta_key(meta_key_fdb).c_str(),
attr.id);
continue;
Expand Down
2 changes: 1 addition & 1 deletion meta/OidRefCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bool OidRefCounter::objectReferenceExists(

bool exists = m_hash.find(oid) != m_hash.end();

SWSS_LOG_DEBUG("object 0x%" PRIx64 " refrence: %s", oid, exists ? "exists" : "missing");
SWSS_LOG_DEBUG("object 0x%" PRIx64 " reference: %s", oid, exists ? "exists" : "missing");

return exists;
}
Expand Down
4 changes: 2 additions & 2 deletions meta/saiserialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ std::string sai_serialize_l2mc_entry(
j["bv_id"] = sai_serialize_object_id(l2mc_entry.bv_id);
j["type"] = sai_serialize_l2mc_entry_type(l2mc_entry.type);
j["destination"] = sai_serialize_ip_address(l2mc_entry.destination);
j["sourte"] = sai_serialize_ip_address(l2mc_entry.source);
j["source"] = sai_serialize_ip_address(l2mc_entry.source);

return j.dump();
}
Expand Down Expand Up @@ -3018,7 +3018,7 @@ void sai_deserialize_attr_value(
return sai_deserialize_system_port_config_list(s, attr.value.sysportconfiglist, countOnly);

default:
SWSS_LOG_THROW("deserialize type %d is not supportd yet FIXME", meta.attrvaluetype);
SWSS_LOG_THROW("deserialize type %d is not supported yet FIXME", meta.attrvaluetype);
}
}

Expand Down
2 changes: 1 addition & 1 deletion meta/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,7 @@ void test_route_entry_create()
status = g_meta->create(&route_entry, 3, list2);
META_ASSERT_FAIL(status);

SWSS_LOG_NOTICE("wrong obejct type");
SWSS_LOG_NOTICE("wrong object type");
attr1.value.oid = create_dummy_object_id(SAI_OBJECT_TYPE_HASH,switch_id);
status = g_meta->create(&route_entry, 2, list);
META_ASSERT_FAIL(status);
Expand Down
6 changes: 3 additions & 3 deletions syncd/AsicView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void AsicView::bindNewVidReference(

int referenceCount = ++(it->second);

SWSS_LOG_INFO("increased vid %s refrence to %d",
SWSS_LOG_INFO("increased vid %s reference to %d",
sai_serialize_object_id(vid).c_str(),
referenceCount);
}
Expand Down Expand Up @@ -954,7 +954,7 @@ std::vector<AsicOperation> AsicView::asicGetWithOptimizedRemoveOperations() cons

if (op.m_vid == SAI_NULL_OBJECT_ID)
{
SWSS_LOG_THROW("non object id remove not exected here");
SWSS_LOG_THROW("non object id remove not expected here");
}

auto mit = m_vidToAsicOperationId.find(op.m_vid);
Expand Down Expand Up @@ -1251,7 +1251,7 @@ void AsicView::updateNonObjectIdVidReferenceCountByValue(

if (m_enableRefernceCountLogs)
{
SWSS_LOG_WARN("updated vid %s refrence to %d",
SWSS_LOG_WARN("updated vid %s reference to %d",
sai_serialize_object_id(vid).c_str(),
m_vidReference[vid]);
}
Expand Down
2 changes: 1 addition & 1 deletion syncd/BestCandidateFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3028,7 +3028,7 @@ bool BestCandidateFinder::exchangeTemporaryVidToCurrentVid(
* This is just sanity check, should never happen.
*/

SWSS_LOG_THROW("found tempoary RID %s but current VID doesn't exist, FATAL",
SWSS_LOG_THROW("found temporary RID %s but current VID doesn't exist, FATAL",
sai_serialize_object_id(temporaryRid).c_str());
}

Expand Down
6 changes: 3 additions & 3 deletions syncd/ComparisonLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2923,15 +2923,15 @@ void ComparisonLogic::logViewObjectCount(

asic_changes = true;

SWSS_LOG_WARN("object count for %s on current view %zu is differnt than on temporary view: %zu",
SWSS_LOG_WARN("object count for %s on current view %zu is different than on temporary view: %zu",
sai_serialize_object_type(ot).c_str(),
c,
t);
}

if (asic_changes)
{
SWSS_LOG_WARN("object count is differnt on both view, there will be ASIC OPERATIONS!");
SWSS_LOG_WARN("object count is different on both view, there will be ASIC OPERATIONS!");
}
}

Expand Down Expand Up @@ -3498,7 +3498,7 @@ void ComparisonLogic::executeOperationsOnAsic()
throw;
}

SWSS_LOG_NOTICE("performed all operations on asic succesfully");
SWSS_LOG_NOTICE("performed all operations on asic successfully");
}

void ComparisonLogic::checkMap(
Expand Down
4 changes: 2 additions & 2 deletions syncd/NotificationProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void NotificationProcessor::sendNotification(

m_notifications->send(op, data, entry);

SWSS_LOG_DEBUG("notification send successfull");
SWSS_LOG_DEBUG("notification send successfully");
}

void NotificationProcessor::sendNotification(
Expand Down Expand Up @@ -545,7 +545,7 @@ void NotificationProcessor::syncProcessNotification(
}
else
{
SWSS_LOG_ERROR("unknow notification: %s", notification.c_str());
SWSS_LOG_ERROR("unknown notification: %s", notification.c_str());
}
}

Expand Down
2 changes: 1 addition & 1 deletion syncd/RedisClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ void RedisClient::processFlushEvent(
break;

default:
SWSS_LOG_THROW("unknow fdb flush entry type: %d", type);
SWSS_LOG_THROW("unknown fdb flush entry type: %d", type);
}

for (int flush_static: vals)
Expand Down
2 changes: 1 addition & 1 deletion syncd/RequestShutdownCommandLineOptionsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void RequestShutdownCommandLineOptionsParser::printUsage()
{
SWSS_LOG_ENTER();

std::cout << "Usage: syncd_request_shutdown [-w] [--wram] [-p] [--pre] [-c] [--cold] [-f] [--fast] [-g idx] [-x contextConfig]" << std::endl;
std::cout << "Usage: syncd_request_shutdown [-w] [--warm] [-p] [--pre] [-c] [--cold] [-f] [--fast] [-g idx] [-x contextConfig]" << std::endl;

std::cerr << std::endl;

Expand Down
2 changes: 1 addition & 1 deletion syncd/SaiAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ std::vector<sai_object_id_t> SaiAttr::getOidListFromAttribute() const

if (m_meta->isoidattribute)
{
SWSS_LOG_THROW("attribute %s is oid attrubute but not handled", m_meta->attridname);
SWSS_LOG_THROW("attribute %s is oid attribute but not handled", m_meta->attridname);
}

// Attribute not contain any object ids.
Expand Down
6 changes: 3 additions & 3 deletions syncd/SingleReiniter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ void SingleReiniter::listFailedAttributes(

if (meta == NULL)
{
SWSS_LOG_ERROR("failed to get atribute metadata %s %d",
SWSS_LOG_ERROR("failed to get attribute metadata %s %d",
sai_serialize_object_type(objectType).c_str(),
attr->id);

Expand Down Expand Up @@ -751,7 +751,7 @@ sai_object_id_t SingleReiniter::processSingleVid(

if (meta == NULL)
{
SWSS_LOG_THROW("failed to get atribute metadata %s: %d",
SWSS_LOG_THROW("failed to get attribute metadata %s: %d",
sai_serialize_object_type(objectType).c_str(),
attr->id);
}
Expand All @@ -760,7 +760,7 @@ sai_object_id_t SingleReiniter::processSingleVid(
if (meta->objecttype == SAI_OBJECT_TYPE_SWITCH &&
attr->id == SAI_SWITCH_ATTR_SRC_MAC_ADDRESS)
{
SWSS_LOG_WARN("skipping to set MAC addres since not supported on mlnx 2700");
SWSS_LOG_WARN("skipping to set MAC address since not supported on Mellanox platforms");
continue;
}

Expand Down
20 changes: 10 additions & 10 deletions syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Syncd::Syncd(

if (m_commandLineOptions->m_enableSyncMode)
{
SWSS_LOG_WARN("enable sync mode is depreacated, please use communication mode, FORCING redis sync mode");
SWSS_LOG_WARN("enable sync mode is deprecated, please use communication mode, FORCING redis sync mode");

m_enableSyncMode = true;

Expand Down Expand Up @@ -216,7 +216,7 @@ void Syncd::performStartupLogic()

if (warmBootReadFile == NULL || access(warmBootReadFile, F_OK) == -1)
{
SWSS_LOG_WARN("user requested warmStart but warmBootReadFile is not specified or not accesible, forcing cold start");
SWSS_LOG_WARN("user requested warmStart but warmBootReadFile is not specified or not accessible, forcing cold start");

m_commandLineOptions->m_startType = SAI_START_TYPE_COLD_BOOT;
}
Expand Down Expand Up @@ -1176,7 +1176,7 @@ sai_status_t Syncd::processBulkEntry(

if (info->isobjectid)
{
SWSS_LOG_THROW("passing oid object to bulk non obejct id operation");
SWSS_LOG_THROW("passing oid object to bulk non object id operation");
}

std::vector<sai_status_t> statuses(objectIds.size());
Expand Down Expand Up @@ -1474,7 +1474,7 @@ sai_status_t Syncd::processBulkOid(

if (info->isnonobjectid)
{
SWSS_LOG_THROW("passing non object id to bulk oid obejct operation");
SWSS_LOG_THROW("passing non object id to bulk oid object operation");
}

std::vector<sai_status_t> statuses(objectIds.size());
Expand Down Expand Up @@ -3401,7 +3401,7 @@ sai_status_t Syncd::applyView()

if (!consistent && m_commandLineOptions->m_enableUnittests)
{
SWSS_LOG_THROW("ASIC content is differnt than DB content!");
SWSS_LOG_THROW("ASIC content is different than DB content!");
}
}
}
Expand Down Expand Up @@ -3728,7 +3728,7 @@ void Syncd::onSwitchCreateInInitViewMode(

if (currentHw != newHw)
{
SWSS_LOG_THROW("hardware info missmatch: current '%s' vs new '%s'", currentHw.c_str(), newHw.c_str());
SWSS_LOG_THROW("hardware info mismatch: current '%s' vs new '%s'", currentHw.c_str(), newHw.c_str());
}

SWSS_LOG_NOTICE("current %s switch hardware info: '%s'",
Expand Down Expand Up @@ -3843,7 +3843,7 @@ void Syncd::performWarmRestartSingleSwitch(
continue;
}

SWSS_LOG_NOTICE("skiping warm boot: %s", meta->attridname);
SWSS_LOG_NOTICE("skipping warm boot: %s", meta->attridname);
}

// TODO support multiple notification handlers
Expand Down Expand Up @@ -3897,7 +3897,7 @@ void Syncd::performWarmRestart()
SWSS_LOG_THROW("on warm restart there is no switches defined in DB, not supported yet, FIXME");
}

SWSS_LOG_NOTICE("switches defined in warm restat: %zu", entries.size());
SWSS_LOG_NOTICE("switches defined in warm restart: %zu", entries.size());

// here we could have multiple switches defined, let's process them one by one

Expand Down Expand Up @@ -3998,7 +3998,7 @@ void Syncd::sendShutdownRequestAfterException()
sendShutdownRequest(SAI_NULL_OBJECT_ID);
}

SWSS_LOG_NOTICE("notification send successfull");
SWSS_LOG_NOTICE("notification send successfully");
}
catch(const std::exception &e)
{
Expand Down Expand Up @@ -4344,7 +4344,7 @@ void Syncd::run()

s->addSelectable(m_restartQuery.get());

SWSS_LOG_NOTICE("switched to PRE_SHUTDOWN, from now on accepting only shurdown requests");
SWSS_LOG_NOTICE("switched to PRE_SHUTDOWN, from now on accepting only shutdown requests");
}
else
{
Expand Down
Loading

0 comments on commit b39e746

Please sign in to comment.