netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Song Liu <song@kernel.org>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	pablo@netfilter.org, fw@strlen.de,
	netfilter-devel@vger.kernel.org, lorenzo.bianconi@redhat.com,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix ct status check in bpf_nf selftests
Date: Thu, 8 Sep 2022 09:45:57 +0200	[thread overview]
Message-ID: <YxmdteGsAuSUT/Wc@lore-desk> (raw)
In-Reply-To: <CAPhsuW4Vcn4GELkKWNdb+X4L+KfdtOiHqN0VijhWy+vLjvD74g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]

> On Wed, Sep 7, 2022 at 3:56 AM Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> >
> > Check properly the connection tracking entry status configured running
> > bpf_ct_change_status kfunc.
> > Remove unnecessary IPS_CONFIRMED status configuration since it is
> > already done during entry allocation.
> >
> > Fixes: 6eb7fba007a7 ("selftests/bpf: Add tests for new nf_conntrack kfuncs")
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 4 ++--
> >  tools/testing/selftests/bpf/progs/test_bpf_nf.c | 8 +++++---
> >  2 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_nf.c b/tools/testing/selftests/bpf/prog_tests/bpf_nf.c
> > index 544bf90ac2a7..903d16e3abed 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/bpf_nf.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/bpf_nf.c
> > @@ -111,8 +111,8 @@ static void test_bpf_nf_ct(int mode)
> >         /* allow some tolerance for test_delta_timeout value to avoid races. */
> >         ASSERT_GT(skel->bss->test_delta_timeout, 8, "Test for min ct timeout update");
> >         ASSERT_LE(skel->bss->test_delta_timeout, 10, "Test for max ct timeout update");
> > -       /* expected status is IPS_SEEN_REPLY */
> > -       ASSERT_EQ(skel->bss->test_status, 2, "Test for ct status update ");
> > +       /* expected status is IPS_CONFIRMED | IPS_SEEN_REPLY */
> > +       ASSERT_EQ(skel->bss->test_status, 0xa, "Test for ct status update ");
> 
> Why do we use 0xa instead of IPS_CONFIRMED | IPS_SEEN_REPLY?
> To avoid dependency on the header file?

nope, thx for reporting it. I will fix it in v2.

Regards,
Lorenzo

> 
> Thanks,
> Song

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2022-09-08  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 10:56 [PATCH bpf-next] selftests/bpf: fix ct status check in bpf_nf selftests Lorenzo Bianconi
2022-09-08  1:04 ` Song Liu
2022-09-08  7:45   ` Lorenzo Bianconi [this message]

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=YxmdteGsAuSUT/Wc@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=song@kernel.org \
    --cc=toke@redhat.com \
    /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).