| 76872971 | 29-Apr-2026 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: Use dev_direct_xmit for TX to our test device
In our test cases, we typically feed a packet sequence into the routing code, then inspect the device's TXed skbs to assert specific be
net: mctp: test: Use dev_direct_xmit for TX to our test device
In our test cases, we typically feed a packet sequence into the routing code, then inspect the device's TXed skbs to assert specific behaviours.
Using dev_queue_xmit() for our TX path introduces a fair bit of complexity between the test packet sequence and the test device's ndo_start_xmit callback; which may mean that the skbs have not hit the device at the point we're inspecting the TXed skb list.
Use dev_direct_xmit instead, as we want a direct a path as possible here, and the test dev does not need any queueing, scheduling or flow control.
Fixes: 6ab578739a4c ("net: mctp: test: move TX packetqueue from dst to dev") Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202604281320.525eee17-lkp@intel.com Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260429-dev-mctp-test-fixes-v1-2-1127b7425809@codeconstruct.com.au Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 0d8647bc | 31-Mar-2026 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: don't require a route for null-EID ingress
Currently, if we receive a physically-addressed packet for the local stack, we perform a route_lookup_null to find a matching device-based route
net: mctp: don't require a route for null-EID ingress
Currently, if we receive a physically-addressed packet for the local stack, we perform a route_lookup_null to find a matching device-based route. If a route is present, it will always have the ->output fn set to mctp_dst_input, which provides our delivery mechanism.
However, if we don't yet have any local addresses assigned, we won't have any local routes to lookup, so this will fail. One of the use-cases for physical addressing is initial address assignment on endpoint nodes, where we would have no addresses, and therefore no local routes.
Instead of iterating routes (looking for one matching the dev), just create a suitable mctp_dst for the device directly.
Add a testcase for the no-route case too.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20260331-dev-mctp-null-eids-v1-3-b4d047372eaf@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 8af20def | 31-Mar-2026 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: allow local TX with no address assigned
If we're operating as a non-bus-owner endpoint, we may want to perform MCTP communication to get an address assigned. In this case, we'll have no l
net: mctp: allow local TX with no address assigned
If we're operating as a non-bus-owner endpoint, we may want to perform MCTP communication to get an address assigned. In this case, we'll have no local addresses, but can TX just fine either with extended routing, or where a direct route exists.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20260331-dev-mctp-null-eids-v1-2-b4d047372eaf@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| e6d8e7db | 10-Jul-2025 |
Matt Johnston <matt@codeconstruct.com.au> |
net: mctp: Add bind lookup test
Test the preference order of bound socket matches with a series of test packets.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.l
net: mctp: Add bind lookup test
Test the preference order of bound socket matches with a series of test packets.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.link/20250710-mctp-bind-v4-8-8ec2f6460c56@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 4ec4b7fc | 10-Jul-2025 |
Matt Johnston <matt@codeconstruct.com.au> |
net: mctp: Add test for conflicting bind()s
Test pairwise combinations of bind addresses and types.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.link/20250710-
net: mctp: Add test for conflicting bind()s
Test pairwise combinations of bind addresses and types.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.link/20250710-mctp-bind-v4-4-8ec2f6460c56@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 48e1736e | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: Add tests for gateway routes
Add a few kunit tests for the gateway routing. Because we have multiple route types now (direct and gateway), rename mctp_test_create_route to mctp_test
net: mctp: test: Add tests for gateway routes
Add a few kunit tests for the gateway routing. Because we have multiple route types now (direct and gateway), rename mctp_test_create_route to mctp_test_create_route_direct, and add a _gateway variant too.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-14-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| ad39c12f | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: add gateway routing support
This change allows for gateway routing, where a route table entry may reference a routable endpoint (by network and EID), instead of routing directly to a netd
net: mctp: add gateway routing support
This change allows for gateway routing, where a route table entry may reference a routable endpoint (by network and EID), instead of routing directly to a netdevice.
We add support for a RTM_GATEWAY attribute for netlink route updates, with an attribute format of:
struct mctp_fq_addr { unsigned int net; mctp_eid_t eid; }
- we need the net here to uniquely identify the target EID, as we no longer have the device reference directly (which would provide the net id in the case of direct routes).
This makes route lookups recursive, as a route lookup that returns a gateway route must be resolved into a direct route (ie, to a device) eventually. We provide a limit to the route lookups, to prevent infinite loop routing.
The route lookup populates a new 'nexthop' field in the dst structure, which now specifies the key for the neighbour table lookup on device output, rather than using the packet destination address directly.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-13-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 9b4a8c38 | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: Add initial socket tests
Recent changes have modified the extaddr path a little, so add a couple of kunit tests to af-mctp.c. These check that we're correctly passing lladdr data be
net: mctp: test: Add initial socket tests
Recent changes have modified the extaddr path a little, so add a couple of kunit tests to af-mctp.c. These check that we're correctly passing lladdr data between sendmsg/recvmsg and the routing layer.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-9-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 19396179 | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: add sock test infrastructure
Add a new test object, for use with the af_mctp socket code. This is intially empty, but we'll start populating actual tests in an upcoming change.
Sig
net: mctp: test: add sock test infrastructure
Add a new test object, for use with the af_mctp socket code. This is intially empty, but we'll start populating actual tests in an upcoming change.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-8-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 80bcf05e | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: move functions into utils.[ch]
A future change will add another mctp test .c file, so move some of the common test setup from route.c into the utils object.
Signed-off-by: Jeremy K
net: mctp: test: move functions into utils.[ch]
A future change will add another mctp test .c file, so move some of the common test setup from route.c into the utils object.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-7-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 46ee1646 | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: Add extaddr routing output test
Test that the routing code preserves the haddr data in a skb through an input route operation.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
net: mctp: test: Add extaddr routing output test
Test that the routing code preserves the haddr data in a skb through an input route operation.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-6-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 96b341a8 | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: test: Add an addressed device constructor
Upcoming tests will check semantics of hardware addressing, which require a dev with ->addr_len != 0. Add a constructor to create a MCTP interfac
net: mctp: test: Add an addressed device constructor
Upcoming tests will check semantics of hardware addressing, which require a dev with ->addr_len != 0. Add a constructor to create a MCTP interface using a physically-addressed bus type.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-5-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 269936db | 02-Jul-2025 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: separate routing database from routing operations
This change adds a struct mctp_dst, representing the result of a routing lookup. This decouples the struct mctp_route from the actual imp
net: mctp: separate routing database from routing operations
This change adds a struct mctp_dst, representing the result of a routing lookup. This decouples the struct mctp_route from the actual implementation of a routing operation.
This will allow for future routing changes which may require more involved lookup logic, such as gateway routing - which may require multiple traversals of the routing table.
Since we only use the struct mctp_route at lookup time, we no longer hold routes over a routing operation, as we only need it to populate the dst. However, we do hold the dev while the dst is active.
This requires some changes to the route test infrastructure, as we no longer have a mock route to handle the route output operation, and transient dsts are created by the routing code, so we can't override them as easily.
Instead, we use kunit->priv to stash a packet queue, and a custom dst_output function queues into that packet queue, which we can use for later expectations.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20250702-dev-forwarding-v5-3-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|