From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: jakub.kicinski@netronome.com, netdev@vger.kernel.org,
johannes@sipsolutions.net, dsa@cumulusnetworks.com,
alexei.starovoitov@gmail.com, bblanco@gmail.com,
john.fastabend@gmail.com, kubakici@wp.pl,
oss-drivers@netronome.com, brouer@redhat.com, jhs@mojatatu.com
Subject: Re: [PATCH net-next 4/4] virtio_net: make use of extended ack message reporting
Date: Mon, 01 May 2017 10:34:47 -0400 (EDT) [thread overview]
Message-ID: <20170501.103447.1197722529092618421.davem@davemloft.net> (raw)
In-Reply-To: <5907130F.7070807@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Mon, 01 May 2017 12:50:55 +0200
> On 05/01/2017 06:46 AM, Jakub Kicinski wrote:
>> Try to carry error messages to the user via the netlink extended
>> ack message attribute.
>>
>> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>
> [...]
>> @@ -1890,16 +1891,17 @@ static int virtnet_xdp_set(struct net_device
>> *dev, struct bpf_prog *prog)
>> virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO6) ||
>> virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ECN) ||
>> virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO)) {
>> - netdev_warn(dev, "can't set XDP while host is implementing LRO, disable
>> - LRO first\n");
>> + NL_SET_ERR_MSG(extack, "can't set XDP while host is implementing
>> LRO, disable LRO first");
>
> Should this be NL_MOD_TRY_SET_ERR_MSG() as well like in nfp case
> (otherwise the 'if (_extack)' check might be missing from the
> macro)?
I don't see a path in the doit callchain for setlink/newlink where the
extack pointer can be null.
I'm going to apply this series and we should either:
1) Guarantee the extack object is always available.
or
2) Make all macros including NL_SET_ERR_MSG() check the
pointer.
Thanks.
next prev parent reply other threads:[~2017-05-01 14:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 4:46 [PATCH net-next 0/4] xdp: use netlink extended ACK reporting Jakub Kicinski
2017-05-01 4:46 ` [PATCH net-next 1/4] netlink: add NULL-friendly helper for setting extended ACK message Jakub Kicinski
2017-05-01 10:45 ` Daniel Borkmann
2017-05-01 4:46 ` [PATCH net-next 2/4] xdp: propagate extended ack to XDP setup Jakub Kicinski
2017-05-01 10:46 ` Daniel Borkmann
2017-05-01 4:46 ` [PATCH net-next 3/4] nfp: make use of extended ack message reporting Jakub Kicinski
2017-05-01 10:46 ` Daniel Borkmann
2017-05-01 4:46 ` [PATCH net-next 4/4] virtio_net: " Jakub Kicinski
2017-05-01 10:50 ` Daniel Borkmann
2017-05-01 14:34 ` David Miller [this message]
2017-05-01 10:32 ` [oss-drivers] [PATCH net-next 0/4] xdp: use netlink extended ACK reporting Simon Horman
2017-05-01 14:36 ` David Miller
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=20170501.103447.1197722529092618421.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexei.starovoitov@gmail.com \
--cc=bblanco@gmail.com \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=dsa@cumulusnetworks.com \
--cc=jakub.kicinski@netronome.com \
--cc=jhs@mojatatu.com \
--cc=johannes@sipsolutions.net \
--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 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).