All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jack Ma <jack4it@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: David Ahern <dsahern@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jack Ma <jack4it@gmail.com>
Subject: Re: [PATCH net-next v2 3/3] selftests: net: add coverage for fdb nexthop dst port
Date: Tue, 21 Jul 2026 22:19:07 +0000	[thread overview]
Message-ID: <20260721221907.2702-3-jack4it@gmail.com> (raw)
In-Reply-To: <20260721152059.GC2667735@shredder>

On Tue, Jul 21, 2026 at 06:20:59PM +0300, Ido Schimmel wrote:
> We already have control plane test for FDB nexthops in fib_nexthops.sh,
> can you add the new test cases there instead? Probably fit in
> ipv4_fdb_grp_fcnal() and ipv6_fdb_grp_fcnal()

Done for v3.  Dropped the standalone fib_nexthops_fdb_port.sh and
folded the cases into ipv4_fdb_grp_fcnal() and ipv6_fdb_grp_fcnal()
in fib_nexthops.sh: accept a port on an fdb nexthop that has a
gateway and echo it back on dump, reject it without a gateway,
reject a zero port, allow a group whose legs differ only in UDP
port, and confirm that a portless fdb nexthop omits the attribute.
A check_nexthop_fdb_port_support() helper SKIPs the cases when
iproute2 lacks the "port" keyword.

> vxlan-fdb-port-integ.sh doesn't exist. We have test_vxlan_nh.sh. Can you
> extend basic_tx_common() to test the new attribute? Don't change the
> existing configuration (we want to test the configuration where user
> space doesn't pass a port) and instead add a new:
>
> 1. FDB nexthop and a group that contains it
> 2. Flower filter that also matches on the destination port (not 4789)
> 3. FDB entry that points to the new group
>
> Run shellcheck (preferably via ingest_mdir.py [1]) to make sure you're
> not adding new warnings / errors.

Done for v3.  The stale vxlan-fdb-port-integ.sh reference is gone;
basic_tx_common() in test_vxlan_nh.sh is extended in place instead.
The existing portless configuration is left exactly as-is, with the
new coverage added alongside it and guarded so it SKIPs on older
iproute2:

  1. a new fdb nexthop "id 2 via $remote_addr fdb port 4790" plus a
     group "id 20 group 2 fdb" that contains it;
  2. a flower filter matching udp dst_port 4790 (the vxlan device
     default in this test is 4789);
  3. an fdb entry 00:11:22:33:44:66 -> nhid 20 that points at the
     new group.

The test then sends a frame to that MAC and waits on both the
nexthop group stats and the port-4790 flower counter, so it only
passes when the per-nexthop port actually lands on the wire.

On shellcheck: I ran it on both touched scripts, comparing the base
tree against the patched tree.  test_vxlan_nh.sh adds no new
warnings.  In fib_nexthops.sh the added code only reproduces idioms
the rest of the file already uses -- check_nexthop_fdb_port_support()
mirrors the adjacent check_nexthop_res_support() helper, and the new
cases use the same run_cmd / "log_test $?" pattern -- so no new
warning categories appear (the SC2086 / SC2181 notes, and the
SC2317 "unreachable ... or ignore if invoked indirectly" notes, are
already present throughout the file).

Thanks,
Jack

      reply	other threads:[~2026-07-21 22:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  6:45 [PATCH net-next v2 0/3] net: nexthop: per-nexthop UDP dst port for fdb (VXLAN) nexthops Jack Ma
2026-07-17  6:45 ` [PATCH net-next v2 1/3] net: nexthop: add NHA_FDB_PORT for fdb nexthops Jack Ma
2026-07-21 15:17   ` Ido Schimmel
2026-07-21 22:19     ` Jack Ma
2026-07-17  6:45 ` [PATCH net-next v2 2/3] vxlan: honor per-nexthop fdb destination port Jack Ma
2026-07-21 15:18   ` Ido Schimmel
2026-07-21 22:19     ` Jack Ma
2026-07-17  6:45 ` [PATCH net-next v2 3/3] selftests: net: add coverage for fdb nexthop dst port Jack Ma
2026-07-21 15:20   ` Ido Schimmel
2026-07-21 22:19     ` Jack Ma [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=20260721221907.2702-3-jack4it@gmail.com \
    --to=jack4it@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@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 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.