examples/l3fwd: add graceful teardown for eventdev
[dpdk.git] / examples / ipsec-secgw / sa.c
index f56e16b..c75a5a1 100644 (file)
@@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
                        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;
@@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
                        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;
@@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
                        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;
@@ -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->replay_win_sz = app_prm->window_size;
+       prm->ipsec_xform.replay_win_sz = app_prm->window_size;
 }
 
 static int