Skip to content

Commit 0cc141e

Browse files
Merge branch 'master' of https://github.com/divyagayathri-hcl/sonic-swss into pytest_skip
2 parents 8f04d99 + a7607be commit 0cc141e

27 files changed

+2831
-31
lines changed

fpmsyncd/fpmsyncd.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,6 @@ int main(int argc, char **argv)
318318
{
319319
cout << "Connection lost, reconnecting..." << endl;
320320
}
321-
catch (const exception& e)
322-
{
323-
cout << "Exception \"" << e.what() << "\" had been thrown in daemon" << endl;
324-
return 0;
325-
}
326321
}
327322

328323
return 1;
@@ -358,4 +353,4 @@ void flushPipeline(RedisPipeline& pipeline) {
358353
// by doing this, we make sure every entry eventually gets flushed
359354
gSelectTimeout = gFlushTimeout - idle;
360355
}
361-
}
356+
}

fpmsyncd/routesync.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,6 +2529,14 @@ void RouteSync::onRouteResponse(const std::string& key, const std::vector<FieldV
25292529
return;
25302530
}
25312531

2532+
// When a route is programmed without FRR knowledge protocol will be empty.
2533+
if (protocol.empty())
2534+
{
2535+
SWSS_LOG_NOTICE("Received response for prefix %s(%s) without protol, ignoring ",
2536+
prefix.to_string().c_str(), vrfName.c_str());
2537+
return;
2538+
}
2539+
25322540
auto routeObject = makeUniqueWithDestructor(rtnl_route_alloc(), rtnl_route_put);
25332541
auto dstAddr = makeNlAddr(prefix);
25342542

orchagent/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ orchagent_SOURCES = \
103103
macsecorch.cpp \
104104
lagid.cpp \
105105
bfdorch.cpp \
106+
icmporch.cpp \
106107
srv6orch.cpp \
107108
response_publisher.cpp \
108109
nvgreorch.cpp \

orchagent/dash/dashhaorch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ bool DashHaOrch::addHaScopeEntry(const std::string &key, const dash::ha_scope::H
236236
}
237237
sai_object_id_t ha_set_oid = ha_set_it->second.ha_set_id;
238238

239-
uint32_t attr_count = 2;
239+
const uint32_t attr_count = 2;
240240
sai_attribute_t ha_scope_attrs[attr_count]={};
241241
sai_status_t status;
242242
sai_object_id_t sai_ha_scope_oid = 0UL;

orchagent/flex_counter/flex_counter_manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const unordered_map<CounterType, string> FlexCounterManager::counter_id_field_lo
5050
{ CounterType::HOSTIF_TRAP, FLOW_COUNTER_ID_LIST },
5151
{ CounterType::ROUTE, FLOW_COUNTER_ID_LIST },
5252
{ CounterType::ENI, ENI_COUNTER_ID_LIST },
53+
{ CounterType::SRV6, SRV6_COUNTER_ID_LIST },
5354
};
5455

5556
FlexManagerDirectory g_FlexManagerDirectory;

orchagent/flex_counter/flex_counter_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ enum class CounterType
3838
TUNNEL,
3939
HOSTIF_TRAP,
4040
ROUTE,
41-
ENI
41+
ENI,
42+
SRV6
4243
};
4344

4445
extern bool gTraditionalFlexCounter;

orchagent/flexcounterorch.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ extern BufferOrch *gBufferOrch;
2727
extern Directory<Orch*> gDirectory;
2828
extern CoppOrch *gCoppOrch;
2929
extern FlowCounterRouteOrch *gFlowCounterRouteOrch;
30+
extern Srv6Orch *gSrv6Orch;
3031
extern sai_object_id_t gSwitchId;
3132

3233
#define FLEX_COUNTER_DELAY_SEC 60
@@ -46,6 +47,7 @@ extern sai_object_id_t gSwitchId;
4647
#define ENI_KEY "ENI"
4748
#define WRED_QUEUE_KEY "WRED_ECN_QUEUE"
4849
#define WRED_PORT_KEY "WRED_ECN_PORT"
50+
#define SRV6_KEY "SRV6"
4951

5052
unordered_map<string, string> flexCounterGroupMap =
5153
{
@@ -71,6 +73,7 @@ unordered_map<string, string> flexCounterGroupMap =
7173
{"ENI", ENI_STAT_COUNTER_FLEX_COUNTER_GROUP},
7274
{"WRED_ECN_PORT", WRED_PORT_STAT_COUNTER_FLEX_COUNTER_GROUP},
7375
{"WRED_ECN_QUEUE", WRED_QUEUE_STAT_COUNTER_FLEX_COUNTER_GROUP},
76+
{SRV6_KEY, SRV6_STAT_COUNTER_FLEX_COUNTER_GROUP},
7477
};
7578

7679

@@ -270,6 +273,10 @@ void FlexCounterOrch::doTask(Consumer &consumer)
270273
m_route_flow_counter_enabled = false;
271274
}
272275
}
276+
if (gSrv6Orch && (key == SRV6_KEY))
277+
{
278+
gSrv6Orch->setCountersState((value == "enable"));
279+
}
273280

274281
gPortsOrch->flushCounters();
275282
setFlexCounterGroupOperation(flexCounterGroupMap[key], value);

0 commit comments

Comments
 (0)