All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Song Liu <liu.song.a23@gmail.com>
Cc: Networking <netdev@vger.kernel.org>,
	"Daniel Borkmann" <borkmann@iogearbox.net>,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
	brouer@redhat.com
Subject: Re: [bpf-next PATCH 1/2] samples/bpf: extend xdp_rxq_info to read packet payload
Date: Wed, 27 Jun 2018 13:23:12 +0200	[thread overview]
Message-ID: <20180627132312.0640448b@redhat.com> (raw)
In-Reply-To: <CAPhsuW7i_YsrFvtrFwAybOiFFMUjQzQwtOwVz-r0=d9=TPM=Cw@mail.gmail.com>

On Tue, 26 Jun 2018 16:53:15 -0700
Song Liu <liu.song.a23@gmail.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

  reply	other threads:[~2018-06-27 11:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 14:27 [bpf-next PATCH 0/2] xdp/bpf: extend XDP samples/bpf xdp_rxq_info Jesper Dangaard Brouer
2018-06-25 14:27 ` [bpf-next PATCH 1/2] samples/bpf: extend xdp_rxq_info to read packet payload Jesper Dangaard Brouer
2018-06-26 23:53   ` Song Liu
2018-06-27 11:23     ` Jesper Dangaard Brouer [this message]
2018-06-27 17:03       ` Song Liu
2018-06-25 14:27 ` [bpf-next PATCH 2/2] samples/bpf: xdp_rxq_info action XDP_TX must adjust MAC-addrs Jesper Dangaard Brouer
2018-06-27  0:09   ` Song Liu
2018-06-27 11:20     ` Jesper Dangaard Brouer
2018-06-27 17:02       ` Song Liu
2018-06-28 21:54 ` [bpf-next PATCH 0/2] xdp/bpf: extend XDP samples/bpf xdp_rxq_info Daniel Borkmann

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=20180627132312.0640448b@redhat.com \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=borkmann@iogearbox.net \
    --cc=liu.song.a23@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=toke@toke.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.