DPDK patches and discussions
 help / color / mirror / Atom feed
From: yoursunny <sunnylandh@gmail.com>
To: Akhil Goyal <akhil.goyal@nxp.com>
Cc: Junxiao Shi <git@mail1.yoursunny.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] crypto: recognize OP_TYPE_UNDEFINED in rte_crypto_op_pool_create
Date: Tue, 9 Oct 2018 06:58:14 -0400	[thread overview]
Message-ID: <CANsAqf5BD+FohUT_-mGRM6ZzN9FtS7oWvH8UFJ6vGc7X2bACKw@mail.gmail.com> (raw)
In-Reply-To: <cf3e2b32-4055-a94a-4763-8b8de408ceda@nxp.com>

Hi Akhil

The documentation of rte_crypto_op_pool_create indicates that _UNDEFINED
creates a pool that supports both symmetric and assymetric crypto. This
change makes the code consistent with documentation.

Yours, Junxiao

On Tue, Oct 9, 2018 at 06:51 Akhil Goyal <akhil.goyal@nxp.com> wrote:

> Hi  Junxiao,
>
> On 10/3/2018 12:35 AM, Junxiao Shi wrote:
> > Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
> > ---
> >   lib/librte_cryptodev/rte_cryptodev.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> b/lib/librte_cryptodev/rte_cryptodev.c
> > index 63ae23f..3d6f474 100644
> > --- a/lib/librte_cryptodev/rte_cryptodev.c
> > +++ b/lib/librte_cryptodev/rte_cryptodev.c
> > @@ -1477,6 +1477,8 @@ rte_crypto_op_pool_create(const char *name, enum
> rte_crypto_op_type type,
> >               elt_size += sizeof(struct rte_crypto_sym_op);
> >       } else if (type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
> >               elt_size += sizeof(struct rte_crypto_asym_op);
> > +     } else if (type == RTE_CRYPTO_OP_TYPE_UNDEFINED) {
> > +             elt_size += RTE_MAX(sizeof(struct rte_crypto_sym_op),
> sizeof(struct rte_crypto_asym_op));
> >       } else {
> >               CDEV_LOG_ERR("Invalid op_type\n");
> >               return NULL;
> Could you please explain the need for this change. If there is some type
> which is missing, we can add that.
> defining the size of undefined op type does not make sense.
>
> -Akhil
>

  reply	other threads:[~2018-10-09 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 19:05 Junxiao Shi
2018-10-09 10:50 ` Akhil Goyal
2018-10-09 10:58   ` yoursunny [this message]
2018-10-09 11:11     ` Akhil Goyal
2018-10-09 12:51       ` Akhil Goyal
  -- strict thread matches above, loose matches on Subject: below --
2018-10-02 19:05 Junxiao Shi

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=CANsAqf5BD+FohUT_-mGRM6ZzN9FtS7oWvH8UFJ6vGc7X2bACKw@mail.gmail.com \
    --to=sunnylandh@gmail.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=git@mail1.yoursunny.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).