Skip to content

Commit 61b8e8e

Browse files
authored
Revert "sonic-sairedis: Add support to sonic-sairedis for gearbox phys (sonic-net#624)" (sonic-net#630)
This reverts commit 2772f15.
1 parent 85e543c commit 61b8e8e

76 files changed

Lines changed: 13 additions & 739 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/src/context_config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
{
2222
"guid" : 1,
2323
"name" : "syncd1",
24-
"dbAsic" : "GB_ASIC_DB",
25-
"dbCounters" : "GB_COUNTERS_DB",
26-
"dbFlex": "GB_FLEX_COUNTER_DB",
27-
"dbState" : "STATE_DB",
24+
"dbAsic" : "ASIC_DB2",
25+
"dbCounters" : "COUNTERS_DB2",
26+
"dbFlex": "FLEX_COUNTER_DB2",
27+
"dbState" : "STATE_DB2",
2828
"switches": [
2929
{
3030
"index" : 0,

lib/src/sai_redis_switch.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
#include "sai_redis.h"
22

3-
sai_status_t redis_switch_mdio_read(
4-
_In_ sai_object_id_t switch_id,
5-
_In_ uint32_t device_addr,
6-
_In_ uint32_t start_reg_addr,
7-
_In_ uint32_t number_of_registers,
8-
_Out_ uint32_t *reg_val)
9-
{
10-
SWSS_LOG_ENTER();
11-
12-
return SAI_STATUS_NOT_IMPLEMENTED;
13-
}
14-
15-
sai_status_t redis_switch_mdio_write(
16-
_In_ sai_object_id_t switch_id,
17-
_In_ uint32_t device_addr,
18-
_In_ uint32_t start_reg_addr,
19-
_In_ uint32_t number_of_registers,
20-
_In_ const uint32_t *reg_val)
21-
{
22-
SWSS_LOG_ENTER();
23-
24-
return SAI_STATUS_NOT_IMPLEMENTED;
25-
}
26-
273
REDIS_GENERIC_QUAD(SWITCH,switch);
284
REDIS_GENERIC_STATS(SWITCH,switch);
295

syncd/SaiSwitch.cpp

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,13 @@ SaiSwitch::SaiSwitch(
5959

6060
helperInternalOids();
6161

62-
if (getSwitchType() == SAI_SWITCH_TYPE_NPU)
63-
{
64-
helperCheckLaneMap();
65-
}
62+
helperCheckLaneMap();
6663

6764
helperLoadColdVids();
6865

6966
helperPopulateWarmBootVids();
7067

71-
if (getSwitchType() == SAI_SWITCH_TYPE_NPU)
72-
{
73-
saiGetMacAddress(m_default_mac_address);
74-
}
68+
saiGetMacAddress(m_default_mac_address);
7569

7670
if (warmBoot)
7771
{
@@ -137,26 +131,6 @@ void SaiSwitch::getDefaultMacAddress(
137131
memcpy(mac, m_default_mac_address, sizeof(sai_mac_t));
138132
}
139133

140-
sai_switch_type_t SaiSwitch::getSwitchType() const
141-
{
142-
SWSS_LOG_ENTER();
143-
144-
sai_attribute_t attr;
145-
146-
attr.id = SAI_SWITCH_ATTR_TYPE;
147-
148-
sai_status_t status = m_vendorSai->get(SAI_OBJECT_TYPE_SWITCH, m_switch_rid, 1, &attr);
149-
150-
if (status != SAI_STATUS_SUCCESS)
151-
{
152-
SWSS_LOG_THROW("failed to get switch type");
153-
}
154-
155-
SWSS_LOG_ERROR("switch type: '%s'", (attr.value.s32 == SAI_SWITCH_TYPE_NPU ? "SAI_SWITCH_TYPE_NPU" : "SAI_SWITCH_TYPE_PHY"));
156-
157-
return (sai_switch_type_t) attr.value.s32;
158-
}
159-
160134
#define MAX_HARDWARE_INFO_LENGTH 0x1000
161135

162136
std::string SaiSwitch::saiGetHardwareInfo() const
@@ -911,7 +885,7 @@ void SaiSwitch::helperPopulateWarmBootVids()
911885
{
912886
sai_object_id_t vid = m_translator->translateRidToVid(rid, m_switch_vid);
913887

914-
m_warmBootDiscoveredVids.insert(vid);
888+
m_warmBootDiscoveredVids.insert(vid);
915889
}
916890
}
917891

syncd/SaiSwitch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ namespace syncd
4141
sai_object_id_t getVid() const;
4242
sai_object_id_t getRid() const;
4343

44-
sai_switch_type_t getSwitchType() const;
4544
std::string getHardwareInfo() const;
4645

4746
std::unordered_map<sai_object_id_t, sai_object_id_t> getVidToRidMap() const;

syncd/scripts/physyncd_start.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

syncd/scripts/physyncd_startup.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ if SAITHRIFT
1919
vssyncd_LDADD += -lrpcserver -lthrift
2020
endif
2121

22-
TESTS = aspellcheck.pl conflictnames.pl swsslogentercheck.sh BCM56850.pl MLNX2700.pl
22+
TESTS = aspellcheck.pl conflictnames.pl swsslogentercheck.sh brcm.pl mlnx.pl
File renamed without changes.

0 commit comments

Comments
 (0)