[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202506241117.wd6sbUKA-lkp@intel.com>
Date: Tue, 24 Jun 2025 11:56:59 +0800
From: kernel test robot <lkp@...el.com>
To: Jeremy Kerr <jk@...econstruct.com.au>,
Matt Johnston <matt@...econstruct.com.au>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 02/13] net: mctp: separate routing database
from routing operations
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/20250619-160339
base: 0097c4195b1d0ca57d15979626c769c74747b5a0
patch link: https://lore.kernel.org/r/20250619-dev-forwarding-v2-2-3f81801b06c2%40codeconstruct.com.au
patch subject: [PATCH net-next v2 02/13] net: mctp: separate routing database from routing operations
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20250624/202506241117.wd6sbUKA-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250624/202506241117.wd6sbUKA-lkp@intel.com/reproduce)
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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506241117.wd6sbUKA-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from net/mctp/route.c:1554:
net/mctp/test/route-test.c: In function 'mctp_test_route_input_cloned_frag':
>> net/mctp/test/route-test.c:1091:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1091 | }
| ^
vim +1091 net/mctp/test/route-test.c
ce1219c3f76bb1 Jeremy Kerr 2024-12-18 983
f5d83cf0eeb90f Matt Johnston 2025-03-06 984 /* Input route to socket, using a fragmented message created from clones.
f5d83cf0eeb90f Matt Johnston 2025-03-06 985 */
f5d83cf0eeb90f Matt Johnston 2025-03-06 986 static void mctp_test_route_input_cloned_frag(struct kunit *test)
f5d83cf0eeb90f Matt Johnston 2025-03-06 987 {
f5d83cf0eeb90f Matt Johnston 2025-03-06 988 /* 5 packet fragments, forming 2 complete messages */
f5d83cf0eeb90f Matt Johnston 2025-03-06 989 const struct mctp_hdr hdrs[5] = {
f5d83cf0eeb90f Matt Johnston 2025-03-06 990 RX_FRAG(FL_S, 0),
f5d83cf0eeb90f Matt Johnston 2025-03-06 991 RX_FRAG(0, 1),
f5d83cf0eeb90f Matt Johnston 2025-03-06 992 RX_FRAG(FL_E, 2),
f5d83cf0eeb90f Matt Johnston 2025-03-06 993 RX_FRAG(FL_S, 0),
f5d83cf0eeb90f Matt Johnston 2025-03-06 994 RX_FRAG(FL_E, 1),
f5d83cf0eeb90f Matt Johnston 2025-03-06 995 };
fb025ae64bd1f2 Jeremy Kerr 2025-06-19 996 struct mctp_test_pktqueue tpq;
f5d83cf0eeb90f Matt Johnston 2025-03-06 997 struct mctp_test_dev *dev;
f5d83cf0eeb90f Matt Johnston 2025-03-06 998 struct sk_buff *skb[5];
f5d83cf0eeb90f Matt Johnston 2025-03-06 999 struct sk_buff *rx_skb;
fb025ae64bd1f2 Jeremy Kerr 2025-06-19 1000 struct mctp_dst dst;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1001 struct socket *sock;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1002 size_t data_len;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1003 u8 compare[100];
f5d83cf0eeb90f Matt Johnston 2025-03-06 1004 u8 flat[100];
f5d83cf0eeb90f Matt Johnston 2025-03-06 1005 size_t total;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1006 void *p;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1007 int rc;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1008
f5d83cf0eeb90f Matt Johnston 2025-03-06 1009 /* Arbitrary length */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1010 data_len = 3;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1011 total = data_len + sizeof(struct mctp_hdr);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1012
fb025ae64bd1f2 Jeremy Kerr 2025-06-19 1013 __mctp_route_test_init(test, &dev, &dst, &tpq, &sock, MCTP_NET_ANY);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1014
f5d83cf0eeb90f Matt Johnston 2025-03-06 1015 /* Create a single skb initially with concatenated packets */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1016 skb[0] = mctp_test_create_skb(&hdrs[0], 5 * total);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1017 mctp_test_skb_set_dev(skb[0], dev);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1018 memset(skb[0]->data, 0 * 0x11, skb[0]->len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1019 memcpy(skb[0]->data, &hdrs[0], sizeof(struct mctp_hdr));
f5d83cf0eeb90f Matt Johnston 2025-03-06 1020
f5d83cf0eeb90f Matt Johnston 2025-03-06 1021 /* Extract and populate packets */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1022 for (int i = 1; i < 5; i++) {
f5d83cf0eeb90f Matt Johnston 2025-03-06 1023 skb[i] = skb_clone(skb[i - 1], GFP_ATOMIC);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1024 KUNIT_ASSERT_TRUE(test, skb[i]);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1025 p = skb_pull(skb[i], total);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1026 KUNIT_ASSERT_TRUE(test, p);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1027 skb_reset_network_header(skb[i]);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1028 memcpy(skb[i]->data, &hdrs[i], sizeof(struct mctp_hdr));
f5d83cf0eeb90f Matt Johnston 2025-03-06 1029 memset(&skb[i]->data[sizeof(struct mctp_hdr)], i * 0x11, data_len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1030 }
f5d83cf0eeb90f Matt Johnston 2025-03-06 1031 for (int i = 0; i < 5; i++)
f5d83cf0eeb90f Matt Johnston 2025-03-06 1032 skb_trim(skb[i], total);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1033
f5d83cf0eeb90f Matt Johnston 2025-03-06 1034 /* SOM packets have a type byte to match the socket */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1035 skb[0]->data[4] = 0;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1036 skb[3]->data[4] = 0;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1037
f5d83cf0eeb90f Matt Johnston 2025-03-06 1038 skb_dump("pkt1 ", skb[0], false);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1039 skb_dump("pkt2 ", skb[1], false);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1040 skb_dump("pkt3 ", skb[2], false);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1041 skb_dump("pkt4 ", skb[3], false);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1042 skb_dump("pkt5 ", skb[4], false);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1043
f5d83cf0eeb90f Matt Johnston 2025-03-06 1044 for (int i = 0; i < 5; i++) {
f5d83cf0eeb90f Matt Johnston 2025-03-06 1045 KUNIT_EXPECT_EQ(test, refcount_read(&skb[i]->users), 1);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1046 /* Take a reference so we can check refcounts at the end */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1047 skb_get(skb[i]);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1048 }
f5d83cf0eeb90f Matt Johnston 2025-03-06 1049
f5d83cf0eeb90f Matt Johnston 2025-03-06 1050 /* Feed the fragments into MCTP core */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1051 for (int i = 0; i < 5; i++) {
fb025ae64bd1f2 Jeremy Kerr 2025-06-19 1052 rc = mctp_dst_input(&dst, skb[i]);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1053 KUNIT_EXPECT_EQ(test, rc, 0);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1054 }
f5d83cf0eeb90f Matt Johnston 2025-03-06 1055
f5d83cf0eeb90f Matt Johnston 2025-03-06 1056 /* Receive first reassembled message */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1057 rx_skb = skb_recv_datagram(sock->sk, MSG_DONTWAIT, &rc);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1058 KUNIT_EXPECT_EQ(test, rc, 0);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1059 KUNIT_EXPECT_EQ(test, rx_skb->len, 3 * data_len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1060 rc = skb_copy_bits(rx_skb, 0, flat, rx_skb->len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1061 for (int i = 0; i < rx_skb->len; i++)
f5d83cf0eeb90f Matt Johnston 2025-03-06 1062 compare[i] = (i / data_len) * 0x11;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1063 /* Set type byte */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1064 compare[0] = 0;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1065
f5d83cf0eeb90f Matt Johnston 2025-03-06 1066 KUNIT_EXPECT_MEMEQ(test, flat, compare, rx_skb->len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1067 KUNIT_EXPECT_EQ(test, refcount_read(&rx_skb->users), 1);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1068 kfree_skb(rx_skb);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1069
f5d83cf0eeb90f Matt Johnston 2025-03-06 1070 /* Receive second reassembled message */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1071 rx_skb = skb_recv_datagram(sock->sk, MSG_DONTWAIT, &rc);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1072 KUNIT_EXPECT_EQ(test, rc, 0);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1073 KUNIT_EXPECT_EQ(test, rx_skb->len, 2 * data_len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1074 rc = skb_copy_bits(rx_skb, 0, flat, rx_skb->len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1075 for (int i = 0; i < rx_skb->len; i++)
f5d83cf0eeb90f Matt Johnston 2025-03-06 1076 compare[i] = (i / data_len + 3) * 0x11;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1077 /* Set type byte */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1078 compare[0] = 0;
f5d83cf0eeb90f Matt Johnston 2025-03-06 1079
f5d83cf0eeb90f Matt Johnston 2025-03-06 1080 KUNIT_EXPECT_MEMEQ(test, flat, compare, rx_skb->len);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1081 KUNIT_EXPECT_EQ(test, refcount_read(&rx_skb->users), 1);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1082 kfree_skb(rx_skb);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1083
f5d83cf0eeb90f Matt Johnston 2025-03-06 1084 /* Check input skb refcounts */
f5d83cf0eeb90f Matt Johnston 2025-03-06 1085 for (int i = 0; i < 5; i++) {
f5d83cf0eeb90f Matt Johnston 2025-03-06 1086 KUNIT_EXPECT_EQ(test, refcount_read(&skb[i]->users), 1);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1087 kfree_skb(skb[i]);
f5d83cf0eeb90f Matt Johnston 2025-03-06 1088 }
f5d83cf0eeb90f Matt Johnston 2025-03-06 1089
fb025ae64bd1f2 Jeremy Kerr 2025-06-19 1090 __mctp_route_test_fini(test, dev, &dst, &tpq, sock);
f5d83cf0eeb90f Matt Johnston 2025-03-06 @1091 }
f5d83cf0eeb90f Matt Johnston 2025-03-06 1092
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists