From f2854f8b3a0e1971a4123e426cc483cb03d57ea8 Mon Sep 17 00:00:00 2001 From: liat-grozovik <44433539+liat-grozovik@users.noreply.github.com> Date: Sun, 14 Feb 2021 22:35:07 +0200 Subject: [PATCH] spell check fixes (#1630) --- cfgmgr/buffermgr.cpp | 2 +- cfgmgr/buffermgrdyn.cpp | 8 ++++---- cfgmgr/buffermgrdyn.h | 2 +- cfgmgr/intfmgr.cpp | 2 +- cfgmgr/natmgr.h | 2 +- cfgmgr/sflowmgr.cpp | 2 +- cfgmgr/vxlanmgr.cpp | 6 +++--- fdbsyncd/fdbsyncd.cpp | 2 +- fpmsyncd/fpmsyncd.cpp | 2 +- mclagsyncd/mclaglink.cpp | 4 ++-- mclagsyncd/mclagsyncd.cpp | 2 +- neighsyncd/neighsync.cpp | 2 +- neighsyncd/neighsyncd.cpp | 2 +- orchagent/aclorch.cpp | 6 +++--- orchagent/aclorch.h | 6 +++--- orchagent/bufferorch.cpp | 2 +- orchagent/crmorch.cpp | 2 +- orchagent/debugcounterorch.cpp | 8 ++++---- orchagent/fdborch.cpp | 4 ++-- orchagent/fgnhgorch.cpp | 18 +++++++++--------- orchagent/fgnhgorch.h | 2 +- orchagent/intfsorch.cpp | 2 +- orchagent/main.cpp | 6 +++--- orchagent/mirrororch.cpp | 10 +++++----- orchagent/natorch.cpp | 8 ++++---- orchagent/neighorch.cpp | 2 +- orchagent/orch.cpp | 6 +++--- orchagent/orchdaemon.cpp | 6 +++--- orchagent/pfcactionhandler.cpp | 2 +- orchagent/pfcactionhandler.h | 2 +- orchagent/pfcwdorch.cpp | 8 ++++---- orchagent/policerorch.cpp | 2 +- orchagent/qosorch.cpp | 4 ++-- orchagent/routeorch.cpp | 6 +++--- swssconfig/swssconfig.cpp | 2 +- teamsyncd/teamsyncd.cpp | 2 +- tests/mock_tests/aclorch_ut.cpp | 12 ++++++------ tests/mock_tests/portsorch_ut.cpp | 4 ++-- tests/mock_tests/saispy.h | 4 ++-- warmrestart/warmRestartAssist.cpp | 4 ++-- warmrestart/warmRestartAssist.h | 16 ++++++++-------- 41 files changed, 97 insertions(+), 97 deletions(-) diff --git a/cfgmgr/buffermgr.cpp b/cfgmgr/buffermgr.cpp index 4f7a94186c..7b1b73faff 100644 --- a/cfgmgr/buffermgr.cpp +++ b/cfgmgr/buffermgr.cpp @@ -246,7 +246,7 @@ void BufferMgr::transformReference(string &name) * This function copies the data from tables in CONFIG_DB to APPL_DB. * With dynamically buffer calculation supported, the following tables * will be moved to APPL_DB from CONFIG_DB because the CONFIG_DB contains - * confgured entries only while APPL_DB contains dynamically generated entries + * configured entries only while APPL_DB contains dynamically generated entries * - BUFFER_POOL * - BUFFER_PROFILE * - BUFFER_PG diff --git a/cfgmgr/buffermgrdyn.cpp b/cfgmgr/buffermgrdyn.cpp index bff7acfd7d..fb00a8a779 100644 --- a/cfgmgr/buffermgrdyn.cpp +++ b/cfgmgr/buffermgrdyn.cpp @@ -19,7 +19,7 @@ * 1. All keys in this file are in format of APPL_DB key. * Key population: * On receiving item update from CONFIG_DB: key has been transformed into the format of APPL_DB - * In intermal maps: table name removed from the index + * In internal maps: table name removed from the index * 2. Maintain maps for pools, profiles and PGs in CONFIG_DB and APPL_DB * 3. Keys of maps in this file don't contain the TABLE_NAME * 3. @@ -468,7 +468,7 @@ void BufferMgrDynamic::checkSharedBufferPoolSize() // Eventually, the correct values will pushed to APPL_DB and then ASIC_DB recalculateSharedBufferPool(); m_firstTimeCalculateBufferPool = false; - SWSS_LOG_NOTICE("Buffer pool update defered because port is still under initialization, start polling timer"); + SWSS_LOG_NOTICE("Buffer pool update deferred because port is still under initialization, start polling timer"); } return; @@ -712,7 +712,7 @@ bool BufferMgrDynamic::isHeadroomResourceValid(const string &port, const buffer_ } //Called when speed/cable length updated from CONFIG_DB -// Update buffer profile of a certern PG of a port or all PGs of the port according to its speed, cable_length and mtu +// Update buffer profile of a certain PG of a port or all PGs of the port according to its speed, cable_length and mtu // Called when // - port's speed, cable_length or mtu updated // - one buffer pg of port's is set to dynamic calculation @@ -1814,7 +1814,7 @@ task_process_status BufferMgrDynamic::handleBufferPortEgressProfileListTable(Key * This function copies the data from tables in CONFIG_DB to APPL_DB. * With dynamically buffer calculation supported, the following tables * will be moved to APPL_DB from CONFIG_DB because the CONFIG_DB contains - * confgured entries only while APPL_DB contains dynamically generated entries + * configured entries only while APPL_DB contains dynamically generated entries * - BUFFER_POOL * - BUFFER_PROFILE * - BUFFER_PG diff --git a/cfgmgr/buffermgrdyn.h b/cfgmgr/buffermgrdyn.h index f11bd86201..a5ffe39b1e 100644 --- a/cfgmgr/buffermgrdyn.h +++ b/cfgmgr/buffermgrdyn.h @@ -81,7 +81,7 @@ typedef struct { typedef enum { // Port is under initializing, which means its info hasn't been comprehensive for calculating headroom PORT_INITIALIZING, - // All necessary information for calculating headrom is ready + // All necessary information for calculating headroom is ready PORT_READY } port_state_t; diff --git a/cfgmgr/intfmgr.cpp b/cfgmgr/intfmgr.cpp index c8cb075574..24516fff1a 100644 --- a/cfgmgr/intfmgr.cpp +++ b/cfgmgr/intfmgr.cpp @@ -613,7 +613,7 @@ bool IntfMgr::doIntfGeneralTask(const vector& keys, else if (op == DEL_COMMAND) { /* make sure all ip addresses associated with interface are removed, otherwise these ip address would - be set with global vrf and it may cause ip address confliction. */ + be set with global vrf and it may cause ip address conflict. */ if (getIntfIpCount(alias)) { return false; diff --git a/cfgmgr/natmgr.h b/cfgmgr/natmgr.h index aa7d159523..83453775a9 100644 --- a/cfgmgr/natmgr.h +++ b/cfgmgr/natmgr.h @@ -276,7 +276,7 @@ class NatMgr : public Orch natDnatPool_map_t m_natDnatPoolInfo; SelectableTimer *m_natRefreshTimer; - /* Declare doTask related fucntions */ + /* Declare doTask related functions */ void doTask(Consumer &consumer); void doTask(SelectableTimer &timer); void doNatRefreshTimerTask(); diff --git a/cfgmgr/sflowmgr.cpp b/cfgmgr/sflowmgr.cpp index 792d583ace..aefcffe8e8 100644 --- a/cfgmgr/sflowmgr.cpp +++ b/cfgmgr/sflowmgr.cpp @@ -247,7 +247,7 @@ void SflowMgr::sflowCheckAndFillValues(string alias, vector &va { if (m_sflowPortConfMap[alias].admin == "") { - /* By default admin state is enable if not set explicitely */ + /* By default admin state is enable if not set explicitly */ m_sflowPortConfMap[alias].admin = "up"; } FieldValueTuple fv("admin_state", m_sflowPortConfMap[alias].admin); diff --git a/cfgmgr/vxlanmgr.cpp b/cfgmgr/vxlanmgr.cpp index 9ad06d9adb..1d77efc2b8 100644 --- a/cfgmgr/vxlanmgr.cpp +++ b/cfgmgr/vxlanmgr.cpp @@ -906,7 +906,7 @@ void VxlanMgr::createAppDBTunnelMapTable(const KeyOpFieldsValuesTuple & t) std::replace(vxlanTunnelMapName.begin(), vxlanTunnelMapName.end(), config_db_key_delimiter, delimiter); /* Case 1: Entry exist - Erase from cache & return - * Case 2: Enry does not exist - Write to AppDB + * Case 2: Entry does not exist - Write to AppDB * Case 3: Entry exist but modified - Not taken care. Will address later */ if (m_in_reconcile) @@ -921,7 +921,7 @@ void VxlanMgr::createAppDBTunnelMapTable(const KeyOpFieldsValuesTuple & t) } else { - SWSS_LOG_INFO("Reconcile App Tunnel Map Table create %s doesnt not exist. Pending %zu", + SWSS_LOG_INFO("Reconcile App Tunnel Map Table create %s does not exist. Pending %zu", vxlanTunnelMapName.c_str(), m_appVxlanTunnelMapKeysRecon.size()); } } @@ -956,7 +956,7 @@ int VxlanMgr::createVxlanNetdevice(std::string vxlanTunnelName, std::string vni_ vlan_id.c_str()); // Case 1: Entry exist - Erase from cache & return - // Case 2: Enry does not exist - Create netDevice in Kernel + // Case 2: Entry does not exist - Create netDevice in Kernel // Case 3: Entry exist but modified - Not taken care. Will address later if (m_in_reconcile) diff --git a/fdbsyncd/fdbsyncd.cpp b/fdbsyncd/fdbsyncd.cpp index eeffeb68c1..8d82db1829 100644 --- a/fdbsyncd/fdbsyncd.cpp +++ b/fdbsyncd/fdbsyncd.cpp @@ -96,7 +96,7 @@ int main(int argc, char **argv) } catch (const std::exception& e) { - cout << "Exception \"" << e.what() << "\" had been thrown in deamon" << endl; + cout << "Exception \"" << e.what() << "\" had been thrown in daemon" << endl; return 0; } } diff --git a/fpmsyncd/fpmsyncd.cpp b/fpmsyncd/fpmsyncd.cpp index 9f5c9e1a65..2c20e3d8bc 100644 --- a/fpmsyncd/fpmsyncd.cpp +++ b/fpmsyncd/fpmsyncd.cpp @@ -188,7 +188,7 @@ int main(int argc, char **argv) } catch (const exception& e) { - cout << "Exception \"" << e.what() << "\" had been thrown in deamon" << endl; + cout << "Exception \"" << e.what() << "\" had been thrown in daemon" << endl; return 0; } } diff --git a/mclagsyncd/mclaglink.cpp b/mclagsyncd/mclaglink.cpp index adf45a5117..80353b0226 100644 --- a/mclagsyncd/mclaglink.cpp +++ b/mclagsyncd/mclaglink.cpp @@ -277,8 +277,8 @@ void MclagLink::setPortMacLearnMode(char *msg) attrs.push_back(learn_attr); if (strncmp(learn_port.c_str(), PORTCHANNEL_PREFIX, strlen(PORTCHANNEL_PREFIX)) == 0) p_lag_tbl->set(learn_port, attrs); - /*vxlan tunnel dont supported currently, for src_ip is the mandatory attribute*/ - /*else if(strncmp(learn_port.c_str(),VXLAN_TUNNEL_PREFIX,5)==0) + /* vxlan tunnel is currently not supported, for src_ip is the mandatory attribute */ + /* else if(strncmp(learn_port.c_str(),VXLAN_TUNNEL_PREFIX,5)==0) p_tnl_tbl->set(learn_port, attrs); */ else p_port_tbl->set(learn_port, attrs); diff --git a/mclagsyncd/mclagsyncd.cpp b/mclagsyncd/mclagsyncd.cpp index df65896b0c..39221d345d 100644 --- a/mclagsyncd/mclagsyncd.cpp +++ b/mclagsyncd/mclagsyncd.cpp @@ -86,7 +86,7 @@ int main(int argc, char **argv) } catch (const exception& e) { - cout << "Exception \"" << e.what() << "\" had been thrown in deamon" << endl; + cout << "Exception \"" << e.what() << "\" had been thrown in daemon" << endl; return 0; } } diff --git a/neighsyncd/neighsync.cpp b/neighsyncd/neighsync.cpp index 1af94450ad..054f13a470 100644 --- a/neighsyncd/neighsync.cpp +++ b/neighsyncd/neighsync.cpp @@ -99,7 +99,7 @@ void NeighSync::onMsg(int nlmsg_type, struct nl_object *obj) /* Ignore neighbor entries with Broadcast Mac - Trigger for directed broadcast */ if (!delete_key && (MacAddress(macStr) == MacAddress("ff:ff:ff:ff:ff:ff"))) { - SWSS_LOG_INFO("Broadcast Mac recieved, ignoring for %s", ipStr); + SWSS_LOG_INFO("Broadcast Mac received, ignoring for %s", ipStr); return; } diff --git a/neighsyncd/neighsyncd.cpp b/neighsyncd/neighsyncd.cpp index f0dab62590..99e86b2ef9 100644 --- a/neighsyncd/neighsyncd.cpp +++ b/neighsyncd/neighsyncd.cpp @@ -86,7 +86,7 @@ int main(int argc, char **argv) } catch (const std::exception& e) { - cout << "Exception \"" << e.what() << "\" had been thrown in deamon" << endl; + cout << "Exception \"" << e.what() << "\" had been thrown in daemon" << endl; return 0; } } diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 798a39fc99..da361a4ea3 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -173,7 +173,7 @@ bool AclRule::validateAddPriority(string attr_name, string attr_value) char *endp = NULL; errno = 0; m_priority = (uint32_t)strtol(attr_value.c_str(), &endp, 0); - // chack conversion was successfull and the value is within the allowed range + // check conversion was successful and the value is within the allowed range status = (errno == 0) && (endp == attr_value.c_str() + attr_value.size()) && (m_priority >= m_minPriority) && @@ -2476,7 +2476,7 @@ void AclOrch::queryAclActionAttrEnumValues(const string &action_name, } } #else - /* assume all enum values are supported untill sai object api is available */ + /* assume all enum values are supported until sai object api is available */ for (size_t i = 0; i < meta->enummetadata->valuescount; i++) { m_aclEnumActionCapabilities[acl_action].insert(meta->enummetadata->values[i]); @@ -2747,7 +2747,7 @@ bool AclOrch::addAclTable(AclTable &newTable) /* If ACL table exists, remove the table first.*/ if (!removeAclTable(table_id)) { - SWSS_LOG_ERROR("Failed to remove exsiting ACL table %s before adding the new one", + SWSS_LOG_ERROR("Failed to remove existing ACL table %s before adding the new one", table_id.c_str()); return false; } diff --git a/orchagent/aclorch.h b/orchagent/aclorch.h index 0e0a21262b..159fef8778 100644 --- a/orchagent/aclorch.h +++ b/orchagent/aclorch.h @@ -352,7 +352,7 @@ class AclTable { map> rules; // Set to store the ACL table port alias set portSet; - // Set to store the not cofigured ACL table port alias + // Set to store the not configured ACL table port alias set pendingPortSet; AclTable() @@ -374,9 +374,9 @@ class AclTable { bool validate(); bool create(); - // Bind the ACL table to a port which is alread linked + // Bind the ACL table to a port which is already linked bool bind(sai_object_id_t portOid); - // Unbind the ACL table to a port which is alread linked + // Unbind the ACL table to a port which is already linked bool unbind(sai_object_id_t portOid); // Bind the ACL table to all ports linked bool bind(); diff --git a/orchagent/bufferorch.cpp b/orchagent/bufferorch.cpp index c43ac25bd4..bc24551ca0 100644 --- a/orchagent/bufferorch.cpp +++ b/orchagent/bufferorch.cpp @@ -178,7 +178,7 @@ void BufferOrch::generateBufferPoolWatermarkCounterIdList(void) // is received on buffer pool watermark key under table "FLEX_COUNTER_GROUP_TABLE" // Because the SubscriberStateTable listens to the entire keyspace of "BUFFER_POOL_WATERMARK", any update // to field value tuples under key "BUFFER_POOL_WATERMARK" will cause this tuple to be heard again - // To avoid resync the coutner ID list a second time, we introduce a data member variable to mark whether + // To avoid resync the counter ID list a second time, we introduce a data member variable to mark whether // this operation has already been done or not yet if (m_isBufferPoolWatermarkCounterIdListGenerated) { diff --git a/orchagent/crmorch.cpp b/orchagent/crmorch.cpp index 87334777f5..d40ca195a2 100644 --- a/orchagent/crmorch.cpp +++ b/orchagent/crmorch.cpp @@ -596,7 +596,7 @@ void CrmOrch::checkCrmThresholds() } else { - SWSS_LOG_WARN("%s Exception occured (div by Zero): Used count %u free count %u", + SWSS_LOG_WARN("%s Exception occurred (div by Zero): Used count %u free count %u", res.name.c_str(), cnt.usedCounter, cnt.availableCounter); } } diff --git a/orchagent/debugcounterorch.cpp b/orchagent/debugcounterorch.cpp index 31ec150276..ff2bee2e98 100644 --- a/orchagent/debugcounterorch.cpp +++ b/orchagent/debugcounterorch.cpp @@ -163,7 +163,7 @@ void DebugCounterOrch::doTask(Consumer& consumer) ++it; break; case task_process_status::task_failed: - SWSS_LOG_ERROR("Failed to process debug counters '%s' task, error(s) occured during execution", op.c_str()); + SWSS_LOG_ERROR("Failed to process debug counters '%s' task, error(s) occurred during execution", op.c_str()); consumer.m_toSync.erase(it++); break; default: @@ -255,7 +255,7 @@ task_process_status DebugCounterOrch::installDebugCounter(const string& counter_ addFreeCounter(counter_name, counter_type); reconcileFreeDropCounters(counter_name); - SWSS_LOG_NOTICE("Succesfully created drop counter %s", counter_name.c_str()); + SWSS_LOG_NOTICE("Successfully created drop counter %s", counter_name.c_str()); return task_process_status::task_success; } @@ -294,7 +294,7 @@ task_process_status DebugCounterOrch::uninstallDebugCounter(const string& counte m_counterNameToSwitchStatMap->hdel("", counter_name); } - SWSS_LOG_NOTICE("Succesfully deleted drop counter %s", counter_name.c_str()); + SWSS_LOG_NOTICE("Successfully deleted drop counter %s", counter_name.c_str()); return task_process_status::task_success; } @@ -451,7 +451,7 @@ void DebugCounterOrch::reconcileFreeDropCounters(const string& counter_name) createDropCounter(counter_name, counter_it->second, reasons_it->second); free_drop_counters.erase(counter_it); free_drop_reasons.erase(reasons_it); - SWSS_LOG_NOTICE("Succesfully matched drop reasons to counter %s", counter_name.c_str()); + SWSS_LOG_NOTICE("Successfully matched drop reasons to counter %s", counter_name.c_str()); } } diff --git a/orchagent/fdborch.cpp b/orchagent/fdborch.cpp index 7e1c30e935..dc9efb444b 100644 --- a/orchagent/fdborch.cpp +++ b/orchagent/fdborch.cpp @@ -677,7 +677,7 @@ void FdbOrch::doTask(NotificationConsumer& consumer) if (op == "ALL") { /* - * so far only support flush all the FDB entris + * so far only support flush all the FDB entries * flush per port and flush per vlan will be added later. */ status = sai_fdb_api->flush_fdb_entries(gSwitchId, 0, NULL); @@ -741,7 +741,7 @@ void FdbOrch::doTask(NotificationConsumer& consumer) * Description: * Flushes FDB entries based on bridge_port_oid, or vlan_oid or both. * This function is called in three cases. - * 1. Port is reoved from VLAN (via SUBJECT_TYPE_VLAN_MEMBER_CHANGE) + * 1. Port is removed from VLAN (via SUBJECT_TYPE_VLAN_MEMBER_CHANGE) * 2. Bridge port OID is removed (Direct call) * 3. Port is shut down (via SUBJECT_TYPE_ */ diff --git a/orchagent/fgnhgorch.cpp b/orchagent/fgnhgorch.cpp index 7077ff4790..6ca37cad81 100644 --- a/orchagent/fgnhgorch.cpp +++ b/orchagent/fgnhgorch.cpp @@ -62,7 +62,7 @@ void FgNhgOrch::update(SubjectType type, void *cntx) SWSS_LOG_WARN("Hit unexpected condition where structs are out of sync"); } nexthop_entry->second.link_oper_state = LINK_UP; - SWSS_LOG_INFO("Updated %s assoicated with %s to state up", + SWSS_LOG_INFO("Updated %s associated with %s to state up", update->port.m_alias.c_str(), ip.to_string().c_str()); if (!m_neighOrch->getNeighborEntry(ip, nhk, macAddress)) @@ -481,9 +481,9 @@ bool FgNhgOrch::invalidNextHopInNextHopGroup(const NextHopKey& nexthop) /* setActiveBankHashBucketChanges: Sets hash buckets for active banks and called on a PER bank basis - * This function deals with a scenario where next-hop changes occured for the route, + * This function deals with a scenario where next-hop changes occurred for the route, * and the next-hop change didn't cause an entire bank to go active/inactive. - * The function uses bank_member_changes to compute the hash buckets to modify, in order to satisy the next-hop + * The function uses bank_member_changes to compute the hash buckets to modify, in order to satisfy the next-hop * availability for the route/neigh. * Eg: Prefix A had nhs 1, 2, 3 with 1, 2, 3, being equally distributed over hash buckets * 0-59(20 buckets per nh). If there was a nh removal of nh 2, this fn would equally redistribute hash buckets @@ -763,12 +763,12 @@ bool FgNhgOrch::setInactiveBankToNextAvailableActiveBank(FGNextHopGroupEntry *sy /* setInactiveBankHashBucketChanges: Sets hash buckets for inactive banks and called on a PER bank basis. - * This function deals with scenarios where next-hop changes occured for the route, + * This function deals with scenarios where next-hop changes occurred for the route, * and the next-hop change causes an active bank to become inactive, or an inactive bank to become active or * inactive bank to remain inactive. * The function uses the bank member diffs provided in bank_member_changes and uses it to compute - * the hash buckets to modify, in order to satisy the next-hop availability for the route/neigh. - * Eg: Lets assume prefix A had nhs 1, 2, 3, 4, 5, 6 with nhs being equally distirbuted over hash buckets + * the hash buckets to modify, in order to satisfy the next-hop availability for the route/neigh. + * Eg: Lets assume prefix A had nhs 1, 2, 3, 4, 5, 6 with nhs being equally distributed over hash buckets * 0-59(10 per nh). Now there was a nh deletion of 1, 2, 3 which constituted bank 0(4, 5, 6 constituted bank 1) * This function will identify that all of bank 0's nh are down and re-assign all the hash buckets(0-29) for these nhs to * nhs from bank 1, along with making local struct changes to track this for future route/neigh changes. @@ -781,7 +781,7 @@ bool FgNhgOrch::setInactiveBankHashBucketChanges(FGNextHopGroupEntry *syncd_fg_r if (bank_member_changes[bank].nhs_to_add.size() > 0) { - /* Previously inactive bank now transistions to active */ + /* Previously inactive bank now transitions to active */ syncd_fg_route_entry->syncd_fgnhg_map[bank].clear(); for (uint32_t i = fgNhgEntry->hash_bucket_indices[bank].start_index; i <= fgNhgEntry->hash_bucket_indices[bank].end_index; i++) @@ -805,7 +805,7 @@ bool FgNhgOrch::setInactiveBankHashBucketChanges(FGNextHopGroupEntry *syncd_fg_r } else if (bank_member_changes[bank].nhs_to_del.size() > 0) { - /* Previously active bank now transistions to inactive */ + /* Previously active bank now transitions to inactive */ if (!setInactiveBankToNextAvailableActiveBank(syncd_fg_route_entry, fgNhgEntry, bank, bank_member_changes, nhopgroup_members_set, ipPrefix)) { @@ -1130,7 +1130,7 @@ bool FgNhgOrch::setFgNhg(sai_object_id_t vrf_id, const IpPrefix &ipPrefix, const fgNhgEntry->hash_bucket_indices.size(), BankMemberChanges()); if (fgNhgEntry->hash_bucket_indices.size() == 0) { - /* Only happens the 1st time when hash_bucket_indices are not inited + /* Only happens the 1st time when hash_bucket_indices are not initialized */ for (auto it : fgNhgEntry->next_hops) { diff --git a/orchagent/fgnhgorch.h b/orchagent/fgnhgorch.h index 551d55ff29..42b2b7f615 100644 --- a/orchagent/fgnhgorch.h +++ b/orchagent/fgnhgorch.h @@ -83,7 +83,7 @@ typedef std::map FgNhgMembers; /* Main structure to hold user configuration */ typedef std::map FgNhgs; -/* Helper struct populated at every route change to identify the next-hop changes which occured */ +/* Helper struct populated at every route change to identify the next-hop changes which occurred */ typedef struct { std::vector nhs_to_del; diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index 29c774d9a9..649293c151 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -1047,7 +1047,7 @@ bool IntfsOrch::addRouterIntfs(sai_object_id_t vrf_id, Port &port) attr.id = SAI_ROUTER_INTERFACE_ATTR_NAT_ZONE_ID; attr.value.u32 = port.m_nat_zone_id; - SWSS_LOG_INFO("Assinging NAT zone id %d to interface %s\n", attr.value.u32, port.m_alias.c_str()); + SWSS_LOG_INFO("Assigning NAT zone id %d to interface %s\n", attr.value.u32, port.m_alias.c_str()); attrs.push_back(attr); } diff --git a/orchagent/main.cpp b/orchagent/main.cpp index 2787cffef3..68e4d0a4b8 100644 --- a/orchagent/main.cpp +++ b/orchagent/main.cpp @@ -81,7 +81,7 @@ void usage() cout << " -b batch_size: set consumer table pop operation batch size (default 128)" << endl; cout << " -m MAC: set switch MAC address" << endl; cout << " -i INST_ID: set the ASIC instance_id in multi-asic platform" << endl; - cout << " -s: enable synchronous mode (depreacated, use -z)" << endl; + cout << " -s: enable synchronous mode (deprecated, use -z)" << endl; cout << " -z: redis communication mode (redis_async|redis_sync|zmq_sync), default: redis_async" << endl; cout << " -f swss_rec_filename: swss record log filename(default 'swss.rec')" << endl; cout << " -j sairedis_rec_filename: sairedis record log filename(default sairedis.rec)" << endl; @@ -305,7 +305,7 @@ int main(int argc, char **argv) { SWSS_LOG_WARN("ASIC instance_id length > SAI_MAX_HARDWARE_ID_LEN, LIMITING !!"); } - // If longer, trancate into a string + // If longer, truncate into a string gAsicInstance.assign(optarg, len); } break; @@ -575,7 +575,7 @@ int main(int argc, char **argv) if (!orchDaemon->init()) { - SWSS_LOG_ERROR("Failed to initialize orchstration daemon"); + SWSS_LOG_ERROR("Failed to initialize orchestration daemon"); exit(EXIT_FAILURE); } diff --git a/orchagent/mirrororch.cpp b/orchagent/mirrororch.cpp index a0665406a1..0495db6363 100644 --- a/orchagent/mirrororch.cpp +++ b/orchagent/mirrororch.cpp @@ -613,7 +613,7 @@ bool MirrorOrch::getNeighborInfo(const string& name, MirrorEntry& session) } else { - // Get the firt member of the LAG + // Get the first member of the LAG Port member; string first_member_alias = *session.neighborInfo.port.m_members.begin(); m_portsOrch->getPort(first_member_alias, member); @@ -924,7 +924,7 @@ bool MirrorOrch::activateSession(const string& name, MirrorEntry& session) sai_object_id_t oid = SAI_NULL_OBJECT_ID; if (!m_policerOrch->getPolicerOid(session.policer, oid)) { - SWSS_LOG_ERROR("Faield to get policer %s", session.policer.c_str()); + SWSS_LOG_ERROR("Failed to get policer %s", session.policer.c_str()); return false; } @@ -1229,7 +1229,7 @@ void MirrorOrch::updateNeighbor(const NeighborUpdate& update) } // The function is called when SUBJECT_TYPE_FDB_CHANGE is received. -// This function will handle the case when new FDB enty is learned/added in the VLAN, +// This function will handle the case when new FDB entry is learned/added in the VLAN, // or when the old FDB entry gets removed. Only when the neighbor is VLAN will the case // be handled. void MirrorOrch::updateFdb(const FdbUpdate& update) @@ -1244,7 +1244,7 @@ void MirrorOrch::updateFdb(const FdbUpdate& update) // Check the following three conditions: // 1) mirror session is pointing to a VLAN // 2) the VLAN matches the FDB notification VLAN ID - // 3) the destination MAC matches the FDB notifaction MAC + // 3) the destination MAC matches the FDB notification MAC if (session.neighborInfo.port.m_type != Port::VLAN || session.neighborInfo.port.m_vlan_info.vlan_oid != update.entry.bv_id || session.neighborInfo.mac != update.entry.mac) @@ -1274,7 +1274,7 @@ void MirrorOrch::updateFdb(const FdbUpdate& update) activateSession(name, session); } } - // Remvoe the monitor port + // Remove the monitor port else { deactivateSession(name, session); diff --git a/orchagent/natorch.cpp b/orchagent/natorch.cpp index 68c9938f59..6bec777083 100644 --- a/orchagent/natorch.cpp +++ b/orchagent/natorch.cpp @@ -3431,7 +3431,7 @@ void NatOrch::updateAllConntrackEntries(void) { SWSS_LOG_ENTER(); - /* Send notifcations for the Single NAT entries to set timeout */ + /* Send notifications for the Single NAT entries to set timeout */ NatEntry::iterator natIter = m_natEntries.begin(); while (natIter != m_natEntries.end()) { @@ -3447,7 +3447,7 @@ void NatOrch::updateAllConntrackEntries(void) natIter++; } - /* Send notifcations for the Single NAPT entries to set timeout */ + /* Send notifications for the Single NAPT entries to set timeout */ NaptEntry::iterator naptIter = m_naptEntries.begin(); while (naptIter != m_naptEntries.end()) { @@ -3461,7 +3461,7 @@ void NatOrch::updateAllConntrackEntries(void) naptIter++; } - /* Send notifcations for the Twice NAT entries to set timeout */ + /* Send notifications for the Twice NAT entries to set timeout */ TwiceNatEntry::iterator twiceNatIter = m_twiceNatEntries.begin(); while (twiceNatIter != m_twiceNatEntries.end()) { @@ -3475,7 +3475,7 @@ void NatOrch::updateAllConntrackEntries(void) twiceNatIter++; } - /* Send notifcations for the Twice NAPT entries to set timeout */ + /* Send notifications for the Twice NAPT entries to set timeout */ TwiceNaptEntry::iterator twiceNaptIter = m_twiceNaptEntries.begin(); while (twiceNaptIter != m_twiceNaptEntries.end()) { diff --git a/orchagent/neighorch.cpp b/orchagent/neighorch.cpp index ef10d8764d..c850bf0ee6 100644 --- a/orchagent/neighorch.cpp +++ b/orchagent/neighorch.cpp @@ -822,7 +822,7 @@ bool NeighOrch::removeNeighbor(const NeighborEntry &neighborEntry, bool disable) { if (status == SAI_STATUS_ITEM_NOT_FOUND) { - SWSS_LOG_ERROR("Failed to locate neigbor %s on %s, rv:%d", + SWSS_LOG_ERROR("Failed to locate neighbor %s on %s, rv:%d", m_syncdNeighbors[neighborEntry].mac.to_string().c_str(), alias.c_str(), status); return true; } diff --git a/orchagent/orch.cpp b/orchagent/orch.cpp index e26439e7b8..ea3e8e78b2 100644 --- a/orchagent/orch.cpp +++ b/orchagent/orch.cpp @@ -103,7 +103,7 @@ void Consumer::addToSync(const KeyOpFieldsValuesTuple &entry) { /* * Now we are trying to add the key-value with SET. - * We maintain maximun two values per key. + * We maintain maximum two values per key. * In case there is one key-value, it should be DEL or SET * In case there are two key-value pairs, it should be DEL then SET * The code logic is following: @@ -531,7 +531,7 @@ void Orch::logfileReopen() /* * On log rotate we will use the same file name, we are assuming that - * logrotate deamon move filename to filename.1 and we will create new + * logrotate daemon move filename to filename.1 and we will create new * empty file here. */ @@ -637,7 +637,7 @@ bool Orch::parseIndexRange(const string &input, sai_uint32_t &range_low, sai_uin range_high = (uint32_t)stoul(range_values[1]); if (range_low >= range_high) { - SWSS_LOG_ERROR("malformed index range in:%s. left value must be less than righ value.\n", input.c_str()); + SWSS_LOG_ERROR("malformed index range in:%s. left value must be less than right value.\n", input.c_str()); return false; } } diff --git a/orchagent/orchdaemon.cpp b/orchagent/orchdaemon.cpp index c2246be280..6e4c887f2a 100644 --- a/orchagent/orchdaemon.cpp +++ b/orchagent/orchdaemon.cpp @@ -58,7 +58,7 @@ OrchDaemon::~OrchDaemon() /* * Some orchagents call other agents in their destructor. * To avoid accessing deleted agent, do deletion in reverse order. - * NOTE: This is stil not a robust solution, as order in this list + * NOTE: This is still not a robust solution, as order in this list * does not strictly match the order of construction of agents. * For a robust solution, first some cleaning/house-keeping in * orchagents management is in order. @@ -602,7 +602,7 @@ void OrchDaemon::start() /* * Try to perform orchagent state restore and dynamic states sync up if - * warm start reqeust is detected. + * warm start request is detected. */ bool OrchDaemon::warmRestoreAndSyncUp() { @@ -618,7 +618,7 @@ bool OrchDaemon::warmRestoreAndSyncUp() * * First iteration: switchorch, Port init/hostif create part of portorch, buffers configuration * - * Second iteratoin: port speed/mtu/fec_mode/pfc_asym/admin_status config, + * Second iteration: port speed/mtu/fec_mode/pfc_asym/admin_status config, * other orch(s) which wait for port to become ready. * * Third iteration: Drain remaining data that are out of order. diff --git a/orchagent/pfcactionhandler.cpp b/orchagent/pfcactionhandler.cpp index 98ae16dfa5..6a0664d0f6 100644 --- a/orchagent/pfcactionhandler.cpp +++ b/orchagent/pfcactionhandler.cpp @@ -577,7 +577,7 @@ PfcWdZeroBufferHandler::ZeroBufferProfile::~ZeroBufferProfile(void) { SWSS_LOG_ENTER(); - // Destory ingress and egress prifiles and pools + // Destroy ingress and egress profiles and pools destroyZeroBufferProfile(true); destroyZeroBufferProfile(false); } diff --git a/orchagent/pfcactionhandler.h b/orchagent/pfcactionhandler.h index e7739cf341..7859709a1e 100644 --- a/orchagent/pfcactionhandler.h +++ b/orchagent/pfcactionhandler.h @@ -125,7 +125,7 @@ class PfcWdZeroBufferHandler: public PfcWdLossyHandler private: /* * Sets lock bits on port's priority group and queue - * to protect them from beeing changed by other Orch's + * to protect them from being changed by other Orch's */ void setPriorityGroupAndQueueLockFlag(Port& port, bool isLocked) const; diff --git a/orchagent/pfcwdorch.cpp b/orchagent/pfcwdorch.cpp index dad4ddd931..d920c21822 100644 --- a/orchagent/pfcwdorch.cpp +++ b/orchagent/pfcwdorch.cpp @@ -305,7 +305,7 @@ task_process_status PfcWdSwOrch::createEntry(const } else if (field == BIG_RED_SWITCH_FIELD) { - SWSS_LOG_NOTICE("Recieve brs mode set, %s", value.c_str()); + SWSS_LOG_NOTICE("Receive brs mode set, %s", value.c_str()); setBigRedSwitchMode(value); } } @@ -345,7 +345,7 @@ void PfcWdSwOrch::disableBigRedSwitchMode() SWSS_LOG_ENTER(); m_bigRedSwitchFlag = false; - // Disable pfcwdaction hanlder on each queue if exists. + // Disable pfcwdaction handler on each queue if exists. for (auto &entry : m_brsEntryMap) { @@ -422,7 +422,7 @@ void PfcWdSwOrch::enableBigRedSwitchMode() } } - // Create pfcwdaction hanlder on all the ports. + // Create pfcwdaction handler on all the ports. for (auto & it: allPorts) { Port port = it.second; @@ -907,7 +907,7 @@ bool PfcWdSwOrch::startWdActionOnQueue(const string if (m_bigRedSwitchFlag) { - SWSS_LOG_NOTICE("Big_RED_SWITCH mode is on, ingore syncd pfc watchdog notification"); + SWSS_LOG_NOTICE("Big_RED_SWITCH mode is on, ignore syncd pfc watchdog notification"); } else if (event == "storm") { diff --git a/orchagent/policerorch.cpp b/orchagent/policerorch.cpp index 3c102487c8..14b97f4ac8 100644 --- a/orchagent/policerorch.cpp +++ b/orchagent/policerorch.cpp @@ -130,7 +130,7 @@ void PolicerOrch::doTask(Consumer &consumer) if (op == SET_COMMAND) { - // Mark the opeartion as an 'update', if the policer exists. + // Mark the operation as an 'update', if the policer exists. bool update = m_syncdPolicers.find(key) != m_syncdPolicers.end(); vector attrs; diff --git a/orchagent/qosorch.cpp b/orchagent/qosorch.cpp index c45d427afd..eae00c27dc 100644 --- a/orchagent/qosorch.cpp +++ b/orchagent/qosorch.cpp @@ -468,7 +468,7 @@ bool WredMapHandler::convertFieldValuesToAttributes(KeyOpFieldsValuesTuple &tupl attribs.push_back(attr); } else { - SWSS_LOG_ERROR("Unkonwn wred profile field:%s", fvField(*i).c_str()); + SWSS_LOG_ERROR("Unknown wred profile field:%s", fvField(*i).c_str()); return false; } } @@ -816,7 +816,7 @@ task_process_status QosOrch::handleSchedulerTable(Consumer& consumer) } else if (fvField(*i) == scheduler_priority_field_name) { - // TODO: The meaning is to be able to adjus priority of the given scheduler group. + // TODO: The meaning is to be able to adjust priority of the given scheduler group. // However currently SAI model does not provide such ability. } else if (fvField(*i) == scheduler_meter_type_field_name) diff --git a/orchagent/routeorch.cpp b/orchagent/routeorch.cpp index fdec0db3cf..3a88b5793c 100644 --- a/orchagent/routeorch.cpp +++ b/orchagent/routeorch.cpp @@ -54,10 +54,10 @@ RouteOrch::RouteOrch(DBConnector *db, string tableName, SwitchOrch *switchOrch, /* * ASIC specific workaround to re-calculate maximum ECMP groups - * according to diferent ECMP mode used. + * according to different ECMP mode used. * * On Mellanox platform, the maximum ECMP groups returned is the value - * under the condition that the ECMP group size is 1. Deviding this + * under the condition that the ECMP group size is 1. Dividing this * number by DEFAULT_MAX_ECMP_GROUP_SIZE gets the maximum number of * ECMP groups when the maximum ECMP group size is 32. */ @@ -549,7 +549,7 @@ void RouteOrch::doTask(Consumer& consumer) } /* Set the empty ip(s) to zero - * as IpAddress("") will construst a incorrect ip. */ + * as IpAddress("") will construct a incorrect ip. */ for (auto &ip : ipv) { if (ip.empty()) diff --git a/swssconfig/swssconfig.cpp b/swssconfig/swssconfig.cpp index 058b83a56b..a41ef0ecdd 100644 --- a/swssconfig/swssconfig.cpp +++ b/swssconfig/swssconfig.cpp @@ -89,7 +89,7 @@ bool load_json_db_data(ifstream &fs, vector &db_items) { if (el_count != arr_item.size()) { - SWSS_LOG_ERROR("Chlid elements must have both key and op entry. %s", + SWSS_LOG_ERROR("Child elements must have both key and op entry. %s", arr_item.dump().c_str()); return false; } diff --git a/teamsyncd/teamsyncd.cpp b/teamsyncd/teamsyncd.cpp index 6adedab81d..c5190f46b1 100644 --- a/teamsyncd/teamsyncd.cpp +++ b/teamsyncd/teamsyncd.cpp @@ -51,7 +51,7 @@ int main(int argc, char **argv) } catch (const std::exception& e) { - cout << "Exception \"" << e.what() << "\" had been thrown in deamon" << endl; + cout << "Exception \"" << e.what() << "\" had been thrown in daemon" << endl; return 0; } diff --git a/tests/mock_tests/aclorch_ut.cpp b/tests/mock_tests/aclorch_ut.cpp index 302f894747..3921dfe73e 100644 --- a/tests/mock_tests/aclorch_ut.cpp +++ b/tests/mock_tests/aclorch_ut.cpp @@ -833,13 +833,13 @@ namespace aclorch_test } else { - // unkonw attr_value + // unknown attr_value return false; } } else { - // unknow attr_name + // unknown attr_name return false; } @@ -896,7 +896,7 @@ namespace aclorch_test } else { - // unknow attr_name + // unknown attr_name return false; } @@ -926,7 +926,7 @@ namespace aclorch_test } else { - // unknow attr_name + // unknown attr_name return false; } } @@ -999,7 +999,7 @@ namespace aclorch_test // When received ACL rule DEL_COMMAND, orchagent can delete corresponding ACL rule. // // Verify ACL table type = { L3 }, stage = { INGRESS, ENGRESS } - // Input by matchs = { SIP, DIP ...}, pkg:actions = { FORWARD, DROP ... } + // Input by matches = { SIP, DIP ...}, pkg:actions = { FORWARD, DROP ... } // TEST_F(AclOrchTest, L3Acl_Matches_Actions) { @@ -1089,7 +1089,7 @@ namespace aclorch_test // When received ACL rule DEL_COMMAND, orchagent can delete corresponding ACL rule. // // Verify ACL table type = { L3V6 }, stage = { INGRESS, ENGRESS } - // Input by matchs = { SIP, DIP ...}, pkg:actions = { FORWARD, DROP ... } + // Input by matches = { SIP, DIP ...}, pkg:actions = { FORWARD, DROP ... } // TEST_F(AclOrchTest, L3V6Acl_Matches_Actions) { diff --git a/tests/mock_tests/portsorch_ut.cpp b/tests/mock_tests/portsorch_ut.cpp index 1ee3cdb027..a52b505b06 100644 --- a/tests/mock_tests/portsorch_ut.cpp +++ b/tests/mock_tests/portsorch_ut.cpp @@ -446,7 +446,7 @@ namespace portsorch_test pgConsumer = static_cast(gBufferOrch->getExecutor(APP_BUFFER_PG_TABLE_NAME)); pgConsumer->dumpPendingTasks(ts); - ASSERT_TRUE(ts.empty()); // PG should be proceesed now + ASSERT_TRUE(ts.empty()); // PG should be processed now ts.clear(); } @@ -571,7 +571,7 @@ namespace portsorch_test vector ts; - // check LAG, VLAN tasks were proceesed + // check LAG, VLAN tasks were processed // port table may require one more doTask iteration for (auto tableName: { APP_LAG_TABLE_NAME, diff --git a/tests/mock_tests/saispy.h b/tests/mock_tests/saispy.h index 535ef130bb..a8a5925fd7 100644 --- a/tests/mock_tests/saispy.h +++ b/tests/mock_tests/saispy.h @@ -5,7 +5,7 @@ #include "saitypes.h" -// Spy C functin pointer to std::function to access closure +// Spy C function pointer to std::function to access closure // Internal using static `spy` function pointer to invoke std::function `fake` // To make sure the convert work for multiple function in the same or different API table. // The caller shall passing to create unique SaiSpyFunction class. @@ -21,7 +21,7 @@ // auto x = SpyOn(&acl_api.get()->create_acl_table); // auto y = SpyOn(&switch_api.get()->create_switch); // -// The rest rare case is spy same function in different API table. Using differnt n value for that. +// The rest rare case is spy same function in different API table. Using different n value for that. // auto x = SpyOn<0, SAI_OBJECT_TYPE_ACL_TABLE>(&acl_api_1.get()->create_acl_table); // auto y = SpyOn<1, SAI_OBJECT_TYPE_ACL_TABLE>(&acl_api_2.get()->create_acl_table); // diff --git a/warmrestart/warmRestartAssist.cpp b/warmrestart/warmRestartAssist.cpp index ca19398577..3bb351fcb7 100644 --- a/warmrestart/warmRestartAssist.cpp +++ b/warmrestart/warmRestartAssist.cpp @@ -29,7 +29,7 @@ AppRestartAssist::AppRestartAssist(RedisPipeline *pipelineAppDB, const std::stri /* * set the default timer value. - * If the application instance privides timer value, use it if valid. + * If the application instance provides timer value, use it if valid. * Use the class default one if none is provided by application. */ if (defaultWarmStartTimerValue > MAXIMUM_WARMRESTART_TIMER_VALUE) @@ -218,7 +218,7 @@ void AppRestartAssist::insertToMap(string tableName, string key, vector vector * It is expect that the application owner keeps the order of f/v pairs - * The application ususally take this class as composition, I,e, include a instance of + * The application usually takes this class as composition, i.e. includes an instance of * this class in their classes. * A high level flow to use this class: - * 1, Include this class in the application class: appClass. + * 1. Include this class in the application class: appClass. * - * 2, Construct appClass along with this class with: + * 2. Construct appClass along with this class with: * docker name, application name, timer value etc * - * 3, Define Select s; + * 3. Define Select s; * Check if warmstart enabled, if so,read application table to cache and start timer: * if (appClass.getRestartAssist()->isWarmStartInProgress()) * { @@ -31,13 +31,13 @@ namespace swss { * appClass.getRestartAssist()->startReconcileTimer(s); * } * - * 4, Before the reconcile timer is expired, insert all requests into cache: + * 4. Before the reconcile timer is expired, insert all requests into cache: * if (m_AppRestartAssist.isWarmStartInProgress()) * { * m_AppRestartAssist.insertToMap(key, fvVector, delete_key); * } * - * 5, In the select loop, check if the reconcile timer is expired, if so, + * 5. In the select loop, check if the reconcile timer is expired, if so, * stop timer and call the reconcilation function: * Selectable *temps; * s.select(&temps); @@ -95,13 +95,13 @@ class AppRestartAssist /* * Default timer to be 5 seconds - * Overwriten by application loading this class and configurations in configDB + * Overwritten by application loading this class and configurations in configDB * Precedence ascent order: Default -> loading class with value -> configuration */ static const uint32_t DEFAULT_INTERNAL_TIMER_VALUE = 5; typedef std::map>> AppTableMap; - // cache map to store temperary application table + // cache map to store temporary application table AppTableMap appTableCacheMap; RedisPipeline *m_pipeLine;