Skip to content

Commit

Permalink
Move SaiInterface to meta directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 21, 2021
1 parent e13991a commit 737393d
Show file tree
Hide file tree
Showing 24 changed files with 28 additions and 34 deletions.
2 changes: 1 addition & 1 deletion lib/inc/ClientSai.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "SaiInterface.h"
#include "meta/SaiInterface.h"
#include "Channel.h"
#include "SwitchContainer.h"
#include "Notification.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/inc/ClientServerSai.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "SaiInterface.h"
#include "meta/SaiInterface.h"

#include <memory>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion lib/inc/RemoteSaiInterface.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "SaiInterface.h"
#include "meta/SaiInterface.h"

namespace sairedis
{
Expand Down
2 changes: 1 addition & 1 deletion lib/inc/ServerSai.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "SaiInterface.h"
#include "meta/SaiInterface.h"
#include "meta/SaiAttributeList.h"
#include "syncd/SelectableChannel.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/inc/sai_redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern "C" {
#include "saiextensions.h"
}

#include "SaiInterface.h"
#include "meta/SaiInterface.h"

#include "swss/logger.h"

Expand Down
1 change: 0 additions & 1 deletion lib/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ libSaiRedis_a_SOURCES = \
Context.cpp \
ContextConfigContainer.cpp \
ContextConfig.cpp \
SaiInterface.cpp \
SwitchConfig.cpp \
SwitchConfigContainer.cpp \
RedisChannel.cpp \
Expand Down
16 changes: 8 additions & 8 deletions meta/DummySaiInterface.h
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
#pragma once

#include "lib/inc/SaiInterface.h"
#include "SaiInterface.h"

#include <memory>

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_REMOVE_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_REMOVE_ENTRY(ot) \
virtual sai_status_t remove( \
_In_ const sai_ ## ot ## _t* ot) override;

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_CREATE_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_CREATE_ENTRY(ot) \
virtual sai_status_t create( \
_In_ const sai_ ## ot ## _t* ot, \
_In_ uint32_t attr_count, \
_In_ const sai_attribute_t *attr_list) override;

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_SET_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_SET_ENTRY(ot) \
virtual sai_status_t set( \
_In_ const sai_ ## ot ## _t* ot, \
_In_ const sai_attribute_t *attr) override;

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_GET_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_GET_ENTRY(ot) \
virtual sai_status_t get( \
_In_ const sai_ ## ot ## _t* ot, \
_In_ uint32_t attr_count, \
_Out_ sai_attribute_t *attr_list) override;

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_BULK_CREATE_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_BULK_CREATE_ENTRY(ot) \
virtual sai_status_t bulkCreate( \
_In_ uint32_t object_count, \
_In_ const sai_ ## ot ## _t *ot, \
Expand All @@ -34,14 +34,14 @@
_In_ sai_bulk_op_error_mode_t mode, \
_Out_ sai_status_t *object_statuses) override;

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_BULK_REMOVE_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_BULK_REMOVE_ENTRY(ot) \
virtual sai_status_t bulkRemove( \
_In_ uint32_t object_count, \
_In_ const sai_ ## ot ## _t *ot, \
_In_ sai_bulk_op_error_mode_t mode, \
_Out_ sai_status_t *object_statuses) override;

#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_BULK_SET_ENTRY(ot) \
#define SAIMETA_DUMMYSAIINTERFACE_DECLARE_BULK_SET_ENTRY(ot) \
virtual sai_status_t bulkSet( \
_In_ uint32_t object_count, \
_In_ const sai_ ## ot ## _t *ot, \
Expand Down
2 changes: 1 addition & 1 deletion meta/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ libsaimetadata_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) -ansi $(CODE_COVERAGE_CFLAGS


libsaimeta_la_SOURCES = \
../lib/src/SaiInterface.cpp \
SaiInterface.cpp \
SaiAttributeList.cpp \
saiserialize.cpp \
SaiAttrWrapper.cpp \
Expand Down
2 changes: 1 addition & 1 deletion meta/Meta.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "lib/inc/SaiInterface.h"
#include "SaiInterface.h"

#include "SaiAttrWrapper.h"
#include "SaiObjectCollection.h"
Expand Down
1 change: 0 additions & 1 deletion meta/MetaTestSaiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@ sai_object_id_t MetaTestSaiInterface::switchIdQuery(

return m_virtualObjectIdManager->saiSwitchIdQuery(objectId);
}

1 change: 0 additions & 1 deletion meta/MetaTestSaiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ namespace saimeta
private:

std::shared_ptr<sairedis::VirtualObjectIdManager> m_virtualObjectIdManager;

};
}
File renamed without changes.
1 change: 0 additions & 1 deletion lib/inc/SaiInterface.h → meta/SaiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,5 @@ namespace sairedis
virtual sai_status_t logSet(
_In_ sai_api_t api,
_In_ sai_log_level_t log_level) = 0;

};
}
8 changes: 4 additions & 4 deletions saiplayer/SaiPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "CommandLineOptions.h"

#include "../lib/inc/SaiInterface.h"
#include "../meta/SaiAttributeList.h"
#include "../syncd/ServiceMethodTable.h"
#include "../syncd/SwitchNotifications.h"
#include "meta/SaiInterface.h"
#include "meta/SaiAttributeList.h"
#include "syncd/ServiceMethodTable.h"
#include "syncd/SwitchNotifications.h"

#include <memory>
#include <map>
Expand Down
1 change: 0 additions & 1 deletion syncd/FlexCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "VidManager.h"

#include "meta/sai_serialize.h"
#include "lib/inc/SaiInterface.h"

#include "swss/redisapi.h"
#include "swss/tokenize.h"
Expand Down
2 changes: 1 addition & 1 deletion syncd/FlexCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern "C" {
#include "sai.h"
}

#include "SaiInterface.h"
#include "meta/SaiInterface.h"

#include "swss/table.h"

Expand Down
2 changes: 1 addition & 1 deletion syncd/HardReiniter.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "SaiInterface.h"
#include "meta/SaiInterface.h"
#include "SaiSwitch.h"
#include "VirtualOidTranslator.h"
#include "RedisClient.h"
Expand Down
2 changes: 1 addition & 1 deletion syncd/SaiDiscovery.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "lib/inc/SaiInterface.h"
#include "meta/SaiInterface.h"

#include <memory>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion syncd/SaiSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern "C" {
#include "sai.h"
}

#include "SaiInterface.h"
#include "meta/SaiInterface.h"
#include "VirtualOidTranslator.h"
#include "RedisClient.h"
#include "SaiSwitchInterface.h"
Expand Down
3 changes: 1 addition & 2 deletions syncd/SingleReiniter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include "RedisClient.h"
#include "NotificationHandler.h"

#include "lib/inc/SaiInterface.h"

#include "meta/SaiInterface.h"
#include "meta/SaiAttributeList.h"

#include <string>
Expand Down
2 changes: 1 addition & 1 deletion syncd/VendorSai.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern "C" {
#include "sai.h"
}

#include "lib/inc/SaiInterface.h"
#include "meta/SaiInterface.h"

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion syncd/VirtualOidTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern "C"{
#include "VirtualObjectIdManager.h"
#include "RedisClient.h"

#include "SaiInterface.h"
#include "meta/SaiInterface.h"

#include <mutex>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion vslib/inc/VirtualSwitchSaiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "EventPayloadNetLinkMsg.h"
#include "ContextConfig.h"

#include "lib/inc/SaiInterface.h"
#include "meta/SaiInterface.h"

#include "meta/Meta.h"

Expand Down
2 changes: 1 addition & 1 deletion vslib/inc/sai_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern "C" {
#include "saiextensions.h"
}

#include "SaiInterface.h"
#include "meta/SaiInterface.h"

#include "swss/logger.h"

Expand Down

0 comments on commit 737393d

Please sign in to comment.