All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jakub Kicinski <jakub.kicinski@netronome.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, dsa@cumulusnetworks.com,
	daniel@iogearbox.net, 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 10:13:34 +0200	[thread overview]
Message-ID: <1493108014.2592.1.camel@sipsolutions.net> (raw)
In-Reply-To: <20170425080644.122536-2-jakub.kicinski@netronome.com> (sfid-20170425_100815_174836_54D64311)

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 ...

johannes

  reply	other threads:[~2017-04-25  8:13 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 [this message]
2017-04-25 20:53     ` Jakub Kicinski
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=1493108014.2592.1.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bblanco@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=john.fastabend@gmail.com \
    --cc=kubakici@wp.pl \
    --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.