[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220914153303.1792444-13-vladimir.oltean@nxp.com>
Date: Wed, 14 Sep 2022 18:33:02 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
Rui Sousa <rui.sousa@....com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Michael Walle <michael@...le.cc>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>,
Maxim Kochetkov <fido_max@...ox.ru>,
Colin Foster <colin.foster@...advantage.com>,
Richie Pearn <richard.pearn@....com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Vladimir Oltean <olteanv@...il.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Gerhard Engleder <gerhard@...leder-embedded.com>,
Grygorii Strashko <grygorii.strashko@...com>,
linux-kernel@...r.kernel.org
Subject: [PATCH net-next 12/13] net: stmmac: deny tc-taprio changes to per-tc max SDU
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@....com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
index 773e415cc2de..8e9c7d54fb4c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -922,13 +922,17 @@ static int tc_setup_taprio(struct stmmac_priv *priv,
struct plat_stmmacenet_data *plat = priv->plat;
struct timespec64 time, current_time, qopt_time;
ktime_t current_time_ns;
+ int i, tc, ret = 0;
bool fpe = false;
- int i, ret = 0;
u64 ctr;
if (!priv->dma_cap.estsel)
return -EOPNOTSUPP;
+ for (tc = 0; tc < TC_MAX_QUEUE; tc++)
+ if (qopt->max_sdu[tc])
+ return -EOPNOTSUPP;
+
switch (wid) {
case 0x1:
wid = 16;
--
2.34.1
Powered by blists - more mailing lists