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>
This commit is contained in:
Jeremy Kerr 2025-07-02 14:20:02 +08:00 committed by Paolo Abeni
parent e0f3c79cc0
commit fc2b87d036
1 changed files with 3 additions and 5 deletions

View File

@ -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);