From patchwork Thu Mar 26 19:23:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46385 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3260021585 for ; Thu, 26 Mar 2015 19:24:43 +0000 (UTC) Received: by wibfv9 with SMTP id fv9sf263975wib.1 for ; Thu, 26 Mar 2015 12:24:42 -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=EjZMASrKgmQmS7fZCpoaJId8p6bFdP6MGpI/4Z/lKTM=; b=ZkGPiQWNN48oV0r3z9irE9Ht5XEnhjzgB7CiRO4M+X9CdhUX3qMj9974lyQO88svzv PQIw1pV6HnUDZAurUiW83h8v+30d7ljIG6wfY4HlueQvH9fmXAQBmQB4BOb1009/+5ck 0VoXlKBH/aYj2HF8a9WAtKC+bxjJiU9LhTp7WHRZFm7stC0vA60oUiAU8Tz9tNOLHa5v wIzWCEd2Z3lvjZkUS9KYRjKqnjNxIa17c0xUw/I7UKBPczxPbaCKTkFPb+HlV+4N6yKS /647x7QHUZjdLbLPIRTxI3StZGTUmd2/XncQTJSmVsU811Xe6gzzTNVsq80lUq3SrBPi Iu0Q== X-Gm-Message-State: ALoCoQn5SoD38h17SYSjIw0yRGAVlsQiX2C4hrIilvk0fEFiCwoJuzerTY+1jotb2/Yivb3XdJk8 X-Received: by 10.194.201.10 with SMTP id jw10mr3757771wjc.3.1427397882531; Thu, 26 Mar 2015 12:24:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.134 with SMTP id ky6ls261685lac.76.gmail; Thu, 26 Mar 2015 12:24:42 -0700 (PDT) X-Received: by 10.112.236.68 with SMTP id us4mr14339148lbc.91.1427397882365; Thu, 26 Mar 2015 12:24:42 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id jr14si5300344lab.166.2015.03.26.12.24.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 12:24:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labe2 with SMTP id e2so53752726lab.3 for ; Thu, 26 Mar 2015 12:24:42 -0700 (PDT) X-Received: by 10.152.22.67 with SMTP id b3mr14412103laf.117.1427397882245; Thu, 26 Mar 2015 12:24:42 -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 k9csp813714lbq; Thu, 26 Mar 2015 12:24:41 -0700 (PDT) X-Received: by 10.140.33.164 with SMTP id j33mr19862165qgj.10.1427397880505; Thu, 26 Mar 2015 12:24:40 -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 u77si5917002qgd.7.2015.03.26.12.24.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Mar 2015 12:24:40 -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 1YbDOO-0000E4-UV; Thu, 26 Mar 2015 19:24:36 +0000 Received: from mail-wi0-f180.google.com ([209.85.212.180]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YbDNd-00006h-2c for lng-odp@lists.linaro.org; Thu, 26 Mar 2015 19:23:49 +0000 Received: by wibgn9 with SMTP id gn9so1710924wib.1 for ; Thu, 26 Mar 2015 12:23:43 -0700 (PDT) X-Received: by 10.180.214.99 with SMTP id nz3mr24132059wic.82.1427397823652; Thu, 26 Mar 2015 12:23:43 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id g5sm9673433wjr.19.2015.03.26.12.23.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 12:23:42 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 26 Mar 2015 19:23:25 +0000 Message-Id: <1427397805-27395-7-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 6/6] netdev-odp: implemenet odp_override_log 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.43 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 ODP logs now end up in OVS logs. Signed-off-by: Zoltan Kiss --- lib/netdev-odp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c index fa325faa..765edee 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -635,6 +635,24 @@ out_stats: return ret; } +int odp_override_log(odp_log_level_e level, const char *fmt, ...) +{ + va_list args; + enum vlog_level ovs_level; + if (level == ODP_LOG_DBG) + ovs_level = VLL_DBG; + else if (level == ODP_LOG_PRINT) + ovs_level = VLL_INFO; + else + ovs_level = VLL_ERR; + + va_start(args, fmt); + vlog_rate_limit_valist(THIS_MODULE, ovs_level, &rl, fmt, args); + va_end(args); + + return 0; +} + static struct netdev_class netdev_odp_class = { "odp", odp_class_init, /* init */