From patchwork Wed Aug 26 15:49:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 52733 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id E744122E9E for ; Wed, 26 Aug 2015 15:50:57 +0000 (UTC) Received: by wilj18 with SMTP id j18sf7624714wil.0 for ; Wed, 26 Aug 2015 08:50:57 -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=MHAiNFWaxRVl5C01STqVHOsHIlcExbN8Br1z1khO4AsFMToY7bkfFSolEQ/c4vNeGs zlBCg7JkbJjNlQuDXYz+g46j/4H7m9nGxc41VmVq8wLqGSx62lkFtEtPqIEAc5qNx7AJ AkyiV6R8YGkcsMCXpJSG0PUDpSKTkc1YMWLg6FRZ3eIrtX3ho9wYJdQ7M13iqAs4FcQC +H2VzwTcFQ9ZwY+S9dMOg6tQZo4tPn0KOM5Auj3Y40DQfHLXBNrc1yO8HGhQk/p1P4Z0 L/ZEHSME9PB98ADQAWIy7E153OyrzKsDkpRji36W+TtkMeJC25s5xOHG5mWgZEDdjL61 TF4Q== X-Gm-Message-State: ALoCoQlYsvEcJi51st4UfOmA1IzyUIZGhFY9vAYpWhXIWAWT+9uxTMfD5xM4rXXmIXwvkBZI0Yw8 X-Received: by 10.112.227.105 with SMTP id rz9mr10253317lbc.8.1440604257214; Wed, 26 Aug 2015 08:50:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.35 with SMTP id s3ls901729lae.29.gmail; Wed, 26 Aug 2015 08:50:57 -0700 (PDT) X-Received: by 10.112.24.163 with SMTP id v3mr31457841lbf.101.1440604257052; Wed, 26 Aug 2015 08:50:57 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id i1si19042677lah.93.2015.08.26.08.50.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2015 08:50:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labgv11 with SMTP id gv11so54621469lab.2 for ; Wed, 26 Aug 2015 08:50:56 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr31789905lbb.56.1440604256922; Wed, 26 Aug 2015 08:50:56 -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 yc8csp4010085lbb; Wed, 26 Aug 2015 08:50:55 -0700 (PDT) X-Received: by 10.140.235.3 with SMTP id g3mr84166598qhc.56.1440604252770; Wed, 26 Aug 2015 08:50:52 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o14si23940598qko.103.2015.08.26.08.50.51; Wed, 26 Aug 2015 08:50:52 -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 D44C76206F; Wed, 26 Aug 2015 15:50:51 +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 0B1A362083; Wed, 26 Aug 2015 15:49:42 +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 3E66B6207F; Wed, 26 Aug 2015 15:49:21 +0000 (UTC) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id DDA3462077 for ; Wed, 26 Aug 2015 15:49:15 +0000 (UTC) Received: by labns7 with SMTP id ns7so4700610lab.0 for ; Wed, 26 Aug 2015 08:49:14 -0700 (PDT) X-Received: by 10.152.37.161 with SMTP id z1mr31013518laj.27.1440604154836; Wed, 26 Aug 2015 08:49:14 -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 w3sm6870916lag.13.2015.08.26.08.49.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Aug 2015 08:49:14 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 26 Aug 2015 18:49:02 +0300 Message-Id: <1440604147-24703-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440604147-24703-1-git-send-email-maxim.uvarov@linaro.org> References: <1440604147-24703-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv5 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.215.44 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) {