From patchwork Thu Jan 22 16:09:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 43525 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 AE0EC240DB for ; Thu, 22 Jan 2015 16:09:44 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf1576198lbv.1 for ; Thu, 22 Jan 2015 08:09:43 -0800 (PST) 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: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=BSnnkX3/crCMFt1uvjJleEWul6KIkNYvfLaLcRZQecw=; b=Ne4RqL4koEl59YTEzMEqdV0t51CGXsRXMgaoakukh36v676gkfClMNOjl5BATP8SoE Y/fy0YDD0z49CGLHD76L6/G+Y6/lQ2Gna/0KaLkeks5daUL+j+tfXqpZVk9Jyb7RcP9/ XqYcXfPD6jj7I5TZljmd2S7Q4ufIqBWjXvZaTX8tat+1VAu71PKkFk+2606XEP/jmd3i 1Ovf8Gxtlej5Hr6lsXGK4OUHfsvP6myeUAGC1t21f3ZqIuYeZFYpVj5Hw5XRDkFSw9nD HOCLpC8zqGAI9XYgO0QK3JbcTO8mbEP7iRedNXF9opse2TnZ+921dKQb7FygUEyP5ilk 824A== X-Gm-Message-State: ALoCoQkM+DuCDYpzMIyxqW+s4UkUNpgVoXNa4SVbRwIuFW4UbnpmeWEFeYmwy/YnQPNlUer/Bv+P X-Received: by 10.112.171.74 with SMTP id as10mr355931lbc.8.1421942983708; Thu, 22 Jan 2015 08:09:43 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.100 with SMTP id i4ls147057laa.106.gmail; Thu, 22 Jan 2015 08:09:43 -0800 (PST) X-Received: by 10.112.204.233 with SMTP id lb9mr2551087lbc.43.1421942983500; Thu, 22 Jan 2015 08:09:43 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id c6si4026827lab.135.2015.01.22.08.09.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 08:09:43 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id p9so2393666lbv.4 for ; Thu, 22 Jan 2015 08:09:43 -0800 (PST) X-Received: by 10.112.41.234 with SMTP id i10mr2581058lbl.25.1421942983416; Thu, 22 Jan 2015 08:09:43 -0800 (PST) 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.9.200 with SMTP id c8csp311765lbb; Thu, 22 Jan 2015 08:09:42 -0800 (PST) X-Received: by 10.140.91.74 with SMTP id y68mr3708404qgd.90.1421942981783; Thu, 22 Jan 2015 08:09:41 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 1si9391344qam.65.2015.01.22.08.09.40 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:09:41 -0800 (PST) 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-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKKA-0008SZ-FG; Thu, 22 Jan 2015 16:09:38 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKK2-0008Rr-8g for lng-odp@lists.linaro.org; Thu, 22 Jan 2015 16:09:30 +0000 Received: by mail-la0-f46.google.com with SMTP id s18so2493235lam.5 for ; Thu, 22 Jan 2015 08:09:24 -0800 (PST) X-Received: by 10.112.43.66 with SMTP id u2mr2562186lbl.35.1421942964306; Thu, 22 Jan 2015 08:09:24 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id v4sm6429275lav.25.2015.01.22.08.09.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:09:22 -0800 (PST) From: Ciprian Barbu To: zoltan.kiss@linaro.org, lng-odp@lists.linaro.org Date: Thu, 22 Jan 2015 18:09:05 +0200 Message-Id: <1421942949-12189-2-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1421942949-12189-1-git-send-email-ciprian.barbu@linaro.org> References: <1421942949-12189-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH odp-ovs 1/3] ofpbuf: init the buffer source before any other operations 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: , MIME-Version: 1.0 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: ciprian.barbu@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.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 Signed-off-by: Ciprian Barbu --- The source was not initialized before calling ofpbuf_init__, which is needed by the ODP netdev implementation. lib/ofpbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index 764a799..6f27b47 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -38,11 +38,11 @@ static void ofpbuf_use__(struct ofpbuf *b, void *base, size_t allocated, enum ofpbuf_source source) { + ofpbuf_init__(b, allocated, source); + ofpbuf_set_base(b, base); ofpbuf_set_data(b, base); ofpbuf_set_size(b, 0); - - ofpbuf_init__(b, allocated, source); } /* Initializes 'b' as an empty ofpbuf that contains the 'allocated' bytes of