[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a29ea9d0-813d-3e6c-739b-011bdcd6aa83@iogearbox.net>
Date: Sat, 14 Jul 2018 10:36:36 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>,
alexei.starovoitov@...il.com, dsahern@...il.com,
stephen@...workplumber.org
Cc: netdev@...r.kernel.org, oss-drivers@...ronome.com
Subject: Re: [PATCH iproute2-next v2] iplink: add support for reporting
multiple XDP programs
On 07/14/2018 12:54 AM, Jakub Kicinski wrote:
> Kernel now supports attaching XDP programs in the driver
> and hardware at the same time. Print that information
> correctly.
>
> In case there are multiple programs attached kernel will
> not provide IFLA_XDP_PROG_ID, so don't expect it to be
> there (this also improves the printing for very old kernels
> slightly, as it avoids unnecessary "prog/xdp" line).
>
> In short mode preserve the current outputs but don't print
> IDs if there are multiple.
>
> 6: netdevsim0: <BROADCAST,NOARP> mtu 1500 xdpoffload/id:11 qdisc [...]
>
> and:
>
> 6: netdevsim0: <BROADCAST,NOARP> mtu 1500 xdpmulti qdisc [...]
>
> ip link output will keep using prog/xdp prefix if only one program
> is attached, but can also print multiple program lines:
>
> prog/xdp id 8 tag fc7a51d1a693a99e jited
>
> vs:
>
> prog/xdpdrv id 8 tag fc7a51d1a693a99e jited
> prog/xdpoffload id 9 tag fc7a51d1a693a99e
>
> JSON output gains a new array called "attached" which will
> contain the full list of attached programs along with their
> attachment modes:
>
> "xdp": {
> "mode": 3,
> "prog": {
> "id": 11,
> "tag": "fc7a51d1a693a99e",
> "jited": 0
> },
> "attached": [ {
> "mode": 3,
> "prog": {
> "id": 11,
> "tag": "fc7a51d1a693a99e",
> "jited": 0
> }
> } ]
> },
>
> In case there are multiple programs attached the general "xdp"
> section will not contain program information:
>
> "xdp": {
> "mode": 4,
> "attached": [ {
> "mode": 1,
> "prog": {
> "id": 10,
> "tag": "fc7a51d1a693a99e",
> "jited": 1
> }
> },{
> "mode": 3,
> "prog": {
> "id": 11,
> "tag": "fc7a51d1a693a99e",
> "jited": 0
> }
> } ]
> },
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@...ronome.com>
LGTM, thanks!
Acked-by: Daniel Borkmann <daniel@...earbox.net>
Powered by blists - more mailing lists