From patchwork Wed Nov 30 00:48:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 84927 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp25634qgi; Tue, 29 Nov 2016 16:48:14 -0800 (PST) X-Received: by 10.55.163.134 with SMTP id m128mr29762345qke.180.1480466894601; Tue, 29 Nov 2016 16:48:14 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c145si36215116qke.290.2016.11.29.16.48.13; Tue, 29 Nov 2016 16:48:14 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B272060D33; Wed, 30 Nov 2016 00:48:13 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 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 4D4EA60936; Wed, 30 Nov 2016 00:48:10 +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 161A460CF4; Wed, 30 Nov 2016 00:48:08 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by lists.linaro.org (Postfix) with ESMTPS id 0645E608F4 for ; Wed, 30 Nov 2016 00:48:07 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id y198so212454878oia.1 for ; Tue, 29 Nov 2016 16:48:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HT3GXBIfWPQMWSk+/FXFgLtkNnRcJcy4fdT0tutgM5c=; b=l5w6dcEP7wdxqEzYlWbWxO5akg/q1w+O2KZ3B4i/k5J33pcapOJ+Byg7df/5+M7+P6 bFoNk+pcBvBCtelrQ279y3gvQszWKCw3bi1+qbUXf0yhkwpnuQjAlmx5fz5GmQh61ZOi 160rNchGs/2hbGLAol03zuOkdtqQaEFbXZB8DqPOnXM86cfcZ8R8G6Mxa32Zr02M2yUD KAFK9lQ4BJ2PeQPMYsjCD2J5lF2VRvO0SyTh/x0vBH5FpYH//4rh+P37M+nmBWQnGrB0 bIqkk/mkjJyogrGShh2uhAG4z/vWLzXGEM5atKDgoTVB2orUFtJgmN8Cl3AJN2yF88XN yrQg== X-Gm-Message-State: AKaTC00l9WQQ9H+0oXuWb1Zam/14pT0yw3EZ1PkjPOq4tOUg4CuHCotlX4sNedEQ+evf92atj4U= X-Received: by 10.202.84.65 with SMTP id i62mr16164914oib.68.1480466886290; Tue, 29 Nov 2016 16:48:06 -0800 (PST) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id 62sm19795776ots.41.2016.11.29.16.48.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Nov 2016 16:48:05 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 29 Nov 2016 18:48:03 -0600 Message-Id: <1480466883-31974-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [API-NEXT PATCH] linux-generic: pool: reset origin_qe on buffer allocation X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2622 by re-initializing origin_qe to NULL when a buffer is allocated. This step was omitted in the switch to ring pool allocation introduced in commit ID c8cf1d87783d4b4c628f219803b78731b8d4ade4 Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_pool.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 4be3827..0b3d694 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -648,9 +648,12 @@ int buffer_alloc_multi(pool_t *pool, odp_buffer_t buf[], cache->num = cache_num - num_ch; } - if (buf_hdr) { - for (i = 0; i < num_ch; i++) - buf_hdr[i] = buf_hdl_to_hdr(buf[i]); + for (i = 0; i < num_ch; i++) { + odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf[i]); + + hdr->origin_qe = NULL; + if (buf_hdr) + buf_hdr[i] = hdr; } return num_ch + num_deq;