Skip to content

Commit

Permalink
[submodule] Update SAI to latest master (sonic-net#1431)
Browse files Browse the repository at this point in the history
Update SAI to latest master SAI v1.15.0
  • Loading branch information
kcudnik authored and shiraez committed Dec 12, 2024
1 parent 772012b commit 16965ce
Show file tree
Hide file tree
Showing 15 changed files with 430 additions and 103 deletions.
2 changes: 1 addition & 1 deletion SAI
Submodule SAI updated 46 files
+1 −0 doc/ACL/SAI-Proposal-ACL-1.md
+80 −0 doc/IP-Multicast/MulticastNextHopRewrite.md
+1,484 −0 doc/SAI-Counter-enhancement-hld.md
+160 −0 doc/SAI-Proposal-HW-FRR.md
+72 −0 doc/SAI_1.14.0_ReleaseNotes.md
+206 −0 doc/Samplepacket/SAI-Proposal-Samplepacket_truncation.md
+136 −0 experimental/saiexperimentaldashappliance.h
+9 −0 experimental/saiexperimentaldashdirectionlookup.h
+27 −0 experimental/saiexperimentaldasheni.h
+920 −0 experimental/saiexperimentaldashflow.h
+58 −4 experimental/saiexperimentaldashha.h
+144 −74 experimental/saiexperimentaldashmeter.h
+6 −0 experimental/saiextensions.h
+6 −0 experimental/saiswitchextensions.h
+148 −1 experimental/saitypesextensions.h
+22 −0 inc/saibfd.h
+44 −0 inc/saibridge.h
+46 −0 inc/saibuffer.h
+42 −0 inc/saicounter.h
+7 −0 inc/saihostif.h
+22 −0 inc/saiicmpecho.h
+1 −1 inc/saiipmcgroup.h
+44 −0 inc/saiipsec.h
+44 −0 inc/saimacsec.h
+4 −2 inc/sainexthop.h
+3 −0 inc/sainexthopgroup.h
+9 −0 inc/saiobject.h
+22 −0 inc/saipolicer.h
+104 −0 inc/saiport.h
+31 −8 inc/saiqueue.h
+22 −0 inc/sairouterinterface.h
+21 −0 inc/saisamplepacket.h
+22 −0 inc/saisrv6.h
+22 −0 inc/saiswitch.h
+22 −0 inc/saitunnel.h
+22 −0 inc/saitwamp.h
+147 −2 inc/saitypes.h
+1 −1 inc/saiversion.h
+22 −0 inc/saivlan.h
+2 −0 meta/acronyms.txt
+1 −0 meta/aspell.en.pws
+10 −1 meta/parse.pl
+8 −0 meta/saisanitycheck.c
+1 −1 meta/saiserializetest.c
+2 −1 meta/structs.pl
+8 −2 meta/style.pm
79 changes: 10 additions & 69 deletions lib/Recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,28 @@ extern "C" {
#include "swss/table.h"

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

#include <string>
#include <fstream>
#include <vector>

#define SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(ot) \
void recordRemove( \
#define SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(X,ot) \
void recordRemove( \
_In_ const sai_ ## ot ## _t* ot);

#define SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(ot) \
#define SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(X,ot) \
void recordCreate( \
_In_ const sai_ ## ot ## _t* ot, \
_In_ uint32_t attr_count, \
_In_ const sai_attribute_t *attr_list);

#define SAI_REDIS_RECORDER_DECLARE_RECORD_SET(ot) \
#define SAI_REDIS_RECORDER_DECLARE_RECORD_SET(X,ot) \
void recordSet( \
_In_ const sai_ ## ot ## _t* ot, \
_In_ const sai_attribute_t *attr);

#define SAI_REDIS_RECORDER_DECLARE_RECORD_GET(ot) \
#define SAI_REDIS_RECORDER_DECLARE_RECORD_GET(X,ot) \
void recordGet( \
_In_ const sai_ ## ot ## _t* ot, \
_In_ uint32_t attr_count, \
Expand Down Expand Up @@ -162,79 +163,19 @@ namespace sairedis

public: // create ENTRY

SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(inseg_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(ipmc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(l2mc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(mcast_fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(neighbor_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(route_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(nat_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(my_sid_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(direction_lookup_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(eni_ether_address_map_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(vip_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(inbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(pa_validation_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(outbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE(outbound_ca_to_pa_entry);
SAIREDIS_DECLARE_EVERY_ENTRY(SAI_REDIS_RECORDER_DECLARE_RECORD_CREATE);

public: // remove ENTRY

SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(inseg_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(ipmc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(l2mc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(mcast_fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(neighbor_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(route_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(nat_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(my_sid_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(direction_lookup_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(eni_ether_address_map_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(vip_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(inbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(pa_validation_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(outbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE(outbound_ca_to_pa_entry);
SAIREDIS_DECLARE_EVERY_ENTRY(SAI_REDIS_RECORDER_DECLARE_RECORD_REMOVE);

public: // set ENTRY

SAI_REDIS_RECORDER_DECLARE_RECORD_SET(fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(inseg_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(ipmc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(l2mc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(mcast_fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(neighbor_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(route_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(nat_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(my_sid_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(direction_lookup_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(eni_ether_address_map_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(vip_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(inbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(pa_validation_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(outbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_SET(outbound_ca_to_pa_entry);
SAIREDIS_DECLARE_EVERY_ENTRY(SAI_REDIS_RECORDER_DECLARE_RECORD_SET);

public: // get ENTRY

SAI_REDIS_RECORDER_DECLARE_RECORD_GET(fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(inseg_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(ipmc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(l2mc_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(mcast_fdb_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(neighbor_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(route_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(nat_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(my_sid_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(direction_lookup_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(eni_ether_address_map_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(vip_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(inbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(pa_validation_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(outbound_routing_entry);
SAI_REDIS_RECORDER_DECLARE_RECORD_GET(outbound_ca_to_pa_entry);
SAIREDIS_DECLARE_EVERY_ENTRY(SAI_REDIS_RECORDER_DECLARE_RECORD_GET);

public: // SAI stats API

Expand Down
38 changes: 38 additions & 0 deletions meta/Meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3116,6 +3116,44 @@ sai_status_t Meta::meta_sai_validate_outbound_ca_to_pa_entry(
return SAI_STATUS_SUCCESS;
}

sai_status_t Meta::meta_sai_validate_flow_entry(
_In_ const sai_flow_entry_t* flow_entry,
_In_ bool create,
_In_ bool get)
{
SWSS_LOG_ENTER();

if (flow_entry == NULL)
{
SWSS_LOG_ERROR("flow_entry pointer is NULL");

return SAI_STATUS_INVALID_PARAMETER;
}

// TODO FIX ME

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t Meta::meta_sai_validate_meter_bucket_entry(
_In_ const sai_meter_bucket_entry_t* meter_bucket_entry,
_In_ bool create,
_In_ bool get)
{
SWSS_LOG_ENTER();

if (meter_bucket_entry == NULL)
{
SWSS_LOG_ERROR("meter_bucket_entry pointer is NULL");

return SAI_STATUS_INVALID_PARAMETER;
}

// TODO FIX ME

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t Meta::meta_generic_validation_create(
_In_ const sai_object_meta_key_t& meta_key,
_In_ sai_object_id_t switch_id,
Expand Down
10 changes: 10 additions & 0 deletions meta/Meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,16 @@ namespace saimeta
_In_ bool create,
_In_ bool get = false);

sai_status_t meta_sai_validate_flow_entry(
_In_ const sai_flow_entry_t* flow_entry,
_In_ bool create,
_In_ bool get = false);

sai_status_t meta_sai_validate_meter_bucket_entry(
_In_ const sai_meter_bucket_entry_t* meter_bucket_entry,
_In_ bool create,
_In_ bool get = false);

public:

/*
Expand Down
39 changes: 39 additions & 0 deletions meta/SaiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,42 @@ sai_log_level_t SaiInterface::logGet(

return SAI_LOG_LEVEL_NOTICE;
}

sai_status_t SaiInterface::getStats(
_In_ const sai_meter_bucket_entry_t* entry,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_Out_ uint64_t *counters)
{
SWSS_LOG_ENTER();

SWSS_LOG_ERROR("not implemented");

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t SaiInterface::getStatsExt(
_In_ const sai_meter_bucket_entry_t* entry,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_In_ sai_stats_mode_t mode,
_Out_ uint64_t *counters)
{
SWSS_LOG_ENTER();

SWSS_LOG_ERROR("not implemented");

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t SaiInterface::clearStats(
_In_ const sai_meter_bucket_entry_t* entry,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids)
{
SWSS_LOG_ENTER();

SWSS_LOG_ERROR("not implemented");

return SAI_STATUS_NOT_IMPLEMENTED;
}
51 changes: 22 additions & 29 deletions meta/SaiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,10 @@ extern "C" {
}

#define SAIREDIS_DECLARE_EVERY_ENTRY(_X) \
_X(FDB_ENTRY,fdb_entry); \
_X(INSEG_ENTRY,inseg_entry); \
_X(IPMC_ENTRY,ipmc_entry); \
_X(L2MC_ENTRY,l2mc_entry); \
_X(MCAST_FDB_ENTRY,mcast_fdb_entry); \
_X(NEIGHBOR_ENTRY,neighbor_entry); \
_X(ROUTE_ENTRY,route_entry); \
_X(NAT_ENTRY,nat_entry); \
_X(MY_SID_ENTRY,my_sid_entry); \
_X(DIRECTION_LOOKUP_ENTRY,direction_lookup_entry); \
_X(ENI_ETHER_ADDRESS_MAP_ENTRY,eni_ether_address_map_entry); \
_X(VIP_ENTRY,vip_entry); \
_X(INBOUND_ROUTING_ENTRY,inbound_routing_entry); \
_X(PA_VALIDATION_ENTRY,pa_validation_entry); \
_X(OUTBOUND_ROUTING_ENTRY,outbound_routing_entry); \
_X(OUTBOUND_CA_TO_PA_ENTRY,outbound_ca_to_pa_entry); \
SAI_METADATA_DECLARE_EVERY_ENTRY(_X)

#define SAIREDIS_DECLARE_EVERY_BULK_ENTRY(_X) \
_X(FDB_ENTRY,fdb_entry); \
_X(INSEG_ENTRY,inseg_entry); \
_X(NAT_ENTRY,nat_entry); \
_X(ROUTE_ENTRY,route_entry); \
_X(MY_SID_ENTRY,my_sid_entry); \
_X(NEIGHBOR_ENTRY,neighbor_entry); \
_X(DIRECTION_LOOKUP_ENTRY,direction_lookup_entry); \
_X(ENI_ETHER_ADDRESS_MAP_ENTRY,eni_ether_address_map_entry); \
_X(VIP_ENTRY,vip_entry); \
_X(INBOUND_ROUTING_ENTRY,inbound_routing_entry); \
_X(PA_VALIDATION_ENTRY,pa_validation_entry); \
_X(OUTBOUND_ROUTING_ENTRY,outbound_routing_entry); \
_X(OUTBOUND_CA_TO_PA_ENTRY,outbound_ca_to_pa_entry); \
SAI_METADATA_DECLARE_EVERY_BULK_ENTRY(_X)

#define SAIREDIS_SAIINTERFACE_DECLARE_QUAD_ENTRY_VIRTUAL(OT,ot) \
virtual sai_status_t create( \
Expand Down Expand Up @@ -274,6 +247,26 @@ namespace sairedis
_In_ sai_stats_mode_t mode,
_Inout_ sai_status_t *object_statuses) = 0;

public: // entry stats

virtual sai_status_t getStats(
_In_ const sai_meter_bucket_entry_t* entry,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_Out_ uint64_t *counters);

virtual sai_status_t getStatsExt(
_In_ const sai_meter_bucket_entry_t* entry,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_In_ sai_stats_mode_t mode,
_Out_ uint64_t *counters);

virtual sai_status_t clearStats(
_In_ const sai_meter_bucket_entry_t* entry,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids);

public: // non QUAD API

virtual sai_status_t flushFdbEntries(
Expand Down
Loading

0 comments on commit 16965ce

Please sign in to comment.