From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH net-next 12/13] net: mctp: add gateway routing support
Date: Fri, 13 Jun 2025 15:34:57 +0800 [thread overview]
Message-ID: <202506131515.a5tCsTj0-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250611-dev-forwarding-v1-12-6b69b1feb37f@codeconstruct.com.au>
References: <20250611-dev-forwarding-v1-12-6b69b1feb37f@codeconstruct.com.au>
TO: Jeremy Kerr <jk@codeconstruct.com.au>
TO: Matt Johnston <matt@codeconstruct.com.au>
TO: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
TO: Eric Dumazet <edumazet@google.com>
TO: Jakub Kicinski <kuba@kernel.org>
TO: Paolo Abeni <pabeni@redhat.com>
TO: Simon Horman <horms@kernel.org>
Hi Jeremy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 0097c4195b1d0ca57d15979626c769c74747b5a0]
url: https://github.com/intel-lab-lkp/linux/commits/Jeremy-Kerr/net-mctp-don-t-use-source-cb-data-when-forwarding-ensure-pkt_type-is-set/20250611-143319
base: 0097c4195b1d0ca57d15979626c769c74747b5a0
patch link: https://lore.kernel.org/r/20250611-dev-forwarding-v1-12-6b69b1feb37f%40codeconstruct.com.au
patch subject: [PATCH net-next 12/13] net: mctp: add gateway routing support
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: csky-randconfig-r073-20250612 (https://download.01.org/0day-ci/archive/20250613/202506131515.a5tCsTj0-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.3.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202506131515.a5tCsTj0-lkp@intel.com/
New smatch warnings:
net/mctp/route.c:1381 mctp_route_nlparse_common() error: uninitialized symbol 'gateway'.
Old smatch warnings:
net/mctp/route.c:1397 mctp_route_nlparse_common() error: uninitialized symbol 'gateway'.
vim +/gateway +1381 net/mctp/route.c
33d33bef994e518 Jeremy Kerr 2025-06-11 1344
75626016e50cb9a Jeremy Kerr 2025-06-11 1345 /* base parsing; common to both _lookup and _populate variants.
75626016e50cb9a Jeremy Kerr 2025-06-11 1346 *
75626016e50cb9a Jeremy Kerr 2025-06-11 1347 * For gateway routes (which have a RTA_GATEWAY, and no RTA_OIF), we populate
75626016e50cb9a Jeremy Kerr 2025-06-11 1348 * *gatweayp. for direct routes (RTA_OIF, no RTA_GATEWAY), we populate *mdev.
75626016e50cb9a Jeremy Kerr 2025-06-11 1349 */
33d33bef994e518 Jeremy Kerr 2025-06-11 1350 static int mctp_route_nlparse_common(struct net *net, struct nlmsghdr *nlh,
06d2f4c583a7d89 Matt Johnston 2021-07-29 1351 struct netlink_ext_ack *extack,
06d2f4c583a7d89 Matt Johnston 2021-07-29 1352 struct nlattr **tb, struct rtmsg **rtm,
33d33bef994e518 Jeremy Kerr 2025-06-11 1353 struct mctp_dev **mdev,
75626016e50cb9a Jeremy Kerr 2025-06-11 1354 struct mctp_fq_addr *gatewayp,
33d33bef994e518 Jeremy Kerr 2025-06-11 1355 mctp_eid_t *daddr_start)
06d2f4c583a7d89 Matt Johnston 2021-07-29 1356 {
75626016e50cb9a Jeremy Kerr 2025-06-11 1357 struct mctp_fq_addr *gateway;
75626016e50cb9a Jeremy Kerr 2025-06-11 1358 unsigned int ifindex = 0;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1359 struct net_device *dev;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1360 int rc;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1361
06d2f4c583a7d89 Matt Johnston 2021-07-29 1362 rc = nlmsg_parse(nlh, sizeof(struct rtmsg), tb, RTA_MAX,
06d2f4c583a7d89 Matt Johnston 2021-07-29 1363 rta_mctp_policy, extack);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1364 if (rc < 0) {
06d2f4c583a7d89 Matt Johnston 2021-07-29 1365 NL_SET_ERR_MSG(extack, "incorrect format");
06d2f4c583a7d89 Matt Johnston 2021-07-29 1366 return rc;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1367 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1368
06d2f4c583a7d89 Matt Johnston 2021-07-29 1369 if (!tb[RTA_DST]) {
06d2f4c583a7d89 Matt Johnston 2021-07-29 1370 NL_SET_ERR_MSG(extack, "dst EID missing");
06d2f4c583a7d89 Matt Johnston 2021-07-29 1371 return -EINVAL;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1372 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1373 *daddr_start = nla_get_u8(tb[RTA_DST]);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1374
75626016e50cb9a Jeremy Kerr 2025-06-11 1375 if (tb[RTA_OIF])
06d2f4c583a7d89 Matt Johnston 2021-07-29 1376 ifindex = nla_get_u32(tb[RTA_OIF]);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1377
75626016e50cb9a Jeremy Kerr 2025-06-11 1378 if (tb[RTA_GATEWAY])
75626016e50cb9a Jeremy Kerr 2025-06-11 1379 gateway = nla_data(tb[RTA_GATEWAY]);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1380
75626016e50cb9a Jeremy Kerr 2025-06-11 @1381 if (ifindex && gateway) {
75626016e50cb9a Jeremy Kerr 2025-06-11 1382 NL_SET_ERR_MSG(extack,
75626016e50cb9a Jeremy Kerr 2025-06-11 1383 "cannot specify both ifindex and gateway");
33d33bef994e518 Jeremy Kerr 2025-06-11 1384 return -EINVAL;
33d33bef994e518 Jeremy Kerr 2025-06-11 1385
75626016e50cb9a Jeremy Kerr 2025-06-11 1386 } else if (ifindex) {
06d2f4c583a7d89 Matt Johnston 2021-07-29 1387 dev = __dev_get_by_index(net, ifindex);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1388 if (!dev) {
06d2f4c583a7d89 Matt Johnston 2021-07-29 1389 NL_SET_ERR_MSG(extack, "bad ifindex");
06d2f4c583a7d89 Matt Johnston 2021-07-29 1390 return -ENODEV;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1391 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1392 *mdev = mctp_dev_get_rtnl(dev);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1393 if (!*mdev)
06d2f4c583a7d89 Matt Johnston 2021-07-29 1394 return -ENODEV;
75626016e50cb9a Jeremy Kerr 2025-06-11 1395 gatewayp->eid = 0;
75626016e50cb9a Jeremy Kerr 2025-06-11 1396
75626016e50cb9a Jeremy Kerr 2025-06-11 1397 } else if (gateway) {
75626016e50cb9a Jeremy Kerr 2025-06-11 1398 if (!mctp_address_unicast(gateway->eid)) {
75626016e50cb9a Jeremy Kerr 2025-06-11 1399 NL_SET_ERR_MSG(extack, "bad gateway");
75626016e50cb9a Jeremy Kerr 2025-06-11 1400 return -EINVAL;
75626016e50cb9a Jeremy Kerr 2025-06-11 1401 }
75626016e50cb9a Jeremy Kerr 2025-06-11 1402
75626016e50cb9a Jeremy Kerr 2025-06-11 1403 gatewayp->eid = gateway->eid;
75626016e50cb9a Jeremy Kerr 2025-06-11 1404 gatewayp->net = gateway->net != MCTP_NET_ANY ?
75626016e50cb9a Jeremy Kerr 2025-06-11 1405 gateway->net :
75626016e50cb9a Jeremy Kerr 2025-06-11 1406 READ_ONCE(net->mctp.default_net);
75626016e50cb9a Jeremy Kerr 2025-06-11 1407 *mdev = NULL;
75626016e50cb9a Jeremy Kerr 2025-06-11 1408
75626016e50cb9a Jeremy Kerr 2025-06-11 1409 } else {
75626016e50cb9a Jeremy Kerr 2025-06-11 1410 NL_SET_ERR_MSG(extack, "no route output provided");
75626016e50cb9a Jeremy Kerr 2025-06-11 1411 return -EINVAL;
75626016e50cb9a Jeremy Kerr 2025-06-11 1412 }
75626016e50cb9a Jeremy Kerr 2025-06-11 1413
75626016e50cb9a Jeremy Kerr 2025-06-11 1414 *rtm = nlmsg_data(nlh);
75626016e50cb9a Jeremy Kerr 2025-06-11 1415 if ((*rtm)->rtm_family != AF_MCTP) {
75626016e50cb9a Jeremy Kerr 2025-06-11 1416 NL_SET_ERR_MSG(extack, "route family must be AF_MCTP");
75626016e50cb9a Jeremy Kerr 2025-06-11 1417 return -EINVAL;
75626016e50cb9a Jeremy Kerr 2025-06-11 1418 }
75626016e50cb9a Jeremy Kerr 2025-06-11 1419
75626016e50cb9a Jeremy Kerr 2025-06-11 1420 if ((*rtm)->rtm_type != RTN_UNICAST) {
75626016e50cb9a Jeremy Kerr 2025-06-11 1421 NL_SET_ERR_MSG(extack, "rtm_type must be RTN_UNICAST");
75626016e50cb9a Jeremy Kerr 2025-06-11 1422 return -EINVAL;
75626016e50cb9a Jeremy Kerr 2025-06-11 1423 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1424
33d33bef994e518 Jeremy Kerr 2025-06-11 1425 return 0;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1426 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1427
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-06-13 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 7:34 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-11 6:30 [PATCH net-next 00/13] net: mctp: Add support for gateway routing Jeremy Kerr
2025-06-11 6:30 ` [PATCH net-next 12/13] net: mctp: add gateway routing support Jeremy Kerr
2025-06-13 17:11 ` Simon Horman
2025-06-18 17:26 ` Dan Carpenter
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=202506131515.a5tCsTj0-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.