Skip to content

Commit

Permalink
[misc]: Fix typos (sonic-net#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuotian Cheng authored and lguohan committed Aug 29, 2018
1 parent 2322375 commit 50e1915
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ sai_status_t handle_generic(
/*
* When we creating switch, then switch_id parameter is
* ignored, but we can't convert it using vid to rid map,
* since rid don't exist yet, so skip translate for switch,
* since rid doesn't exist yet, so skip translate for switch,
* but use translate for all other objects.
*/

Expand Down Expand Up @@ -1997,7 +1997,7 @@ void on_switch_create_in_init_view(
if (attr == NULL)
{
/*
* This is ok, attribute don't exists, so assumption is empty string.
* This is ok, attribute doesn't exist, so assumption is empty string.
*/
}
else
Expand Down
36 changes: 18 additions & 18 deletions syncd/syncd_applyview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ class AsicView

if (it == m_vidReference.end())
{
SWSS_LOG_THROW("vid %s don't exist in reference map",
SWSS_LOG_THROW("vid %s doesn't exist in reference map",
sai_serialize_object_id(vid).c_str());
}

Expand Down Expand Up @@ -740,7 +740,7 @@ class AsicView

if (it == m_vidReference.end())
{
SWSS_LOG_THROW("vid %s don't exist in reference map",
SWSS_LOG_THROW("vid %s doesn't exist in reference map",
sai_serialize_object_id(vid).c_str());
}

Expand Down Expand Up @@ -779,7 +779,7 @@ class AsicView
* @brief Insert new VID reference.
*
* Inserts new reference to be tracked. This also make sure that
* reference don't exists yet, as a sanity check if same reference
* reference doesn't exist yet, as a sanity check if same reference
* would be inserted twice.
*
* @param[in] vid Virtual ID reference to be inserted.
Expand Down Expand Up @@ -1725,7 +1725,7 @@ void checkMatchedPorts(
*
* In case of really long list, easier way to solve this can be getting all the
* RIDs from current view (they must exist), getting all the matched RIDs from
* temporary list (if one of them don't exists then lists are not equal) sort
* temporary list (if one of them doesn't exist then lists are not equal) sort
* both list nlog(n) and then compare sequentially.
*
* @param currentView Current view.
Expand Down Expand Up @@ -1814,13 +1814,13 @@ bool hasEqualObjectList(
if (temporaryIt == temporaryView.vidToRid.end())
{
/*
* Temporary RID don't exist yet for this object, so it mean's
* Temporary RID doesn't exist yet for this object, so it means
* this object will be created in the future after all
* comparison logic finishes.
*
* Here we know that this temporary object is not processed yet
* but during recursive processing we know that this OID value
* was already processed, and two things could happened:
* was already processed, and two things could happen:
*
* - we matched existing current object for this VID and actual
* RID was assigned, or
Expand All @@ -1829,7 +1829,7 @@ bool hasEqualObjectList(
* not assigned, and this object will be created later on
* which will assign new RID
*
* Since we are here where RID don't exist this is the second
* Since we are here where RID doesn't exist this is the second
* case, also we know that current object VID exists so his RID
* also exists, so those RID's can't be equal, we need return
* false here.
Expand All @@ -1839,7 +1839,7 @@ bool hasEqualObjectList(
* needs to be created.
*/

SWSS_LOG_INFO("temporary RID don't exists (VID %s), attributes are not equal",
SWSS_LOG_INFO("temporary RID doesn't exist (VID %s), attributes are not equal",
sai_serialize_object_id(temporaryVid).c_str());

return false;
Expand Down Expand Up @@ -2374,15 +2374,15 @@ std::shared_ptr<SaiObj> findCurrentBestMatchForGenericObject(
* attributes are existing and both are equal, so here it
* returned false, so it may mean 2 things:
*
* - attribute don't exists in current view, or
* - attribute doesn't exist in current view, or
* - attributes are different
*
* If we check if attribute also exists in current view and has
* CREATE_ONLY flag then attributes are different and we
* disqualify this object since new temporary object needs to
* pass new different attribute with CREATE_ONLY flag.
*
* Case when attribute don't exists is much more complicated
* Case when attribute doesn't exist is much more complicated
* since it maybe conditional and have default value, we will
* do that check when we select best match.
*/
Expand Down Expand Up @@ -2567,7 +2567,7 @@ bool exchangeTemporaryVidToCurrentVid(
* This is just sanity check, should never happen.
*/

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

Expand Down Expand Up @@ -2597,7 +2597,7 @@ bool exchangeTemporaryVidToCurrentVid(
* struct and do dictionary lookup on serialized neighbor_entry.
*
* With this approach for many entries this is the quickest possible way. In
* case when RID don't exist, that means we have invalid neighbor entry, so we
* case when RID doesn't exist, that means we have invalid neighbor entry, so we
* must return null.
*
* @param currentView Current view.
Expand Down Expand Up @@ -2680,7 +2680,7 @@ std::shared_ptr<SaiObj> findCurrentBestMatchForNeighborEntry(
* and do dictionary lookup on serialized route_entry.
*
* With this approach for many entries this is the quickest possible way. In
* case when RID don't exist, that means we have invalid route entry, so we
* case when RID doesn't exist, that means we have invalid route entry, so we
* must return null.
*
* @param currentView Current view.
Expand Down Expand Up @@ -2761,7 +2761,7 @@ std::shared_ptr<SaiObj> findCurrentBestMatchForRouteEntry(
* lookup on serialized fdb_entry.
*
* With this approach for many entries this is the quickest possible way. In
* case when RID don't exist, that means we have invalid fdb entry, so we must
* case when RID doesn't exist, that means we have invalid fdb entry, so we must
* return null.
*
* @param currentView Current view.
Expand Down Expand Up @@ -3230,7 +3230,7 @@ sai_object_id_t translateTemporaryVidToCurrentVid(

/*
* This method is used to translate temporary VID to current VID using RID
* which should be present in both views. If RID don't exist, then we
* which should be present in both views. If RID doesn't exist, then we
* check whether object was created if so, then we return temporary VID
* instead of creating new current VID and we don't need to track mapping
* of those vids not having actual RID. This function should be used only
Expand Down Expand Up @@ -3496,7 +3496,7 @@ void createNewObjectFromTemporaryObject(
* trap group to asic view, so if user will query default one, they will be
* matched by RID.
*
* Default trap group is transferred to view on init if it don't exist.
* Default trap group is transferred to view on init if it doesn't exist.
*
* There should be no such action here, since this scenario would mean that
* there is default switch object in temporary view, but not in current
Expand Down Expand Up @@ -3703,7 +3703,7 @@ void UpdateObjectStatus(
temporaryView.vidToRid[tvid] = rid;

/*
* TODO: Set new VID if it don't exist in current view with NULL RID
* TODO: Set new VID if it doesn't exist in current view with NULL RID
* that will mean we created new object, this VID will be later
* used to count references and as a sanity check if we are
* increasing valid reference.
Expand Down Expand Up @@ -3895,7 +3895,7 @@ std::shared_ptr<SaiAttr> getSaiAttrFromDefaultValue(

if (tg == currentView.ridToVid.end())
{
SWSS_LOG_THROW("default trap group RID 0x%lx don't exist in current view", currentView.defaultTrapGroupRid);
SWSS_LOG_THROW("default trap group RID 0x%lx doesn't exist in current view", currentView.defaultTrapGroupRid);
}

sai_attribute_t at;
Expand Down
2 changes: 1 addition & 1 deletion vslib/src/sai_vs_switch_MLNX2700.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ void uninit_switch_MLNX2700(

if (g_switch_state_map.find(switch_id) == g_switch_state_map.end())
{
SWSS_LOG_THROW("switch don't exists 0x%lx", switch_id);
SWSS_LOG_THROW("switch doesn't exist 0x%lx", switch_id);
}

SWSS_LOG_NOTICE("remove switch 0x%lx", switch_id);
Expand Down

0 comments on commit 50e1915

Please sign in to comment.