Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Comment on lines +544 to +545
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer not to have commented code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are welcome to jump in and make a proper fix for this issue if you are knowledgeable of macsec

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
2 changes: 2 additions & 0 deletions vslib/src/sai_vs_hash.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#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,
};