diff mbox series

[v2,net-next,06/12] net: lan966x: deny tc-taprio changes to per-tc max SDU

Message ID 20220923163310.3192733-7-vladimir.oltean@nxp.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Add tc-taprio support for queueMaxSDU | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Vladimir Oltean Sept. 23, 2022, 4:33 p.m. UTC
Since the driver does not act upon the max_sdu argument, deny any other
values except the default all-zeroes, which means that all traffic
classes should use the same MTU as the port itself.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
v1->v2: patch is new

 drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c b/drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
index 3f5b212066c5..96367819ff96 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
@@ -219,8 +219,16 @@  static int lan966x_taprio_find_list(struct lan966x_port *port,
 static int lan966x_taprio_check(struct tc_taprio_qopt_offload *qopt)
 {
 	u64 total_time = 0;
+	int tc;
 	u32 i;
 
+	/* Offloading queueMaxSDU is not supported at the moment,
+	 * only accept the default port MTU
+	 */
+	for (tc = 0; tc < 8; tc++)
+		if (qopt->max_sdu[tc])
+			return -EOPNOTSUPP;
+
 	/* This is not supported by th HW */
 	if (qopt->cycle_time_extension)
 		return -EOPNOTSUPP;