From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Matt Johnston <matt@codeconstruct.com.au>,
"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>
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next v3 02/14] net: mctp: test: make cloned_frag buffers more appropriately-sized
Date: Wed, 25 Jun 2025 15:34:40 +0800 [thread overview]
Message-ID: <20250625-dev-forwarding-v3-2-2061bd3013b3@codeconstruct.com.au> (raw)
In-Reply-To: <20250625-dev-forwarding-v3-0-2061bd3013b3@codeconstruct.com.au>
In our input_cloned_frag test, we currently allocate our test buffers
arbitrarily-sized at 100 bytes.
We only expect to receive a max of 15 bytes from the socket, so reduce
to a more appropriate size. There are some upcoming changes to the
routing code which hit a frame-size limit on s390, so reduce the usage
before that lands.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
---
v3:
- new commit, preventing -Wframe-larger-than issues for the upcoming
change, reported by ktr.
---
net/mctp/test/route-test.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c
index 06c1897b685a8bdfd6bb4f1bccaacb53b0cd54ba..41c9644704a5dc6237b3820fde3816f2480b5473 100644
--- a/net/mctp/test/route-test.c
+++ b/net/mctp/test/route-test.c
@@ -933,20 +933,18 @@ static void mctp_test_route_input_cloned_frag(struct kunit *test)
RX_FRAG(FL_S, 0),
RX_FRAG(FL_E, 1),
};
+ const size_t data_len = 3; /* arbitrary */
+ u8 compare[data_len * ARRAY_SIZE(hdrs)];
+ u8 flat[data_len * ARRAY_SIZE(hdrs)];
struct mctp_test_route *rt;
struct mctp_test_dev *dev;
struct sk_buff *skb[5];
struct sk_buff *rx_skb;
struct socket *sock;
- size_t data_len;
- u8 compare[100];
- u8 flat[100];
size_t total;
void *p;
int rc;
- /* Arbitrary length */
- data_len = 3;
total = data_len + sizeof(struct mctp_hdr);
__mctp_route_test_init(test, &dev, &rt, &sock, MCTP_NET_ANY);
--
2.39.5
next prev parent reply other threads:[~2025-06-25 7:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 7:34 [PATCH net-next v3 00/14] net: mctp: Add support for gateway routing Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 01/14] net: mctp: don't use source cb data when forwarding, ensure pkt_type is set Jeremy Kerr
2025-06-25 7:34 ` Jeremy Kerr [this message]
2025-06-26 14:17 ` [PATCH net-next v3 02/14] net: mctp: test: make cloned_frag buffers more appropriately-sized kernel test robot
2025-06-25 7:34 ` [PATCH net-next v3 03/14] net: mctp: separate routing database from routing operations Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 04/14] net: mctp: separate cb from direct-addressing routing Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 05/14] net: mctp: test: Add an addressed device constructor Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 06/14] net: mctp: test: Add extaddr routing output test Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 07/14] net: mctp: test: move functions into utils.[ch] Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 08/14] net: mctp: test: add sock test infrastructure Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 09/14] net: mctp: test: Add initial socket tests Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 10/14] net: mctp: pass net into route creation Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 11/14] net: mctp: remove routes by netid, not by device Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 12/14] net: mctp: allow NL parsing directly into a struct mctp_route Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 13/14] net: mctp: add gateway routing support Jeremy Kerr
2025-06-25 7:34 ` [PATCH net-next v3 14/14] net: mctp: test: Add tests for gateway routes Jeremy Kerr
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=20250625-dev-forwarding-v3-2-2061bd3013b3@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@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).