Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SSCI from SC to SA and change packet number field name to adapt sai 1.7.1 #26

Merged
merged 5 commits into from
Mar 27, 2021
Merged
Changes from all 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
13 changes: 7 additions & 6 deletions src/drivers/driver_macsec_sonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static int macsec_sonic_get_receive_lowest_pn(void *priv, struct receive_sa *sa)
drv->sonic_manager,
COUNTERS_TABLE,
key,
"SAI_MACSEC_SA_ATTR_MINIMUM_XPN",
"SAI_MACSEC_SA_ATTR_CURRENT_XPN",
&pn);
PRINT_LOG("SA %s PN %" PRIu64 "", key, pn);
if (ret == SONIC_DB_SUCCESS)
Expand Down Expand Up @@ -426,7 +426,7 @@ static int macsec_sonic_get_transmit_next_pn(void *priv, struct transmit_sa *sa)
drv->sonic_manager,
COUNTERS_TABLE,
key,
"SAI_MACSEC_SA_ATTR_XPN",
"SAI_MACSEC_SA_ATTR_CURRENT_XPN",
&pn);
PRINT_LOG("SA %s PN %" PRIu64 "", key, pn);
if (ret == SONIC_DB_SUCCESS)
Expand Down Expand Up @@ -494,7 +494,7 @@ static int macsec_sonic_create_receive_sc(void *priv, struct receive_sc *sc,
validation);
const struct sonic_db_name_value_pair pairs[] =
{
{"ssci", ""},
{"Null", "Null"},
};
// TODO
// Validation
Expand Down Expand Up @@ -590,7 +590,8 @@ static int macsec_sonic_create_receive_sa(void *priv, struct receive_sa *sa)
{"sak", sak},
{"auth_key", auth_key},
{"lowest_acceptable_pn", pn},
{"salt", ""}
{"salt", ""},
{"ssci", ""}
};
int ret = sonic_db_set(
drv->sonic_manager,
Expand Down Expand Up @@ -731,7 +732,6 @@ static int macsec_sonic_create_transmit_sc(
// Validation
const struct sonic_db_name_value_pair pairs[] =
{
{"ssci", ""},
{"encoding_an", "0"},
};
int ret = sonic_db_set(
Expand Down Expand Up @@ -825,7 +825,8 @@ static int macsec_sonic_create_transmit_sa(void *priv, struct transmit_sa *sa)
{"sak", sak},
{"auth_key", auth_key},
{"next_pn", pn},
{"salt", ""}
{"salt", ""},
{"ssci", ""}
};
int ret = sonic_db_set(
drv->sonic_manager,
Expand Down