From patchwork Thu Mar 19 19:13:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46079 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EDE882153C for ; Thu, 19 Mar 2015 19:14:39 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf14205142lbv.0 for ; Thu, 19 Mar 2015 12:14:38 -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: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=dNefQSQp9AOSDePoXrmhtFQxTJ7E1ujfKx+ZVHD6VZg=; b=UoFrdcGuOTbHF7BAgptqpYMjcBJFBZpCCHnS2BATOFVGz763SpBQzaS/RcQrOS998z k092DRO5FWcBgmIDs5IIYtKhE+54unITWHwb7HzGlmvLlsNQ/9XwP4/Dfn9+5w4tk4Hz aSaChKE8elAtbOogID3HXWXKGYVzjGTjAJ1hgtpSiX5d7QEENiaiXwKKvTv5xKc2KUSW kFj0bJ9f7ssT1wy6WAsfR7hRdjeoShlNUSW4I+6lc9ObFUXT5C/266TNS+sH/ixPMMCn qX2672P3+T1b1D7rriO/dDWpsfbogSaPchUZsevAxcPkM+X5aotaNIAnG9VdtlA32ule yTog== X-Gm-Message-State: ALoCoQmVx32mb+6vX6dufOX8XoJrjd/eMmWTRfOQolEmH34NcTHw0F2JTcg78FTW3RaoA7o3zn7P X-Received: by 10.112.198.34 with SMTP id iz2mr12373927lbc.22.1426792478919; Thu, 19 Mar 2015 12:14:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.243.37 with SMTP id wv5ls348361lac.60.gmail; Thu, 19 Mar 2015 12:14:38 -0700 (PDT) X-Received: by 10.152.29.68 with SMTP id i4mr20506131lah.19.1426792478647; Thu, 19 Mar 2015 12:14:38 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id f1si1594269lah.139.2015.03.19.12.14.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lagg8 with SMTP id g8so70293383lag.1 for ; Thu, 19 Mar 2015 12:14:38 -0700 (PDT) X-Received: by 10.112.212.106 with SMTP id nj10mr51180060lbc.36.1426792478443; Thu, 19 Mar 2015 12:14:38 -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.35.133 with SMTP id h5csp589116lbj; Thu, 19 Mar 2015 12:14:37 -0700 (PDT) X-Received: by 10.55.15.159 with SMTP id 31mr102761582qkp.29.1426792477332; Thu, 19 Mar 2015 12:14:37 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 128si2199099qhs.5.2015.03.19.12.14.36 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:14:37 -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-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYftq-0001DX-L9; Thu, 19 Mar 2015 19:14:34 +0000 Received: from mail-wg0-f50.google.com ([74.125.82.50]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYftU-0001AY-J7 for lng-odp@lists.linaro.org; Thu, 19 Mar 2015 19:14:12 +0000 Received: by wgra20 with SMTP id a20so70935366wgr.3 for ; Thu, 19 Mar 2015 12:14:07 -0700 (PDT) X-Received: by 10.194.93.2 with SMTP id cq2mr15626707wjb.69.1426792447168; Thu, 19 Mar 2015 12:14:07 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id s19sm8680658wik.18.2015.03.19.12.14.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:14:06 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 19 Mar 2015 19:13:45 +0000 Message-Id: <1426792426-12507-6-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426792426-12507-1-git-send-email-zoltan.kiss@linaro.org> References: <1426792426-12507-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 5/6] netdev-odp: add error checking to clone_pkts 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: 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.52 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 For odp_packet_push_tail Signed-off-by: Zoltan Kiss --- lib/netdev-odp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c index 4b13bfe..87f6ec4 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -329,7 +329,8 @@ clone_pkts(struct netdev_odp *dev, struct dpif_packet **pkts, odp_packet_l2_offset_set(pkt, 0); - odp_packet_push_tail(pkt, size); + if (!odp_packet_push_tail(pkt, size)) + VLOG_WARN_RL(&rl, "Can't push tail with %lu", size); odp_packet_copydata_in(pkt, 0, size, ofpbuf_data(&pkts[i]->ofpbuf)); odp_pkts[newcnt] = pkt; newcnt++;