Skip to content

Commit 6420808

Browse files
svshah-intelStormLiangMS
authored andcommitted
[p4orch]: PINS Extension tables support (#2506)
* PINS Extension tables support
1 parent 782a2ef commit 6420808

Some content is hidden

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

46 files changed

+2575
-78
lines changed

orchagent/Makefile.am

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ orchagent_SOURCES += debug_counter/debug_counter.cpp debug_counter/drop_counter.
105105
orchagent_SOURCES += p4orch/p4orch.cpp \
106106
p4orch/p4orch_util.cpp \
107107
p4orch/p4oidmapper.cpp \
108+
p4orch/tables_definition_manager.cpp \
108109
p4orch/router_interface_manager.cpp \
109110
p4orch/gre_tunnel_manager.cpp \
110111
p4orch/neighbor_manager.cpp \
@@ -115,7 +116,8 @@ orchagent_SOURCES += p4orch/p4orch.cpp \
115116
p4orch/acl_rule_manager.cpp \
116117
p4orch/wcmp_manager.cpp \
117118
p4orch/mirror_session_manager.cpp \
118-
p4orch/l3_admit_manager.cpp
119+
p4orch/l3_admit_manager.cpp \
120+
p4orch/ext_tables_manager.cpp
119121

120122
orchagent_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI) $(CFLAGS_ASAN)
121123
orchagent_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI) $(CFLAGS_ASAN)

orchagent/p4orch/acl_rule_manager.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ std::vector<sai_attribute_t> getMeterSaiAttrs(const P4AclMeter &p4_acl_meter)
165165

166166
} // namespace
167167

168-
void AclRuleManager::enqueue(const swss::KeyOpFieldsValuesTuple &entry)
168+
ReturnCode AclRuleManager::getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key)
169+
{
170+
return StatusCode::SWSS_RC_UNIMPLEMENTED;
171+
}
172+
173+
void AclRuleManager::enqueue(const std::string &table_name, const swss::KeyOpFieldsValuesTuple &entry)
169174
{
170175
m_entries.push_back(entry);
171176
}

orchagent/p4orch/acl_rule_manager.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ class AclRuleManager : public ObjectManagerInterface
4141
}
4242
virtual ~AclRuleManager() = default;
4343

44-
void enqueue(const swss::KeyOpFieldsValuesTuple &entry) override;
44+
void enqueue(const std::string &table_name, const swss::KeyOpFieldsValuesTuple &entry) override;
4545
void drain() override;
4646
std::string verifyState(const std::string &key, const std::vector<swss::FieldValueTuple> &tuple) override;
47+
ReturnCode getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key) override;
4748

4849
// Update counters stats for every rule in each ACL table in COUNTERS_DB, if
4950
// counters are enabled in rules.

orchagent/p4orch/acl_table_manager.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ ReturnCodeOr<std::vector<sai_attribute_t>> AclTableManager::getUdfSaiAttrs(const
205205
return udf_attrs;
206206
}
207207

208-
void AclTableManager::enqueue(const swss::KeyOpFieldsValuesTuple &entry)
208+
ReturnCode AclTableManager::getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key)
209+
{
210+
return StatusCode::SWSS_RC_UNIMPLEMENTED;
211+
}
212+
213+
void AclTableManager::enqueue(const std::string &table_name, const swss::KeyOpFieldsValuesTuple &entry)
209214
{
210215
m_entries.push_back(entry);
211216
}

orchagent/p4orch/acl_table_manager.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ class AclTableManager : public ObjectManagerInterface
3131
explicit AclTableManager(P4OidMapper *p4oidMapper, ResponsePublisherInterface *publisher);
3232
virtual ~AclTableManager();
3333

34-
void enqueue(const swss::KeyOpFieldsValuesTuple &entry) override;
34+
void enqueue(const std::string &table_name, const swss::KeyOpFieldsValuesTuple &entry) override;
3535
void drain() override;
3636
std::string verifyState(const std::string &key, const std::vector<swss::FieldValueTuple> &tuple) override;
37+
ReturnCode getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key) override;
3738

3839
// Get ACL table definition by table name in cache. Return nullptr if not
3940
// found.

0 commit comments

Comments
 (0)