net: mctp: Add support for gateway routing
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected] change-id 20250520-dev-forwarding-0711973470bfVersions newest first
- v5 Latest14 patches 0 repliesApplied 14/14
- v414 patches 4 repliesSuperseded
- v314 patches 0 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 13 patches | 0 replies | Superseded | |
| v1 | 13 patches | 2 replies | Superseded |
Changes in v5 from the cover letter
- reinstate IFF_LOOPBACK check for new routes. Reported by Paolo Abeni
- mctp_sendmsg: return immediately on errors before we have allocated
skb, preventing a mctp_dst_release() on uninit dst. Reported by Paolo
Abeni.
- move mctp_dev_hold() to nlparse_populate, so we're consistent in the
cleanup semantics. defer all stores to @rt to the success case.
- keep existing semantics of extaddr->halen checking
- Link to v4: https://lore.kernel.org/r/[email protected]
Patches in v5 All 14 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | net: mctp: don't use source cb data when forwarding, ensure pkt_type is setnet/ | +12 | 0 replies | Applied |
| 2/14 | net: mctp: test: make cloned_frag buffers more appropriately-sizednet/ | +3 | 0 replies | Applied |
| 3/14 | net: mctp: separate routing database from routing operationsinclude/ net/ net/ +1 more | +313 | 0 replies | Applied |
| 4/14 | net: mctp: separate cb from direct-addressing routinginclude/ net/ | +7 | 0 replies | Applied |
| 5/14 | net: mctp: test: Add an addressed device constructornet/ net/ | +25 | 0 replies | Applied |
| 6/14 | net: mctp: test: Add extaddr routing output testnet/ | +53 | 0 replies | Applied |
| 7/14 | net: mctp: test: move functions into utils.[ch]net/ net/ net/ | +182 | 0 replies | Applied |
| 8/14 | net: mctp: test: add sock test infrastructurenet/ net/ net/ | +21 | 0 replies | Applied |
| 9/14 | net: mctp: test: Add initial socket testsnet/ net/ | +218 | 0 replies | Applied |
| 10/14 | net: mctp: pass net into route creationnet/ | +16 | 0 replies | Applied |
| 11/14 | net: mctp: remove routes by netid, not by devicenet/ | +10 | 0 replies | Applied |
| 12/14 | net: mctp: allow NL parsing directly into a struct mctp_routenet/ | +140 | 0 replies | Applied |
| 13/14 | net: mctp: add gateway routing supportinclude/ include/ net/ +1 more | +173 | 0 replies | Applied |
| 14/14 | net: mctp: test: Add tests for gateway routesnet/ net/ net/ +1 more | +271 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH net-next v5 00/14] net: mctp: Add support for gateway routing
This series adds a gateway route type for the MCTP core, allowing non-local EIDs as the match for a route.
Example setup using the mctp tools:
mctp route add 9 via mctpi2c0
mctp neigh add 9 dev mctpi2c0 lladdr 0x1d
mctp route add 10 gw 9
- will route packets to eid 10 through mctpi2c0, using a dest lladdr of 0x1d (ie, that of the directly-attached eid 9).
The core change to support this is the introduction of a struct mctp_dst, which represents the result of a route lookup. Since this involves a bit of surgery through the routing code, we add a few tests along the way.
We're introducing an ABI change in the new RTM_{NEW,GET,DEL}ROUTE netlink formats, with the support for a RTA_GATEWAY attribute. Because we need a network ID specified to fully-qualify a gateway EID, the RTA_GATEWAY attribute carries the (net, eid) tuple in full:
struct mctp_fq_addr {
unsigned int net;
mctp_eid_t eid;
}Of course, any questions, comments etc are most welcome.
---
Changes in v5:
- reinstate IFF_LOOPBACK check for new routes. Reported by Paolo Abeni
- mctp_sendmsg: return immediately on errors before we have allocated
skb, preventing a mctp_dst_release() on uninit dst. Reported by Paolo
Abeni.
- move mctp_dev_hold() to nlparse_populate, so we're consistent in the
cleanup semantics. defer all stores to @rt to the success case.
- keep existing semantics of extaddr->halen checking
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- avoid vla detection from const array-size initialiser, reported by ktr
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- 02/14 (new): Reduce frame size for route_input_cloned_frag kunit test,
preventing -Wframe-size-larger-than warnings
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- 12/13: prevent uninitialsed gateway variable in nlparse_common
- 13/13: make test data static
- commit message spelling fixes
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Jeremy Kerr (14):
net: mctp: don't use source cb data when forwarding, ensure pkt_type is set
net: mctp: test: make cloned_frag buffers more appropriately-sized
net: mctp: separate routing database from routing operations
net: mctp: separate cb from direct-addressing routing
net: mctp: test: Add an addressed device constructor
net: mctp: test: Add extaddr routing output test
net: mctp: test: move functions into utils.[ch]
net: mctp: test: add sock test infrastructure
net: mctp: test: Add initial socket tests
net: mctp: pass net into route creation
net: mctp: remove routes by netid, not by device
net: mctp: allow NL parsing directly into a struct mctp_route
net: mctp: add gateway routing support
net: mctp: test: Add tests for gateway routes
include/net/mctp.h | 52 +++- include/uapi/linux/mctp.h | 8 + net/mctp/af_mctp.c | 66 ++--- net/mctp/route.c | 574 ++++++++++++++++++++++++++++-------------- net/mctp/test/route-test.c | 612 +++++++++++++++++++++++++++++---------------- net/mctp/test/sock-test.c | 229 +++++++++++++++++ net/mctp/test/utils.c | 196 ++++++++++++++- net/mctp/test/utils.h | 44 ++++ 8 files changed, 1324 insertions(+), 457 deletions(-)
---
base-commit: 0097c4195b1d0ca57d15979626c769c74747b5a0
change-id: 20250520-dev-forwarding-0711973470bf
Best regards,
Signature · 1 line
Jeremy Kerr <[email protected]>