From patchwork Wed Jun 3 15:30:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 49476 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 133A420DDC for ; Wed, 3 Jun 2015 15:31:32 +0000 (UTC) Received: by labpg10 with SMTP id pg10sf4139952lab.2 for ; Wed, 03 Jun 2015 08:31:31 -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:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=YrebUxcutEyBGeOCjwUXPnY496n3Rr1yJRLEYg4Y+dE=; b=mfNt6qMT2UgUxwlHHyDSdCEfsapkNXWNIwVoKZblYQuCqswTmhfd7gPmS/fdfJM97M C0gBGrWNuch98CGrqmD/bNUzIhY+/g1oA4B6aYTRNZaDnsMfL4ciY/vDelH/7y4zqj8a 0e7CLJP+Jq0dE2l2wz/r8HGuf79eZmdNS0mj9UsW+/2+M801/ZKLAaXobVwXqVswh4N+ WyVmuj84/s1A9Q5kkbw3XS802dRxytzQg7BUS9YXOEX0Fnln6Q9m2eMafJCjmMmiA7JV yym+fieIaf2KVL17PVvdv9JHgjkyGOB7a//4MUWwsD5Q2tEyyTHqAbQ5HF2rNRTqcMUs dErg== X-Gm-Message-State: ALoCoQmTWNdyVtNlB5eHZbsUQ9b0yku1qnd3UxlCAqIUmAq3r2443EOR5rh72zxFsJv4p88lIFbl X-Received: by 10.112.142.170 with SMTP id rx10mr30924852lbb.12.1433345490799; Wed, 03 Jun 2015 08:31:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.166 with SMTP id z6ls71723laj.64.gmail; Wed, 03 Jun 2015 08:31:30 -0700 (PDT) X-Received: by 10.152.7.206 with SMTP id l14mr24329822laa.3.1433345490625; Wed, 03 Jun 2015 08:31:30 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id bj8si18303925lbc.93.2015.06.03.08.31.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 08:31:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbcue7 with SMTP id ue7so9601265lbc.0 for ; Wed, 03 Jun 2015 08:31:30 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr32702410lbc.19.1433345490482; Wed, 03 Jun 2015 08:31:30 -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.108.230 with SMTP id hn6csp3951203lbb; Wed, 3 Jun 2015 08:31:29 -0700 (PDT) X-Received: by 10.55.25.134 with SMTP id 6mr60422939qkz.13.1433345488700; Wed, 03 Jun 2015 08:31:28 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j19si910283qhc.124.2015.06.03.08.31.27; Wed, 03 Jun 2015 08:31:28 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 62C0E61D86; Wed, 3 Jun 2015 15:31:27 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled 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 6A9E661F28; Wed, 3 Jun 2015 15:31:24 +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 E102561F28; Wed, 3 Jun 2015 15:31:15 +0000 (UTC) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by lists.linaro.org (Postfix) with ESMTPS id 0BC5A61D0F for ; Wed, 3 Jun 2015 15:31:15 +0000 (UTC) Received: by wgez8 with SMTP id z8so12500302wge.0 for ; Wed, 03 Jun 2015 08:31:14 -0700 (PDT) X-Received: by 10.194.176.165 with SMTP id cj5mr63003412wjc.72.1433345474226; Wed, 03 Jun 2015 08:31:14 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id o4sm5445989wib.5.2015.06.03.08.31.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jun 2015 08:31:13 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Wed, 3 Jun 2015 16:30:58 +0100 Message-Id: <1433345458-20463-1-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] odp_l2fwd: make unidirectional tests easier 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoltan.kiss@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.171 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 If you want to test traffic going only in one direction, you might be better off with one thread for the two interfaces. Removing this exit() call makes it possible, while you still have the big error message which warns you that this might be a bad idea. In this case it's important to add the ingress interface first for the -i parameter. Signed-off-by: Zoltan Kiss --- test/performance/odp_l2fwd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 5d4b833..e540e93 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -397,11 +397,9 @@ int main(int argc, char *argv[]) printf("first CPU: %i\n", odp_cpumask_first(&cpumask)); printf("cpu mask: %s\n", cpumaskstr); - if (num_workers < gbl_args->appl.if_count) { + if (num_workers < gbl_args->appl.if_count) LOG_ERR("Error: CPU count %d less than interface count\n", num_workers); - exit(EXIT_FAILURE); - } if (gbl_args->appl.if_count % 2 != 0) { LOG_ERR("Error: interface count %d is odd in fwd appl.\n", gbl_args->appl.if_count); @@ -667,6 +665,7 @@ static void usage(char *progname) "\n" "Mandatory OPTIONS:\n" " -i, --interface Eth interfaces (comma-separated, no spaces)\n" + " (unidirectional test: src must be first)\n" " -m, --mode 0: Burst send&receive packets (no queues)\n" " 1: Send&receive packets through ODP queues.\n" "\n"