From patchwork Thu Mar 19 19:13:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46080 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 868822153C for ; Thu, 19 Mar 2015 19:14:44 +0000 (UTC) Received: by wesq59 with SMTP id q59sf14087475wes.1 for ; Thu, 19 Mar 2015 12:14:43 -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=m8j6MH47IN/4Vp3/23M9szFCZrlTi6pr3IWsTmjEtUs=; b=Q7yLblPtO+IVg7UayaM8Lia/ACtnP36kwD5j+R2GbYksh0spX+a9PsTRhnw5yoz9gk RnFmY70xwlWRq2qf04SIolvM2CpugENg1C2ve8x/8aPZNoH4yR0jnew7IguNuowsYDKa Aw3G33yuvyzojq4JpD1LCvjNPOJoftn+mzPUQybTZgsZOF3B4dQUcUC42wg6NuT5YlI3 sxA7odub9BYOz3SyQAK9XH3vvETuNATZnCNK5wshsVL8sblD6YRKxzTkIl9jdmEbeYM7 DcHBu5F5kp/Icvfr1CF+3Q/54LnY88VPybv2H0Ebt2hRVy3YtioE69BjyC5dgfgmMaJE QmWQ== X-Gm-Message-State: ALoCoQkkCqRbOOjvd6NFUmN/c69E8tYaG74ObqUP1lpfyeuJPBxJbO+ds+IqcRNZWL1jAjZ/CapV X-Received: by 10.180.182.201 with SMTP id eg9mr2052004wic.3.1426792483889; Thu, 19 Mar 2015 12:14:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.132 with SMTP id i4ls316783lab.25.gmail; Thu, 19 Mar 2015 12:14:43 -0700 (PDT) X-Received: by 10.112.46.201 with SMTP id x9mr70547936lbm.65.1426792483711; Thu, 19 Mar 2015 12:14:43 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id pw4si1626156lbb.87.2015.03.19.12.14.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by ladw1 with SMTP id w1so70224937lad.0 for ; Thu, 19 Mar 2015 12:14:43 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr68394071lbb.76.1426792483623; Thu, 19 Mar 2015 12:14:43 -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 h5csp589165lbj; Thu, 19 Mar 2015 12:14:43 -0700 (PDT) X-Received: by 10.55.42.39 with SMTP id q39mr136697168qkh.99.1426792482436; Thu, 19 Mar 2015 12:14:42 -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 md3si2206310qcb.7.2015.03.19.12.14.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:14:42 -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 1YYftv-0001EG-3Y; Thu, 19 Mar 2015 19:14:39 +0000 Received: from mail-we0-f169.google.com ([74.125.82.169]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYftV-0001Ad-NO for lng-odp@lists.linaro.org; Thu, 19 Mar 2015 19:14:13 +0000 Received: by wegp1 with SMTP id p1so65274483weg.1 for ; Thu, 19 Mar 2015 12:14:08 -0700 (PDT) X-Received: by 10.180.208.33 with SMTP id mb1mr18846896wic.69.1426792448366; Thu, 19 Mar 2015 12:14:08 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id s19sm8680658wik.18.2015.03.19.12.14.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:14:07 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 19 Mar 2015 19:13:46 +0000 Message-Id: <1426792426-12507-7-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 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.41 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 87f6ec4..7176992 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -639,6 +639,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 */