Skip to content

Commit

Permalink
[SAI submodule] Update SAI to 1.7.1 (sonic-net#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmittal-msft authored and lguohan committed Dec 19, 2020
1 parent 83d11f1 commit 36e912b
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/src/sai_redis_hash.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "sai_redis.h"

REDIS_GENERIC_QUAD(HASH,hash);
REDIS_GENERIC_QUAD(FINE_GRAINED_HASH_FIELD,fine_grained_hash_field);

const sai_hash_api_t redis_hash_api = {

REDIS_GENERIC_QUAD_API(hash)
REDIS_GENERIC_QUAD_API(fine_grained_hash_field)
};
23 changes: 23 additions & 0 deletions lib/src/sai_redis_hostintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ static sai_status_t redis_send_hostif_packet(
return SAI_STATUS_NOT_IMPLEMENTED;
}

static sai_status_t redis_allocate_hostif_packet(
_In_ sai_object_id_t hostif_id,
_In_ sai_size_t buffer_size,
_Out_ void **buffer,
_In_ uint32_t attr_count,
_In_ const sai_attribute_t *attr_list)
{
SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

static sai_status_t redis_free_hostif_packet(
_In_ sai_object_id_t hostif_id,
_Inout_ void *buffer)
{
SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

REDIS_GENERIC_QUAD(HOSTIF,hostif);
REDIS_GENERIC_QUAD(HOSTIF_TABLE_ENTRY,hostif_table_entry);
REDIS_GENERIC_QUAD(HOSTIF_TRAP_GROUP,hostif_trap_group);
Expand All @@ -40,4 +61,6 @@ const sai_hostif_api_t redis_hostif_api = {

redis_recv_hostif_packet,
redis_send_hostif_packet,
redis_allocate_hostif_packet,
redis_free_hostif_packet,
};
9 changes: 5 additions & 4 deletions vslib/src/SwitchStateBaseMACsec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,16 @@ sai_status_t SwitchStateBase::loadMACsecAttrFromMACsecSA(

macsecAttr.m_an = attr->value.u8;

SAI_METADATA_GET_ATTR_BY_ID(attr, SAI_MACSEC_SA_ATTR_ENCRYPTION_ENABLE, attrCount, attrList);

macsecAttr.m_encryptionEnable = attr->value.booldata;
//SAI_METADATA_GET_ATTR_BY_ID(attr, SAI_MACSEC_SA_ATTR_ENCRYPTION_ENABLE, attrCount, attrList);
//macsecAttr.m_encryptionEnable = attr->value.booldata;
SWSS_LOG_THROW("SAI_MACSEC_SA_ATTR_ENCRYPTION_ENABLE is not available in SAI 1.7.1, please help fix this");

SAI_METADATA_GET_ATTR_BY_ID(attr, SAI_MACSEC_SA_ATTR_SAK, attrCount, attrList);

macsecAttr.m_sak = sai_serialize_hex_binary(attr->value.macsecsak);

SAI_METADATA_GET_ATTR_BY_ID(attr, SAI_MACSEC_SA_ATTR_SAK_256_BITS, attrCount, attrList);
//SAI_METADATA_GET_ATTR_BY_ID(attr, SAI_MACSEC_SA_ATTR_SAK_256_BITS, attrCount, attrList);
SWSS_LOG_THROW("SAI_MACSEC_SA_ATTR_256_BITS is not available in SAI 1.7.1, please help fix this");

if (!attr->value.booldata)
{
Expand Down
3 changes: 2 additions & 1 deletion vslib/src/sai_vs_hash.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "sai_vs.h"

VS_GENERIC_QUAD(HASH,hash);
VS_GENERIC_QUAD(FINE_GRAINED_HASH_FIELD,fine_grained_hash_field);

const sai_hash_api_t vs_hash_api = {

VS_GENERIC_QUAD_API(hash)
VS_GENERIC_QUAD_API(fine_grained_hash_field)
};
23 changes: 23 additions & 0 deletions vslib/src/sai_vs_hostintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ static sai_status_t vs_send_hostif_packet(
return SAI_STATUS_NOT_IMPLEMENTED;
}

static sai_status_t vs_allocate_hostif_packet(
_In_ sai_object_id_t hostif_id,
_In_ sai_size_t buffer_size,
_Out_ void **buffer,
_In_ uint32_t attr_count,
_In_ const sai_attribute_t *attr_list)
{
SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

static sai_status_t vs_free_hostif_packet(
_In_ sai_object_id_t hostif_id,
_Inout_ void *buffer)
{
SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

VS_GENERIC_QUAD(HOSTIF,hostif);
VS_GENERIC_QUAD(HOSTIF_TABLE_ENTRY,hostif_table_entry);
VS_GENERIC_QUAD(HOSTIF_TRAP_GROUP,hostif_trap_group);
Expand All @@ -40,4 +61,6 @@ const sai_hostif_api_t vs_hostif_api = {

vs_recv_hostif_packet,
vs_send_hostif_packet,
vs_allocate_hostif_packet,
vs_free_hostif_packet,
};

0 comments on commit 36e912b

Please sign in to comment.