From patchwork Thu Apr 2 08:13:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Badicioiu X-Patchwork-Id: 46706 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B6AF6216D1 for ; Thu, 2 Apr 2015 08:13:56 +0000 (UTC) Received: by wgfh4 with SMTP id h4sf15520694wgf.1 for ; Thu, 02 Apr 2015 01:13:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=FX9uJ6iXgrULYRMkSwu9Z5VZW4migbyA5tDydZmBGyU=; b=JdvjjZWwIG6N4HwRZrnOdnTqf5/YqpTMp6xLWqJuAqf8h6inqvBBEmBCzGpDb36OYM SYF+7VgG6GvnrziQfMlqBxdmV4lS+6e/8+ab0Yool10OyJQfQtSIvoRRV8flCmxR8fRi Fz8rB0gH512l0SYgT3GiYuyipmBFceQ2tngvbqv/Q8yMMv88CmyXlyOV9tURzcgF4Qk2 qAbze6VZJkxMx5ZWtZqp7IpF0mOwXcnFWrdhi0Y1bCcK8eZ4+ICvUV+1XC8SJb7f0wlD 5rXTjkNyw+i10Ql7CdIyBwFqyVimKMJ2SoKSU/z3hte+CgMrQVXhBAmhc5Fz5zqCYm5U f+UA== X-Gm-Message-State: ALoCoQm5Sqna834wraoG1wgXi1VoTnlascQ+4LGA8kugYb7fAKYkC9bTKCQchZXtjyhKwEqd2x+g X-Received: by 10.112.242.7 with SMTP id wm7mr10320269lbc.1.1427962436064; Thu, 02 Apr 2015 01:13:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.164 with SMTP id an4ls178092lac.19.gmail; Thu, 02 Apr 2015 01:13:55 -0700 (PDT) X-Received: by 10.152.204.168 with SMTP id kz8mr16137856lac.70.1427962435916; Thu, 02 Apr 2015 01:13:55 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id m20si3617835lbg.107.2015.04.02.01.13.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 01:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lboc7 with SMTP id c7so53884851lbo.1 for ; Thu, 02 Apr 2015 01:13:55 -0700 (PDT) X-Received: by 10.152.8.161 with SMTP id s1mr30492466laa.41.1427962435795; Thu, 02 Apr 2015 01:13:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp1176012lbq; Thu, 2 Apr 2015 01:13:55 -0700 (PDT) X-Received: by 10.140.32.52 with SMTP id g49mr59022565qgg.83.1427962434506; Thu, 02 Apr 2015 01:13:54 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q76si4328080qgq.44.2015.04.02.01.13.53; Thu, 02 Apr 2015 01:13:54 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 14DAD65073; Thu, 2 Apr 2015 08:13:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9C2A065053; Thu, 2 Apr 2015 08:13:50 +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 0E71C65060; Thu, 2 Apr 2015 08:13:49 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0071.outbound.protection.outlook.com [157.56.110.71]) by lists.linaro.org (Postfix) with ESMTPS id 8819C65053 for ; Thu, 2 Apr 2015 08:13:48 +0000 (UTC) Received: from CO2PR03CA0041.namprd03.prod.outlook.com (10.141.194.168) by CY1PR0301MB0601.namprd03.prod.outlook.com (25.160.142.20) with Microsoft SMTP Server (TLS) id 15.1.125.19; Thu, 2 Apr 2015 08:13:48 +0000 Received: from BN1BFFO11FD042.protection.gbl (2a01:111:f400:7c10::1:102) by CO2PR03CA0041.outlook.office365.com (2a01:111:e400:1414::40) with Microsoft SMTP Server (TLS) id 15.1.125.19 via Frontend Transport; Thu, 2 Apr 2015 08:13:47 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD042.mail.protection.outlook.com (10.58.144.105) with Microsoft SMTP Server (TLS) id 15.1.136.16 via Frontend Transport; Thu, 2 Apr 2015 08:13:46 +0000 Received: from fsr-fed1364-15.ea.freescale.net (fsr-fed1364-15.ea.freescale.net [10.171.81.144]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t328Dimo018512; Thu, 2 Apr 2015 01:13:45 -0700 From: To: Date: Thu, 2 Apr 2015 11:13:23 +0300 Message-ID: <1427962403-11791-1-git-send-email-alexandru.badicioiu@linaro.org> X-Mailer: git-send-email 1.7.3.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130724360269069517; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(106466001)(2351001)(110136001)(104016003)(33646002)(77096005)(36756003)(105596002)(229853001)(77156002)(48376002)(92566002)(50466002)(62966003)(50986999)(46102003)(6806004)(47776003)(19580395003)(19580405001)(86362001)(86152002)(87936001)(50226001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0601; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0601; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:CY1PR0301MB0601; BCL:0; PCL:0; RULEID:(401004)(400005); SRVR:CY1PR0301MB0601; X-Forefront-PRVS: 0534947130 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2015 08:13:46.6729 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0601 X-Topics: patch Subject: [lng-odp] [PATCH 1/1] odp_ipsec: runtime select multiple vs single deq X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alexandru.badicioiu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Alexandru Badicioiu Signed-off-by: Alexandru Badicioiu --- example/ipsec/odp_ipsec.c | 3 +++ example/ipsec/odp_ipsec_stream.c | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 9fb048a..cb8f535 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -1498,6 +1498,9 @@ static void usage(char *progname) " can be used to advanced pkt I/O selection for linux-generic\n" " ODP_IPSEC_USE_POLL_QUEUES\n" " to enable use of poll queues instead of scheduled (default)\n" + " ODP_IPSEC_STREAM_VERIFY_MDEQ\n" + " to enable use of multiple dequeue for queue draining during\n" + " stream verification instead of single dequeue (default)\n" "\n", NO_PATH(progname), NO_PATH(progname) ); } diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c index ed07355..6507558 100644 --- a/example/ipsec/odp_ipsec_stream.c +++ b/example/ipsec/odp_ipsec_stream.c @@ -517,7 +517,9 @@ odp_bool_t verify_stream_db_outputs(void) { odp_bool_t done = TRUE; stream_db_entry_t *stream = NULL; + const char *env; + env = getenv("ODP_IPSEC_STREAM_VERIFY_MDEQ"); /* For each stream look for output packets */ for (stream = stream_db->list; NULL != stream; stream = stream->next) { int idx; @@ -531,14 +533,15 @@ odp_bool_t verify_stream_db_outputs(void) continue; for (;;) { -#if LOOP_DEQ_MULTIPLE - count = odp_queue_deq_multi(queue, - ev_tbl, - LOOP_DEQ_COUNT); -#else - ev_tbl[0] = odp_queue_deq(queue); - count = (ev_tbl[0] != ODP_EVENT_INVALID) ? 1 : 0; -#endif + if (env) + count = odp_queue_deq_multi(queue, + ev_tbl, + LOOP_DEQ_COUNT); + else { + ev_tbl[0] = odp_queue_deq(queue); + count = (ev_tbl[0] != ODP_EVENT_INVALID) ? + 1 : 0; + } if (!count) break; for (idx = 0; idx < count; idx++) {