netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Eric Leblond <eric@regit.org>, Jakub Kicinski <kubakici@wp.pl>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	ast@kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH net-next] libbpf: add function to setup XDP
Date: Sun, 10 Dec 2017 14:07:12 -0700	[thread overview]
Message-ID: <49b37939-ebd4-fe92-eeab-e5d2713cadb8@gmail.com> (raw)
In-Reply-To: <1512938058.10027.7.camel@regit.org>

On 12/10/17 1:34 PM, Eric Leblond wrote:
>> Would it be possible to print out or preferably return to the caller
>> the ext ack error message?  A couple of drivers are using it for XDP
>> mis-configuration reporting instead of printks.  We should encourage
>> other to do the same and support it in all user space since ext ack 
>> msgs lead to much better user experience.
> 
> I've seen the kind of messages displayed by reading at kernel log. They
> are really useful and it looks almost mandatory to be able to display
> them.
> 
> Kernel code seems to not have a parser for the ext ack error message.
> Did I miss something here ?
>  
> Looking at tc code, it seems it is using libmnl to parse them and I
> doubt it is a good idea to use that in libbpf as it is introducing a
> dependency.
> 
> Does someone has an existing parsing code or should I write on my own ?

I had worked on extack for libbpf but seem to have lost the changes.

Look at the commits here:
    https://github.com/dsahern/iproute2/commits/ext-ack

I suggest using this:

https://github.com/dsahern/iproute2/commit/b61e4c7dd54a5d3ff98640da4b480441cee497b2

to bring in nlattr from lib/nlattr (as I recall lib/nlattr can not be
used directly). From there, use this one:

https://github.com/dsahern/iproute2/commit/261f7251e6704d565b91e310faabbbb7e18d14a1

to see what is needed for extack support.

Really not that much code to add.

  reply	other threads:[~2017-12-10 21:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 14:43 [PATCH net-next] libbpf: add function to setup XDP Eric Leblond
2017-12-09 16:34 ` David Ahern
2017-12-09 17:49   ` Alexei Starovoitov
2017-12-09 23:57 ` Jakub Kicinski
2017-12-10 20:34   ` Eric Leblond
2017-12-10 21:07     ` David Ahern [this message]
2017-12-12  2:23       ` Daniel Borkmann
2017-12-11  2:24 ` Toshiaki Makita
2017-12-12 15:53   ` 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=49b37939-ebd4-fe92-eeab-e5d2713cadb8@gmail.com \
    --to=dsahern@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eric@regit.org \
    --cc=kubakici@wp.pl \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).