From patchwork Thu Mar 26 19:23:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46384 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 E7F1A21585 for ; Thu, 26 Mar 2015 19:24:37 +0000 (UTC) Received: by lbcgn8 with SMTP id gn8sf5095569lbc.1 for ; Thu, 26 Mar 2015 12:24:36 -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=B3sfztMn5jgOL3Z8S4inQgAsRtQhLArl0eT86ZFXkn4=; b=LqV99Z/eJ9vos6Sfi8moVYqzYpum1hswrlcquS9WAGZjbgNNJCOwAPmf+mZDSrcKch teRqTyCvo8JUEH56IHgDJqtJ/BCdMaj9nuo22TXQdE/PeUp6tyRLplMexF5Ut8Q8pR9j QqKHtmBm/fY0lKKUcq2oyTiV8dpe7M0lBG013tHyMKeYpa4ugkeTyyZBI0STbb7r9iim 2yuX3F+lZY0RPaVvjDayQ+vvkyTouoAEWooyM0OSCYIksH93qPORi0xOQ5tMhHnK24/V 0kGZQpssFqO6Da9soRofHHnu5e70AqlSOz7C3GS/lpO3lZ5u++11RoEjZEdfLQMpV2bI akVw== X-Gm-Message-State: ALoCoQkWbWlYVyl/o3kbW7nMoDarwjGa1NY/NY/CSnmZBchbVIhEa6nBvxlwZxloMjlIPhMr083e X-Received: by 10.152.87.110 with SMTP id w14mr2111231laz.3.1427397876917; Thu, 26 Mar 2015 12:24:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.132 with SMTP id wq4ls291077lac.30.gmail; Thu, 26 Mar 2015 12:24:36 -0700 (PDT) X-Received: by 10.152.20.37 with SMTP id k5mr328961lae.102.1427397876770; Thu, 26 Mar 2015 12:24:36 -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 jr9si5334339lbc.39.2015.03.26.12.24.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 12:24:36 -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 lbbsy1 with SMTP id sy1so48547090lbb.1 for ; Thu, 26 Mar 2015 12:24:36 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr14418592lbc.117.1427397876676; Thu, 26 Mar 2015 12:24:36 -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.57.201 with SMTP id k9csp813672lbq; Thu, 26 Mar 2015 12:24:36 -0700 (PDT) X-Received: by 10.140.150.149 with SMTP id 143mr21220691qhw.4.1427397875243; Thu, 26 Mar 2015 12:24:35 -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 o1si5864101qko.117.2015.03.26.12.24.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Mar 2015 12:24:35 -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 1YbDOK-0000DY-9A; Thu, 26 Mar 2015 19:24:32 +0000 Received: from mail-wg0-f53.google.com ([74.125.82.53]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YbDNb-00006c-S4 for lng-odp@lists.linaro.org; Thu, 26 Mar 2015 19:23:47 +0000 Received: by wgdm6 with SMTP id m6so75791336wgd.2 for ; Thu, 26 Mar 2015 12:23:42 -0700 (PDT) X-Received: by 10.194.94.164 with SMTP id dd4mr31883194wjb.56.1427397822468; Thu, 26 Mar 2015 12:23:42 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id g5sm9673433wjr.19.2015.03.26.12.23.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 12:23:41 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 26 Mar 2015 19:23:24 +0000 Message-Id: <1427397805-27395-6-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427397805-27395-1-git-send-email-zoltan.kiss@linaro.org> References: <1427397805-27395-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 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.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 For odp_packet_push_tail Signed-off-by: Zoltan Kiss --- v2: add OVS_UNLIKELY 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 b77eea0..fa325faa 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -326,7 +326,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 (OVS_UNLIKELY(!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++;