From patchwork Tue Nov 25 16:00:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 41476 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 12B1125E18 for ; Tue, 25 Nov 2014 16:01:06 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf586862wgh.10 for ; Tue, 25 Nov 2014 08:01:05 -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:cc: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=dtLEBvEe9qwmOnBPrMI8IurngKVnsBPkXzQbPNky+BU=; b=egdQ6Ad2j0zEYPv/IMfbiYIuZKMleN9sCg2mXjVSXaDHPaoTpo6et0426IGcp0WV9H 1oc+8r8+4KW3EDySAP5fwuOCvu33aKeI8hfHtkNXQZuqBP2nrmctIO/vZv4o2ohRjxgj 97R7aDM66WBuFTaXeqhonEnNxpy/OUeFYeyJhSDsnHG+zDYr50KQSCRAIPiqTeW2DY9s G37JM/6HeoRVMIT/NiGXmv1jiLn0c2EU63flPcJI21MWEAxtW7a5nu99SrCcxjrTlcsv LTbebXN92WR/g+EI2eHtLRonB7rpBvx4pUcgU2A8toT+cCYKxsj2Cl4jTHvnMtKIfNZr 5cew== X-Gm-Message-State: ALoCoQkr7RusT/okGVDbxJd6Vvc6MlEvwlOr+tX9AoczXv24h/Q/eh56bmSEBmd+GrETFGCaZ8bV X-Received: by 10.112.130.8 with SMTP id oa8mr878843lbb.11.1416931265249; Tue, 25 Nov 2014 08:01:05 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.7 with SMTP id 7ls529771laq.88.gmail; Tue, 25 Nov 2014 08:01:05 -0800 (PST) X-Received: by 10.112.172.97 with SMTP id bb1mr27870835lbc.38.1416931265102; Tue, 25 Nov 2014 08:01:05 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id q15si1759554lal.79.2014.11.25.08.01.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 08:01:05 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id ge10so818986lab.17 for ; Tue, 25 Nov 2014 08:01:05 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr28114135lbc.34.1416931264913; Tue, 25 Nov 2014 08:01:04 -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.184.201 with SMTP id ew9csp460161lbc; Tue, 25 Nov 2014 08:01:04 -0800 (PST) X-Received: by 10.224.131.200 with SMTP id y8mr26839489qas.41.1416931263560; Tue, 25 Nov 2014 08:01:03 -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 d5si1728770qag.48.2014.11.25.08.01.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Nov 2014 08:01:03 -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 1XtIY1-0002g0-6Z; Tue, 25 Nov 2014 16:01:01 +0000 Received: from mail-wi0-f177.google.com ([209.85.212.177]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XtIXu-0002fs-L9 for lng-odp@lists.linaro.org; Tue, 25 Nov 2014 16:00:54 +0000 Received: by mail-wi0-f177.google.com with SMTP id l15so1945214wiw.10 for ; Tue, 25 Nov 2014 08:00:49 -0800 (PST) X-Received: by 10.180.92.129 with SMTP id cm1mr10083570wib.33.1416931247714; Tue, 25 Nov 2014 08:00:47 -0800 (PST) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id mc10sm16997102wic.24.2014.11.25.08.00.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Nov 2014 08:00:47 -0800 (PST) From: Zoltan Kiss To: ciprian.barbu@linaro.org Date: Tue, 25 Nov 2014 16:00:23 +0000 Message-Id: <1416931223-16807-1-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH] netdev-odp: Use VLOG_ERR instead of ODP_ERR 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.44 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 OVS usually ditches stderr and stdout after startup, so logging there won't be effective. Use instead the proper OVS logging facilities. Signed-off-by: Zoltan Kiss --- lib/netdev-odp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c index 59de46d..96126a1 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -111,13 +111,13 @@ odp_init(int argc, char *argv[]) result = odp_init_global(NULL, NULL); if (result) { - ODP_ERR("Error: ODP global init failed\n"); + VLOG_ERR("Error: ODP global init failed\n"); return result; } /* Init this thread */ if (odp_init_local()) { - ODP_ERR("Error: ODP local init failed.\n"); + VLOG_ERR("Error: ODP local init failed.\n"); exit(EXIT_FAILURE); } @@ -139,7 +139,7 @@ odp_class_init(void) pool_base = odp_shm_addr(shm); if (odp_unlikely(pool_base == NULL)) { - ODP_ERR("Error: ODP packet pool mem alloc failed\n"); + VLOG_ERR("Error: ODP packet pool mem alloc failed\n"); out_of_memory(); return -1; } @@ -151,7 +151,7 @@ odp_class_init(void) ODP_BUFFER_TYPE_PACKET); if (pool == ODP_BUFFER_POOL_INVALID) { - ODP_ERR("Error: packet pool create failed.\n"); + VLOG_ERR("Error: packet pool create failed.\n"); return -1; } odp_buffer_pool_print(pool); @@ -162,7 +162,7 @@ odp_class_init(void) pool_base = odp_shm_addr(shm); if (odp_unlikely(pool_base == NULL)) { - ODP_ERR("Error: ODP packet pool mem alloc failed\n"); + VLOG_ERR("Error: ODP packet pool mem alloc failed\n"); out_of_memory(); return -1; } @@ -174,7 +174,7 @@ odp_class_init(void) ODP_BUFFER_TYPE_RAW); if (ofpbuf_pool == ODP_BUFFER_POOL_INVALID) { - ODP_ERR("Error: ofpbuf pool create failed.\n"); + VLOG_ERR("Error: ofpbuf pool create failed.\n"); return -1; } odp_buffer_pool_print(ofpbuf_pool); @@ -185,7 +185,7 @@ odp_class_init(void) pool_base = odp_shm_addr(shm); if (odp_unlikely(pool_base == NULL)) { - ODP_ERR("Error: ODP packet pool mem alloc failed\n"); + VLOG_ERR("Error: ODP packet pool mem alloc failed\n"); out_of_memory(); return -1; } @@ -197,7 +197,7 @@ odp_class_init(void) ODP_BUFFER_TYPE_RAW); if (struct_pool == ODP_BUFFER_POOL_INVALID) { - ODP_ERR("Error: packet pool create failed.\n"); + VLOG_ERR("Error: packet pool create failed.\n"); return -1; } odp_buffer_pool_print(struct_pool); @@ -241,7 +241,7 @@ netdev_odp_construct(struct netdev *netdev_) netdev->pktio = odp_pktio_open(odp_if, pool); if (netdev->pktio == ODP_PKTIO_INVALID) { - ODP_ERR("Error: odp pktio failed\n"); + VLOG_ERR("Error: odp pktio failed\n"); err = ENODEV; goto out_err; } @@ -633,7 +633,7 @@ netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets, if (pkts > 0) { pkts_ok = drop_err_pkts(pkt_tbl, pkts); if (odp_unlikely(pkts_ok != pkts)) - ODP_ERR("Dropped frames:%u - err_cnt:%lu\n", + VLOG_ERR("Dropped frames:%u - err_cnt:%lu\n", pkts-pkts_ok, ++err_cnt); if (!pkts_ok) { ret = EAGAIN;