Thread (38 messages) 38 messages, 4 authors, 2022-09-22

Re: [PATCH net-next 10/13] tsnep: deny tc-taprio changes to per-tc max SDU

flat view

From: Gerhard Engleder <hidden>
Date: 2022-09-15 19:49:44
Also in: lkml

quoted hunk ↗ jump to hunk
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>
---
  drivers/net/ethernet/engleder/tsnep_tc.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/engleder/tsnep_tc.c b/drivers/net/ethernet/engleder/tsnep_tc.c
index c4c6e1357317..82df837ffc54 100644
--- a/drivers/net/ethernet/engleder/tsnep_tc.c
+++ b/drivers/net/ethernet/engleder/tsnep_tc.c
@@ -320,11 +320,15 @@ static int tsnep_taprio(struct tsnep_adapter *adapter,
  {
  	struct tsnep_gcl *gcl;
  	struct tsnep_gcl *curr;
-	int retval;
+	int retval, tc;
  
  	if (!adapter->gate_control)
  		return -EOPNOTSUPP;
  
+	for (tc = 0; tc < TC_MAX_QUEUE; tc++)
+		if (qopt->max_sdu[tc])
+			return -EOPNOTSUPP;
Does it make any difference if the MAC already guarantees that too
long frames, which would violate the next taprio interval, will not
be transmitted? MACs are able to do that, switches not.

The user could be informed, that the MAC is considering the length of the frames by accepting any max_sdu value lower than the MTU of the netdev.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help