Linux USB
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-usb@vger.kernel.org
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Andreas Noever <andreas.noever@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Mika Westerberg <westeri@kernel.org>
Subject: [PATCH 6/9] thunderbolt: Add KUnit tests for lane to lane DMA tunnels
Date: Wed, 25 Nov 2026 16:26:19 +0100	[thread overview]
Message-ID: <20261125152623.456054-7-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20261125152623.456054-1-mika.westerberg@linux.intel.com>

From: "Mika Westerberg (Intel)" <westeri@kernel.org>

This adds KUnit tests for the lane to lane DMA tunnels we just started
to support.

Signed-off-by: Mika Westerberg (Intel) <westeri@kernel.org>
---
 drivers/thunderbolt/test.c | 408 +++++++++++++++++++++++++++++++++++++
 1 file changed, 408 insertions(+)

diff --git a/drivers/thunderbolt/test.c b/drivers/thunderbolt/test.c
index 0321408fe91c..b36bbe8bd7c1 100644
--- a/drivers/thunderbolt/test.c
+++ b/drivers/thunderbolt/test.c
@@ -2154,6 +2154,239 @@ static void tb_test_tunnel_dma_match(struct kunit *test)
 #undef MATCH
 }
 
+static void tb_test_tunnel_dma_lane2lane(struct kunit *test)
+{
+	struct tb_port *src_port, *dst_port;
+	struct tb_tunnel *tunnel;
+	struct tb_switch *host;
+
+	/*
+	 * Create DMA tunnel between two hosts that are connected to lane
+	 * adapters 1 and 3 of this host.
+	 *
+	 *   [Host 2]                     [Host 3]
+	 * ............ Domain border ............
+	 *      |                             |
+	 *    1 v In HopID 8 -> Out HopID 8   |
+	 *    1 ^ Out HopID 8 <- In HopID 8   v 3
+	 *              [Host 1]
+	 */
+	host = alloc_host(test);
+	src_port = &host->ports[1];
+	dst_port = &host->ports[3];
+
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, 8, 8, dst_port, 8, 8);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+	KUNIT_EXPECT_EQ(test, tunnel->type, TB_TUNNEL_DMA);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, src_port);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->dst_port, dst_port);
+	KUNIT_ASSERT_EQ(test, tunnel->npaths, 2);
+	/* Path from the second host to the first one */
+	KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 8);
+	KUNIT_EXPECT_TRUE(test, tunnel->paths[0]->hops[0].ingress_fc_enable);
+	KUNIT_EXPECT_TRUE(test, tunnel->paths[0]->hops[0].egress_fc_enable);
+	/* Path from the first host to the second one */
+	KUNIT_ASSERT_EQ(test, tunnel->paths[1]->path_length, 1);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].out_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].next_hop_index, 8);
+	KUNIT_EXPECT_TRUE(test, tunnel->paths[1]->hops[0].ingress_fc_enable);
+	KUNIT_EXPECT_TRUE(test, tunnel->paths[1]->hops[0].egress_fc_enable);
+
+	tb_tunnel_put(tunnel);
+}
+
+static void tb_test_tunnel_dma_lane2lane_one_way(struct kunit *test)
+{
+	struct tb_port *src_port, *dst_port;
+	struct tb_tunnel *tunnel;
+	struct tb_switch *host;
+
+	/*
+	 * Create uni-directional DMA tunnels between two hosts that are
+	 * connected to lane adapters 1 and 3 of this host.
+	 *
+	 *   [Host 2]                     [Host 3]
+	 * ............ Domain border ............
+	 *      |                             |
+	 *    1 v In HopID 8 -> Out HopID 8   v 3
+	 *              [Host 1]
+	 */
+	host = alloc_host(test);
+	src_port = &host->ports[1];
+	dst_port = &host->ports[3];
+
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, 8, -1, dst_port, -1, 8);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+	KUNIT_ASSERT_EQ(test, tunnel->npaths, 1);
+	KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 8);
+
+	tb_tunnel_put(tunnel);
+
+	/* Now the other way around */
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, -1, 8, dst_port, 8, -1);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+	KUNIT_ASSERT_EQ(test, tunnel->npaths, 1);
+	KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 8);
+
+	tb_tunnel_put(tunnel);
+}
+
+static void tb_test_tunnel_dma_lane2lane_chain(struct kunit *test)
+{
+	struct tb_port *src_port, *dst_port;
+	struct tb_switch *host, *dev;
+	struct tb_tunnel *tunnel;
+
+	/*
+	 * Create DMA tunnel between a host connected to lane adapter 1 of
+	 * this host and another one that is behind a device router.
+	 *
+	 *   [Host 2]
+	 * ............ Domain border
+	 *      |
+	 *    1 | In and Out HopID 8
+	 *  [Host 1]
+	 *      3 \
+	 *        1 \
+	 *      [Device #1]
+	 *          3 | In and Out HopID 8
+	 *            v
+	 * ............ Domain border
+	 *            |
+	 *         [Host 3]
+	 */
+	host = alloc_host(test);
+	dev = alloc_dev_default(test, host, 0x3, true);
+
+	src_port = &host->ports[1];
+	dst_port = &dev->ports[3];
+
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, 8, 8, dst_port, 8, 8);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+	KUNIT_ASSERT_EQ(test, tunnel->npaths, 2);
+	/* Path from the second host to the first one */
+	KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 2);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port,
+			    &dev->ports[1]);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].in_port,
+			    &host->ports[3]);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].out_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[1].next_hop_index, 8);
+	/* Path from the first host to the second one */
+	KUNIT_ASSERT_EQ(test, tunnel->paths[1]->path_length, 2);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].out_port,
+			    &host->ports[3]);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[1].in_port,
+			    &dev->ports[1]);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[1].out_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[1].next_hop_index, 8);
+
+	tb_tunnel_put(tunnel);
+}
+
+static void tb_test_tunnel_dma_lane2lane_hub(struct kunit *test)
+{
+	struct tb_port *src_port, *dst_port;
+	struct tb_switch *host, *hub;
+	struct tb_tunnel *tunnel;
+
+	/*
+	 * Create DMA tunnel between two hosts that are both connected to a
+	 * hub below this host. Now the path goes directly from one downstream
+	 * port of the hub to the other one and does not reach this host at
+	 * all.
+	 *
+	 *              [Host 1]
+	 *                  1 |
+	 *                  1 |
+	 *               [Hub #1]
+	 *   3 v In HopID 8 -> Out HopID 8 v 5
+	 *   3 ^ Out HopID 8 <- In HopID 8 ^ 5
+	 * ............ Domain border ............
+	 *     |                              |
+	 *  [Host 2]                      [Host 3]
+	 */
+	host = alloc_host(test);
+	hub = alloc_dev_default(test, host, 0x1, true);
+
+	src_port = &hub->ports[3];
+	dst_port = &hub->ports[5];
+
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, 8, 8, dst_port, 8, 8);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+	KUNIT_ASSERT_EQ(test, tunnel->npaths, 2);
+	/* Path from the second host to the first one */
+	KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 8);
+	/* Path from the first host to the second one */
+	KUNIT_ASSERT_EQ(test, tunnel->paths[1]->path_length, 1);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, src_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].in_hop_index, 8);
+	KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].out_port, dst_port);
+	KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].next_hop_index, 8);
+
+	tb_tunnel_put(tunnel);
+}
+
+static void tb_test_tunnel_dma_lane2lane_match(struct kunit *test)
+{
+	struct tb_port *src_port, *dst_port, *nhi;
+	struct tb_tunnel *tunnel;
+	struct tb_switch *host;
+
+	host = alloc_host(test);
+	nhi = &host->ports[7];
+	src_port = &host->ports[1];
+	dst_port = &host->ports[3];
+
+	/*
+	 * Use a different HopID for each end and direction, which is what
+	 * happens when there are already other tunnels going through, so
+	 * that mixing them up gets caught below.
+	 */
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, 8, 9, dst_port, 10, 11);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+
+#define MATCH(src, src_in, src_out, dst, dst_in, dst_out) \
+	tb_tunnel_match_dma(tunnel, src, src_in, src_out, dst, dst_in, dst_out)
+
+	KUNIT_EXPECT_TRUE(test, MATCH(src_port, 8, 9, dst_port, 10, 11));
+	KUNIT_EXPECT_TRUE(test, MATCH(src_port, 8, -1, NULL, -1, -1));
+	KUNIT_EXPECT_TRUE(test, MATCH(dst_port, 10, -1, NULL, -1, -1));
+	KUNIT_EXPECT_TRUE(test, MATCH(src_port, -1, -1, dst_port, -1, -1));
+	/* The HopIDs of the two ends cannot be mixed up */
+	KUNIT_EXPECT_FALSE(test, MATCH(src_port, 10, 11, dst_port, 8, 9));
+	KUNIT_EXPECT_FALSE(test, MATCH(src_port, 9, -1, NULL, -1, -1));
+	KUNIT_EXPECT_FALSE(test, MATCH(dst_port, -1, 10, NULL, -1, -1));
+	/* Neither end is at the host interface */
+	KUNIT_EXPECT_FALSE(test, MATCH(nhi, -1, -1, NULL, -1, -1));
+
+	tb_tunnel_put(tunnel);
+
+#undef MATCH
+}
+
 static void tb_test_credit_alloc_legacy_not_bonded(struct kunit *test)
 {
 	struct tb_switch *host, *dev;
@@ -3382,6 +3615,174 @@ static void tb_test_credit_alloc_shared_hop(struct kunit *test)
 	usb4_switch_free_credit_pools(host);
 }
 
+/* Same as what tb_port_configure_xdomain() does for the credit pools */
+static void tb_test_connect_xdomain(struct kunit *test, struct tb_port *port)
+{
+	port->xdomain = kunit_kzalloc(test, sizeof(*port->xdomain), GFP_KERNEL);
+	KUNIT_ASSERT_NOT_NULL(test, port->xdomain);
+	usb4_port_update_credit_pools(port);
+}
+
+static unsigned int tb_test_dma_credits_used(const struct tb_port *port)
+{
+	return usb4_credit_pool_used(&port->credit_pool[USB4_CREDIT_POOL_COMMON]);
+}
+
+static void tb_test_credit_alloc_dma_lane2lane(struct kunit *test)
+{
+	struct tb_port *src_port, *dst_port;
+	struct tb_switch *host, *dev;
+	struct tb_tunnel *tunnel;
+	struct tb_path *path;
+
+	host = alloc_host_usb4(test);
+	dev = alloc_dev_usb4(test, host, 0x3, true);
+
+	KUNIT_ASSERT_EQ(test, usb4_switch_alloc_credit_pools(host), 0);
+	KUNIT_ASSERT_EQ(test, usb4_switch_alloc_credit_pools(dev), 0);
+
+	src_port = &host->ports[1];
+	dst_port = &dev->ports[3];
+
+	tb_test_connect_xdomain(test, src_port);
+	tb_test_connect_xdomain(test, dst_port);
+
+	tunnel = tb_tunnel_alloc_dma(NULL, src_port, 8, 8, dst_port, 8, 8);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel);
+	KUNIT_ASSERT_EQ(test, tunnel->npaths, (size_t)2);
+
+	/*
+	 * Both directions are treated the same way. The first hop is the
+	 * lane adapter facing the remote host so all its buffers are
+	 * available for DMA, the rest are allocated from the intermediate
+	 * hops. Both paths end to a lane adapter so flow control is
+	 * enabled on egress of every hop.
+	 */
+	path = tunnel->paths[0];
+	KUNIT_ASSERT_EQ(test, path->path_length, 2);
+	tb_test_check_path_fc(test, path, true);
+	KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U);
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+	KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U);
+	KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U);
+
+	path = tunnel->paths[1];
+	KUNIT_ASSERT_EQ(test, path->path_length, 2);
+	tb_test_check_path_fc(test, path, true);
+	KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U);
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+	KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U);
+	KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U);
+
+	tb_tunnel_put(tunnel);
+
+	usb4_switch_free_credit_pools(dev);
+	usb4_switch_free_credit_pools(host);
+}
+
+static void tb_test_credit_alloc_dma_lane2lane_multiple(struct kunit *test)
+{
+	struct tb_tunnel *tunnel1, *tunnel2, *tunnel3, *tunnel4, *tunnel5;
+	struct tb_port *src_port, *dst_port;
+	struct tb_tunnel *tunnel6;
+	struct tb_switch *host;
+	struct tb_path *path;
+
+	host = alloc_host_usb4(test);
+
+	KUNIT_ASSERT_EQ(test, usb4_switch_alloc_credit_pools(host), 0);
+
+	src_port = &host->ports[1];
+	dst_port = &host->ports[3];
+
+	tb_test_connect_xdomain(test, src_port);
+	tb_test_connect_xdomain(test, dst_port);
+
+	/*
+	 * Couple the two hosts connected to lane adapters 1 and 3 several
+	 * times, each coupling using different HopIDs.
+	 *
+	 * Neither lane adapter tunnels other protocols so all their
+	 * buffers except the ones reserved for control traffic stay in
+	 * the common pool:
+	 *
+	 *   60 - 2 = 58
+	 *
+	 * Each coupling takes 14 of those from both adapters, so the first
+	 * four get what they asked for, the fifth gets the remaining 2 and
+	 * after that we run out of buffers.
+	 */
+	tunnel1 = tb_tunnel_alloc_dma(NULL, src_port, 8, 8, dst_port, 8, 8);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel1);
+	KUNIT_ASSERT_EQ(test, tunnel1->npaths, (size_t)2);
+
+	path = tunnel1->paths[0];
+	KUNIT_ASSERT_EQ(test, path->path_length, 1);
+	KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U);
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+
+	path = tunnel1->paths[1];
+	KUNIT_ASSERT_EQ(test, path->path_length, 1);
+	KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U);
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+
+	tunnel2 = tb_tunnel_alloc_dma(NULL, src_port, 9, 9, dst_port, 9, 9);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel2);
+	tunnel3 = tb_tunnel_alloc_dma(NULL, src_port, 10, 10, dst_port, 10, 10);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel3);
+	tunnel4 = tb_tunnel_alloc_dma(NULL, src_port, 11, 11, dst_port, 11, 11);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel4);
+
+	path = tunnel4->paths[0];
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+	path = tunnel4->paths[1];
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+
+	/* Both adapters have now handed out 4 * 14 = 56 of their 58 */
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(src_port), 56U);
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(dst_port), 56U);
+
+	/* The fifth one has to make do with what is left */
+	tunnel5 = tb_tunnel_alloc_dma(NULL, src_port, 12, 12, dst_port, 12, 12);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel5);
+
+	path = tunnel5->paths[0];
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 2U);
+	path = tunnel5->paths[1];
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 2U);
+
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(src_port), 58U);
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(dst_port), 58U);
+
+	/* And the sixth one no longer fits */
+	tunnel6 = tb_tunnel_alloc_dma(NULL, src_port, 13, 13, dst_port, 13, 13);
+	KUNIT_ASSERT_NULL(test, tunnel6);
+
+	/* Releasing the first one makes room for another */
+	tb_tunnel_put(tunnel1);
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(src_port), 44U);
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(dst_port), 44U);
+
+	tunnel1 = tb_tunnel_alloc_dma(NULL, src_port, 13, 13, dst_port, 13, 13);
+	KUNIT_ASSERT_NOT_NULL(test, tunnel1);
+
+	path = tunnel1->paths[0];
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+	path = tunnel1->paths[1];
+	KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U);
+
+	tb_tunnel_put(tunnel5);
+	tb_tunnel_put(tunnel4);
+	tb_tunnel_put(tunnel3);
+	tb_tunnel_put(tunnel2);
+	tb_tunnel_put(tunnel1);
+
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(src_port), 0U);
+	KUNIT_EXPECT_EQ(test, tb_test_dma_credits_used(dst_port), 0U);
+
+	usb4_switch_free_credit_pools(host);
+}
+
 static struct tb_tunnel *TB_TEST_PCIE_TUNNEL(struct kunit *test,
 			struct tb_switch *host, struct tb_switch *dev)
 {
@@ -4147,6 +4548,11 @@ static struct kunit_case tb_test_cases[] = {
 	KUNIT_CASE(tb_test_tunnel_dma_tx),
 	KUNIT_CASE(tb_test_tunnel_dma_chain),
 	KUNIT_CASE(tb_test_tunnel_dma_match),
+	KUNIT_CASE(tb_test_tunnel_dma_lane2lane),
+	KUNIT_CASE(tb_test_tunnel_dma_lane2lane_one_way),
+	KUNIT_CASE(tb_test_tunnel_dma_lane2lane_chain),
+	KUNIT_CASE(tb_test_tunnel_dma_lane2lane_hub),
+	KUNIT_CASE(tb_test_tunnel_dma_lane2lane_match),
 	KUNIT_CASE(tb_test_credit_alloc_legacy_not_bonded),
 	KUNIT_CASE(tb_test_credit_alloc_legacy_bonded),
 	KUNIT_CASE(tb_test_credit_alloc_pcie),
@@ -4166,6 +4572,8 @@ static struct kunit_case tb_test_cases[] = {
 	KUNIT_CASE(tb_test_credit_alloc_dma_shared_mixed),
 	KUNIT_CASE(tb_test_credit_alloc_dma_shared_no_credit_allocation),
 	KUNIT_CASE(tb_test_credit_alloc_shared_hop),
+	KUNIT_CASE(tb_test_credit_alloc_dma_lane2lane),
+	KUNIT_CASE(tb_test_credit_alloc_dma_lane2lane_multiple),
 	KUNIT_CASE(tb_test_credit_alloc_all),
 	KUNIT_CASE(tb_test_property_parse),
 	KUNIT_CASE(tb_test_property_format),
-- 
2.50.1


  parent reply	other threads:[~2026-11-25 15:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 15:26 [PATCH 0/9] thunderbolt: Introduce USB4STREAM coupling Mika Westerberg
2026-11-25 15:26 ` [PATCH 1/9] thunderbolt: Add and remove XDomain services outside of the state work Mika Westerberg
2026-11-25 15:26 ` [PATCH 2/9] thunderbolt: Unregister XDomains when the domain is removed Mika Westerberg
2026-11-25 15:26 ` [PATCH 3/9] thunderbolt: stream: Keep better track of the HopIDs Mika Westerberg
2026-11-25 15:26 ` [PATCH 4/9] thunderbolt: stream: Validate the ConfigFS group name more strictly Mika Westerberg
2026-11-25 15:26 ` [PATCH 5/9] thunderbolt: Allow DMA tunnel also between two lane adapters Mika Westerberg
2026-11-25 15:26 ` Mika Westerberg [this message]
2026-11-25 15:26 ` [PATCH 7/9] thunderbolt: Add tb_xdomains_enable_paths() and tb_xdomains_disable_paths() Mika Westerberg
2026-11-25 15:26 ` [PATCH 8/9] thunderbolt: stream: Introduce USB4STREAM coupling Mika Westerberg
2026-11-25 15:26 ` [PATCH 9/9] Documentation: thunderbolt: Document " Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261125152623.456054-7-mika.westerberg@linux.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=westeri@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox