netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dave Jones <davej@redhat.com>
Cc: venkat.x.venkatsubra@oracle.com, netdev@vger.kernel.org
Subject: Re: Improve rds_sendmsg printk
Date: Mon, 19 Mar 2012 16:08:25 -0700	[thread overview]
Message-ID: <1332198505.7847.5.camel@joe2Laptop> (raw)
In-Reply-To: <20120319224008.GA23036@redhat.com>

On Mon, 2012-03-19 at 18:40 -0400, Dave Jones wrote:
> - Given this can be called by any user, prevent them from flooding
>   the logs by using printk_ratelimited
> - Also add a rds: prefix, so it's clear where the message is coming from.
> 
> Signed-off-by: Dave Jones <davej@redhat.com>
> 
> --- linux/net/rds/send.c	2011-11-07 12:00:32.000000000 -0500
> +++ linux/net/rds/send.c	2012-03-19 18:36:21.804991923 -0400
> @@ -935,7 +935,7 @@ int rds_sendmsg(struct kiocb *iocb, stru
>  	/* Mirror Linux UDP mirror of BSD error message compatibility */
>  	/* XXX: Perhaps MSG_MORE someday */
>  	if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_CMSG_COMPAT)) {
> -		printk(KERN_INFO "msg_flags 0x%08X\n", msg->msg_flags);
> +		printk_ratelimited(KERN_INFO "rds: msg_flags 0x%08X\n", msg->msg_flags);

It might be better to use net_ratelimit
for all the rds printk_ratelimited calls.

That's a bit more standardized across net/

      parent reply	other threads:[~2012-03-19 23:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 22:40 Improve rds_sendmsg printk Dave Jones
2012-03-19 22:43 ` David Miller
2012-03-19 23:01   ` Remove printk from rds_sendmsg Dave Jones
2012-03-20 20:12     ` David Miller
2012-03-20 14:50   ` Improve rds_sendmsg printk Venkat Venkatsubra
2012-03-19 23:08 ` Joe Perches [this message]

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=1332198505.7847.5.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=davej@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=venkat.x.venkatsubra@oracle.com \
    /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;
as well as URLs for NNTP newsgroup(s).