From patchwork Wed Aug 26 09:10:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 52712 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 9705922E9E for ; Wed, 26 Aug 2015 09:11:59 +0000 (UTC) Received: by lbck9 with SMTP id k9sf59965378lbc.0 for ; Wed, 26 Aug 2015 02:11:58 -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:in-reply-to:references: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=SUw3WAVjEOqZztLA2cS51tXaTYVXwm8Eb/6lVw5oli4=; b=E+6ywtyc684uRE/Mr12gKPk65S1eQ4YD3on4ggRJnAaYf8HpmfVxsETMQegzeZQlm8 SdOEq9birtzs9lcaA4t++lA3Zk/ScyINhditPURUtn3rAPnB4fpJNSfGO51hLlJj0SV4 kghnD3R9PQ/M+7JjsI2zqUe+L1CCa4JAE9ENPyNoo93AUZit50i0dC+RO7OlVF1yoCzQ 3oXlBYAzTvX4/Y9Zs2nVAT0NtzzNJpMsRF5bQhaS0o6LJQ5bZVWWKd2VEPXmu3lOF1w5 UjQUiG7U8AHQph3dWzJUbwTCXBuZQAX3HNvwX1wzzpVFpjDtxkdL4/gAnRcSdI2ONoq5 eusQ== X-Gm-Message-State: ALoCoQkW3HInLS9/tZKfxU0HLvJq2/FeR9T2mB6bnm4PYpPYLTxvFlxc3jnof1QbsX0VdCJOI+Xe X-Received: by 10.180.12.205 with SMTP id a13mr585342wic.4.1440580318537; Wed, 26 Aug 2015 02:11:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.7 with SMTP id v7ls854699laa.107.gmail; Wed, 26 Aug 2015 02:11:58 -0700 (PDT) X-Received: by 10.152.43.18 with SMTP id s18mr3012017lal.25.1440580318095; Wed, 26 Aug 2015 02:11:58 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id dc5si1440876lad.29.2015.08.26.02.11.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2015 02:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcbn3 with SMTP id bn3so115636473lbc.2 for ; Wed, 26 Aug 2015 02:11:58 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr29600675laj.19.1440580318006; Wed, 26 Aug 2015 02:11:58 -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.162.200 with SMTP id yc8csp3774342lbb; Wed, 26 Aug 2015 02:11:56 -0700 (PDT) X-Received: by 10.107.3.149 with SMTP id e21mr1948378ioi.19.1440580316260; Wed, 26 Aug 2015 02:11:56 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id dz9si3043670igb.91.2015.08.26.02.11.55; Wed, 26 Aug 2015 02:11:56 -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 F21EF61E65; Wed, 26 Aug 2015 09:11:54 +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 9F2176202E; Wed, 26 Aug 2015 09:11:14 +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 42E9E62030; Wed, 26 Aug 2015 09:10:55 +0000 (UTC) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by lists.linaro.org (Postfix) with ESMTPS id DCA2761FF5 for ; Wed, 26 Aug 2015 09:10:46 +0000 (UTC) Received: by lbcbn3 with SMTP id bn3so115618585lbc.2 for ; Wed, 26 Aug 2015 02:10:45 -0700 (PDT) X-Received: by 10.152.170.130 with SMTP id am2mr30178467lac.54.1440580245463; Wed, 26 Aug 2015 02:10:45 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-161-180.pppoe.mtu-net.ru. [91.76.161.180]) by smtp.gmail.com with ESMTPSA id kc4sm6569409lbc.39.2015.08.26.02.10.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Aug 2015 02:10:44 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 26 Aug 2015 12:10:32 +0300 Message-Id: <1440580237-21578-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440580237-21578-1-git-send-email-maxim.uvarov@linaro.org> References: <1440580237-21578-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv4 2/7] linux-generic: schedule pktin_poll: account pktio stop state 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: maxim.uvarov@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.181 as permitted sender) smtp.mailfrom=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 pktio in state stop return 0, which means no packets was received but that pktio is good to be sheduled next time. Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_packet_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 532c264..84485a9 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -610,6 +610,9 @@ int pktin_poll(pktio_entry_t *entry) if (odp_unlikely(entry->s.inq_default == ODP_QUEUE_INVALID)) return -1; + if (entry->s.state == STATE_STOP) + return 0; + num = odp_pktio_recv(entry->s.handle, pkt_tbl, QUEUE_MULTI_MAX); if (num < 0) {