From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Martin Kaistra <martin.kaistra@linutronix.de>,
Kurt Kanzenbach <kurt@linutronix.de>,
Ansuel Smith <ansuelsmth@gmail.com>,
Tobias Waldekranz <tobias@waldekranz.com>
Subject: [PATCH net-next 03/11] net: dsa: sja1105: let deferred packets time out when sent to ports going down
Date: Wed, 8 Dec 2021 22:04:56 +0200 [thread overview]
Message-ID: <20211208200504.3136642-4-vladimir.oltean@nxp.com> (raw)
In-Reply-To: <20211208200504.3136642-1-vladimir.oltean@nxp.com>
This code is not necessary and complicates the conversion of this driver
to tagger-owned memory. If there is a PTP packet that is sent
concurrently with the port getting disabled, the deferred xmit mechanism
is robust enough to time out when it sees that it hasn't been delivered,
and recovers.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/dsa/sja1105/sja1105_main.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index cefde41ce8d6..f7c88da377e4 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -2617,18 +2617,6 @@ static int sja1105_prechangeupper(struct dsa_switch *ds, int port,
return 0;
}
-static void sja1105_port_disable(struct dsa_switch *ds, int port)
-{
- struct sja1105_private *priv = ds->priv;
- struct sja1105_port *sp = &priv->ports[port];
-
- if (!dsa_is_user_port(ds, port))
- return;
-
- kthread_cancel_work_sync(&sp->xmit_work);
- skb_queue_purge(&sp->xmit_queue);
-}
-
static int sja1105_mgmt_xmit(struct dsa_switch *ds, int port, int slot,
struct sk_buff *skb, bool takets)
{
@@ -3215,7 +3203,6 @@ static const struct dsa_switch_ops sja1105_switch_ops = {
.get_ethtool_stats = sja1105_get_ethtool_stats,
.get_sset_count = sja1105_get_sset_count,
.get_ts_info = sja1105_get_ts_info,
- .port_disable = sja1105_port_disable,
.port_fdb_dump = sja1105_fdb_dump,
.port_fdb_add = sja1105_fdb_add,
.port_fdb_del = sja1105_fdb_del,
--
2.25.1
next prev parent reply other threads:[~2021-12-08 20:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 20:04 [PATCH net-next 00/11] Replace DSA dp->priv with tagger-owned storage Vladimir Oltean
2021-12-08 20:04 ` [PATCH net-next 01/11] net: dsa: introduce tagger-owned storage for private and shared data Vladimir Oltean
2021-12-08 20:04 ` [PATCH net-next 02/11] net: dsa: tag_ocelot: convert to tagger-owned data Vladimir Oltean
2021-12-08 20:04 ` Vladimir Oltean [this message]
2021-12-08 20:04 ` [PATCH net-next 04/11] net: dsa: sja1105: bring in line deferred xmit implementation with ocelot-8021q Vladimir Oltean
2021-12-08 20:04 ` [PATCH net-next 05/11] net: dsa: sja1105: remove hwts_tx_en from tagger data Vladimir Oltean
2021-12-09 0:13 ` Jakub Kicinski
2021-12-09 0:14 ` Vladimir Oltean
2021-12-08 20:04 ` [PATCH net-next 06/11] net: dsa: sja1105: make dp->priv point directly to sja1105_tagger_data Vladimir Oltean
2021-12-08 20:05 ` [PATCH net-next 07/11] net: dsa: sja1105: move ts_id from sja1105_tagger_data Vladimir Oltean
2021-12-08 20:05 ` [PATCH net-next 08/11] net: dsa: tag_sja1105: convert to tagger-owned data Vladimir Oltean
2021-12-08 20:05 ` [PATCH net-next 09/11] Revert "net: dsa: move sja1110_process_meta_tstamp inside the tagging protocol driver" Vladimir Oltean
2021-12-08 20:05 ` [PATCH net-next 10/11] net: dsa: tag_sja1105: split sja1105_tagger_data into private and public sections Vladimir Oltean
2021-12-08 20:05 ` [PATCH net-next 11/11] net: dsa: remove dp->priv Vladimir Oltean
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=20211208200504.3136642-4-vladimir.oltean@nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=martin.kaistra@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.com \
/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