From nobody Mon Jun 8 17:49:20 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 934E125D215; Wed, 27 May 2026 15:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779895988; cv=none; b=roVSlPpeFkyJPR635/uA3+v9tA+vi9yuYLzCqVyLCtlWYLTmwKkbMtlsYDhccgBugcJ/dfP8dUkrirJ4WxcDikp2AbCDVUEgTCxoPHsz6Wi5lmY7PR1kl13NjhStLGTk+yyiHTPf42r7O0Qg/xDjd6q4ehZEos/U9DochpQ+HUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779895988; c=relaxed/simple; bh=VdBUolhNyo8yi7fcXoYRSQ+Yv/xh8n4VXOHyJf6wnGc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VQ7m94mHxXDHxOzmMtxQ1Rg+wIEROArQ1GRDvCe03weORdI56dpMiXIGnhzL7MrM9WIKqnSIQWJTwkKsFvTuQfLxFq1xYafQZfncoVNsdCThjvD15dAlhbVUNz3RL7BsSB236FwEja9IiCGjRWYNCMU0R3tBkCyMpu+muI51Goc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ippvKyOY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ippvKyOY" Received: by smtp.kernel.org (Postfix) with ESMTPS id 108B4C19425; Wed, 27 May 2026 15:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779895987; bh=VdBUolhNyo8yi7fcXoYRSQ+Yv/xh8n4VXOHyJf6wnGc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ippvKyOYrLN4zc8OltBGaGieuXCUS06p91J8fS32imithq5T+daFnZ5U2BLnLQy3P uL+G2xpERmDKrBITF8w0C98hF898k8LOOr7MYa6yeQDIWt97uYKqHEEKyZMtotQBNM CI7yfxqKLpdunDtwsMjrDAz6miTCEWS1mwnuOqYS/FdE2rb7agACfiSoIG1tL9HGu1 wbpvyQ/0dNdUbBsQm9cipvXk7cF8cfGPzKKbXgbUSzPnudGkVb/+qmHHli4ZBYLvY0 v8JF/qrtFqIVfshkbtdlrmFVLaSL4tmMQ8kxJTzyJB+qUJsMKjo+pbKly7+0jGs1/m yEyXjuNMIeUiw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01182CD6E41; Wed, 27 May 2026 15:33:07 +0000 (UTC) From: Cedric Jehasse via B4 Relay Date: Wed, 27 May 2026 17:33:04 +0200 Subject: [PATCH net-next v3 1/2] net: dsa: mv88e6xxx: use the hw tx queues Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260527-net-next-mv88e6xxx-cbs-v3-1-2f387eb5ff63@luminex.be> References: <20260527-net-next-mv88e6xxx-cbs-v3-0-2f387eb5ff63@luminex.be> In-Reply-To: <20260527-net-next-mv88e6xxx-cbs-v3-0-2f387eb5ff63@luminex.be> To: Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luke Howard , =?utf-8?q?Marek_Beh=C3=BAn?= , Cedric Jehasse , Cedric Jehasse X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1779895985; l=11505; i=cedric.jehasse@luminex.be; s=20260213; h=from:subject:message-id; bh=N73EMbDeMk4TXkTfSVwg8qX1Kj5tDWt/w+RuUrgiY1M=; b=LtkXENps+Dfw4EtbbwqfBmeyWLBx1Qt6Vf7UfuvYG1nHEVj+ruNr+iOzOpNG1zDZlqBxD6vHb WJ8kY3yYA+jBm1H4Qb5i+q4J2XS537af+EAxRU/GY8FvwrpD1/mB08F X-Developer-Key: i=cedric.jehasse@luminex.be; a=ed25519; pk=DL2RaHc2bc7tTDTMJdugm42BtJk4Ip+7V41Gkj+Avjk= X-Endpoint-Received: by B4 Relay for cedric.jehasse@luminex.be/20260213 with auth_id=638 X-Original-From: Cedric Jehasse Reply-To: cedric.jehasse@luminex.be From: Cedric Jehasse When transmitting fill in the PRI field in the dsa tag to select the egress queue is sent to. From the datasheets i've looked at these switches have 4 or 8 transmit queues per port. Note: skbs with skb->fw_offload_fwd_mark set use the DSA_CMD_FORWARD tag. These are processed as normal ingress frames, meaning the queue they end up in can still be altered by other switch config. eg. priority overrides, tcam policies. This isn't done for vlan tagged frames because this would overwrite the PCP value in the vlan tag (The PRI field in the dsa tag is used as the PCP value in the vlan tag). Signed-off-by: Cedric Jehasse --- drivers/net/dsa/mv88e6xxx/chip.c | 35 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 1 + net/dsa/tag_dsa.c | 11 ++++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/c= hip.c index 8ca5fd40df92..ffd4fa41b7c5 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3979,6 +3979,7 @@ static int mv88e6xxx_setup(struct dsa_switch *ds) =20 chip->ds =3D ds; ds->user_mii_bus =3D mv88e6xxx_default_mdio_bus(chip); + ds->num_tx_queues =3D chip->info->num_tx_queues; =20 /* Since virtual bridges are mapped in the PVT, the number we support * depends on the physical switch topology. We need to let DSA figure @@ -5689,6 +5690,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { */ .num_ports =3D 7, .num_internal_phys =3D 2, + .num_tx_queues =3D 4, .invalid_port_mask =3D BIT(2) | BIT(3) | BIT(4), .max_vid =3D 4095, .port_base_addr =3D 0x8, @@ -5711,6 +5713,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_databases =3D 64, .num_ports =3D 7, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .port_base_addr =3D 0x08, .phy_base_addr =3D 0x00, @@ -5733,6 +5736,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 10, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5757,6 +5761,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 11, .num_internal_phys =3D 0, + .num_tx_queues =3D 4, .max_vid =3D 4095, .port_base_addr =3D 0x10, .phy_base_addr =3D 0x0, @@ -5778,6 +5783,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 11, .num_internal_phys =3D 8, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5803,6 +5809,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 1024, .num_ports =3D 3, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5828,6 +5835,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 8, .num_internal_phys =3D 0, + .num_tx_queues =3D 4, .max_vid =3D 4095, .port_base_addr =3D 0x10, .phy_base_addr =3D 0x0, @@ -5850,6 +5858,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 6, .num_internal_phys =3D 5, .num_gpio =3D 11, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5875,6 +5884,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 1024, .num_ports =3D 6, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5901,6 +5911,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 6, .num_internal_phys =3D 0, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5926,6 +5937,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 7, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5952,6 +5964,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 7, .num_internal_phys =3D 5, .num_gpio =3D 15, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -5977,6 +5990,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 7, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6003,6 +6017,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 7, .num_internal_phys =3D 5, .num_gpio =3D 15, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6028,6 +6043,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 10, .num_internal_phys =3D 0, + .num_tx_queues =3D 4, .max_vid =3D 4095, .port_base_addr =3D 0x10, .phy_base_addr =3D 0x0, @@ -6051,6 +6067,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 11, /* 10 + Z80 */ .num_internal_phys =3D 9, .num_gpio =3D 16, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6076,6 +6093,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 11, /* 10 + Z80 */ .num_internal_phys =3D 9, .num_gpio =3D 16, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6100,6 +6118,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 16384, .num_ports =3D 11, /* 10 + Z80 */ .num_internal_phys =3D 9, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6125,6 +6144,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 11, /* 10 + Z80 */ .num_internal_phys =3D 8, .internal_phys_offset =3D 1, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6151,6 +6171,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_internal_phys =3D 8, .num_tcam_entries =3D 256, .internal_phys_offset =3D 1, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6181,6 +6202,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 7, .num_internal_phys =3D 2, .invalid_port_mask =3D BIT(2) | BIT(3) | BIT(4), + .num_tx_queues =3D 4, .max_vid =3D 4095, .port_base_addr =3D 0x08, .phy_base_addr =3D 0x00, @@ -6205,6 +6227,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 7, .num_internal_phys =3D 5, .num_gpio =3D 15, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6230,6 +6253,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_databases =3D 64, .num_ports =3D 7, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .port_base_addr =3D 0x08, .phy_base_addr =3D 0x00, @@ -6254,6 +6278,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_internal_phys =3D 9, .num_gpio =3D 16, .num_tcam_entries =3D 256, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6282,6 +6307,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_internal_phys =3D 2, .internal_phys_offset =3D 3, .num_gpio =3D 15, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6310,6 +6336,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_internal_phys =3D 2, .internal_phys_offset =3D 3, .num_gpio =3D 15, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6337,6 +6364,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_internal_phys =3D 5, .num_ports =3D 6, .num_gpio =3D 11, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6363,6 +6391,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 7, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6388,6 +6417,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_macs =3D 8192, .num_ports =3D 7, .num_internal_phys =3D 5, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6414,6 +6444,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 7, .num_internal_phys =3D 5, .num_gpio =3D 15, + .num_tx_queues =3D 4, .max_vid =3D 4095, .max_sid =3D 63, .port_base_addr =3D 0x10, @@ -6442,6 +6473,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .invalid_port_mask =3D BIT(1) | BIT(2) | BIT(8), .num_internal_phys =3D 5, .internal_phys_offset =3D 3, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6468,6 +6500,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_internal_phys =3D 9, .num_gpio =3D 16, .num_tcam_entries =3D 256, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6495,6 +6528,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 11, /* 10 + Z80 */ .num_internal_phys =3D 9, .num_gpio =3D 16, + .num_tx_queues =3D 8, .max_vid =3D 8191, .max_sid =3D 63, .port_base_addr =3D 0x0, @@ -6521,6 +6555,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .num_ports =3D 11, /* 10 + Z80 */ .num_internal_phys =3D 8, .num_tcam_entries =3D 256, + .num_tx_queues =3D 8, .internal_phys_offset =3D 1, .max_vid =3D 8191, .max_sid =3D 63, diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/c= hip.h index cde71828e9d9..19d8eda19b78 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -136,6 +136,7 @@ struct mv88e6xxx_info { unsigned int num_internal_phys; unsigned int num_gpio; unsigned int num_tcam_entries; + unsigned int num_tx_queues; unsigned int max_vid; unsigned int max_sid; unsigned int port_base_addr; diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index 2a2c4fb61a65..cc27b2994c6b 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c @@ -179,8 +179,17 @@ static struct sk_buff *dsa_xmit_ll(struct sk_buff *skb= , struct net_device *dev, dsa_header[2] &=3D ~0x10; } } else { + u16 queue =3D skb_get_queue_mapping(skb) & 0x7; u16 vid; =20 + /* The PRI field is 3 bits. According to the documentation the + * 2 highest bits specify the egress queue in From_CPU DSA + * tagged frames. On devices with 8 queues it's possible to + * send to the 8 queues, which means the 3 bits are used. + */ + if (dp->ds->num_tx_queues =3D=3D 4) + queue <<=3D 1; + vid =3D br_dev ? MV88E6XXX_VID_BRIDGED : MV88E6XXX_VID_STANDALONE; =20 skb_push(skb, DSA_HLEN + extra); @@ -191,7 +200,7 @@ static struct sk_buff *dsa_xmit_ll(struct sk_buff *skb,= struct net_device *dev, =20 dsa_header[0] =3D (cmd << 6) | tag_dev; dsa_header[1] =3D tag_port << 3; - dsa_header[2] =3D vid >> 8; + dsa_header[2] =3D (queue << 5) | vid >> 8; dsa_header[3] =3D vid & 0xff; } =20 --=20 2.43.0 From nobody Mon Jun 8 17:49:20 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9394D37BE9A; Wed, 27 May 2026 15:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779895988; cv=none; b=nVH79Do7fnYxY5WEwK0DLvK691KRnaRhi/XEaeKdAzw4vgZ1wVKSU5wXkcfXH+VcZKo9d937wFKUubdw/8e1f6vEJ4Axcgcag2ZzHjX0C3L4+xygT5amdQVFTom5ob8nqt/IIAgGkcrXRmjAptI+xWYs5ts1oyQpXd3Ham8O4bw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779895988; c=relaxed/simple; bh=nKGwJ1w0fYTuo5hG3MEZtBTwsf3ijSIfF5Jb467A2L4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b4yuE9AG/EAZdpobytTDsR5nHSASwdD7QZtf7hToKxzSu/yg53jLYzPBwXYCDDOnoD3YMuWrVssfIOpyOBK/Hz0cgsTwBuFlRz8LtaW96BdfHI2lyVYlcjrwXWAoidzMYU+/NHC4G7QUqCygDyobzqjgs4g5Md63GBMVdvaIeGs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b3QY0FHa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b3QY0FHa" Received: by smtp.kernel.org (Postfix) with ESMTPS id 31B3FC2BCF7; Wed, 27 May 2026 15:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779895987; bh=nKGwJ1w0fYTuo5hG3MEZtBTwsf3ijSIfF5Jb467A2L4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=b3QY0FHalFis1g5wbkYwUqGH3HDo11XkvDa1w7CtgH1KOAgO/nMeFncEUsxw/Xrvu c0Md35UiT2bGaBicvySKfR1JQM/0GfVO53UbawKmVQv9sbdRKsMrXzuHB4NcP4phRI P8tgqymf3isjB2dXtvqr+jUlPlK7vWVxG6OyqqiVULp4xl4BvfvNBPGn3nGZL7ucRe MMEzyCjdgJ8F5HdUyvaKYiNC9VvLhbQWPg8zlO7fJ+8cqET3R8PnQKelbBb94y4tfA UjqNiz05wttZa0vzZaAdeKt1dLqYrW1QlEDY1qrmpBt407pcrh74vp0zqv18wvWrih knXJhCECt0rDQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 292F9CD6E44; Wed, 27 May 2026 15:33:07 +0000 (UTC) From: Cedric Jehasse via B4 Relay Date: Wed, 27 May 2026 17:33:05 +0200 Subject: [PATCH net-next v3 2/2] net: dsa: mv88e6xxx: add support for credit based shaper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260527-net-next-mv88e6xxx-cbs-v3-2-2f387eb5ff63@luminex.be> References: <20260527-net-next-mv88e6xxx-cbs-v3-0-2f387eb5ff63@luminex.be> In-Reply-To: <20260527-net-next-mv88e6xxx-cbs-v3-0-2f387eb5ff63@luminex.be> To: Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luke Howard , =?utf-8?q?Marek_Beh=C3=BAn?= , Cedric Jehasse , Cedric Jehasse X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1779895985; l=17090; i=cedric.jehasse@luminex.be; s=20260213; h=from:subject:message-id; bh=IpLJvXB642y/6ej+j7p87D9XP4fQ/cLeZOP1mjWpMYA=; b=DQudfE47Sxhded7cyCa2sZOrvhdq3TxcuYORL+w8RiM5wgDcp55cFv2ES29nlx756QHczYYXg DKp1yGZBHr3AIsppIeabD+Eg3YjP6EXlCK63DbsD3vT8OdMC/jgN9gs X-Developer-Key: i=cedric.jehasse@luminex.be; a=ed25519; pk=DL2RaHc2bc7tTDTMJdugm42BtJk4Ip+7V41Gkj+Avjk= X-Endpoint-Received: by B4 Relay for cedric.jehasse@luminex.be/20260213 with auth_id=638 X-Original-From: Cedric Jehasse Reply-To: cedric.jehasse@luminex.be From: Cedric Jehasse Some of the chips supported by this driver have credit based shaper support. Support is added for the 6352, 6390 and 6393 families. This is configured using the Qav registers in the AVB register block. There are small differences in the Qav registers between the chip families (eg. the unit used for the rate and number of bits in the registers). mv88e6xxx_qav_info is introduced to configure this per chip. Eg. setting up 20mbps credit based shaper on a 1GBit link: tc qdisc add dev p8 parent root handle 100: mqprio \ num_tc 8 \ map 0 0 6 7 0 5 0 0 0 0 0 0 0 0 0 0 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ hw 0 tc qdisc replace dev p8 parent 100:8 cbs locredit -1470 hicredit 30 \ sendslope -980000 idleslope 20000 offload 1 Note: only idleslope and hicredit can be programmed in the switch registers, other parameters won't affect settings. Signed-off-by: Cedric Jehasse --- drivers/net/dsa/mv88e6xxx/chip.c | 126 ++++++++++++++++++++++++++++= ++++ drivers/net/dsa/mv88e6xxx/chip.h | 21 ++++++ drivers/net/dsa/mv88e6xxx/global2_avb.c | 21 ++++++ drivers/net/dsa/mv88e6xxx/port.c | 45 ++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 16 ++++ 5 files changed, 229 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/c= hip.c index ffd4fa41b7c5..3e3f1e2ba336 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -32,6 +32,7 @@ #include #include #include +#include =20 #include "chip.h" #include "devlink.h" @@ -5015,6 +5016,7 @@ static const struct mv88e6xxx_ops mv88e6240_ops =3D { .port_set_ether_type =3D mv88e6351_port_set_ether_type, .port_set_jumbo_size =3D mv88e6165_port_set_jumbo_size, .port_egress_rate_limiting =3D mv88e6097_port_egress_rate_limiting, + .port_set_scheduling_mode =3D mv88e6352_port_set_scheduling_mode, .port_pause_limit =3D mv88e6097_port_pause_limit, .port_disable_learn_limit =3D mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override =3D mv88e6xxx_port_disable_pri_override, @@ -5446,6 +5448,7 @@ static const struct mv88e6xxx_ops mv88e6352_ops =3D { .port_set_ether_type =3D mv88e6351_port_set_ether_type, .port_set_jumbo_size =3D mv88e6165_port_set_jumbo_size, .port_egress_rate_limiting =3D mv88e6097_port_egress_rate_limiting, + .port_set_scheduling_mode =3D mv88e6352_port_set_scheduling_mode, .port_pause_limit =3D mv88e6097_port_pause_limit, .port_disable_learn_limit =3D mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override =3D mv88e6xxx_port_disable_pri_override, @@ -5515,6 +5518,7 @@ static const struct mv88e6xxx_ops mv88e6390_ops =3D { .port_get_cmode =3D mv88e6352_port_get_cmode, .port_set_cmode =3D mv88e6390_port_set_cmode, .port_setup_message_port =3D mv88e6xxx_setup_message_port, + .port_set_scheduling_mode =3D mv88e6390_port_set_scheduling_mode, .stats_snapshot =3D mv88e6390_g1_stats_snapshot, .stats_set_histogram =3D mv88e6390_g1_stats_set_histogram, .stats_get_sset_count =3D mv88e6320_stats_get_sset_count, @@ -5580,6 +5584,7 @@ static const struct mv88e6xxx_ops mv88e6390x_ops =3D { .port_get_cmode =3D mv88e6352_port_get_cmode, .port_set_cmode =3D mv88e6390x_port_set_cmode, .port_setup_message_port =3D mv88e6xxx_setup_message_port, + .port_set_scheduling_mode =3D mv88e6390_port_set_scheduling_mode, .stats_snapshot =3D mv88e6390_g1_stats_snapshot, .stats_set_histogram =3D mv88e6390_g1_stats_set_histogram, .stats_get_sset_count =3D mv88e6320_stats_get_sset_count, @@ -5637,6 +5642,7 @@ static const struct mv88e6xxx_ops mv88e6393x_ops =3D { .port_set_ether_type =3D mv88e6393x_port_set_ether_type, .port_set_jumbo_size =3D mv88e6165_port_set_jumbo_size, .port_egress_rate_limiting =3D mv88e6097_port_egress_rate_limiting, + .port_set_scheduling_mode =3D mv88e6390_port_set_scheduling_mode, .port_pause_limit =3D mv88e6390_port_pause_limit, .port_disable_learn_limit =3D mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override =3D mv88e6xxx_port_disable_pri_override, @@ -5679,6 +5685,22 @@ static const struct mv88e6xxx_ops mv88e6393x_ops =3D= { .tcam_ops =3D &mv88e6393_tcam_ops, }; =20 +static const struct mv88e6xxx_qav_info mv88e6352_qav_info =3D { + .max_rate =3D 1000000, + .rate_unit =3D 32, + .rate_mask =3D GENMASK(14, 0), + .hi_limit_mask =3D GENMASK(14, 0), + .queue_mask =3D GENMASK(3, 0), +}; + +static const struct mv88e6xxx_qav_info mv88e6390_qav_info =3D { + .max_rate =3D 4000000, + .rate_unit =3D 64, + .rate_mask =3D GENMASK(15, 0), + .hi_limit_mask =3D GENMASK(13, 0), + .queue_mask =3D GENMASK(7, 0), +}; + static const struct mv88e6xxx_info mv88e6xxx_table[] =3D { [MV88E6020] =3D { .prod_num =3D MV88E6XXX_PORT_SWITCH_ID_PROD_6020, @@ -6243,6 +6265,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .multi_chip =3D true, .edsa_support =3D MV88E6XXX_EDSA_SUPPORTED, .ptp_support =3D true, + .qav =3D &mv88e6352_qav_info, .ops =3D &mv88e6240_ops, }, =20 @@ -6460,6 +6483,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .multi_chip =3D true, .edsa_support =3D MV88E6XXX_EDSA_SUPPORTED, .ptp_support =3D true, + .qav =3D &mv88e6352_qav_info, .ops =3D &mv88e6352_ops, }, [MV88E6361] =3D { @@ -6517,6 +6541,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .multi_chip =3D true, .edsa_support =3D MV88E6XXX_EDSA_UNDOCUMENTED, .ptp_support =3D true, + .qav =3D &mv88e6390_qav_info, .ops =3D &mv88e6390_ops, }, [MV88E6390X] =3D { @@ -6544,6 +6569,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .multi_chip =3D true, .edsa_support =3D MV88E6XXX_EDSA_UNDOCUMENTED, .ptp_support =3D true, + .qav =3D &mv88e6390_qav_info, .ops =3D &mv88e6390x_ops, }, =20 @@ -6572,6 +6598,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = =3D { .pvt =3D true, .multi_chip =3D true, .ptp_support =3D true, + .qav =3D &mv88e6390_qav_info, .ops =3D &mv88e6393x_ops, }, }; @@ -7193,6 +7220,104 @@ static int mv88e6xxx_crosschip_lag_leave(struct dsa= _switch *ds, int sw_index, return err_sync ? : err_pvt; } =20 +static int mv88e6xxx_setup_tc_cbs(struct dsa_switch *ds, int port, + struct tc_cbs_qopt_offload *cbs) +{ + const struct mv88e6xxx_avb_ops *avb_ops; + struct mv88e6xxx_chip *chip =3D ds->priv; + const struct mv88e6xxx_qav_info *qav; + const struct mv88e6xxx_ops *ops; + int hilimit_reg; + int rate_reg; + u8 queue_bit; + u16 hi_limit; + u16 rate =3D 0; + int err; + + ops =3D chip->info->ops; + avb_ops =3D ops->avb_ops; + qav =3D chip->info->qav; + + if (!qav || !avb_ops || !avb_ops->port_qav_write || + !ops->port_set_scheduling_mode) + return -EOPNOTSUPP; + + if (!dsa_is_user_port(ds, port)) + return -EOPNOTSUPP; + + if (cbs->queue < 0 || cbs->queue >=3D chip->info->num_tx_queues) + return -EINVAL; + + if (!(qav->queue_mask & BIT(cbs->queue))) + return -EOPNOTSUPP; + + queue_bit =3D BIT(cbs->queue); + rate_reg =3D cbs->queue * 2; + hilimit_reg =3D rate_reg + 1; + + if (cbs->enable) { + if (cbs->idleslope <=3D 0 || + cbs->idleslope > qav->max_rate || + cbs->sendslope >=3D 0 || cbs->hicredit <=3D 0 || + cbs->hicredit > qav->hi_limit_mask) + return -ERANGE; + + rate =3D DIV_ROUND_UP(cbs->idleslope, qav->rate_unit); + if (rate > qav->rate_mask) + return -ERANGE; + } + + mv88e6xxx_reg_lock(chip); + + if (!cbs->enable) { + err =3D avb_ops->port_qav_write(chip, port, rate_reg, 0); + if (err) + goto unlock; + + if (!(chip->ports[port].cbs_active_queues & ~queue_bit)) { + err =3D ops->port_set_scheduling_mode(chip, port, 0); + if (err) + goto unlock; + } + chip->ports[port].cbs_active_queues &=3D ~queue_bit; + goto unlock; + } + + hi_limit =3D cbs->hicredit & qav->hi_limit_mask; + err =3D avb_ops->port_qav_write(chip, port, hilimit_reg, hi_limit); + if (err) + goto unlock; + + err =3D avb_ops->port_qav_write(chip, port, rate_reg, rate); + if (err) + goto unlock; + + err =3D ops->port_set_scheduling_mode(chip, port, + chip->info->num_tx_queues - 1); + if (err) { + avb_ops->port_qav_write(chip, port, rate_reg, 0); + chip->ports[port].cbs_active_queues &=3D ~queue_bit; + goto unlock; + } + chip->ports[port].cbs_active_queues |=3D queue_bit; + +unlock: + mv88e6xxx_reg_unlock(chip); + + return err; +} + +static int mv88e6xxx_port_setup_tc(struct dsa_switch *ds, int port, + enum tc_setup_type type, void *type_data) +{ + switch (type) { + case TC_SETUP_QDISC_CBS: + return mv88e6xxx_setup_tc_cbs(ds, port, type_data); + default: + return -EOPNOTSUPP; + } +} + static const struct phylink_mac_ops mv88e6xxx_phylink_mac_ops =3D { .mac_select_pcs =3D mv88e6xxx_mac_select_pcs, .mac_prepare =3D mv88e6xxx_mac_prepare, @@ -7252,6 +7377,7 @@ static const struct dsa_switch_ops mv88e6xxx_switch_o= ps =3D { .port_hwtstamp_get =3D mv88e6xxx_port_hwtstamp_get, .port_txtstamp =3D mv88e6xxx_port_txtstamp, .port_rxtstamp =3D mv88e6xxx_port_rxtstamp, + .port_setup_tc =3D mv88e6xxx_port_setup_tc, .cls_flower_add =3D mv88e6xxx_cls_flower_add, .cls_flower_del =3D mv88e6xxx_cls_flower_del, .get_ts_info =3D mv88e6xxx_get_ts_info, diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/c= hip.h index 19d8eda19b78..81c9fb2f0e92 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -125,6 +125,7 @@ enum mv88e6xxx_edsa_support { }; =20 struct mv88e6xxx_ops; +struct mv88e6xxx_qav_info; =20 struct mv88e6xxx_info { enum mv88e6xxx_family family; @@ -177,6 +178,9 @@ struct mv88e6xxx_info { /* Supports PTP */ bool ptp_support; =20 + /* 802.1Qav credit based shaping */ + const struct mv88e6xxx_qav_info *qav; + /* Internal PHY start index. 0 means that internal PHYs range starts at * port 0, 1 means internal PHYs range starts at port 1, etc */ @@ -304,6 +308,9 @@ struct mv88e6xxx_port { =20 /* MacAuth Bypass control flag */ bool mab; + + /* Queues with CBS currently enabled. */ + u8 cbs_active_queues; }; =20 enum mv88e6xxx_region_id { @@ -607,6 +614,8 @@ struct mv88e6xxx_ops { size_t size); =20 int (*port_egress_rate_limiting)(struct mv88e6xxx_chip *chip, int port); + int (*port_set_scheduling_mode)(struct mv88e6xxx_chip *chip, int port, + u8 mode); int (*port_pause_limit)(struct mv88e6xxx_chip *chip, int port, u8 in, u8 out); int (*port_disable_learn_limit)(struct mv88e6xxx_chip *chip, int port); @@ -764,6 +773,10 @@ struct mv88e6xxx_avb_ops { int (*tai_read)(struct mv88e6xxx_chip *chip, int addr, u16 *data, int len); int (*tai_write)(struct mv88e6xxx_chip *chip, int addr, u16 data); + + /* Access port-scoped 802.1Qav registers */ + int (*port_qav_write)(struct mv88e6xxx_chip *chip, int port, int addr, + u16 data); }; =20 struct mv88e6xxx_ptp_ops { @@ -799,6 +812,14 @@ struct mv88e6xxx_tcam_ops { int (*flush_tcam)(struct mv88e6xxx_chip *chip); }; =20 +struct mv88e6xxx_qav_info { + u32 max_rate; /* in kbps */ + u16 rate_unit; /* in kbps */ + u16 rate_mask; /* QPri Rate valid bits mask */ + u16 hi_limit_mask; /* Qpri Hi Limit bits mask*/ + u8 queue_mask; /* supported queues bitmask */ +}; + static inline bool mv88e6xxx_has_stu(struct mv88e6xxx_chip *chip) { return chip->info->max_sid > 0 && diff --git a/drivers/net/dsa/mv88e6xxx/global2_avb.c b/drivers/net/dsa/mv88= e6xxx/global2_avb.c index 657783e043ff..6b54e275d21a 100644 --- a/drivers/net/dsa/mv88e6xxx/global2_avb.c +++ b/drivers/net/dsa/mv88e6xxx/global2_avb.c @@ -110,6 +110,15 @@ static int mv88e6352_g2_avb_port_ptp_write(struct mv88= e6xxx_chip *chip, return mv88e6xxx_g2_avb_write(chip, writeop, data); } =20 +static int mv88e6352_g2_avb_port_qav_write(struct mv88e6xxx_chip *chip, + int port, int addr, u16 data) +{ + u16 writeop =3D MV88E6352_G2_AVB_CMD_OP_WRITE | (port << 8) | + (MV88E6352_G2_AVB_CMD_BLOCK_QAV << 5) | addr; + + return mv88e6xxx_g2_avb_write(chip, writeop, data); +} + static int mv88e6352_g2_avb_ptp_read(struct mv88e6xxx_chip *chip, int addr, u16 *data, int len) { @@ -149,6 +158,7 @@ const struct mv88e6xxx_avb_ops mv88e6352_avb_ops =3D { .ptp_write =3D mv88e6352_g2_avb_ptp_write, .tai_read =3D mv88e6352_g2_avb_tai_read, .tai_write =3D mv88e6352_g2_avb_tai_write, + .port_qav_write =3D mv88e6352_g2_avb_port_qav_write, }; =20 static int mv88e6165_g2_avb_tai_read(struct mv88e6xxx_chip *chip, int addr, @@ -174,6 +184,7 @@ const struct mv88e6xxx_avb_ops mv88e6165_avb_ops =3D { .ptp_write =3D mv88e6352_g2_avb_ptp_write, .tai_read =3D mv88e6165_g2_avb_tai_read, .tai_write =3D mv88e6165_g2_avb_tai_write, + .port_qav_write =3D mv88e6352_g2_avb_port_qav_write, }; =20 static int mv88e6390_g2_avb_port_ptp_read(struct mv88e6xxx_chip *chip, @@ -197,6 +208,15 @@ static int mv88e6390_g2_avb_port_ptp_write(struct mv88= e6xxx_chip *chip, return mv88e6xxx_g2_avb_write(chip, writeop, data); } =20 +static int mv88e6390_g2_avb_port_qav_write(struct mv88e6xxx_chip *chip, + int port, int addr, u16 data) +{ + u16 writeop =3D MV88E6390_G2_AVB_CMD_OP_WRITE | (port << 8) | + (MV88E6352_G2_AVB_CMD_BLOCK_QAV << 5) | addr; + + return mv88e6xxx_g2_avb_write(chip, writeop, data); +} + static int mv88e6390_g2_avb_ptp_read(struct mv88e6xxx_chip *chip, int addr, u16 *data, int len) { @@ -236,4 +256,5 @@ const struct mv88e6xxx_avb_ops mv88e6390_avb_ops =3D { .ptp_write =3D mv88e6390_g2_avb_ptp_write, .tai_read =3D mv88e6390_g2_avb_tai_read, .tai_write =3D mv88e6390_g2_avb_tai_write, + .port_qav_write =3D mv88e6390_g2_avb_port_qav_write, }; diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/p= ort.c index c90117d2dd83..c0bcddbd3cbd 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -1348,6 +1348,51 @@ int mv88e6097_port_egress_rate_limiting(struct mv88e= 6xxx_chip *chip, int port) 0x0001); } =20 +int mv88e6352_port_set_scheduling_mode(struct mv88e6xxx_chip *chip, int po= rt, + u8 mode) +{ + u16 reg; + int err; + + if (mode > 3) + return -EINVAL; + + err =3D mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_EGRESS_RATE_CTL2, + ®); + if (err) + return err; + + reg &=3D ~MV88E6XXX_PORT_EGRESS_RATE_CTL2_SCHEDULE_MASK; + reg |=3D mode << MV88E6XXX_PORT_EGRESS_RATE_CTL2_SCHEDULE_SHIFT; + + return mv88e6xxx_port_write(chip, port, + MV88E6XXX_PORT_EGRESS_RATE_CTL2, reg); +} + +int mv88e6390_port_set_scheduling_mode(struct mv88e6xxx_chip *chip, int po= rt, + u8 mode) +{ + u16 reg; + int err; + + if (mode > MV88E6390_PORT_QUEUE_CTL_SCHEDULE_MASK) + return -EINVAL; + + reg =3D MV88E6390_PORT_QUEUE_CTL_UPDATE | + (MV88E6390_PORT_QUEUE_CTL_SCHEDULE << + MV88E6390_PORT_QUEUE_CTL_PTR_SHIFT) | + (mode & MV88E6390_PORT_QUEUE_CTL_SCHEDULE_MASK); + + err =3D mv88e6xxx_port_write(chip, port, MV88E6390_PORT_QUEUE_CTL, + reg); + if (err) + return err; + + return mv88e6xxx_port_wait_bit(chip, port, MV88E6390_PORT_QUEUE_CTL, + __bf_shf(MV88E6390_PORT_QUEUE_CTL_UPDATE) + , 0); +} + /* Offset 0x0B: Port Association Vector */ =20 int mv88e6xxx_port_set_assoc_vector(struct mv88e6xxx_chip *chip, int port, diff --git a/drivers/net/dsa/mv88e6xxx/port.h b/drivers/net/dsa/mv88e6xxx/p= ort.h index f6041f91215e..c4b0ec1990b3 100644 --- a/drivers/net/dsa/mv88e6xxx/port.h +++ b/drivers/net/dsa/mv88e6xxx/port.h @@ -241,6 +241,18 @@ =20 /* Offset 0x0A: Egress Rate Control 2 */ #define MV88E6XXX_PORT_EGRESS_RATE_CTL2 0x0a +#define MV88E6XXX_PORT_EGRESS_RATE_CTL2_SCHEDULE_MASK 0x3000 +#define MV88E6XXX_PORT_EGRESS_RATE_CTL2_SCHEDULE_SHIFT 12 + +/* Offset 0x1C: Port Queue Control */ +#define MV88E6390_PORT_QUEUE_CTL 0x1c +#define MV88E6390_PORT_QUEUE_CTL_UPDATE 0x8000 +#define MV88E6390_PORT_QUEUE_CTL_PTR_MASK 0x7f00 +#define MV88E6390_PORT_QUEUE_CTL_PTR_SHIFT 8 +#define MV88E6390_PORT_QUEUE_CTL_DATA_MASK 0x00ff +#define MV88E6390_PORT_QUEUE_CTL_SCHEDULE 0x00 +#define MV88E6390_PORT_QUEUE_CTL_SCHEDULE_MASK 0x07 + =20 /* Offset 0x0B: Port Association Vector */ #define MV88E6XXX_PORT_ASSOC_VECTOR 0x0b @@ -569,6 +581,10 @@ int mv88e6165_port_set_jumbo_size(struct mv88e6xxx_chi= p *chip, int port, size_t size); int mv88e6095_port_egress_rate_limiting(struct mv88e6xxx_chip *chip, int p= ort); int mv88e6097_port_egress_rate_limiting(struct mv88e6xxx_chip *chip, int p= ort); +int mv88e6352_port_set_scheduling_mode(struct mv88e6xxx_chip *chip, int po= rt, + u8 mode); +int mv88e6390_port_set_scheduling_mode(struct mv88e6xxx_chip *chip, int po= rt, + u8 mode); int mv88e6xxx_port_set_assoc_vector(struct mv88e6xxx_chip *chip, int port, u16 pav); int mv88e6097_port_pause_limit(struct mv88e6xxx_chip *chip, int port, u8 i= n, --=20 2.43.0