Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	dev-yBygre7rU0SM8Zsap4Y0gw@public.gmane.org
Subject: [RFC PATCH] openvswitch: Use net_ratelimit in OVS_NLERR
Date: Sun, 02 Feb 2014 22:55:26 -0800	[thread overview]
Message-ID: <1391410526.2784.9.camel@joe-AO722> (raw)
In-Reply-To: <1391389686-34303-6-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

Perhaps it'd make sense to use net_ratelimit()
instead of printk_once for OVS_NLERR
---
 net/openvswitch/datapath.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 6be9fbb..0f5e77c 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -194,7 +194,9 @@ struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq,
 int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb);
 void ovs_dp_notify_wq(struct work_struct *work);
 
-#define OVS_NLERR(fmt, ...) \
-	pr_info_once("netlink: " fmt, ##__VA_ARGS__)
-
+#define OVS_NLERR(fmt, ...)					\
+do {								\
+	if (net_ratelimit())					\
+		pr_info("netlink: " fmt, ##__VA_ARGS__);	\
+} while (0)
 #endif /* datapath.h */

  parent reply	other threads:[~2014-02-03  6:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03  1:08 [GIT net] Open vSwitch Jesse Gross
     [not found] ` <1391389686-34303-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03  1:08   ` [PATCH net 1/5] openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed Jesse Gross
     [not found]     ` <1391389686-34303-2-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03 16:43       ` Sergei Shtylyov
     [not found]         ` <52EFC74E.8040906-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-02-05  6:02           ` Jesse Gross
2014-02-03  1:08   ` [PATCH net 2/5] openvswitch: Fix kernel panic on ovs_flow_free Jesse Gross
2014-02-03  1:08   ` [PATCH net 3/5] openvswitch: Fix ovs_dp_cmd_msg_size() Jesse Gross
2014-02-03  1:08   ` [PATCH net 4/5] openvswitch: Fix ovs_flow_free() ovs-lock assert Jesse Gross
     [not found]     ` <1391389686-34303-5-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03 16:42       ` Sergei Shtylyov
2014-02-03  1:08   ` [PATCH net 5/5] openvswitch: Suppress error messages on megaflow updates Jesse Gross
     [not found]     ` <1391389686-34303-6-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03  6:55       ` Joe Perches [this message]
2014-02-03 21:46         ` [RFC PATCH] openvswitch: Use net_ratelimit in OVS_NLERR Jesse Gross
     [not found]           ` <CAEP_g=_vvSPLt76VUE66XHJtgCW_05acn-r77PfkJFWBkT0S2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-03 22:08             ` Joe Perches
2014-02-03 23:41               ` Jesse Gross
     [not found]                 ` <CAEP_g=83oVtSTMmLB7O8g=a3e5ghjHp7Bgs-f4nvgqCvWqE5VQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-04  1:06                   ` [PATCH] " Joe Perches
2014-02-04  1:18                     ` [PATCH] openvswitch: flow_netlink: Use pr_fmt to OVS_NLERR output Joe Perches
2014-02-04  1:29                       ` Jesse Gross
2014-02-04  1:29                     ` [PATCH] openvswitch: Use net_ratelimit in OVS_NLERR Jesse Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391410526.2784.9.camel@joe-AO722 \
    --to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dev-yBygre7rU0SM8Zsap4Y0gw@public.gmane.org \
    --cc=jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox