From patchwork Wed Jul 1 17:06:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 50531 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DFF1C214B3 for ; Wed, 1 Jul 2015 17:07:42 +0000 (UTC) Received: by lbcpe5 with SMTP id pe5sf7076952lbc.3 for ; Wed, 01 Jul 2015 10:07:41 -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:cc: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=lqa/2a33wK56L2f7u8JZjcsosegdTQNkBbcq4+y3VikMcg7F2vz082T7WqGFI3WXdC myeJRUN2SyEKXNrSeZRnl2wwi63s5YqewC86GxHCYHLqM+Fw/bqfSTaMOEE1/T+ZVvca sKSwSecUtvtm8syv4ivHwlj5A4ZiHW2z8DvNsTm0qtTnXXwzp1EmRcnkXZzkrBtYhEMq 80pRMiwmn0b/3/Oo35/cFGIQpj7wJTS9RiXfzgcic8r0vw+uRN31VOTk/VHbIWqk+Yv+ kuuSJ8cJPMMSGQ3wZ9lAd4TN7WlrbiES6p1eDvkDozjpXg9naSD4AYMVxclAK4v6wjvD jlYg== X-Gm-Message-State: ALoCoQmdPHAIHzd9mbEuiQBzimNmS3WuXLoQdpBKkRqUdV9mhfwPHvWe0ZCbyuoOkltY3g4+ztfr X-Received: by 10.112.40.45 with SMTP id u13mr17685063lbk.0.1435770461880; Wed, 01 Jul 2015 10:07:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.129 with SMTP id m1ls213456laf.76.gmail; Wed, 01 Jul 2015 10:07:41 -0700 (PDT) X-Received: by 10.152.1.4 with SMTP id 4mr26494350lai.25.1435770461727; Wed, 01 Jul 2015 10:07:41 -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 xg7si2220884lbb.48.2015.07.01.10.07.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2015 10:07:41 -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 lbcui10 with SMTP id ui10so16835353lbc.0 for ; Wed, 01 Jul 2015 10:07:41 -0700 (PDT) X-Received: by 10.112.42.50 with SMTP id k18mr24211326lbl.76.1435770461629; Wed, 01 Jul 2015 10:07:41 -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 hn6csp742281lbb; Wed, 1 Jul 2015 10:07:40 -0700 (PDT) X-Received: by 10.55.23.141 with SMTP id 13mr56373719qkx.94.1435770460222; Wed, 01 Jul 2015 10:07:40 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e144si2936417qhc.127.2015.07.01.10.07.35; Wed, 01 Jul 2015 10:07:40 -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 3456261F57; Wed, 1 Jul 2015 17:07:35 +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 1AAF661F5E; Wed, 1 Jul 2015 17:06:54 +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 1FD5761F5E; Wed, 1 Jul 2015 17:06:50 +0000 (UTC) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by lists.linaro.org (Postfix) with ESMTPS id 1EF7661F49 for ; Wed, 1 Jul 2015 17:06:37 +0000 (UTC) Received: by wibdq8 with SMTP id dq8so51432247wib.1 for ; Wed, 01 Jul 2015 10:06:36 -0700 (PDT) X-Received: by 10.180.231.40 with SMTP id td8mr8647327wic.9.1435770396235; Wed, 01 Jul 2015 10:06:36 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id fi6sm4335895wib.6.2015.07.01.10.06.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jul 2015 10:06:35 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Wed, 1 Jul 2015 18:06:12 +0100 Message-Id: <1435770379-30000-3-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435770379-30000-1-git-send-email-zoltan.kiss@linaro.org> References: <1435770379-30000-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Cc: Petri Savolainen Subject: [lng-odp] [API-NEXT PATCH v4 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.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 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;