diff options
| author | Jeremy Kerr <jk@codeconstruct.com.au> | 2025-07-02 14:20:02 +0800 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-07-08 12:39:23 +0200 |
| commit | fc2b87d036e2155b16f8c53c8198df7b376fd616 (patch) | |
| tree | f1808042b69647c4e5e59ff6f4e67c3791346149 /net | |
| parent | net: mctp: don't use source cb data when forwarding, ensure pkt_type is set (diff) | |
| download | linux-fc2b87d036e2155b16f8c53c8198df7b376fd616.tar.gz linux-fc2b87d036e2155b16f8c53c8198df7b376fd616.zip | |
net: mctp: test: make cloned_frag buffers more appropriately-sized
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>
Link: https://patch.msgid.link/20250702-dev-forwarding-v5-2-1468191da8a4@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/mctp/test/route-test.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c index 06c1897b685a..44ebc8e4e30c 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[3 * ARRAY_SIZE(hdrs)]; + u8 flat[3 * 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); |
