All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kubakici@wp.pl>
To: Johannes Berg <johannes@sipsolutions.net>, daniel@iogearbox.net
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	dsa@cumulusnetworks.com, alexei.starovoitov@gmail.com,
	bblanco@gmail.com, john.fastabend@gmail.com, kubakici@wp.pl,
	oss-drivers@netronome.com
Subject: Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly
Date: Tue, 25 Apr 2017 13:53:06 -0700	[thread overview]
Message-ID: <20170425135306.0ff1db27@cakuba.netronome.com> (raw)
In-Reply-To: <1493108014.2592.1.camel@sipsolutions.net>

On Tue, 25 Apr 2017 10:13:34 +0200, Johannes Berg wrote:
> On Tue, 2017-04-25 at 01:06 -0700, Jakub Kicinski wrote:
> 
> > +#define NL_SET_ERR_MSG(extack, msg) do {		\
> > +	struct netlink_ext_ack *_extack = (extack);	\
> > +	static const char _msg[] = (msg);		\
> > +							\
> > +	if (_extack)					\
> > +		_extack->_msg = _msg;			\
> > +	else						\
> > +		pr_info("%s\n", _msg);			\
> >  } while (0)  
> 
> That's a good point, I used it only for genetlink so far where it was
> guaranteed non-NULL.
> 
> I'm not really sure about the printing though - I'd rather not people
> start relying on that and then we convert to have non-NULL and the
> message disappears as a result ...

Yes, agreed.  I don't really know what to do about that one though :|
One could argue people may already be depending on the messages which
I'm converting in this series...  On the other hand, that would
be considering logs as part of the ABI which we don't want to do.

I'm leaning towards dropping the else clause and never printing, that
will add an incentive for people to convert more paths to provide the
ext ack.  Any thoughts on that?

  reply	other threads:[~2017-04-25 20:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  8:06 [RFC 0/4] xdp: use netlink extended ACK reporting Jakub Kicinski
2017-04-25  8:06 ` [RFC 1/4] netlink: make extended ACK setting NULL-friendly Jakub Kicinski
2017-04-25  8:13   ` Johannes Berg
2017-04-25 20:53     ` Jakub Kicinski [this message]
2017-04-26  7:17       ` Johannes Berg
2017-04-25  9:12   ` Daniel Borkmann
2017-04-25  8:06 ` [RFC 2/4] xdp: propagate extended ack to XDP setup Jakub Kicinski
2017-04-25  8:06 ` [RFC 3/4] nfp: make use of extended ack message reporting Jakub Kicinski
2017-04-25 12:42   ` Jamal Hadi Salim
2017-04-25 14:20     ` David Miller
2017-04-26 11:13       ` [oss-drivers] " Simon Horman
2017-04-26 13:03         ` Jamal Hadi Salim
2017-04-26 13:31           ` Daniel Borkmann
2017-04-26 14:44         ` David Miller
2017-04-26 18:44           ` Simon Horman
2017-04-25  8:06 ` [RFC 4/4] virtio_net: " Jakub Kicinski
2017-04-25  9:05 ` [RFC 0/4] xdp: use netlink extended ACK reporting Daniel Borkmann
2017-04-25 16:54   ` Jesper Dangaard Brouer
2017-04-25 21:00   ` Jakub Kicinski
2017-04-25 14:53 ` David Ahern
2017-04-25 21:05   ` Jakub Kicinski

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=20170425135306.0ff1db27@cakuba.netronome.com \
    --to=kubakici@wp.pl \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bblanco@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=johannes@sipsolutions.net \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.