From patchwork Thu Mar 26 19:23:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46380 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 35EF621585 for ; Thu, 26 Mar 2015 19:24:21 +0000 (UTC) Received: by wibgr10 with SMTP id gr10sf250305wib.2 for ; Thu, 26 Mar 2015 12:24:20 -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=5Wfi0niE8yCfaCCjfouJco6+WgvTw4yHzZxGLV3CQ0o=; b=SXfEnYzL5snFYfSERe+jSYQ0OGUuDmNKS195xk9zaZtBHfwzDHp5IQOrOD7QZzxgPS ppegFAXVpDn3BCA1TDLaaoIrgoEzPnACMaqDmCBcs3VofE7i9Z0PNa52781fAFyHt0qW I/nV1Ic+GK0k0JDSKnvTsd+PzU38JHe3lZxJEwW/5p0AO6//dJ4uPuvyCvmBoknfybp5 C+/4gqNzqyej1yrQ2s3H8tuKyWjy5Xfi+5jwhktKMEqpRVrW117JRg5FTKhDvQrEV09q toLL33v/S/XxJKEbop9F5mmz5Yt2h/loP4qeF1CCckdgXyI4BeuMweBX8DvlJ5WOPunc RJhQ== X-Gm-Message-State: ALoCoQlNv+T9Gdhygo+8mmy7vGO3QxNxRbxPSTnqJl8KHNQnHdAL3EgHdKYj/TCmj2iIIfLw2Apf X-Received: by 10.194.95.67 with SMTP id di3mr3767431wjb.0.1427397860549; Thu, 26 Mar 2015 12:24:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.134 with SMTP id ky6ls261619lac.76.gmail; Thu, 26 Mar 2015 12:24:20 -0700 (PDT) X-Received: by 10.152.10.66 with SMTP id g2mr14722606lab.44.1427397860388; Thu, 26 Mar 2015 12:24:20 -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 a15si5317678lbq.90.2015.03.26.12.24.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 12:24:20 -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 lbbug6 with SMTP id ug6so48550831lbb.3 for ; Thu, 26 Mar 2015 12:24:20 -0700 (PDT) X-Received: by 10.152.178.197 with SMTP id da5mr15114811lac.56.1427397860239; Thu, 26 Mar 2015 12:24:20 -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 k9csp813544lbq; Thu, 26 Mar 2015 12:24:19 -0700 (PDT) X-Received: by 10.140.91.71 with SMTP id y65mr19582985qgd.90.1427397858188; Thu, 26 Mar 2015 12:24:18 -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 d76si1768138qhc.96.2015.03.26.12.24.17 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Mar 2015 12:24:18 -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 1YbDO3-0000BV-0W; Thu, 26 Mar 2015 19:24:15 +0000 Received: from mail-wi0-f181.google.com ([209.85.212.181]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YbDNX-00006Y-N7 for lng-odp@lists.linaro.org; Thu, 26 Mar 2015 19:23:43 +0000 Received: by wiaa2 with SMTP id a2so1769195wia.0 for ; Thu, 26 Mar 2015 12:23:38 -0700 (PDT) X-Received: by 10.180.77.110 with SMTP id r14mr49407585wiw.89.1427397818224; Thu, 26 Mar 2015 12:23:38 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id g5sm9673433wjr.19.2015.03.26.12.23.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 12:23:37 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 26 Mar 2015 19:23:20 +0000 Message-Id: <1427397805-27395-2-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 1/6] vlog: add vlog_rate_limit_valist 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 We will need this for odp_override_log Signed-off-by: Zoltan Kiss --- include/openvswitch/vlog.h | 2 ++ lib/vlog.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h index 3f71e4b..71b3453 100644 --- a/include/openvswitch/vlog.h +++ b/include/openvswitch/vlog.h @@ -170,6 +170,8 @@ OVS_NO_RETURN void vlog_abort_valist(const struct vlog_module *, void vlog_rate_limit(const struct vlog_module *, enum vlog_level, struct vlog_rate_limit *, const char *, ...) OVS_PRINTF_FORMAT (4, 5); +void vlog_rate_limit_valist(const struct vlog_module *, enum vlog_level, + struct vlog_rate_limit *, const char *, va_list); /* Creates and initializes a global instance of a module named MODULE, and * defines a static variable named THIS_MODULE that points to it, for use with diff --git a/lib/vlog.c b/lib/vlog.c index dbf46c5..6548656 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -1069,6 +1069,14 @@ vlog_rate_limit(const struct vlog_module *module, enum vlog_level level, } void +vlog_rate_limit_valist(const struct vlog_module *module, enum vlog_level level, + struct vlog_rate_limit *rl, const char *message, va_list args) +{ + if (!vlog_should_drop(module, level, rl)) + vlog_valist(module, level, message, args); +} + +void vlog_usage(void) { printf("\n\