| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/17 09:20 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"VXLAN"
],
"FocusSymbols": [
"rtm_to_nh_config",
"nexthop_create",
"nh_fill_node",
"vxlan_xmit_nh",
"vxlan_xmit_nhid"
],
"Reasoning": "The patch introduces a new netlink attribute NHA_FDB_PORT for fdb nexthops, modifying nexthop creation and dumping logic, as well as VXLAN transmission paths to utilize this new port. This is a functional change in core networking and VXLAN driver.",
"WorthFuzzing": true
} |
| 1/1 | 2026/07/17 09:20 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 356166167166ce44bc5d3d72609db702dbbce001\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Jul 17 09:20:33 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/include/net/nexthop.h b/include/net/nexthop.h\nindex 572e69cda4766d..7fb612a7307f25 100644\n--- a/include/net/nexthop.h\n+++ b/include/net/nexthop.h\n@@ -28,6 +28,7 @@ struct nh_config {\n \tu8\t\tnh_protocol;\n \tu8\t\tnh_blackhole;\n \tu8\t\tnh_fdb;\n+\t__be16\t\tnh_fdb_port;\n \tu32\t\tnh_flags;\n \n \tint\t\tnh_ifindex;\n@@ -63,6 +64,7 @@ struct nh_info {\n \tu8\t\t\tfamily;\n \tbool\t\t\treject_nh;\n \tbool\t\t\tfdb_nh;\n+\t__be16\t\t\tfdb_port;\n \n \tunion {\n \t\tstruct fib_nh_common\tfib_nhc;\n@@ -574,7 +576,8 @@ struct fib_nh_common *nexthop_fdb_nhc(struct nexthop *nh)\n }\n \n static inline struct fib_nh_common *nexthop_path_fdb_result(struct nexthop *nh,\n-\t\t\t\t\t\t\t int hash)\n+\t\t\t\t\t\t int hash,\n+\t\t\t\t\t\t __be16 *fdb_port)\n {\n \tstruct nh_info *nhi;\n \tstruct nexthop *nhp;\n@@ -583,6 +586,8 @@ static inline struct fib_nh_common *nexthop_path_fdb_result(struct nexthop *nh,\n \tif (unlikely(!nhp))\n \t\treturn NULL;\n \tnhi = rcu_dereference(nhp-\u003enh_info);\n+\tif (fdb_port)\n+\t\t*fdb_port = nhi-\u003efdb_port;\n \treturn \u0026nhi-\u003efib_nhc;\n }\n #endif\ndiff --git a/include/net/vxlan.h b/include/net/vxlan.h\nindex dfba89695efcfa..de41b374688f29 100644\n--- a/include/net/vxlan.h\n+++ b/include/net/vxlan.h\n@@ -567,8 +567,9 @@ static inline bool vxlan_fdb_nh_path_select(struct nexthop *nh,\n \t\t\t\t\t struct vxlan_rdst *rdst)\n {\n \tstruct fib_nh_common *nhc;\n+\t__be16 fdb_port = 0;\n \n-\tnhc = nexthop_path_fdb_result(nh, hash \u003e\u003e 1);\n+\tnhc = nexthop_path_fdb_result(nh, hash \u003e\u003e 1, \u0026fdb_port);\n \tif (unlikely(!nhc))\n \t\treturn false;\n \n@@ -583,6 +584,8 @@ static inline bool vxlan_fdb_nh_path_select(struct nexthop *nh,\n \t\tbreak;\n \t}\n \n+\trdst-\u003eremote_port = fdb_port;\n+\n \treturn true;\n }\n \ndiff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h\nindex bc49baf4a267f0..e587bbf3b890a3 100644\n--- a/include/uapi/linux/nexthop.h\n+++ b/include/uapi/linux/nexthop.h\n@@ -83,6 +83,9 @@ enum {\n \t/* u32; read-only; whether any driver collects HW stats */\n \tNHA_HW_STATS_USED,\n \n+\t/* be16; UDP destination port for an fdb nexthop (e.g. VXLAN) */\n+\tNHA_FDB_PORT,\n+\n \t__NHA_MAX,\n };\n \ndiff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c\nindex 6205bd57aa8520..5b27cc9a9191d7 100644\n--- a/net/ipv4/nexthop.c\n+++ b/net/ipv4/nexthop.c\n@@ -39,6 +39,7 @@ static const struct nla_policy rtm_nh_policy_new[] = {\n \t[NHA_ENCAP_TYPE]\t= { .type = NLA_U16 },\n \t[NHA_ENCAP]\t\t= { .type = NLA_NESTED },\n \t[NHA_FDB]\t\t= { .type = NLA_FLAG },\n+\t[NHA_FDB_PORT]\t\t= { .type = NLA_U16 },\n \t[NHA_RES_GROUP]\t\t= { .type = NLA_NESTED },\n \t[NHA_HW_STATS_ENABLE]\t= NLA_POLICY_MAX(NLA_U32, true),\n };\n@@ -956,6 +957,9 @@ static int nh_fill_node(struct sk_buff *skb, struct nexthop *nh,\n \t} else if (nhi-\u003efdb_nh) {\n \t\tif (nla_put_flag(skb, NHA_FDB))\n \t\t\tgoto nla_put_failure;\n+\t\tif (nhi-\u003efdb_port \u0026\u0026\n+\t\t nla_put_be16(skb, NHA_FDB_PORT, nhi-\u003efdb_port))\n+\t\t\tgoto nla_put_failure;\n \t} else {\n \t\tconst struct net_device *dev;\n \n@@ -1055,6 +1059,9 @@ static size_t nh_nlmsg_size_single(struct nexthop *nh)\n \t\tbreak;\n \t}\n \n+\tif (nhi-\u003efdb_nh)\n+\t\tsz += nla_total_size(2);\t/* NHA_FDB_PORT */\n+\n \tif (nhi-\u003efib_nhc.nhc_lwtstate) {\n \t\tsz += lwtunnel_get_encap_size(nhi-\u003efib_nhc.nhc_lwtstate);\n \t\tsz += nla_total_size(2); /* NHA_ENCAP_TYPE */\n@@ -2956,8 +2963,10 @@ static struct nexthop *nexthop_create(struct net *net, struct nh_config *cfg,\n \tnhi-\u003efamily = cfg-\u003enh_family;\n \tnhi-\u003efib_nhc.nhc_scope = RT_SCOPE_LINK;\n \n-\tif (cfg-\u003enh_fdb)\n+\tif (cfg-\u003enh_fdb) {\n \t\tnhi-\u003efdb_nh = 1;\n+\t\tnhi-\u003efdb_port = cfg-\u003enh_fdb_port;\n+\t}\n \n \tif (cfg-\u003enh_blackhole) {\n \t\tnhi-\u003ereject_nh = 1;\n@@ -3147,6 +3156,15 @@ static int rtm_to_nh_config(struct net *net, struct sk_buff *skb,\n \t\tcfg-\u003enh_fdb = nla_get_flag(tb[NHA_FDB]);\n \t}\n \n+\tif (tb[NHA_FDB_PORT]) {\n+\t\tif (!tb[NHA_FDB] || !tb[NHA_GATEWAY]) {\n+\t\t\tNL_SET_ERR_MSG(extack,\n+\t\t\t\t \"FDB port can only be set on fdb nexthops that have a gateway\");\n+\t\t\tgoto out;\n+\t\t}\n+\t\tcfg-\u003enh_fdb_port = nla_get_be16(tb[NHA_FDB_PORT]);\n+\t}\n+\n \tif (tb[NHA_GROUP]) {\n \t\tif (nhm-\u003enh_family != AF_UNSPEC) {\n \t\t\tNL_SET_ERR_MSG(extack, \"Invalid family for group\");\ndiff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile\nindex 708d960ae07d5b..c06eb4927cd9cb 100644\n--- a/tools/testing/selftests/net/Makefile\n+++ b/tools/testing/selftests/net/Makefile\n@@ -36,6 +36,7 @@ TEST_PROGS := \\\n \tfib_nexthop_multiprefix.sh \\\n \tfib_nexthop_nongw.sh \\\n \tfib_nexthops.sh \\\n+\tfib_nexthops_fdb_port.sh \\\n \tfib_rule_tests.sh \\\n \tfib_tests.sh \\\n \tfin_ack_lat.sh \\\ndiff --git a/tools/testing/selftests/net/fib_nexthops_fdb_port.sh b/tools/testing/selftests/net/fib_nexthops_fdb_port.sh\nnew file mode 100755\nindex 00000000000000..8b401c6d24a14f\n--- /dev/null\n+++ b/tools/testing/selftests/net/fib_nexthops_fdb_port.sh\n@@ -0,0 +1,78 @@\n+#!/bin/bash\n+# SPDX-License-Identifier: GPL-2.0\n+#\n+# Control-plane selftest for per-nexthop VXLAN fdb destination port\n+# (NHA_FDB_PORT). Verifies the accept/reject rules and the dump roundtrip.\n+# No datapath traffic here -- see tests/integ/vxlan-fdb-port-integ.sh for the\n+# real forwarding test.\n+#\n+# Requires: patched kernel (NHA_FDB_PORT) and patched iproute2 (the \"port\"\n+# keyword on \"ip nexthop ... fdb\"). SKIPs cleanly otherwise.\n+\n+set -u\n+\n+ksft_skip=4\n+NS=\"nhfdbport-$$\"\n+IP=\"ip -netns $NS\"\n+ret=0\n+\n+log_test() {\t# $1 actual_rc $2 expected_rc $3 name\n+\tif [ \"$1\" = \"$2\" ]; then\n+\t\tprintf \"TEST: %-58s [ OK ]\\n\" \"$3\"\n+\telse\n+\t\tprintf \"TEST: %-58s [FAIL] (rc=$1 want=$2)\\n\" \"$3\"\n+\t\tret=1\n+\tfi\n+}\n+\n+# passes (returns 0) iff the command FAILS\n+expect_fail() {\n+\tif \"$@\" \u003e/dev/null 2\u003e\u00261; then return 1; else return 0; fi\n+}\n+\n+cleanup() { ip netns del \"$NS\" 2\u003e/dev/null; }\n+\n+command -v ip \u003e/dev/null 2\u003e\u00261 || { echo \"SKIP: iproute2 not found\"; exit $ksft_skip; }\n+ip nexthop help 2\u003e\u00261 | grep -q fdb || { echo \"SKIP: no fdb nexthop support\"; exit $ksft_skip; }\n+\n+trap cleanup EXIT\n+cleanup\n+ip netns add \"$NS\" || { echo \"SKIP: cannot create netns\"; exit $ksft_skip; }\n+$IP link set lo up\n+\n+# Probe for \"port\" keyword + kernel NHA_FDB_PORT support; SKIP if missing.\n+if ! $IP nexthop add id 1 via 10.0.0.1 fdb port 4790 2\u003e/dev/null; then\n+\techo \"SKIP: 'ip nexthop ... fdb port' unsupported (needs patched kernel + iproute2)\"\n+\texit $ksft_skip\n+fi\n+log_test 0 0 \"add fdb nexthop with port\"\n+\n+# Dump roundtrip must echo the port back.\n+$IP nexthop show id 1 | grep -qw \"port 4790\"\n+log_test $? 0 \"dump shows fdb port 4790\"\n+\n+# Reject: port on a routed (non-fdb) nexthop.\n+expect_fail $IP nexthop add id 2 via 10.0.0.1 dev lo port 4790\n+log_test $? 0 \"reject port on non-fdb nexthop\"\n+\n+# Reject: fdb port without a gateway.\n+expect_fail $IP nexthop add id 3 fdb port 4790\n+log_test $? 0 \"reject fdb port without gateway\"\n+\n+# The HA case: a group whose legs share the gateway but differ in port.\n+$IP nexthop add id 10 via 10.0.0.1 fdb port 4789 \u0026\u0026 \\\n+$IP nexthop add id 11 via 10.0.0.1 fdb port 5789 \u0026\u0026 \\\n+$IP nexthop add id 100 group 10/11 fdb\n+log_test $? 0 \"add fdb nexthop group with differing ports\"\n+\n+# A fdb nexthop without a port must NOT emit one (backward compat).\n+$IP nexthop add id 20 via 10.0.0.1 fdb\n+$IP nexthop show id 20 | grep -qw \"port\"\n+log_test $? 1 \"fdb nexthop without port omits NHA_FDB_PORT\"\n+\n+if [ $ret -eq 0 ]; then\n+\techo \"PASS: all NHA_FDB_PORT control-plane checks\"\n+else\n+\techo \"FAIL: one or more NHA_FDB_PORT checks failed\"\n+fi\n+exit $ret\n"
} |
| 2/1 | 2026/07/17 09:20 | agent | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": [
"VXLAN"
],
"FocusSymbols": [
"rtm_to_nh_config",
"nexthop_create",
"nh_fill_node",
"vxlan_xmit_nh",
"vxlan_xmit_nhid"
],
"Reasoning": "The patch introduces a new netlink attribute NHA_FDB_PORT for fdb nexthops, modifying nexthop creation and dumping logic, as well as VXLAN transmission paths to utilize this new port. This is a functional change in core networking and VXLAN driver.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit 356166167166ce44bc5d3d72609db702dbbce001
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Jul 17 09:20:33 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/net/nexthop.h b/include/net/nexthop.h
index 572e69cda4766d..7fb612a7307f25 100644
--- a/include/net/nexthop.h
+++ b/include/net/nexthop.h
@@ -28,6 +28,7 @@ struct nh_config {
u8 nh_protocol;
u8 nh_blackhole;
u8 nh_fdb;
+ __be16 nh_fdb_port;
u32 nh_flags;
int nh_ifindex;
@@ -63,6 +64,7 @@ struct nh_info {
u8 family;
bool reject_nh;
bool fdb_nh;
+ __be16 fdb_port;
union {
struct fib_nh_common fib_nhc;
@@ -574,7 +576,8 @@ struct fib_nh_common *nexthop_fdb_nhc(struct nexthop *nh)
}
static inline struct fib_nh_common *nexthop_path_fdb_result(struct nexthop *nh,
- int hash)
+ int hash,
+ __be16 *fdb_port)
{
struct nh_info *nhi;
struct nexthop *nhp;
@@ -583,6 +586,8 @@ static inline struct fib_nh_common *nexthop_path_fdb_result(struct nexthop *nh,
if (unlikely(!nhp))
return NULL;
nhi = rcu_dereference(nhp->nh_info);
+ if (fdb_port)
+ *fdb_port = nhi->fdb_port;
return &nhi->fib_nhc;
}
#endif
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index dfba89695efcfa..de41b374688f29 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -567,8 +567,9 @@ static inline bool vxlan_fdb_nh_path_select(struct nexthop *nh,
struct vxlan_rdst *rdst)
{
struct fib_nh_common *nhc;
+ __be16 fdb_port = 0;
- nhc = nexthop_path_fdb_result(nh, hash >> 1);
+ nhc = nexthop_path_fdb_result(nh, hash >> 1, &fdb_port);
if (unlikely(!nhc))
return false;
@@ -583,6 +584,8 @@ static inline bool vxlan_fdb_nh_path_select(struct nexthop *nh,
break;
}
+ rdst->remote_port = fdb_port;
+
return true;
}
diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
index bc49baf4a267f0..e587bbf3b890a3 100644
--- a/include/uapi/linux/nexthop.h
+++ b/include/uapi/linux/nexthop.h
@@ -83,6 +83,9 @@ enum {
/* u32; read-only; whether any driver collects HW stats */
NHA_HW_STATS_USED,
+ /* be16; UDP destination port for an fdb nexthop (e.g. VXLAN) */
+ NHA_FDB_PORT,
+
__NHA_MAX,
};
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 6205bd57aa8520..5b27cc9a9191d7 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -39,6 +39,7 @@ static const struct nla_policy rtm_nh_policy_new[] = {
[NHA_ENCAP_TYPE] = { .type = NLA_U16 },
[NHA_ENCAP] = { .type = NLA_NESTED },
[NHA_FDB] = { .type = NLA_FLAG },
+ [NHA_FDB_PORT] = { .type = NLA_U16 },
[NHA_RES_GROUP] = { .type = NLA_NESTED },
[NHA_HW_STATS_ENABLE] = NLA_POLICY_MAX(NLA_U32, true),
};
@@ -956,6 +957,9 @@ static int nh_fill_node(struct sk_buff *skb, struct nexthop *nh,
} else if (nhi->fdb_nh) {
if (nla_put_flag(skb, NHA_FDB))
goto nla_put_failure;
+ if (nhi->fdb_port &&
+ nla_put_be16(skb, NHA_FDB_PORT, nhi->fdb_port))
+ goto nla_put_failure;
} else {
const struct net_device *dev;
@@ -1055,6 +1059,9 @@ static size_t nh_nlmsg_size_single(struct nexthop *nh)
break;
}
+ if (nhi->fdb_nh)
+ sz += nla_total_size(2); /* NHA_FDB_PORT */
+
if (nhi->fib_nhc.nhc_lwtstate) {
sz += lwtunnel_get_encap_size(nhi->fib_nhc.nhc_lwtstate);
sz += nla_total_size(2); /* NHA_ENCAP_TYPE */
@@ -2956,8 +2963,10 @@ static struct nexthop *nexthop_create(struct net *net, struct nh_config *cfg,
nhi->family = cfg->nh_family;
nhi->fib_nhc.nhc_scope = RT_SCOPE_LINK;
- if (cfg->nh_fdb)
+ if (cfg->nh_fdb) {
nhi->fdb_nh = 1;
+ nhi->fdb_port = cfg->nh_fdb_port;
+ }
if (cfg->nh_blackhole) {
nhi->reject_nh = 1;
@@ -3147,6 +3156,15 @@ static int rtm_to_nh_config(struct net *net, struct sk_buff *skb,
cfg->nh_fdb = nla_get_flag(tb[NHA_FDB]);
}
+ if (tb[NHA_FDB_PORT]) {
+ if (!tb[NHA_FDB] || !tb[NHA_GATEWAY]) {
+ NL_SET_ERR_MSG(extack,
+ "FDB port can only be set on fdb nexthops that have a gateway");
+ goto out;
+ }
+ cfg->nh_fdb_port = nla_get_be16(tb[NHA_FDB_PORT]);
+ }
+
if (tb[NHA_GROUP]) {
if (nhm->nh_family != AF_UNSPEC) {
NL_SET_ERR_MSG(extack, "Invalid family for group");
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index 708d960ae07d5b..c06eb4927cd9cb 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -36,6 +36,7 @@ TEST_PROGS := \
fib_nexthop_multiprefix.sh \
fib_nexthop_nongw.sh \
fib_nexthops.sh \
+ fib_nexthops_fdb_port.sh \
fib_rule_tests.sh \
fib_tests.sh \
fin_ack_lat.sh \
diff --git a/tools/testing/selftests/net/fib_nexthops_fdb_port.sh b/tools/testing/selftests/net/fib_nexthops_fdb_port.sh
new file mode 100755
index 00000000000000..8b401c6d24a14f
--- /dev/null
+++ b/tools/testing/selftests/net/fib_nexthops_fdb_port.sh
@@ -0,0 +1,78 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+#
+# Control-plane selftest for per-nexthop VXLAN fdb destination port
+# (NHA_FDB_PORT). Verifies the accept/reject rules and the dump roundtrip.
+# No datapath traffic here -- see tests/integ/vxlan-fdb-port-integ.sh for the
+# real forwarding test.
+#
+# Requires: patched kernel (NHA_FDB_PORT) and patched iproute2 (the "port"
+# keyword on "ip nexthop ... fdb"). SKIPs cleanly otherwise.
+
+set -u
+
+ksft_skip=4
+NS="nhfdbport-$$"
+IP="ip -netns $NS"
+ret=0
+
+log_test() { # $1 actual_rc $2 expected_rc $3 name
+ if [ "$1" = "$2" ]; then
+ printf "TEST: %-58s [ OK ]\n" "$3"
+ else
+ printf "TEST: %-58s [FAIL] (rc=$1 want=$2)\n" "$3"
+ ret=1
+ fi
+}
+
+# passes (returns 0) iff the command FAILS
+expect_fail() {
+ if "$@" >/dev/null 2>&1; then return 1; else return 0; fi
+}
+
+cleanup() { ip netns del "$NS" 2>/dev/null; }
+
+command -v ip >/dev/null 2>&1 || { echo "SKIP: iproute2 not found"; exit $ksft_skip; }
+ip nexthop help 2>&1 | grep -q fdb || { echo "SKIP: no fdb nexthop support"; exit $ksft_skip; }
+
+trap cleanup EXIT
+cleanup
+ip netns add "$NS" || { echo "SKIP: cannot create netns"; exit $ksft_skip; }
+$IP link set lo up
+
+# Probe for "port" keyword + kernel NHA_FDB_PORT support; SKIP if missing.
+if ! $IP nexthop add id 1 via 10.0.0.1 fdb port 4790 2>/dev/null; then
+ echo "SKIP: 'ip nexthop ... fdb port' unsupported (needs patched kernel + iproute2)"
+ exit $ksft_skip
+fi
+log_test 0 0 "add fdb nexthop with port"
+
+# Dump roundtrip must echo the port back.
+$IP nexthop show id 1 | grep -qw "port 4790"
+log_test $? 0 "dump shows fdb port 4790"
+
+# Reject: port on a routed (non-fdb) nexthop.
+expect_fail $IP nexthop add id 2 via 10.0.0.1 dev lo port 4790
+log_test $? 0 "reject port on non-fdb nexthop"
+
+# Reject: fdb port without a gateway.
+expect_fail $IP nexthop add id 3 fdb port 4790
+log_test $? 0 "reject fdb port without gateway"
+
+# The HA case: a group whose legs share the gateway but differ in port.
+$IP nexthop add id 10 via 10.0.0.1 fdb port 4789 && \
+$IP nexthop add id 11 via 10.0.0.1 fdb port 5789 && \
+$IP nexthop add id 100 group 10/11 fdb
+log_test $? 0 "add fdb nexthop group with differing ports"
+
+# A fdb nexthop without a port must NOT emit one (backward compat).
+$IP nexthop add id 20 via 10.0.0.1 fdb
+$IP nexthop show id 20 | grep -qw "port"
+log_test $? 1 "fdb nexthop without port omits NHA_FDB_PORT"
+
+if [ $ret -eq 0 ]; then
+ echo "PASS: all NHA_FDB_PORT control-plane checks"
+else
+ echo "FAIL: one or more NHA_FDB_PORT checks failed"
+fi
+exit $ret
|
| 3/2 | 2026/07/17 09:20 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 5093 output: 31 thoughts: 231 Thoughts: **Analyzing the VXLAN FDB Nexthop Patch** Okay, so we've got a new patch here. It's adding `NHA_FDB_PORT`, a new feature for FDB nexthops, specifically for things like VXLAN. Seems straightforward enough – we're giving the user the ability to set a UDP destination port for these nexthops. This is good; more granular control is always a plus. The patch itself touches some key areas: `include/net/nexthop.h`, `include/net/vxlan.h`, `include/uapi/linux/nexthop.h`, and `net/ipv4/nexthop.c`, which makes sense given the functionality. Plus, we get a selftest, which is absolutely crucial. Gotta make sure this stuff is behaving as expected, and test coverage is key for networking. Now, before I dig into the code itself, I should figure out the build configuration requirements for testing. This feature affects `net/ipv4/nexthop.c` and `include/net/vxlan.h` primarily. Let's think...`net/ipv4/nexthop.c`...is that dependent on `CONFIG_IP_ROUTE_MULTIPATH` or something similar? Actually, I think that's compiled unconditionally for IPv4, isn't it? Better double-check the `net/ipv4/Makefile` just to be certain. I don't want to waste time configuring something that's already enabled. |
| 4/2 | 2026/07/17 09:20 | tool | grepper |
0mArgs:{
"Expression": "nexthop.o",
"PathPrefix": "net/ipv4/Makefile"
}Results: {
"Output": "net/ipv4/Makefile=6=obj-y := route.o inetpeer.o protocol.o \\\n--\nnet/ipv4/Makefile-16-\t inet_fragment.o ping.o ip_tunnel_core.o gre_offload.o \\\nnet/ipv4/Makefile:17:\t metrics.o netlink.o nexthop.o udp_tunnel_stub.o\nnet/ipv4/Makefile-18-\n"
} |
| 5/2 | 2026/07/17 09:20 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 5801 output: 38 thoughts: 60 Thoughts: Okay, let's see, my initial thought is: **Examining Conditional Compilation in Networking Code** Alright, so `nexthop.o` is always built for IPv4. Makes sense, it's a fundamental part of the routing. Now, what's the deal with `vxlan.h`? My gut says that's likely tied to the `CONFIG_VXLAN` configuration option, right? Yeah, that rings a bell. To be absolutely sure, I'll quickly check the `drivers/net/vxlan/Makefile` file. It's the Makefile that tells the kernel what to include. I could also skim the directory itself but the Makefile will give a definitive answer. I'll get the answer immediately. |
| 6/2 | 2026/07/17 09:20 | tool | grepper |
0mArgs:{
"Expression": "vxlan_fdb_nh_path_select",
"PathPrefix": "drivers/net/vxlan/"
}Results: {
"Output": "drivers/net/vxlan/vxlan_core.c=2650=static void vxlan_xmit_nh(struct sk_buff *skb, struct net_device *dev,\n--\ndrivers/net/vxlan/vxlan_core.c-2663-\t\tgoto drop;\ndrivers/net/vxlan/vxlan_core.c:2664:\tdo_xmit = vxlan_fdb_nh_path_select(nh, hash, \u0026nh_rdst);\ndrivers/net/vxlan/vxlan_core.c-2665-\n--\ndrivers/net/vxlan/vxlan_core.c=2680=static netdev_tx_t vxlan_xmit_nhid(struct sk_buff *skb, struct net_device *dev,\n--\ndrivers/net/vxlan/vxlan_core.c-2697-\t}\ndrivers/net/vxlan/vxlan_core.c:2698:\tdo_xmit = vxlan_fdb_nh_path_select(nh, hash, \u0026nh_rdst);\ndrivers/net/vxlan/vxlan_core.c-2699-\trcu_read_unlock();\n"
} |
| 7/2 | 2026/07/17 09:20 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 6360 output: 34 thoughts: 297 Thoughts: **Analyzing the Nexthop and VXLAN Integration** Okay, so I'm looking at this code and immediately see that `vxlan_fdb_nh_path_select` is used in the VXLAN core, specifically in `drivers/net/vxlan/vxlan_core.c`. That means `CONFIG_VXLAN` is a prerequisite, which is expected. Now, let's broaden the scope. This patch also touches `net/ipv4/nexthop.c`. The modified functions are `nh_fill_node`, `nh_nlmsg_size_single`, `nexthop_create`, and `rtm_to_nh_config`. These are all related to the nexthop netlink interface, so that's a key area to explore. I want to dive deeper into `nexthop_create` and `rtm_to_nh_config` within `net/ipv4/nexthop.c`. They're the critical functions involved in creating and configuring nexthops via netlink, which is the heart of how this works. The focus symbols here are going to be `nexthop_create`, `rtm_to_nh_config`, `nh_fill_node`, `nh_nlmsg_size_single` – they're all directly involved in netlink interaction for nexthops. Then, we also have `vxlan_fdb_nh_path_select`, which is a static inline function defined in `include/net/vxlan.h`. Because it's inline, it's actually inlined into the two functions that use it: `vxlan_xmit_nh` and `vxlan_xmit_nhid`. Therefore, I'll need to check if `vxlan_xmit_nh` and `vxlan_xmit_nhid` are good focus symbols since those are the places where `vxlan_fdb_nh_path_select` is actually getting used. |
| 8/2 | 2026/07/17 09:20 | tool | grepper |
0mArgs:{
"Expression": "vxlan_xmit_nh",
"PathPrefix": "drivers/net/vxlan/"
}Results: {
"Output": "drivers/net/vxlan/vxlan_core.c=2344=void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,\n--\ndrivers/net/vxlan/vxlan_core.c-2649-\ndrivers/net/vxlan/vxlan_core.c:2650:static void vxlan_xmit_nh(struct sk_buff *skb, struct net_device *dev,\ndrivers/net/vxlan/vxlan_core.c-2651-\t\t\t struct vxlan_fdb *f, __be32 vni, bool did_rsc)\n--\ndrivers/net/vxlan/vxlan_core.c-2679-\ndrivers/net/vxlan/vxlan_core.c:2680:static netdev_tx_t vxlan_xmit_nhid(struct sk_buff *skb, struct net_device *dev,\ndrivers/net/vxlan/vxlan_core.c-2681-\t\t\t\t u32 nhid, __be32 vni)\n--\ndrivers/net/vxlan/vxlan_core.c=2725=static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)\n--\ndrivers/net/vxlan/vxlan_core.c-2772-\tif (nhid)\ndrivers/net/vxlan/vxlan_core.c:2773:\t\treturn vxlan_xmit_nhid(skb, dev, nhid, vni);\ndrivers/net/vxlan/vxlan_core.c-2774-\n--\ndrivers/net/vxlan/vxlan_core.c-2818-\tif (rcu_access_pointer(f-\u003enh)) {\ndrivers/net/vxlan/vxlan_core.c:2819:\t\tvxlan_xmit_nh(skb, dev, f,\ndrivers/net/vxlan/vxlan_core.c-2820-\t\t\t (vni ? : vxlan-\u003edefault_dst.remote_vni), did_rsc);\n"
} |
| 9/2 | 2026/07/17 09:20 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 7656 output: 30 thoughts: 291 Thoughts: **Analyzing VXLAN Nexthop Transmission Path** Okay, so I'm honing in on the key symbols for this investigation: `vxlan_xmit_nh` and `vxlan_xmit_nhid`. These are my primary focus points. I should also keep an eye on `rtm_to_nh_config`, `nexthop_create`, `nh_fill_node`, and `nh_nlmsg_size_single`. Now, let's determine if `nexthop_create` is performance critical. Thinking through it, it's triggered during nexthop creation through netlink, which firmly places it in the control path. `rtm_to_nh_config` is also control plane. `nh_fill_node`, involved in nexthop dumping, clearly belongs to the control path as well. And `nh_nlmsg_size_single`, also control plane. Crucially, `vxlan_xmit_nh` and `vxlan_xmit_nhid` are datapath functions, and they're specifically tied to nexthop-based VXLAN transmission, which is exactly what I'm looking to optimize. Before I go further, let's make sure I don't need any additional configuration options enabled. The obvious one is `CONFIG_VXLAN`, required for the datapath functions. I should also think about `CONFIG_IP_ROUTE_MULTIPATH`. Nexthops are pretty fundamental to IPv4 routing, so I'll double-check `net/ipv4/Kconfig` just to be certain that I haven't missed anything pertinent to nexthop behavior. |
| 10/2 | 2026/07/17 09:20 | tool | grepper |
0mError:no matches Args: {
"Expression": "nexthop",
"PathPrefix": "net/ipv4/Kconfig"
}Results: {
"error": "no matches"
} |
| 11/2 | 2026/07/17 09:20 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 8345 output: 37 thoughts: 38 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **IPv4 Next Hop Investigation** Right, this seems pretty straightforward – it's just standard IPv4 behavior we're dealing with. No major surprises there. But, given the recent modifications, I need to be absolutely certain. My next step is to drill down into the kernel code, specifically, `net/ipv4/nexthop.c`. I need to meticulously check for any preprocessor directives, any `#ifdef` blocks, surrounding this particular code section. The goal is to identify if the changes are conditionally compiled or if they're universally applied. Understanding the scope of the modifications is paramount. Let's see what we've got. |
| 12/2 | 2026/07/17 09:21 | tool | grepper |
0mArgs:{
"Expression": "NHA_FDB_PORT",
"PathPrefix": "net/ipv4/nexthop.c"
}Results: {
"Output": "net/ipv4/nexthop.c=32=static const struct nla_policy rtm_nh_policy_new[] = {\n--\nnet/ipv4/nexthop.c-41-\t[NHA_FDB]\t\t= { .type = NLA_FLAG },\nnet/ipv4/nexthop.c:42:\t[NHA_FDB_PORT]\t\t= { .type = NLA_U16 },\nnet/ipv4/nexthop.c-43-\t[NHA_RES_GROUP]\t\t= { .type = NLA_NESTED },\n--\nnet/ipv4/nexthop.c=915=static int nh_fill_node(struct sk_buff *skb, struct nexthop *nh,\n--\nnet/ipv4/nexthop.c-960-\t\tif (nhi-\u003efdb_port \u0026\u0026\nnet/ipv4/nexthop.c:961:\t\t nla_put_be16(skb, NHA_FDB_PORT, nhi-\u003efdb_port))\nnet/ipv4/nexthop.c-962-\t\t\tgoto nla_put_failure;\n--\nnet/ipv4/nexthop.c=1039=static size_t nh_nlmsg_size_single(struct nexthop *nh)\n--\nnet/ipv4/nexthop.c-1062-\tif (nhi-\u003efdb_nh)\nnet/ipv4/nexthop.c:1063:\t\tsz += nla_total_size(2);\t/* NHA_FDB_PORT */\nnet/ipv4/nexthop.c-1064-\n--\nnet/ipv4/nexthop.c=3102=static int rtm_to_nh_config(struct net *net, struct sk_buff *skb,\n--\nnet/ipv4/nexthop.c-3158-\nnet/ipv4/nexthop.c:3159:\tif (tb[NHA_FDB_PORT]) {\nnet/ipv4/nexthop.c-3160-\t\tif (!tb[NHA_FDB] || !tb[NHA_GATEWAY]) {\n--\nnet/ipv4/nexthop.c-3164-\t\t}\nnet/ipv4/nexthop.c:3165:\t\tcfg-\u003enh_fdb_port = nla_get_be16(tb[NHA_FDB_PORT]);\nnet/ipv4/nexthop.c-3166-\t}\n"
} |
| 13/2 | 2026/07/17 09:21 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 9217 output: 40 thoughts: 139 Thoughts: Okay, let's break this down. **Analyzing VXLAN Configuration Interactions** Alright, no preprocessor directives, specifically `#ifdef`s, are being used to conditionally include code related to `NHA_FDB_PORT`. That's good to know – fewer potential configuration gotchas. The current configuration is simply `VXLAN`. Now, I need to focus on these specific symbols: `rtm_to_nh_config`, `nexthop_create`, `nh_fill_node`, `nh_nlmsg_size_single`, `vxlan_xmit_nh`, and `vxlan_xmit_nhid`. These appear to be the key functions involved in the VXLAN next-hop configuration process. I'm especially interested in understanding how they interact, how next hops are created, filled, and transmitted. Wait a second... a quick reality check. `vxlan_xmit_nh` and `vxlan_xmit_nhid` are *static* functions, and I'm pretty sure they are in `drivers/net/vxlan/vxlan_core.c`. I should verify those names to make sure. I'll need to double check that I'm referencing the correct function definitions. My understanding is these are important, but static functions can introduce unexpected behavior if not accounted for correctly. |
| 14/2 | 2026/07/17 09:21 | tool | grepper |
0mArgs:{
"Expression": "vxlan_xmit_nh",
"PathPrefix": "drivers/net/vxlan/vxlan_core.c"
}Results: {
"Output": "drivers/net/vxlan/vxlan_core.c=2344=void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,\n--\ndrivers/net/vxlan/vxlan_core.c-2649-\ndrivers/net/vxlan/vxlan_core.c:2650:static void vxlan_xmit_nh(struct sk_buff *skb, struct net_device *dev,\ndrivers/net/vxlan/vxlan_core.c-2651-\t\t\t struct vxlan_fdb *f, __be32 vni, bool did_rsc)\n--\ndrivers/net/vxlan/vxlan_core.c-2679-\ndrivers/net/vxlan/vxlan_core.c:2680:static netdev_tx_t vxlan_xmit_nhid(struct sk_buff *skb, struct net_device *dev,\ndrivers/net/vxlan/vxlan_core.c-2681-\t\t\t\t u32 nhid, __be32 vni)\n--\ndrivers/net/vxlan/vxlan_core.c=2725=static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)\n--\ndrivers/net/vxlan/vxlan_core.c-2772-\tif (nhid)\ndrivers/net/vxlan/vxlan_core.c:2773:\t\treturn vxlan_xmit_nhid(skb, dev, nhid, vni);\ndrivers/net/vxlan/vxlan_core.c-2774-\n--\ndrivers/net/vxlan/vxlan_core.c-2818-\tif (rcu_access_pointer(f-\u003enh)) {\ndrivers/net/vxlan/vxlan_core.c:2819:\t\tvxlan_xmit_nh(skb, dev, f,\ndrivers/net/vxlan/vxlan_core.c-2820-\t\t\t (vni ? : vxlan-\u003edefault_dst.remote_vni), did_rsc);\n"
} |
| 15/2 | 2026/07/17 09:21 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 10212 output: 141 thoughts: 117 Thoughts: Okay, here's my assessment of this patch, from my perspective as someone who understands this low-level networking code: **Analyzing the Patch's Functionality and Testability** Right, so these are confirmed as static functions, which is good to keep in mind for scoping and potential side effects. My initial question is if there are any other configurations that need to be considered. The patch includes a new selftest, `fib_nexthops_fdb_port.sh`, which is a positive sign. Functionally, this patch looks solid, and it's definitely something that's ripe for fuzzing. Good to see they're thinking about that. Now, let's drill down to the critical symbols the patch focuses on. I want to make sure these are the correct ones. Examining the code, I see: * `rtm_to_nh_config` * `nexthop_create` * `nh_fill_node` * `vxlan_xmit_nh` * `vxlan_xmit_nhid` Yep, these are the key functions, and these choices make sense given what I'm expecting this patch to address. That's a good set of focus points for this work. Now I can move on to the next set of code blocks. Let's call `set-results`. |
| 16/2 | 2026/07/17 09:21 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"VXLAN"
],
"FocusSymbols": [
"rtm_to_nh_config",
"nexthop_create",
"nh_fill_node",
"vxlan_xmit_nh",
"vxlan_xmit_nhid"
],
"Reasoning": "The patch introduces a new netlink attribute NHA_FDB_PORT for fdb nexthops, modifying nexthop creation and dumping logic, as well as VXLAN transmission paths to utilize this new port. This is a functional change in core networking and VXLAN driver.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"VXLAN"
],
"FocusSymbols": [
"rtm_to_nh_config",
"nexthop_create",
"nh_fill_node",
"vxlan_xmit_nh",
"vxlan_xmit_nhid"
],
"Reasoning": "The patch introduces a new netlink attribute NHA_FDB_PORT for fdb nexthops, modifying nexthop creation and dumping logic, as well as VXLAN transmission paths to utilize this new port. This is a functional change in core networking and VXLAN driver.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|