From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails2n1-route0.email.arizona.edu (mails2n1-route0.email.arizona.edu [128.196.130.123]) by dpdk.org (Postfix) with ESMTP id CA8D92C5E for ; Tue, 2 Oct 2018 22:11:21 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AJAADoz7NbjAVFDMBbGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBUYNzKIwJX4s7AVABAQaEM4VviQuEZIIFExgBgyyFJCE0GAE?= =?us-ascii?q?DAQEBAQEBAhQBAQEmNCSGdDROE4MhgXUNqF2KF4lCgUEXeYEHgRKIXYULAo4?= =?us-ascii?q?ScY45CZBPj1kBLJRtAgQGBQITAYFCN4FWMxoIGxWDJ4FwAY8CUHsBAY1OAQE?= X-IPAS-Result: =?us-ascii?q?A2AJAADoz7NbjAVFDMBbGgEBAQEBAgEBAQEHAgEBAQGBU?= =?us-ascii?q?YNzKIwJX4s7AVABAQaEM4VviQuEZIIFExgBgyyFJCE0GAEDAQEBAQEBAhQBA?= =?us-ascii?q?QEmNCSGdDROE4MhgXUNqF2KF4lCgUEXeYEHgRKIXYULAo4ScY45CZBPj1kBL?= =?us-ascii?q?JRtAgQGBQITAYFCN4FWMxoIGxWDJ4FwAY8CUHsBAY1OAQE?= X-IronPort-AV: E=Sophos;i="5.54,333,1534834800"; d="scan'208";a="318279513" Received: from optima.cs.arizona.edu ([192.12.69.5]) by mails2n1out.email.arizona.edu with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2018 13:08:12 -0700 Received: from lectura.cs.arizona.edu (lectura.cs.arizona.edu [192.12.69.186]) by optima.cs.arizona.edu (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id w92K8ClZ019871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 2 Oct 2018 13:08:12 -0700 Received: from lectura.cs.arizona.edu (localhost [127.0.0.1]) by lectura.cs.arizona.edu (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w92K8B2Y031186 for ; Tue, 2 Oct 2018 13:08:11 -0700 Received: (from shijunxiao@localhost) by lectura.cs.arizona.edu (8.14.4/8.14.4/Submit) id w92K8B2r031185; Tue, 2 Oct 2018 13:08:11 -0700 Message-Id: <201810022008.w92K8B2r031185@lectura.cs.arizona.edu> From: Junxiao Shi To: Date: Tue, 2 Oct 2018 13:05:41 -0600 Subject: [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, 02 Oct 2018 20:11:22 -0000 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; -- 2.7.4