From 37e9be6e5667ff3babf15652e67a95019c6c86d9 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Thu, 26 Nov 2020 20:37:57 +0800 Subject: [PATCH 1/3] [lgtm]: Add LGTM yml Signed-off-by: Ze Gan --- lgtm.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lgtm.yml diff --git a/lgtm.yml b/lgtm.yml new file mode 100644 index 000000000..e142b1f56 --- /dev/null +++ b/lgtm.yml @@ -0,0 +1,38 @@ +extraction: + cpp: + prepare: + packages: + - "qtbase5-dev" + - "libssl-dev" + - "dbus" + - "libdbus-1-dev" + - "libdbus-glib-1-2" + - "libdbus-glib-1-dev" + - "libreadline-dev" + - "libncurses5-dev" + - "libpcsclite-dev" + - "docbook-to-man" + - "docbook-utils" + - "libxml-simple-perl" + - "aspell" + - "aspell-en" + - "libhiredis-dev" + - "libnl-3-dev" + - "libnl-genl-3-dev" + - "libnl-route-3-dev" + - "libnl-nf-3-dev" + - "swig3.0" + - "libpython2.7-dev" + - "libgtest-dev" + - "dh-exec" + - "libzmq3-dev" + - "libzmq5" + after_prepare: + - "ls -l" + - "git clone https://github.com/Azure/sonic-swss-common; pushd sonic-swss-common;\ + \ ./autogen.sh; fakeroot dpkg-buildpackage -us -uc -b; popd" + - "dpkg-deb -x libswsscommon_1.0.0_amd64.deb $LGTM_WORKSPACE" + - "dpkg-deb -x libswsscommon-dev_1.0.0_amd64.deb $LGTM_WORKSPACE" + index: + build_command: + - "pushd wpa_supplicant; cp defconfig .config; make EXTRA_CFLAGS=\"-I$LGTM_WORKSPACE/usr/include -L$LGTM_WORKSPACE/usr/lib/x86_64-linux-gnu\"; popd" \ No newline at end of file From aeb2bf2d11e2248604a2a4ef90c770fe7d5a9a5b Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Wed, 23 Dec 2020 00:15:30 +0800 Subject: [PATCH 2/3] Move SSCI from SC to SA and change packet number field name to adapter sai 1.7.1 Signed-off-by: Ze Gan --- src/drivers/driver_macsec_sonic.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/drivers/driver_macsec_sonic.c b/src/drivers/driver_macsec_sonic.c index 6b7d6fdf1..2e4ebdf88 100644 --- a/src/drivers/driver_macsec_sonic.c +++ b/src/drivers/driver_macsec_sonic.c @@ -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) @@ -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) @@ -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 @@ -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, @@ -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( @@ -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, From 1c46e66d78ce45923744e04880c68bc9ca96b2c6 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Wed, 23 Dec 2020 00:19:02 +0800 Subject: [PATCH 3/3] Remove useless modification Signed-off-by: Ze Gan --- lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgtm.yml b/lgtm.yml index 6f0d8b319..c2fb02c5f 100644 --- a/lgtm.yml +++ b/lgtm.yml @@ -35,4 +35,4 @@ extraction: - "dpkg-deb -x libswsscommon-dev_1.0.0_amd64.deb $LGTM_WORKSPACE" index: build_command: - - "pushd wpa_supplicant; cp defconfig .config;make EXTRA_CFLAGS=\"-I$LGTM_WORKSPACE/usr/include\" LDFLAGS=\"-L${LGTM_WORKSPACE}/usr/lib/x86_64-linux-gnu\"; popd" + - "pushd wpa_supplicant; cp defconfig .config;make EXTRA_CFLAGS=\"-I$LGTM_WORKSPACE/usr/include\" LDFLAGS=\"-L${LGTM_WORKSPACE}/usr/lib/x86_64-linux-gnu\"; popd" \ No newline at end of file