From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) by dpdk.org (Postfix) with ESMTP id 3E33A1B4CA for ; Tue, 9 Oct 2018 12:58:26 +0200 (CEST) Received: by mail-ot1-f53.google.com with SMTP id c32so1124360otb.8 for ; Tue, 09 Oct 2018 03:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BdwvKKSMzGSndA5E6rApDagR2RKuovMJ+sMssGw9v+o=; b=IHlaUTfYWyhevE4XEEYHv8lPUeJdnoCUPfeGyJ9FgyD4y2rTH7jrRl5zA+L1aDZrbc 2UrbIiMr8OTh0gb9MEJzKsUFLoHhc2O/WDKU7VuhB2boC9wgMletIDiDDCbqgiqiI1vF hkMlPAQi/Z/EGX3/1qcIP6bDZhwOHX51a15p1wJqtGgB751Dxc1zs63zme51e/QIDmQ8 s2yBldHiwzYbUOL3h7drYDiNTYHeUReKgsDxyiR1asK15kUQvxe9XNYJ0V6GfPcxfDOe XQNoi2O+U/d8wIzBC9l9Ar1gGgo005EdhZSljY1vnIveNEylC839byK+au4sHDwc9iH2 GH4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BdwvKKSMzGSndA5E6rApDagR2RKuovMJ+sMssGw9v+o=; b=AiklZRNZG2kl6yCzxTLhz8X0ibPuZk+IC3jG8bRPiCW9nsQ8pDMVqbwbLUWPb+waF7 BHj5ssOFnCDsUgF0N2rajj7pLxGJuRM8ju7XRcJ9W2s7BRasxQi/WEZeaYTxMq+0bLgq YW1KIpjNBpk027FNnbtsxywiHzVXTEwz1kotOlTwkz2fpztTzirpK+8DG9d0irE5l84X 3Z9riYPjSf5G8FmXK6toQdvPPMYG778hFRFMG0z7eqlhL9dKZKUbElcIghJqQWjr3Sfz KzgPytIA3TFnippq8rDA2FK0gWpAbQoitfBZazeJdyhwRKPXLUSQPZcpDF/igoZyv0zM hdNw== X-Gm-Message-State: ABuFfohT4JliQWa+w41DOVQ872i8qbRXXL7DVNQ2EmQnaclrKWzag11/ AfQvSY4J/8JQGKsYGgDeAntMH73xGrM5pBMZVjE= X-Google-Smtp-Source: ACcGV61++Ew/DWbNBGnK1gs/6wcFROAqKwwfNYsDxC2liE+Fh5lFLMDUjXoVK6o7LIX9v0PxJnX0ftSaDMvdBlq3DYg= X-Received: by 2002:a9d:7519:: with SMTP id r25mr5991233otk.231.1539082705536; Tue, 09 Oct 2018 03:58:25 -0700 (PDT) MIME-Version: 1.0 References: <201810022008.w92K8B2r031185@lectura.cs.arizona.edu> In-Reply-To: From: yoursunny Date: Tue, 9 Oct 2018 06:58:14 -0400 Message-ID: To: Akhil Goyal Cc: Junxiao Shi , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] crypto: recognize OP_TYPE_UNDEFINED in rte_crypto_op_pool_create X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 10:58:26 -0000 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 wrote: > Hi Junxiao, > > On 10/3/2018 12:35 AM, Junxiao Shi wrote: > > Signed-off-by: Junxiao Shi > > --- > > 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 >