Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly

2017-04-26 Thread Johannes Berg
On Tue, 2017-04-25 at 13:53 -0700, Jakub Kicinski wrote: > 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); \ >

Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly

2017-04-25 Thread Jakub Kicinski
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); \ > > +

Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly

2017-04-25 Thread Daniel Borkmann
On 04/25/2017 10:06 AM, Jakub Kicinski wrote: As we propagate extended ack reporting throughout various paths in the kernel it may happen that the same function is called with the extended ack parameter passed as NULL. Make the NL_SET_ERR_MSG() macro simply print the message to the logs if that

Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly

2017-04-25 Thread Johannes Berg
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); \ > + \ > + i

[RFC 1/4] netlink: make extended ACK setting NULL-friendly

2017-04-25 Thread Jakub Kicinski
As we propagate extended ack reporting throughout various paths in the kernel it may happen that the same function is called with the extended ack parameter passed as NULL. Make the NL_SET_ERR_MSG() macro simply print the message to the logs if that happens. Signed-off-by: Jakub Kicinski --- in