[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180627132312.0640448b@redhat.com>
Date: Wed, 27 Jun 2018 13:23:12 +0200
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Song Liu <liu.song.a23@...il.com>
Cc: Networking <netdev@...r.kernel.org>,
Daniel Borkmann <borkmann@...earbox.net>,
Toke Høiland-Jørgensen <toke@...e.dk>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
brouer@...hat.com
Subject: Re: [bpf-next PATCH 1/2] samples/bpf: extend xdp_rxq_info to read
packet payload
On Tue, 26 Jun 2018 16:53:15 -0700
Song Liu <liu.song.a23@...il.com> wrote:
> > +static char* options2str(enum cfg_options_flags flag)
> > +{
> > + if (flag == NO_TOUCH)
> > + return "no_touch";
> > + if (flag & READ_MEM)
> > + return "read";
> > + fprintf(stderr, "ERR: Unknown config option flags");
> > + exit(EXIT_FAIL);
> > +}
> > +
>
> enum cfg_options_flags is used as a bitmap in other parts of the sample.
> So this function is a little weird (with more flags added).
Sure, and do I handle this correctly in the next patch.
I'm uncertain what you want me to change?
Do you want me to drop the enum, and use #define instead?
--
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