From patchwork Wed Dec 6 08:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120793 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6753037qgn; Wed, 6 Dec 2017 00:01:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ3FjICMh5bDKXQYmurnR2G9u7XvO8U6yKGssXKyN157nP8sGRFGlvYUhZ5ws9rUIXSKIaw X-Received: by 10.200.47.105 with SMTP id k38mr3354764qta.195.1512547304624; Wed, 06 Dec 2017 00:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512547304; cv=none; d=google.com; s=arc-20160816; b=gfp6AY+4LgWsuBjFdxw2xVK9Cb58h5eaGq+GRLIITCnL1bVb2QlpW2I3Dk1vGDRccZ 6sqveshcvYO+jiEyzr06Sa4vmrzIjhyKhQUolzl17e6mZNlL1ZWKPdH0q9j9XDBr1513 hxxg4M/9SDQuv1yoVfTIQHyI86pNfvHzmuqn9CMzlkG+wjdBvpYBbmHk2rwLW+7tiXSD ejy82efJpx4vSpcMZMpAoqJ/kr+m+/DxrUSEaEjhgu41EbHCpgJwb3+otEZavQp+0HqO GfmD1qGB8Gjezi6joLewJI8QUXbSYAgBjSGnQFvWrhfnIspSuEchicc855KTYhb2FnRp 2+xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=OinjEaEUrfHKY/Wc4XJvMzYFucJSOm3bm804ruWkjTs=; b=yXgFGgKOMq1yXI61SOcpMgjhUXt6srJwOOsTIf25XB9mp5l0Fy2uDlIhOQjmM2/qrs HacyNw+c6zr/GTyUXnVaTECQQUAQdxlY7ZcxNBXtGaFETJMo81HvyEfgIDvSMiAyQqMj ai5YjuFLkOE6BrBbBsjfJ+FNc4C4Ivg9wv1Va2StgYBriXhjx67uxYgxc6aUo639oyKO ycU/GhuuhoD7P4znDyQHw3x4cbLaSHBg54VVPTYp8DMh15cH0Fu9aR7CePw3BFbDNCCB /O8EiNeHXvXGjBk3Oec1FEGpBQZT5rpuNpHw4R8r2yJka/zIL8inSgctsVyGBAuh0oQ5 uYBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id i193si747218qke.20.2017.12.06.00.01.44; Wed, 06 Dec 2017 00:01:44 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 6014F608FD; Wed, 6 Dec 2017 08:01:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 80A36607FB; Wed, 6 Dec 2017 08:00:35 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DB6DA60903; Wed, 6 Dec 2017 08:00:27 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id E0EAA608E0 for ; Wed, 6 Dec 2017 08:00:10 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 437BE180289C for ; Wed, 6 Dec 2017 11:00:09 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DzyVc2YU7N-097unqkC; Wed, 06 Dec 2017 11:00:09 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4V0UNXlOkv-086Cvufx; Wed, 06 Dec 2017 11:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 6 Dec 2017 11:00:03 +0300 Message-Id: <1512547207-1806-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> References: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 323 Subject: [lng-odp] [PATCH 2.0 v1 1/5] test: enable dpdk initialization before running validation on linux-dpdk X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balakrishna Garapati Signed-off-by: Balakrishna Garapati Reviewed-by: Yi He --- /** Email created from pull request 323 (heyi-linaro:2.0-linux-dpdk-make-check) ** https://github.com/Linaro/odp/pull/323 ** Patch: https://github.com/Linaro/odp/pull/323.patch ** Base sha: 00c7441fae53949dd87855d48102f932f8f64537 ** Merge commit sha: 97e968c4c23266a903016fe9bda392687b44b08f **/ platform/linux-generic/test/wrapper-script.sh | 3 +++ test/Makefile.inc | 2 ++ test/performance/Makefile.am | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 platform/linux-generic/test/wrapper-script.sh diff --git a/platform/linux-generic/test/wrapper-script.sh b/platform/linux-generic/test/wrapper-script.sh new file mode 100755 index 000000000..977a032ae --- /dev/null +++ b/platform/linux-generic/test/wrapper-script.sh @@ -0,0 +1,3 @@ +#wrapper script for pre setting environment for validation suit. +#currently this is empty but needs to be created to make it align with +#linux-dpdk. diff --git a/test/Makefile.inc b/test/Makefile.inc index eaf791e08..3e7dfe57f 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -20,6 +20,8 @@ AM_CFLAGS = $(CUNIT_CFLAGS) AM_LDFLAGS = -L$(LIB) -static +LOG_COMPILER = $(top_srcdir)/platform/@with_platform@/test/wrapper-script.sh + @VALGRIND_CHECK_RULES@ TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} \ diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index 1dccd82e1..4417c4843 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -31,6 +31,6 @@ odp_sched_latency_SOURCES = odp_sched_latency.c odp_scheduling_SOURCES = odp_scheduling.c odp_pktio_perf_SOURCES = odp_pktio_perf.c -dist_check_SCRIPTS = $(TESTSCRIPTS) +dist_check_SCRIPTS = $(TESTSCRIPTS) $(LOG_COMPILER) dist_check_DATA = udp64.pcap From patchwork Wed Dec 6 08:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120792 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6753031qgn; Wed, 6 Dec 2017 00:01:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMaKLV1vAeN+CQiE9VBot1bKdJIPapKII+70OOJs/bD0z8PMqu1WoBYPlfidSD5iCC+BC7As X-Received: by 10.200.3.8 with SMTP id q8mr3855751qtg.212.1512547304027; Wed, 06 Dec 2017 00:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512547304; cv=none; d=google.com; s=arc-20160816; b=JwNNjISBU4mx0reE6YZfrzw4iOSVsu+GKQVJQrd32M96Jp++2AIbL/4ddPyRvkS67C iqojqsZDNYQnbVPBWYP1nvcc1aMXYLblJUseWxxCHnhuNqv5MNwpWuGITxjStbnNKkhc wSdD8r9cttN4iNe0ZEV4PDl7bGvqrP+YBEn+oImhroxxVgsxSLHHc2FbW04QL6Z1PyfR VihNC6Vt5YIY+DpnD/qEanOpzvqyn+rHM75yY2MRvSy12jUWHYtZl4lDRu1QpEpEDu8+ UqM6/QSMLKGhLVP5VLwGoQt8XePoLrafkchGaVsP/ckeGS/TdoSL1tyFSz5dysezu7cA i0bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=3/NyGS4mqON54QRgN7L5tltQ4X9cj+LE5oZSvzEXWVc=; b=chSS1WcOYQOuvPu7mjQ1egFB/CRYuquZ1BoAwjCBZQQ+2Vr9o3weNR3aM4rlDmUTKJ YoRc3JV/Ywb3wsSxhxcdniL6qL7iU3y9YGiBRA95J3kWCRYJvkNwFXGYyKf7xDRGVRjQ Ehz8idEDrcf7/TWjuF0fAgPia6h9Yb64VDffnl5T8d5lQ0Xqyb2HNt6ppC7LInL7b7Td Z2JEUtu/lft6W+DjxWhGjeZY4PFlpLSdEAuBOXrxr0yXnfdqWfbXRb+/aJhTYXaDgFPr 85NdPq/+gOszIPRyVm39MB4CKrhmfXVtqMKJL7Y4SIR6P/dWjPlnEbS53h1oI2olTiBX YX7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 82si715721qko.420.2017.12.06.00.01.43; Wed, 06 Dec 2017 00:01:44 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 54105608FD; Wed, 6 Dec 2017 08:01:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D800D608BC; Wed, 6 Dec 2017 08:00:44 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 232A360903; Wed, 6 Dec 2017 08:00:29 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id ED123607FB for ; Wed, 6 Dec 2017 08:00:12 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 4FF657845D1 for ; Wed, 6 Dec 2017 11:00:11 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Ar4wlw45Az-0BkS7a7Y; Wed, 06 Dec 2017 11:00:11 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4V0UNXlOkv-096m2KtB; Wed, 06 Dec 2017 11:00:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 6 Dec 2017 11:00:04 +0300 Message-Id: <1512547207-1806-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> References: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 323 Subject: [lng-odp] [PATCH 2.0 v1 2/5] linux-dpdk: changes which are needed for odp_crypto to work X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balakrishna Garapati All the changes are within the linux-dpdk/odp_crypto.c file: 1) Added missing brackets which made it impossible to create a crypto session 2) Increased the number of queues created, from nb_queue_pairs - 1 to nb_queue_pairs, what seems to work better 3) Removed a memory leak - the memory allocated for iv and aad were not freed Signed-off-by: Szymon Sliwa Signed-off-by: Balakrishna Garapati Reviewed-by: Yi He --- /** Email created from pull request 323 (heyi-linaro:2.0-linux-dpdk-make-check) ** https://github.com/Linaro/odp/pull/323 ** Patch: https://github.com/Linaro/odp/pull/323.patch ** Base sha: 00c7441fae53949dd87855d48102f932f8f64537 ** Merge commit sha: 97e968c4c23266a903016fe9bda392687b44b08f **/ platform/linux-dpdk/odp_crypto.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c index 8e0f8a9df..9844f2dd7 100644 --- a/platform/linux-dpdk/odp_crypto.c +++ b/platform/linux-dpdk/odp_crypto.c @@ -271,7 +271,7 @@ int odp_crypto_init_global(void) qp_conf.nb_descriptors = NB_MBUF; - for (queue_pair = 0; queue_pair < nb_queue_pairs - 1; + for (queue_pair = 0; queue_pair < nb_queue_pairs; queue_pair++) { rc = rte_cryptodev_queue_pair_setup(cdev_id, queue_pair, @@ -898,11 +898,12 @@ int odp_crypto_session_create(odp_crypto_session_param_t *param, /* Setup session */ session = rte_cryptodev_sym_session_create(cdev_id, first_xform); - if (session == NULL) + if (session == NULL) { /* remove the crypto_session_entry_t */ memset(entry, 0, sizeof(*entry)); free_session(entry); return -1; + } entry->rte_session = (intptr_t)session; entry->cipher_xform = cipher_xform; @@ -1216,6 +1217,9 @@ int odp_crypto_int(odp_packet_t pkt_in, goto err; } + op->sym->auth.aad.data = NULL; + op->sym->cipher.iv.data = NULL; + odp_spinlock_unlock(&global->lock); /* Set crypto operation data parameters */ @@ -1242,9 +1246,8 @@ int odp_crypto_int(odp_packet_t pkt_in, if (aad_len > 0) { op->sym->auth.aad.data = rte_malloc("aad", aad_len, 0); if (op->sym->auth.aad.data == NULL) { - rte_crypto_op_free(op); ODP_ERR("Failed to allocate memory for AAD"); - goto err; + goto err_op_free; } memcpy(op->sym->auth.aad.data, aad_head, aad_len); @@ -1254,16 +1257,14 @@ int odp_crypto_int(odp_packet_t pkt_in, } if (entry->iv.length == 0) { - rte_crypto_op_free(op); ODP_ERR("Wrong IV length"); - goto err; + goto err_op_free; } op->sym->cipher.iv.data = rte_malloc("iv", entry->iv.length, 0); if (op->sym->cipher.iv.data == NULL) { - rte_crypto_op_free(op); ODP_ERR("Failed to allocate memory for IV"); - goto err; + goto err_op_free; } if (param->override_iv_ptr) { @@ -1300,18 +1301,16 @@ int odp_crypto_int(odp_packet_t pkt_in, rc = rte_cryptodev_enqueue_burst(rte_session->dev_id, queue_pair, &op, 1); if (rc == 0) { - rte_crypto_op_free(op); ODP_ERR("Failed to enqueue packet"); - goto err; + goto err_op_free; } rc = rte_cryptodev_dequeue_burst(rte_session->dev_id, queue_pair, &op, 1); if (rc == 0) { - rte_crypto_op_free(op); ODP_ERR("Failed to dequeue packet"); - goto err; + goto err_op_free; } out_pkt = (odp_packet_t)op->sym->m_src; @@ -1331,6 +1330,8 @@ int odp_crypto_int(odp_packet_t pkt_in, op_result = get_op_result_from_packet(out_pkt); *op_result = local_result; + rte_free(op->sym->cipher.iv.data); + rte_free(op->sym->auth.aad.data); rte_crypto_op_free(op); /* Synchronous, simply return results */ @@ -1338,6 +1339,11 @@ int odp_crypto_int(odp_packet_t pkt_in, return 0; +err_op_free: + rte_free(op->sym->cipher.iv.data); + rte_free(op->sym->auth.aad.data); + rte_crypto_op_free(op); + err: if (allocated) { odp_packet_free(out_pkt); From patchwork Wed Dec 6 08:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120795 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6755401qgn; Wed, 6 Dec 2017 00:04:17 -0800 (PST) X-Google-Smtp-Source: AGs4zMaDjMHHnY7hzLSoMAzhy+1EAW5E6/jOiAD03wr9P3Lv6eXjI6cLXSJ8bCecMn5el1XJIBmC X-Received: by 10.200.4.7 with SMTP id v7mr3951744qtg.129.1512547457219; Wed, 06 Dec 2017 00:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512547457; cv=none; d=google.com; s=arc-20160816; b=gwMYGlmPZutEXOeW4X42aPgMxZXCnLZ6OU9+Rwp5u5CYRLT/HilNRaYBnt2Isuzs6S TdGiM/+EyaGwXjqMbH/rRZI3qQEUfy0uP8csV/sZlNncpXH+fIpp7p/21Kc3U96NhH0U 2C8GOXE5aS0rRyskLs1CwH3hzK0eSOF3absyGYV592a7NqxZHaheZv4gwYfwFl/hjffb g+628HyGyUKUA9AHJwYbytXgsZP4Eu1/sOg+vTaK5tJW0Dzqi8/eyLAAsrGFZL7RPJ18 ZO3Rqv3b5o3L/r6HG0bPP01nOuBteAbalPElOXFhcnE8qpBPPCMH+LpRJacxRqAXu5hD HeSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=kNtxSLFEy0RP3NKC1tcsfhy7x72zWzIr2jY+MIoWs1E=; b=J3+bw2Lmif5NGjoS+NQk/Oxbk2EEJYAtvgZTFQIE76fKel7XmcYDFlIuF74R+n/GNC E0JV8HbOHPhRTo+XjOT0VbjuY/DFUOlW3laz7XLX62b3F1yc9x77Bn4CK5tfzezaYf5O bFz3ZFnfRbxoSASArU6I0s4VTqLFekP0veAK0uaXQsts/paI+UxcqPYibsSBNabjKxaH cIhRlWf/InfEXDk+VSuORdwMaxFi777iYPANiBg0CM+jVoFRIxWOZsJt7PiQGtGeL/9G qzP2YFcxQMIkwK9Wh2RwLTAJhJuIgNpc4mbC5clAK3Oy2Na3KJsyPcfQLMfbsGR0uR/O MctA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id v37si721232qtg.324.2017.12.06.00.04.16; Wed, 06 Dec 2017 00:04:17 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id D983E60927; Wed, 6 Dec 2017 08:04:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9C34060939; Wed, 6 Dec 2017 08:01:04 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DD7E0608BA; Wed, 6 Dec 2017 08:00:36 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 9529560918 for ; Wed, 6 Dec 2017 08:00:13 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward103j.mail.yandex.net (Yandex) with ESMTP id CCDBD34C48E7 for ; Wed, 6 Dec 2017 11:00:11 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FLbsGC27I9-0BjOTQvW; Wed, 06 Dec 2017 11:00:11 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4V0UNXlOkv-0B6OiIls; Wed, 06 Dec 2017 11:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 6 Dec 2017 11:00:05 +0300 Message-Id: <1512547207-1806-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> References: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 323 Subject: [lng-odp] [PATCH 2.0 v1 3/5] linux-dpdk: crypto bug fixes X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balakrishna Garapati Signed-off-by: Balakrishna Garapati Reviewed-by: Yi He --- /** Email created from pull request 323 (heyi-linaro:2.0-linux-dpdk-make-check) ** https://github.com/Linaro/odp/pull/323 ** Patch: https://github.com/Linaro/odp/pull/323.patch ** Base sha: 00c7441fae53949dd87855d48102f932f8f64537 ** Merge commit sha: 97e968c4c23266a903016fe9bda392687b44b08f **/ platform/linux-dpdk/odp_crypto.c | 77 ++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c index 9844f2dd7..ea014c8e8 100644 --- a/platform/linux-dpdk/odp_crypto.c +++ b/platform/linux-dpdk/odp_crypto.c @@ -808,40 +808,53 @@ int odp_crypto_session_create(odp_crypto_session_param_t *param, /* Default to successful result */ *status = ODP_CRYPTO_SES_CREATE_ERR_NONE; - /* Cipher Data */ - cipher_xform.cipher.key.data = rte_malloc("crypto key", - param->cipher_key.length, 0); - if (cipher_xform.cipher.key.data == NULL) { - ODP_ERR("Failed to allocate memory for cipher key\n"); - /* remove the crypto_session_entry_t */ - memset(entry, 0, sizeof(*entry)); - free_session(entry); - return -1; - } - cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cipher_xform.next = NULL; - cipher_xform.cipher.key.length = param->cipher_key.length; - memcpy(cipher_xform.cipher.key.data, - param->cipher_key.data, - param->cipher_key.length); - - /* Authentication Data */ - auth_xform.auth.key.data = rte_malloc("auth key", - param->auth_key.length, 0); - if (auth_xform.auth.key.data == NULL) { - ODP_ERR("Failed to allocate memory for auth key\n"); - /* remove the crypto_session_entry_t */ - memset(entry, 0, sizeof(*entry)); - free_session(entry); - return -1; + + if (param->cipher_key.length) { + /* Cipher Data */ + cipher_xform.cipher.key.data = rte_malloc("crypto key", + param->cipher_key.length, 0); + if (cipher_xform.cipher.key.data == NULL) { + ODP_ERR("Failed to allocate memory for cipher key\n"); + /* remove the crypto_session_entry_t */ + memset(entry, 0, sizeof(*entry)); + free_session(entry); + return -1; + } + + cipher_xform.cipher.key.length = param->cipher_key.length; + memcpy(cipher_xform.cipher.key.data, + param->cipher_key.data, + param->cipher_key.length); + } else { + cipher_xform.cipher.key.data = 0; + cipher_xform.cipher.key.length = 0; } + auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; auth_xform.next = NULL; - auth_xform.auth.key.length = param->auth_key.length; - memcpy(auth_xform.auth.key.data, - param->auth_key.data, - param->auth_key.length); + + if (param->auth_key.length) { + /* Authentication Data */ + auth_xform.auth.key.data = rte_malloc("auth key", + param->auth_key.length, 0); + if (auth_xform.auth.key.data == NULL) { + ODP_ERR("Failed to allocate memory for auth key\n"); + /* remove the crypto_session_entry_t */ + memset(entry, 0, sizeof(*entry)); + free_session(entry); + return -1; + } + auth_xform.auth.key.length = param->auth_key.length; + memcpy(auth_xform.auth.key.data, + param->auth_key.data, + param->auth_key.length); + } else { + auth_xform.auth.key.data = 0; + auth_xform.auth.key.length = 0; + } + /* Derive order */ if (ODP_CRYPTO_OP_ENCODE == param->op) @@ -1271,11 +1284,13 @@ int odp_crypto_int(odp_packet_t pkt_in, memcpy(op->sym->cipher.iv.data, param->override_iv_ptr, entry->iv.length); + op->sym->cipher.iv.phys_addr = + rte_malloc_virt2phy(op->sym->cipher.iv.data); + op->sym->cipher.iv.length = entry->iv.length; } else if (entry->iv.data) { memcpy(op->sym->cipher.iv.data, entry->iv.data, entry->iv.length); - op->sym->cipher.iv.phys_addr = rte_malloc_virt2phy(op->sym->cipher.iv.data); op->sym->cipher.iv.length = entry->iv.length; @@ -1326,7 +1341,7 @@ int odp_crypto_int(odp_packet_t pkt_in, (rc_auth == ODP_CRYPTO_ALG_ERR_NONE); _odp_buffer_event_subtype_set(packet_to_buffer(out_pkt), - ODP_EVENT_PACKET_BASIC); + ODP_EVENT_PACKET_CRYPTO); op_result = get_op_result_from_packet(out_pkt); *op_result = local_result; From patchwork Wed Dec 6 08:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120794 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6754619qgn; Wed, 6 Dec 2017 00:03:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMZamKdyJQGk0IjzxaAoK17nJo22pOcWEcu2fW3YwOR6ZqMkz60APMrO2q013I51Z2bt0RaN X-Received: by 10.200.43.24 with SMTP id 24mr3431570qtu.153.1512547404464; Wed, 06 Dec 2017 00:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512547404; cv=none; d=google.com; s=arc-20160816; b=xKgF3laANon4jTKYsyWUIZESSwi37MiiXAgrLc2W7z95iNr5hgJluAX7vifYCd4KcX ZKTgEcgkdKIxgCeqGZ6ZcufKY+cESSIYPfF7ST6OWdObr2Ax7vjpR4TBPFEaHd+Low6G aH5C45zkXWBoYyuyASMhsiG/K+zfBGSaKTIx3TVyHNKN8wTNH6lgU4B7y8LMLlxxF+Yb ATri193et7Oj4+AaDP4PmxD3StZLVOLBPyp3Y3bqr9idqZOyFxRXwOzi1Xt0ARIFj42x YMktoSgcG0aXjmL3u+cUxvRhQWexboW0ZSjET/70uVW/gv/2JLI2GrThsrZlrKE4HuJe Faeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=VF/AB6xopaFT+EucvPD40msaZbRMjqv5HcIm04j3VXg=; b=i76VF2KgsBqY4/kx7+/bZpJUrygGrbLAZDIO0mtY62fpznCrDzn0LGxrSW35TrBFM3 /erMQMy3K/uifTgyVCRqsKPYDOjATATb0Wb0sy1UaPGZIJJNf34xcvYtrARnNuYoiEXc NZ/Vxz0gDxxvCbAgHjj2znnxj4Ys3MVsPTZyUKcIwcZUBjur/1vyOZM1qPogc4kecx7w 3ZxqI+tEEX0VnoAHSy0sGQoTHZfMyVp7w8upWBFEEG0juXdcc3SgUmucO3yw5/VkfoGg jFM5yLhvf9mRvQLT0mzlpcWatsEo8bFZ33XnoR4OrOlOZoPm53PcUoeNAvSKExnDV6qe Bwjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id s12si708313qke.463.2017.12.06.00.03.24; Wed, 06 Dec 2017 00:03:24 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 27ACF60943; Wed, 6 Dec 2017 08:03:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 72EEC6091E; Wed, 6 Dec 2017 08:00:58 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1F783607FB; Wed, 6 Dec 2017 08:00:34 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 1ABC66091B for ; Wed, 6 Dec 2017 08:00:14 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 5DC3B1844EA for ; Wed, 6 Dec 2017 11:00:12 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id dxasxXTaeh-0CDGaj0E; Wed, 06 Dec 2017 11:00:12 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4V0UNXlOkv-0B6uLdeS; Wed, 06 Dec 2017 11:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 6 Dec 2017 11:00:06 +0300 Message-Id: <1512547207-1806-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> References: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 323 Subject: [lng-odp] [PATCH 2.0 v1 4/5] linux-dpdk: fix platform tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Yi He Fixed search path in pktio_run.sh for pktio_main executable, and Makefile.am to run platform tests with wrapper script. Signed-off-by: Yi He Reviewed-by: Honnappa Nagarahalli --- /** Email created from pull request 323 (heyi-linaro:2.0-linux-dpdk-make-check) ** https://github.com/Linaro/odp/pull/323 ** Patch: https://github.com/Linaro/odp/pull/323.patch ** Base sha: 00c7441fae53949dd87855d48102f932f8f64537 ** Merge commit sha: 97e968c4c23266a903016fe9bda392687b44b08f **/ platform/linux-dpdk/test/Makefile.am | 2 -- platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am index a872400e4..8cb27b14f 100644 --- a/platform/linux-dpdk/test/Makefile.am +++ b/platform/linux-dpdk/test/Makefile.am @@ -14,8 +14,6 @@ SUBDIRS += validation/api/pktio endif endif -TEST_EXTENSIONS = .sh - TESTNAME = linux-dpdk TESTENV = tests-$(TESTNAME).env diff --git a/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh b/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh index 538c87d00..a08256a6b 100755 --- a/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh +++ b/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh @@ -23,7 +23,7 @@ # running stand alone out of tree requires setting PATH PATH=${TEST_DIR}/api/pktio:$PATH PATH=$(dirname $0):$PATH -PATH=$(dirname $0)/../../../../common_plat/validation/api/pktio:$PATH +PATH=$(dirname $0)/../../../../../../test/validation/api/pktio:$PATH PATH=.:$PATH pktio_main_path=$(which pktio_main${EXEEXT}) From patchwork Wed Dec 6 08:00:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120796 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6755652qgn; Wed, 6 Dec 2017 00:04:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMbHvP4fbnpaZexmPmSvMoufusV2Ko2lHpOQWI0dha2Fye4trh685CTdE4WedOTGqFGCMG+s X-Received: by 10.55.74.144 with SMTP id x138mr22528614qka.239.1512547473438; Wed, 06 Dec 2017 00:04:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512547473; cv=none; d=google.com; s=arc-20160816; b=tpbAQEPJDV7KU4uYGt15uVM6ZNVZyLQJmagV6Ysza2VqTgz3WhAuudC2X7JyD91ru9 p5Nr+DsUCTy6oM3PUPW91MCSBil5W8wAEgeoZxa8a71+YwKKn56TP96pMU3gF++ewmBp Me7w0Y2cjPtgVup2uaZzKwpvQyWWwjz1kIISDFInZbDd/wuwRA6OQO/ExGfITe0mRKMW QcJtsqG12X5R6tc44RXzqH+qj3EOQqVvfQn8wkaGwQS/h2zXxcZ1xvEizZEQM3EfVXky RTD7hS1bxmzz6UHt5IwouZ9BvLjcjjpo0Ob/kNlUnpdqsuQM3p/r3tNF07WEjobbB2bc 9XXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=ATGLYpL/Gff3s69/5Es3LgLa5ItfWoZDdJwwXGacp2I=; b=uvsypYjipt5mMB1rx24ozE01uBLWrBVlNE8nld1Df/K1GkxWOVTJpSIfHpwZHo+e7u E7lWbWg4jH8ROGWutPWFADlaxo0kEymEcPg57bJwpOzgtZCb3Cpw2QeM2arCmJjfkq6j hibIwadBeacq3JloUBYhLvLoColJAQQ4NtmIveNtiwnh1tSesvApmxlaEM1tjPRdXkO9 wQigEtT3VPxL312TWWu9wxsQSbjgrM9HDUFn1PHQxSdF1uKknTGATie06dAC5T1zgnQF k7GGmx+dnLj/LMC9cWxDTv0gULL1QXDqq3m4i61x3OD59YKVHcjefmq5aTkok5vDl+IG Ix1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e44si754161qtf.10.2017.12.06.00.04.33; Wed, 06 Dec 2017 00:04:33 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1F17260927; Wed, 6 Dec 2017 08:04:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id F1F2B60948; Wed, 6 Dec 2017 08:01:12 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 57F8B6090A; Wed, 6 Dec 2017 08:00:37 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 491276091D for ; Wed, 6 Dec 2017 08:00:14 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward104j.mail.yandex.net (Yandex) with ESMTP id DBFD943549 for ; Wed, 6 Dec 2017 11:00:12 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2nThVrjoms-0C7i2QSF; Wed, 06 Dec 2017 11:00:12 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4V0UNXlOkv-0C6GgsDq; Wed, 06 Dec 2017 11:00:12 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 6 Dec 2017 11:00:07 +0300 Message-Id: <1512547207-1806-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> References: <1512547207-1806-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 323 Subject: [lng-odp] [PATCH 2.0 v1 5/5] linux-dpdk: fix inconsistent *_INVALID defines X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Yi He Fixed inconsistent defines of ODP_BUFFER_INVALID, ODP_EVENT_INVALID and ODP_TIMEOUT_INVALID as NULL instead of 0xffffffff for linux-dpdk platform, to align with linux-generic as well as abi compatible headers. Signed-off-by: Yi He Reviewed-by: Honnappa Nagarahalli --- /** Email created from pull request 323 (heyi-linaro:2.0-linux-dpdk-make-check) ** https://github.com/Linaro/odp/pull/323 ** Patch: https://github.com/Linaro/odp/pull/323.patch ** Base sha: 00c7441fae53949dd87855d48102f932f8f64537 ** Merge commit sha: 97e968c4c23266a903016fe9bda392687b44b08f **/ platform/linux-dpdk/include/odp/api/plat/buffer_types.h | 2 +- platform/linux-dpdk/include/odp/api/plat/event_types.h | 2 +- platform/linux-dpdk/include/odp/api/plat/timer_types.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/linux-dpdk/include/odp/api/plat/buffer_types.h b/platform/linux-dpdk/include/odp/api/plat/buffer_types.h index 809768f3d..0f5f7baa1 100644 --- a/platform/linux-dpdk/include/odp/api/plat/buffer_types.h +++ b/platform/linux-dpdk/include/odp/api/plat/buffer_types.h @@ -31,7 +31,7 @@ extern "C" { typedef ODP_HANDLE_T(odp_buffer_t); -#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0xffffffff) +#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, NULL) typedef ODP_HANDLE_T(odp_buffer_seg_t); diff --git a/platform/linux-dpdk/include/odp/api/plat/event_types.h b/platform/linux-dpdk/include/odp/api/plat/event_types.h index e0f68e34e..ecda702c8 100644 --- a/platform/linux-dpdk/include/odp/api/plat/event_types.h +++ b/platform/linux-dpdk/include/odp/api/plat/event_types.h @@ -32,7 +32,7 @@ extern "C" { typedef ODP_HANDLE_T(odp_event_t); -#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff) +#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, NULL) /** * Event types diff --git a/platform/linux-dpdk/include/odp/api/plat/timer_types.h b/platform/linux-dpdk/include/odp/api/plat/timer_types.h index 2ae8bfec8..3d97993ba 100644 --- a/platform/linux-dpdk/include/odp/api/plat/timer_types.h +++ b/platform/linux-dpdk/include/odp/api/plat/timer_types.h @@ -37,7 +37,7 @@ typedef ODP_HANDLE_T(odp_timer_t); typedef ODP_HANDLE_T(odp_timeout_t); -#define ODP_TIMEOUT_INVALID _odp_cast_scalar(odp_timeout_t, 0xffffffff) +#define ODP_TIMEOUT_INVALID _odp_cast_scalar(odp_timeout_t, NULL) /** * @}