diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2025-07-02 14:20:03 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-07-08 12:39:23 +0200 |
commit | 269936db5eb3962fe290b1dc4dbf1859cd5a04dd (patch) | |
tree | 93d96730002af6d8ed651337055246abea82f0e6 /net/unix/af_unix.c | |
parent | fc2b87d036e2155b16f8c53c8198df7b376fd616 (diff) |
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>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions