From patchwork Tue Jul 15 13:20:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 33665 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1276521141 for ; Tue, 15 Jul 2014 13:21:29 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g18sf31129542oah.6 for ; Tue, 15 Jul 2014 06:21:29 -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:from:to:date:message-id :mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=NO0AmLrch4+/pBCe1g6j6jUHXudv3cbEU9I+vFjYxQE=; b=GVYhYn5U8ywKijFUsmymRiyEtREVGWCaTxfFnm/D3WHkLrXyYk2GCodyd+5Zf0wwb+ iW7MQofVy67F8CMnM0q2aZSWomLuIG/ndrFFJn3bhsbruw3WWtuOxDtDXRWXaBmhzGtB VhCEMNz1R6wfQ4VNyY7vASk9rIpreBTprThsPz53s5ZbOjib5H945Jm8DyauG9DHViyR 90MbQbcLmuHn8AgX8tpFOtAeJJxfvwREIUoMa9Djj60ePRuhT9iIPjpTnoC9bEn2D7zg uf8/oOs+r3slZG0lc2vT9A1J7Fk1a+ul1xPe+DDdwkqX9UaAh7Qz6JM+kUOgX88l7jek hMIQ== X-Gm-Message-State: ALoCoQmx/SSgkyVv9cWMoEhynkoybvvrntGIVYNnacf2vm9WPkU1JK2P60S8THwOaasIxyHN6WXq X-Received: by 10.50.62.8 with SMTP id u8mr2431805igr.1.1405430489272; Tue, 15 Jul 2014 06:21:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.198 with SMTP id 64ls85274qgn.8.gmail; Tue, 15 Jul 2014 06:21:29 -0700 (PDT) X-Received: by 10.221.55.70 with SMTP id vx6mr12960381vcb.23.1405430489184; Tue, 15 Jul 2014 06:21:29 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id f15si6667683vdt.65.2014.07.15.06.21.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jul 2014 06:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so6205145vcb.4 for ; Tue, 15 Jul 2014 06:21:29 -0700 (PDT) X-Received: by 10.58.188.199 with SMTP id gc7mr22106257vec.4.1405430489110; Tue, 15 Jul 2014 06:21:29 -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.221.37.5 with SMTP id tc5csp214101vcb; Tue, 15 Jul 2014 06:21:28 -0700 (PDT) X-Received: by 10.140.100.233 with SMTP id s96mr10636472qge.92.1405430487931; Tue, 15 Jul 2014 06:21:27 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id z7si20421392qal.15.2014.07.15.06.21.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Jul 2014 06:21:27 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X72dK-00077T-Ar; Tue, 15 Jul 2014 13:19:02 +0000 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X72dE-00076v-CJ for lng-odp@lists.linaro.org; Tue, 15 Jul 2014 13:18:56 +0000 X-IronPort-AV: E=Sophos;i="5.01,665,1400050800"; d="scan'208";a="39328717" Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw2-out.broadcom.com with ESMTP; 15 Jul 2014 06:29:29 -0700 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 15 Jul 2014 06:21:01 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.174.1; Tue, 15 Jul 2014 06:21:01 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id AE5FB9F9FD; Tue, 15 Jul 2014 06:21:00 -0700 (PDT) From: To: Date: Tue, 15 Jul 2014 18:50:52 +0530 Message-ID: <1405430452-23143-1-git-send-email-venkatesh.vivekanandan@linaro.org> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Topics: patch Subject: [lng-odp] [PATCHv2] Fix to give back the sent buffers to buffer pool. X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkatesh.vivekanandan@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.220.173 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 From: Venkatesh Vivekanandan Signed-off-by: Venkatesh Vivekanandan --- platform/linux-dpdk/odp_packet_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/linux-dpdk/odp_packet_io.c b/platform/linux-dpdk/odp_packet_io.c index abea0ec..3d4f5d4 100644 --- a/platform/linux-dpdk/odp_packet_io.c +++ b/platform/linux-dpdk/odp_packet_io.c @@ -323,6 +323,9 @@ int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) if (pktio_entry == NULL) return -1; + if (pktio_entry->s.params.type == ODP_PKTIO_TYPE_DPDK) + odp_pktio_send(id, pkt_table, 0); + lock_entry(pktio_entry); switch (pktio_entry->s.params.type) { case ODP_PKTIO_TYPE_SOCKET_BASIC: