From patchwork Thu May 12 15:20:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 67682 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp812795qge; Thu, 12 May 2016 08:20:59 -0700 (PDT) X-Received: by 10.140.151.206 with SMTP id 197mr10930352qhx.4.1463066459786; Thu, 12 May 2016 08:20:59 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f65si8865522qhe.24.2016.05.12.08.20.59; Thu, 12 May 2016 08:20:59 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6B1796164A; Thu, 12 May 2016 15:20:59 +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, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED 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 0F2D1615E3; Thu, 12 May 2016 15:20:56 +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 521B361589; Thu, 12 May 2016 15:20:54 +0000 (UTC) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) by lists.linaro.org (Postfix) with ESMTPS id 5B20661589 for ; Thu, 12 May 2016 15:20:53 +0000 (UTC) Received: by mail-lf0-f41.google.com with SMTP id m64so73577583lfd.1 for ; Thu, 12 May 2016 08:20:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Clm9Z7l89dmoDrHajEjTB1IueROq1CNci/kmqrEi3XQ=; b=NgtvhyJJdc3mXEBnjFts7EgHml7NeRqgEGhihxO8i46UfJ4ZhBVEV+wiCmXtiX9jSj c2zlWBsWMVMEHKCaESHnjWHNzezGSEkWEzFJAjgtQsgVcWPLiNyLX8x8xiJfYd+a2LlQ RLUwA93mIhedbp2onlTPDd50vzs0aWWtyEeCwTJ2o7CHOuQQC87RpXsg1TJIdYdLlaan DAseTS1h9fcLr9PWChfewmiiVNNEREd+WMicym+Ru0UdzC2DVFEajwz1E232QstEryxC vvrU7DRDI8GDzHWMKOJUTN8o4JgOXL+HVRP/YJSrJRm01K+ev4LEQdA9PP6Gau9NNR+A FVpg== X-Gm-Message-State: AOPr4FVUQ87xlGnpGAFsfm8e427NEAWpiKlfHb1vSFPuuc9wvMTTYJ8a4KnXO7n/dJNt7p8X/iA= X-Received: by 10.25.165.135 with SMTP id o129mr4703130lfe.162.1463066452009; Thu, 12 May 2016 08:20:52 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-173-31.pppoe.mtu-net.ru. [91.77.173.31]) by smtp.gmail.com with ESMTPSA id i6sm2177590lbc.8.2016.05.12.08.20.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 08:20:51 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 12 May 2016 18:20:41 +0300 Message-Id: <1463066441-6779-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH] validation: pktio: fix assert for odp_pktin_queue ret code 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Fix wrong return code check due to assignment to unsigned variable. https://bugs.linaro.org/show_bug.cgi?id=2224 Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- test/validation/pktio/pktio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index a51e0b2..7b7c0a5 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -493,9 +493,9 @@ static int recv_packets_tmo(odp_pktio_t pktio, odp_packet_t pkt_tbl[], odp_pktin_queue_t pktin[MAX_QUEUES]; odp_time_t ts1, ts2; int num_rx = 0; + int num_q; int i; int n; - unsigned num_q; unsigned from_val; unsigned *from = NULL; @@ -513,7 +513,8 @@ static int recv_packets_tmo(odp_pktio_t pktio, odp_packet_t pkt_tbl[], n = odp_pktin_recv_tmo(pktin[0], pkt_tmp, num - num_rx, tmo); else - n = odp_pktin_recv_mq_tmo(pktin, num_q, from, pkt_tmp, + n = odp_pktin_recv_mq_tmo(pktin, (unsigned)num_q, + from, pkt_tmp, num - num_rx, tmo); ts2 = odp_time_global(); @@ -526,7 +527,7 @@ static int recv_packets_tmo(odp_pktio_t pktio, odp_packet_t pkt_tbl[], odp_packet_free(pkt_tmp[i]); } if (mode == RECV_MQ_TMO) - CU_ASSERT(from_val < num_q); + CU_ASSERT(from_val < (unsigned)num_q); } while (num_rx < num); if (tmo == ODP_PKTIN_WAIT)