git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vdpa/mlx5: prepare memory regions
[dpdk.git]
/
examples
/
ipsec-secgw
/
sa.c
diff --git
a/examples/ipsec-secgw/sa.c
b/examples/ipsec-secgw/sa.c
index
4cb9085
..
c75a5a1
100644
(file)
--- a/
examples/ipsec-secgw/sa.c
+++ b/
examples/ipsec-secgw/sa.c
@@
-115,7
+115,7
@@
const struct supported_auth_algo auth_algos[] = {
{
.keyword = "sha256-hmac",
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
{
.keyword = "sha256-hmac",
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
- .digest_len = 1
2
,
+ .digest_len = 1
6
,
.key_len = 32
}
};
.key_len = 32
}
};
@@
-314,6
+314,9
@@
parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->cipher_algo = algo->algo;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
rule->cipher_algo = algo->algo;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
@@
-378,6
+381,9
@@
parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
@@
-433,6
+439,9
@@
parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
@@
-985,7
+994,7
@@
sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
struct rte_ipsec_session *ips;
if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
struct rte_ipsec_session *ips;
- iv_length = 1
6
;
+ iv_length = 1
2
;
sa_ctx->xf[idx].a.type = RTE_CRYPTO_SYM_XFORM_AEAD;
sa_ctx->xf[idx].a.aead.algo = sa->aead_algo;
sa_ctx->xf[idx].a.type = RTE_CRYPTO_SYM_XFORM_AEAD;
sa_ctx->xf[idx].a.aead.algo = sa->aead_algo;
@@
-1115,7
+1124,7
@@
fill_ipsec_app_sa_prm(struct rte_ipsec_sa_prm *prm,
prm->flags = app_prm->flags;
prm->ipsec_xform.options.esn = app_prm->enable_esn;
prm->flags = app_prm->flags;
prm->ipsec_xform.options.esn = app_prm->enable_esn;
- prm->replay_win_sz = app_prm->window_size;
+ prm->
ipsec_xform.
replay_win_sz = app_prm->window_size;
}
static int
}
static int