| 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 ...
|
| d192eaf5 | 19-Feb-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: tests: Add a test for proper tag creation on local output
Ensure we have the correct key parameters on sending a message.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-
net: mctp: tests: Add a test for proper tag creation on local output
Ensure we have the correct key parameters on sending a message.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 109a5331 | 19-Feb-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: tests: Test that outgoing skbs have flow data populated
When CONFIG_MCTP_FLOWS is enabled, outgoing skbs should have their SKB_EXT_MCTP extension set for drivers to consume.
Add two test
net: mctp: tests: Test that outgoing skbs have flow data populated
When CONFIG_MCTP_FLOWS is enabled, outgoing skbs should have their SKB_EXT_MCTP extension set for drivers to consume.
Add two tests for local-to-output routing that check for the flow extensions: one for the simple single-packet case, and one for fragmentation.
We now make MCTP_TEST select MCTP_FLOWS, so we always get coverage of these flow tests. The tests are skippable if MCTP_FLOWS is (otherwise) disabled, but that would need manual config tweaking.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 9acdc089 | 19-Feb-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: tests: Add MCTP net isolation tests
Add a couple of tests that excersise the new net-specific sk_key and bind lookups
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by:
net: mctp: tests: Add MCTP net isolation tests
Add a couple of tests that excersise the new net-specific sk_key and bind lookups
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 61b50531 | 19-Feb-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: tests: Add netid argument to __mctp_route_test_init
We'll want to create net-specific test setups in an upcoming change, so allow the caller to provide a non-default netid.
Signed-off-by
net: mctp: tests: Add netid argument to __mctp_route_test_init
We'll want to create net-specific test setups in an upcoming change, so allow the caller to provide a non-default netid.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 43e67955 | 19-Feb-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
net: mctp: separate key correlation across nets
Currently, we lookup sk_keys from the entire struct net_namespace, which may contain multiple MCTP net IDs. In those cases we want to distinguish betw
net: mctp: separate key correlation across nets
Currently, we lookup sk_keys from the entire struct net_namespace, which may contain multiple MCTP net IDs. In those cases we want to distinguish between endpoints with the same EID but different net ID.
Add the net ID data to the struct mctp_sk_key, populate on add and filter on this during route lookup.
For the ioctl interface, we use a default net of MCTP_INITIAL_DEFAULT_NET (ie., what will be in use for single-net configurations), but we'll extend the ioctl interface to provide net-specific tag allocation in an upcoming change.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|