Skip to content

Commit 5528ebf

Browse files
authored
Cleanup code (#1814)
1 parent d594c47 commit 5528ebf

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ stamp-h1
3232
**/Makefile
3333
autom4te.cache
3434

35+
# Temp files #
36+
##############
37+
*~
38+
*.swp
39+
3540
# Dependency Folder #
3641
#####################
3742
deps/
@@ -52,6 +57,8 @@ cfgmgr/vxlanmgrd
5257
cfgmgr/natmgrd
5358
cfgmgr/sflowmgrd
5459
cfgmgr/macsecmgrd
60+
cfgmgr/coppmgrd
61+
cfgmgr/tunnelmgrd
5562
fpmsyncd/fpmsyncd
5663
gearsyncd/gearsyncd
5764
mclagsyncd/mclagsyncd
@@ -68,6 +75,7 @@ tlm_teamd/tlm_teamd
6875
teamsyncd/teamsyncd
6976
tests/tests
7077

78+
7179
# Test Files #
7280
##############
7381
tests/log

orchagent/countercheckorch.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ PfcFrameCounters CounterCheckOrch::getPfcFrameCounters(sai_object_id_t portId)
164164

165165
if (!m_countersTable->get(sai_serialize_object_id(portId), fieldValues))
166166
{
167-
return move(counters);
167+
return counters;
168168
}
169169

170170
for (const auto& fv : fieldValues)
@@ -182,7 +182,7 @@ PfcFrameCounters CounterCheckOrch::getPfcFrameCounters(sai_object_id_t portId)
182182
}
183183
}
184184

185-
return move(counters);
185+
return counters;
186186
}
187187

188188
QueueMcCounters CounterCheckOrch::getQueueMcCounters(
@@ -218,10 +218,9 @@ QueueMcCounters CounterCheckOrch::getQueueMcCounters(
218218
counters.push_back(pkts);
219219
}
220220

221-
return move(counters);
221+
return counters;
222222
}
223223

224-
225224
void CounterCheckOrch::addPort(const Port& port)
226225
{
227226
m_mcCountersMap.emplace(port.m_port_id, getQueueMcCounters(port));

orchagent/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ void usage()
8585
cout << " -b batch_size: set consumer table pop operation batch size (default 128)" << endl;
8686
cout << " -m MAC: set switch MAC address" << endl;
8787
cout << " -i INST_ID: set the ASIC instance_id in multi-asic platform" << endl;
88-
cout << " -s: enable synchronous mode (deprecated, use -z)" << endl;
89-
cout << " -z: redis communication mode (redis_async|redis_sync|zmq_sync), default: redis_async" << endl;
88+
cout << " -s enable synchronous mode (deprecated, use -z)" << endl;
89+
cout << " -z redis communication mode (redis_async|redis_sync|zmq_sync), default: redis_async" << endl;
9090
cout << " -f swss_rec_filename: swss record log filename(default 'swss.rec')" << endl;
9191
cout << " -j sairedis_rec_filename: sairedis record log filename(default sairedis.rec)" << endl;
92-
cout << " -k max bulk size in bulk mode (default 1000)";
92+
cout << " -k max bulk size in bulk mode (default 1000)" << endl;
9393
}
9494

9595
void sighup_handler(int signo)

orchagent/mirrororch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ bool MirrorOrch::setUnsetPortMirror(Port port,
759759
status = sai_port_api->set_port_attribute(p.m_port_id, &port_attr);
760760
if (status != SAI_STATUS_SUCCESS)
761761
{
762-
SWSS_LOG_ERROR("Failed to configure %s session on port %s: %s, status %d, sessionId %x",
762+
SWSS_LOG_ERROR("Failed to configure %s session on port %s: %s, status %d, sessionId %lx",
763763
ingress ? "RX" : "TX", port.m_alias.c_str(),
764764
p.m_alias.c_str(), status, sessionId);
765765
task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status);
@@ -775,7 +775,7 @@ bool MirrorOrch::setUnsetPortMirror(Port port,
775775
status = sai_port_api->set_port_attribute(port.m_port_id, &port_attr);
776776
if (status != SAI_STATUS_SUCCESS)
777777
{
778-
SWSS_LOG_ERROR("Failed to configure %s session on port %s, status %d, sessionId %x",
778+
SWSS_LOG_ERROR("Failed to configure %s session on port %s, status %d, sessionId %lx",
779779
ingress ? "RX" : "TX", port.m_alias.c_str(), status, sessionId);
780780
task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status);
781781
if (handle_status != task_success)

orchagent/natorch.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,6 @@ void NatOrch::doNatTableTask(Consumer& consumer)
26672667
string key = kfvKey(t);
26682668
string op = kfvOp(t);
26692669
vector<string> keys = tokenize(key, ':');
2670-
IpAddress global_address;
26712670
/* Example : APPL_DB
26722671
* NAT_TABLE:65.55.45.1
26732672
* translated_ip: 10.0.0.1
@@ -2808,7 +2807,6 @@ void NatOrch::doTwiceNatTableTask(Consumer& consumer)
28082807
string key = kfvKey(t);
28092808
string op = kfvOp(t);
28102809
vector<string> keys = tokenize(key, ':');
2811-
IpAddress global_address;
28122810
/* Example : APPL_DB
28132811
* NAT_TWICE_TABLE:91.91.91.91:65.55.45.1
28142812
* translated_src_ip: 14.14.14.14
@@ -3020,7 +3018,6 @@ void NatOrch::doDnatPoolTableTask(Consumer& consumer)
30203018
string key = kfvKey(t);
30213019
string op = kfvOp(t);
30223020
vector<string> keys = tokenize(key, ':');
3023-
IpAddress global_address;
30243021
/* Example : APPL_DB
30253022
* NAT_DNAT_POOL_TABLE:65.55.45.1
30263023
* NULL: NULL

orchagent/pfcactionhandler.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ PfcWdActionHandler::PfcWdQueueStats PfcWdActionHandler::getQueueStats(shared_ptr
121121

122122
if (!countersTable->get(queueIdStr, fieldValues))
123123
{
124-
return move(stats);
124+
return stats;
125125
}
126126

127127
for (const auto& fv : fieldValues)
@@ -175,7 +175,7 @@ PfcWdActionHandler::PfcWdQueueStats PfcWdActionHandler::getQueueStats(shared_ptr
175175
}
176176
}
177177

178-
return move(stats);
178+
return stats;
179179
}
180180

181181
void PfcWdActionHandler::initWdCounters(shared_ptr<Table> countersTable, const string &queueIdStr)

0 commit comments

Comments
 (0)