From patchwork Thu Mar 19 19:13:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46075 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AC71C2153C for ; Thu, 19 Mar 2015 19:14:22 +0000 (UTC) Received: by labgq15 with SMTP id gq15sf14187185lab.0 for ; Thu, 19 Mar 2015 12:14:21 -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=PPV4Tsf2rG43XwkibfYPZ+4xzRDUNGMn85QWbQpScLk2M6LHsark28A0WVKoKd8d6K SGQtbqzyVKTZj5anOZMo2r1yaVjABSAys/fGFCrGEkP3tV9B2AUKqlxeT1RYqV7wI8XA HRrM+zvCZB4LP5opDnurZBtkjNcsXT+asOHWoTRm0pRWbe2N1bRBvld7DMW8NaEdM4BL XYcnq0vsy4EcRHIAS3xjU3F0kePkrUEG/RcukovwxiZRUqIL/HRxKY5hpoSn/XjKEzHN dTEm/khuUYTI5YsWgimk04MxN01+8B9zh2Ppdm4cYnWToanmKVY8zu5Y92uv/FhBqv0o 6lbQ== X-Gm-Message-State: ALoCoQlg4YOey6x7Z0pkxGXnWZg9H3W7OwrL7uUcUAPuBDkJGXOUZVuLBGKzlU//GucNiOuomC9S X-Received: by 10.112.224.12 with SMTP id qy12mr12157044lbc.10.1426792461606; Thu, 19 Mar 2015 12:14:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.5 with SMTP id e5ls304587lab.37.gmail; Thu, 19 Mar 2015 12:14:21 -0700 (PDT) X-Received: by 10.112.89.71 with SMTP id bm7mr42566422lbb.20.1426792461332; Thu, 19 Mar 2015 12:14:21 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id r3si1664279lbs.22.2015.03.19.12.14.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:14:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbnq5 with SMTP id q5so32003854lbn.0 for ; Thu, 19 Mar 2015 12:14:21 -0700 (PDT) X-Received: by 10.152.5.194 with SMTP id u2mr70283329lau.88.1426792461125; Thu, 19 Mar 2015 12:14:21 -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 h5csp588934lbj; Thu, 19 Mar 2015 12:14:20 -0700 (PDT) X-Received: by 10.140.37.7 with SMTP id q7mr94497518qgq.29.1426792459901; Thu, 19 Mar 2015 12:14:19 -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 140si2144604qhh.61.2015.03.19.12.14.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:14:19 -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 1YYftZ-0001BV-5J; Thu, 19 Mar 2015 19:14:17 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYftP-0001AM-I8 for lng-odp@lists.linaro.org; Thu, 19 Mar 2015 19:14:07 +0000 Received: by wibg7 with SMTP id g7so14844379wib.1 for ; Thu, 19 Mar 2015 12:14:02 -0700 (PDT) X-Received: by 10.180.23.193 with SMTP id o1mr19020605wif.14.1426792442148; Thu, 19 Mar 2015 12:14:02 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id s19sm8680658wik.18.2015.03.19.12.14.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:14:01 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 19 Mar 2015 19:13:41 +0000 Message-Id: <1426792426-12507-2-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 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.174 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\