[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 8 Aug 2019 17:58:14 +0200
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: netdev@...r.kernel.org, Daniel Borkmann <borkmann@...earbox.net>,
Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: a.s.protopopov@...il.com, dsahern@...il.com,
Toke Høiland-Jørgensen
<toke@...e.dk>, ys114321@...il.com, brouer@...hat.com
Subject: Re: [bpf-next v2 PATCH 2/3] samples/bpf: make xdp_fwd more
practically usable via devmap lookup
On Thu, 08 Aug 2019 17:46:46 +0200
Jesper Dangaard Brouer <brouer@...hat.com> wrote:
> @@ -103,8 +112,17 @@ int main(int argc, char **argv)
> return 1;
> }
>
> - if (bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd))
> + err = bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd);
> + if (err) {
> + if (err == -22) {
Darn - I forgot this, need to be changed.
I'll send a V3.
> + printf("Does kernel support devmap lookup?\n");
> + /* If not, the error message will be:
> + * "cannot pass map_type 14 into func
> + * bpf_map_lookup_elem#1"
> + */
> + }
> return 1;
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists