@@ -2235,11 +2235,6 @@ bool PortsOrch::initPort(const string &alias, const string &role, const int inde
2235
2235
{
2236
2236
SWSS_LOG_ENTER ();
2237
2237
2238
- if (role == " Rec" || role == " Inb" )
2239
- {
2240
- return doProcessRecircPort (alias, role, lane_set, SET_COMMAND);
2241
- }
2242
-
2243
2238
/* Determine if the lane combination exists in switch */
2244
2239
if (m_portListLaneMap.find (lane_set) != m_portListLaneMap.end ())
2245
2240
{
@@ -2294,6 +2289,11 @@ bool PortsOrch::initPort(const string &alias, const string &role, const int inde
2294
2289
2295
2290
m_portList[alias].m_init = true ;
2296
2291
2292
+ if (role == " Rec" || role == " Inb" )
2293
+ {
2294
+ m_recircPortRole[alias] = role;
2295
+ }
2296
+
2297
2297
SWSS_LOG_NOTICE (" Initialized port %s" , alias.c_str ());
2298
2298
}
2299
2299
else
@@ -2756,16 +2756,6 @@ void PortsOrch::doPortTask(Consumer &consumer)
2756
2756
}
2757
2757
else
2758
2758
{
2759
- /* Skip configuring recirc port for now because the current SAI implementation of some vendors
2760
- * have limiited support for recirc port. This check can be removed once SAI implementation
2761
- * is enhanced/changed in the future.
2762
- */
2763
- if (m_recircPortRole.find (alias) != m_recircPortRole.end ())
2764
- {
2765
- it = consumer.m_toSync .erase (it);
2766
- continue ;
2767
- }
2768
-
2769
2759
if (!an_str.empty ())
2770
2760
{
2771
2761
if (autoneg_mode_map.find (an_str) == autoneg_mode_map.end ())
@@ -5955,80 +5945,6 @@ bool PortsOrch::getRecircPort(Port &port, string role)
5955
5945
return false ;
5956
5946
}
5957
5947
5958
- bool PortsOrch::doProcessRecircPort (string alias, string role, set<int > lane_set, string op)
5959
- {
5960
- SWSS_LOG_ENTER ();
5961
-
5962
- if (op == SET_COMMAND)
5963
- {
5964
- if (m_recircPortRole.find (alias) != m_recircPortRole.end ())
5965
- {
5966
- SWSS_LOG_DEBUG (" Recirc port %s already added" , alias.c_str ());
5967
- return true ;
5968
- }
5969
-
5970
- /* Find pid of recirc port */
5971
- sai_object_id_t port_id = SAI_NULL_OBJECT_ID;
5972
- if (m_portListLaneMap.find (lane_set) != m_portListLaneMap.end ())
5973
- {
5974
- port_id = m_portListLaneMap[lane_set];
5975
- }
5976
-
5977
- if (port_id == SAI_NULL_OBJECT_ID)
5978
- {
5979
- SWSS_LOG_ERROR (" Failed to find port id for recirc port %s" , alias.c_str ());
5980
- return false ;
5981
- }
5982
-
5983
- Port p (alias, Port::PHY);
5984
- p.m_port_id = port_id;
5985
- p.m_init = true ;
5986
- m_recircPortRole[alias] = role;
5987
- setPort (alias, p);
5988
-
5989
- string lane_str = " " ;
5990
- for (auto lane : lane_set)
5991
- {
5992
- lane_str += to_string (lane) + " " ;
5993
- }
5994
- SWSS_LOG_NOTICE (" Added recirc port %s, pid:%" PRIx64 " lanes:%s" ,
5995
- alias.c_str (), port_id, lane_str.c_str ());
5996
-
5997
- /* Create host intf for recirc port */
5998
- if (addHostIntfs (p, p.m_alias , p.m_hif_id ))
5999
- {
6000
- SWSS_LOG_NOTICE (" Created host intf for recycle port %s" , p.m_alias .c_str ());
6001
- }
6002
- else
6003
- {
6004
- SWSS_LOG_ERROR (" Failed to Create host intf for recirc port %s" , p.m_alias .c_str ());
6005
- }
6006
-
6007
- if (setHostIntfsOperStatus (p, true ))
6008
- {
6009
- SWSS_LOG_NOTICE (" Set host intf oper status UP for recirc port %s" , p.m_alias .c_str ());
6010
- }
6011
- else
6012
- {
6013
- SWSS_LOG_ERROR (" Failed to set host intf oper status for recirc port %s" , p.m_alias .c_str ());
6014
- }
6015
-
6016
- PortUpdate update = { p, true };
6017
- notify (SUBJECT_TYPE_PORT_CHANGE, static_cast <void *>(&update));
6018
- return true ;
6019
- }
6020
- else if (op == DEL_COMMAND)
6021
- {
6022
- SWSS_LOG_ERROR (" Delete recirc port is not supported." );
6023
- return false ;
6024
- }
6025
- else
6026
- {
6027
- SWSS_LOG_ERROR (" Unknown operation type %s" , op.c_str ());
6028
- return false ;
6029
- }
6030
- }
6031
-
6032
5948
bool PortsOrch::addSystemPorts ()
6033
5949
{
6034
5950
vector<string> keys;
0 commit comments