From patchwork Fri Jun 5 17:51:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 49584 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A10BC2154F for ; Fri, 5 Jun 2015 17:53:16 +0000 (UTC) Received: by lagh7 with SMTP id h7sf724386lag.2 for ; Fri, 05 Jun 2015 10:53:15 -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=gRK9GE3qlyTXY4foZ3N/FVezm5/wpz3EUar1sEUJlgE=; b=Dnv9PDf6KEfuwvodDl99ngUT98/M2iq3+QGubGsuBKjqtP0JE56a1ulIyXn/FjUIrK /Dx9YFv6Zo5Jotuh4kJjknpPXau3BjTLyX91UUUl/SkFPinQudj3T8oHQ9FnYyBAW4BR qmmrHB3Xxapbc5IRolhUel8ND5Bx2b5ZYU8xuL8l4BIcT/IqXamgfIes3eiaVwG5NhOu q1weVrzomx4rkmCZGwGUyLfwPHWIvOHgWpo3O2zldYgpwNWSydaxxWImgWkLbUtCWfVP O/EPyNxF3acvhVoFHAqKGMfaCjHTCCnrMaqCrHNZxGM/TkQ5JjBhXxPsEaaWOdhotXm/ p0/g== X-Gm-Message-State: ALoCoQmc8FaT89TIlU10kItau8VRCnXYardZYqfkp2Pcm9oqiZh2z8/xw7N9PPpONH6mGln3H66y X-Received: by 10.180.106.10 with SMTP id gq10mr32119816wib.0.1433526795638; Fri, 05 Jun 2015 10:53:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.70 with SMTP id le6ls405420lac.50.gmail; Fri, 05 Jun 2015 10:53:15 -0700 (PDT) X-Received: by 10.112.219.201 with SMTP id pq9mr4432145lbc.109.1433526795468; Fri, 05 Jun 2015 10:53:15 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id u7si5387372laj.60.2015.06.05.10.53.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 10:53:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by laew7 with SMTP id w7so59459245lae.1 for ; Fri, 05 Jun 2015 10:53:15 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr4572667lbb.56.1433526795368; Fri, 05 Jun 2015 10:53:15 -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 hn6csp44332lbb; Fri, 5 Jun 2015 10:53:14 -0700 (PDT) X-Received: by 10.140.20.99 with SMTP id 90mr5378228qgi.87.1433526793152; Fri, 05 Jun 2015 10:53:13 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s10si8116279qci.42.2015.06.05.10.52.47; Fri, 05 Jun 2015 10:53:13 -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 C295B6212F; Fri, 5 Jun 2015 17:52:47 +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=-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 ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5468B62134; Fri, 5 Jun 2015 17:52:09 +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 3E4AE62136; Fri, 5 Jun 2015 17:52:05 +0000 (UTC) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by lists.linaro.org (Postfix) with ESMTPS id A27D862129 for ; Fri, 5 Jun 2015 17:51:50 +0000 (UTC) Received: by wgme6 with SMTP id e6so62295399wgm.2 for ; Fri, 05 Jun 2015 10:51:50 -0700 (PDT) X-Received: by 10.194.59.112 with SMTP id y16mr8329617wjq.10.1433526709931; Fri, 05 Jun 2015 10:51:49 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id bg4sm11582752wjc.10.2015.06.05.10.51.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jun 2015 10:51:49 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Fri, 5 Jun 2015 18:51:24 +0100 Message-Id: <1433526691-20058-3-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433526691-20058-1-git-send-email-zoltan.kiss@linaro.org> References: <1433526691-20058-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v3 2/9] packet_socket: do not release packets in odp_pktio_send 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.215.51 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 It happens with ODP_PKTIO_TYPE_SOCKET_BASIC. Signed-off-by: Zoltan Kiss --- platform/linux-generic/odp_packet_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c index 9272146..0526166 100644 --- a/platform/linux-generic/odp_packet_socket.c +++ b/platform/linux-generic/odp_packet_socket.c @@ -276,7 +276,7 @@ int send_pkt_sock_basic(pkt_sock_t *const pkt_sock, unsigned i; unsigned flags; int sockfd; - int nb_tx; + unsigned nb_tx; int ret; sockfd = pkt_sock->sockfd; @@ -301,7 +301,7 @@ int send_pkt_sock_basic(pkt_sock_t *const pkt_sock, } /* end while */ nb_tx = i; - for (i = 0; i < len; i++) + for (i = 0; i < nb_tx; i++) odp_packet_free(pkt_table[i]); return nb_tx;