From: "Daniel T. Lee" <danieltimlee@gmail.com>
To: Song Liu <liu.song.a23@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
Networking <netdev@vger.kernel.org>
Subject: Re: [bpf-next, v2] samples: bpf: add max_pckt_size option at xdp_adjust_tail
Date: Fri, 30 Aug 2019 03:23:34 +0900 [thread overview]
Message-ID: <CAEKGpzhGkLGswP3G9BzY1YErVOuNQRRBD2y=4g7u7dfh1by3aA@mail.gmail.com> (raw)
In-Reply-To: <CAPhsuW6dnbwtCxf5AO6gJe07qu4ewvO1NQ+ZiQVBR8jUVfQ9uQ@mail.gmail.com>
On Fri, Aug 30, 2019 at 5:42 AM Song Liu <liu.song.a23@gmail.com> wrote:
>
> On Mon, Aug 26, 2019 at 9:52 AM Daniel T. Lee <danieltimlee@gmail.com> wrote:
> >
> > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited
> > to 600. To make this size flexible, a new map 'pcktsz' is added.
> >
> > By updating new packet size to this map from the userland,
> > xdp_adjust_tail_kern.o will use this value as a new max_pckt_size.
> >
> > If no '-P <MAX_PCKT_SIZE>' option is used, the size of maximum packet
> > will be 600 as a default.
>
> Please also cc bpf@vger.kernel.org for bpf patches.
>
I'll make sure to have it included next time.
> >
> > Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
>
> Acked-by: Song Liu <songliubraving@fb.com>
>
> With a nit below.
>
> [...]
>
> > diff --git a/samples/bpf/xdp_adjust_tail_user.c b/samples/bpf/xdp_adjust_tail_user.c
> > index a3596b617c4c..29ade7caf841 100644
> > --- a/samples/bpf/xdp_adjust_tail_user.c
> > +++ b/samples/bpf/xdp_adjust_tail_user.c
> > @@ -72,6 +72,7 @@ static void usage(const char *cmd)
> > printf("Usage: %s [...]\n", cmd);
> > printf(" -i <ifname|ifindex> Interface\n");
> > printf(" -T <stop-after-X-seconds> Default: 0 (forever)\n");
> > + printf(" -P <MAX_PCKT_SIZE> Default: 600\n");
>
> nit: printf(" -P <MAX_PCKT_SIZE> Default: %u\n", MAX_PCKT_SIZE);
With all due respect, I'm afraid that MAX_PCKT_SIZE constant is only
defined at '_kern.c'.
Are you saying that it should be defined at '_user.c' either?
Thanks for the review!
next prev parent reply other threads:[~2019-08-30 3:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 16:25 [bpf-next, v2] samples: bpf: add max_pckt_size option at xdp_adjust_tail Daniel T. Lee
2019-08-29 20:41 ` Song Liu
2019-08-29 18:23 ` Daniel T. Lee [this message]
2019-09-02 4:43 ` Daniel T. Lee
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='CAEKGpzhGkLGswP3G9BzY1YErVOuNQRRBD2y=4g7u7dfh1by3aA@mail.gmail.com' \
--to=danieltimlee@gmail.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=liu.song.a23@gmail.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).