From: Joe Perches <joe@perches.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: sctp: rework debugging framework to use pr_debug and friends
Date: Thu, 27 Jun 2013 07:49:55 -0700 [thread overview]
Message-ID: <1372344595.2060.15.camel@joe-AO722> (raw)
In-Reply-To: <1372326225-19203-3-git-send-email-dborkman@redhat.com>
On Thu, 2013-06-27 at 11:43 +0200, Daniel Borkmann wrote:
> - Changed %pIg into %pIS, thanks Joe Perches
Hi Daniel.
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
[]
> + pr_debug("%s: association:%p addr:%pIS port:%d\n",
> + __func__, asoc, &peer->ipaddr.sa,
> + ntohs(peer->ipaddr.v4.sin_port));
This is why I think %pIS should have an option
to print port/flow, etc.
In this case it's using v4 and you are mixing
unknown and known forms. It looks untidy.
You should probably use peer->sa.sin_port instead.
> @@ -636,12 +638,8 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
> /* AF_INET and AF_INET6 share common port field. */
> port = ntohs(addr->v4.sin_port);
>
> - SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_add_peer:association %p addr: ",
> - " port: %d state:%d\n",
> - asoc,
> - addr,
> - port,
> - peer_state);
> + pr_debug("%s: association:%p addr:%pIS port:%d state:%d\n", __func__,
> + asoc, &addr->sa,port , peer_state);
here too, but port may be unused when !CONFIG_DEBUG
I didn't look at the rest of the patch.
next prev parent reply other threads:[~2013-06-27 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 9:43 [PATCH net-next v2 0/2] Rework SCTP debugging framework Daniel Borkmann
2013-06-27 9:43 ` [PATCH net-next v2 1/2] lib: vsprintf: add IPv4/v6 generic %piS/%pIS format specifier Daniel Borkmann
2013-06-27 9:43 ` [PATCH net-next v2 2/2] net: sctp: rework debugging framework to use pr_debug and friends Daniel Borkmann
2013-06-27 14:49 ` Joe Perches [this message]
2013-06-27 15:14 ` Daniel Borkmann
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=1372344595.2060.15.camel@joe-AO722 \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.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