DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Dharmappa, Savinay" <savinay.dharmappa@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL
Date: Thu, 12 Dec 2019 11:30:21 +0000	[thread overview]
Message-ID: <DM6PR11MB255674509DC67E789C74BEDD9A550@DM6PR11MB2556.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20191212091435.4398-1-savinay.dharmappa@intel.com>

Hi, 

 
> if algo is NULL set the status to error and return.

As this is a bug fix please add 'fix' to the commit header:
examples/ipsec-secgw: fix ...

Also probably worth to add 1-2  line explanation why this is needed
into the commit message.

Apart from that:
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> 

> 
> Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
> ---
>  examples/ipsec-secgw/sa.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
> index 7f046e3ed..c75a5a15f 100644
> --- a/examples/ipsec-secgw/sa.c
> +++ b/examples/ipsec-secgw/sa.c
> @@ -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;
> --
> 2.17.1


  reply	other threads:[~2019-12-12 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12  9:14 Savinay Dharmappa
2019-12-12 11:30 ` Ananyev, Konstantin [this message]
2019-12-13 11:49 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
2019-12-13 11:57   ` Ananyev, Konstantin
2020-01-15 15:56     ` Akhil Goyal
2019-12-16  7:34   ` [dpdk-dev] [PATCH v3] examples/ipsec-secgw: fix application crash Savinay Dharmappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB255674509DC67E789C74BEDD9A550@DM6PR11MB2556.namprd11.prod.outlook.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --cc=savinay.dharmappa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).