On Fri, 13 Jul 2018 15:23:30 -0700, Stephen Hemminger wrote:
> > > I prefer to not use "printf(fp," and use print_string(PRINT_FP, NULL,
> > > "%s", ...)
> > > because otherwise you end up mixing strings and json format output in the
> > > same result.
> > >
> > > You should be able to do
> > >
On Fri, 13 Jul 2018 14:20:37 -0700
Jakub Kicinski wrote:
> On Fri, 13 Jul 2018 13:59:41 -0700, Stephen Hemminger wrote:
> > On Fri, 13 Jul 2018 13:43:59 -0700
> > Jakub Kicinski wrote:
> >
> > >
> > > +static void xdp_dump_prog_one(FILE *fp, struct rtattr *tb[IFLA_XDP_MAX +
> > > 1],
> > >
On Fri, 13 Jul 2018 13:59:41 -0700, Stephen Hemminger wrote:
> On Fri, 13 Jul 2018 13:43:59 -0700
> Jakub Kicinski wrote:
>
> >
> > +static void xdp_dump_prog_one(FILE *fp, struct rtattr *tb[IFLA_XDP_MAX +
> > 1],
> > + __u32 attr, bool link, bool details, char *pfx)
>
On Fri, 13 Jul 2018 13:43:59 -0700
Jakub Kicinski wrote:
>
> +static void xdp_dump_prog_one(FILE *fp, struct rtattr *tb[IFLA_XDP_MAX + 1],
> + __u32 attr, bool link, bool details, char *pfx)
> +{
> + __u32 prog_id;
> +
> + if (!tb[attr])
> + return;
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
sli