linux/drivers/net/dsa
Vladimir Oltean d38049bbe7 net: dsa: sja1105: bring deferred xmit implementation in line with ocelot-8021q
When the ocelot-8021q driver was converted to deferred xmit as part of
commit 8d5f7954b7 ("net: dsa: felix: break at first CPU port during
init and teardown"), the deferred implementation was deliberately made
subtly different from what sja1105 has.

The implementation differences lied on the following observations:

- There might be a race between these two lines in tag_sja1105.c:

       skb_queue_tail(&sp->xmit_queue, skb_get(skb));
       kthread_queue_work(sp->xmit_worker, &sp->xmit_work);

  and the skb dequeue logic in sja1105_port_deferred_xmit(). For
  example, the xmit_work might be already queued, however the work item
  has just finished walking through the skb queue. Because we don't
  check the return code from kthread_queue_work, we don't do anything if
  the work item is already queued.

  However, nobody will take that skb and send it, at least until the
  next timestampable skb is sent. This creates additional (and
  avoidable) TX timestamping latency.

  To close that race, what the ocelot-8021q driver does is it doesn't
  keep a single work item per port, and a skb timestamping queue, but
  rather dynamically allocates a work item per packet.

- It is also unnecessary to have more than one kthread that does the
  work. So delete the per-port kthread allocations and replace them with
  a single kthread which is global to the switch.

This change brings the two implementations in line by applying those
observations to the sja1105 driver as well.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-12 12:51:33 +00:00
..
b53 net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
hirschmann net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
microchip net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
mv88e6xxx net: dsa: mv88e6xxx: Add tx fwd offload PVT on intermediate devices 2021-12-12 12:38:23 +00:00
ocelot net: dsa: tag_ocelot: convert to tagger-owned data 2021-12-12 12:51:33 +00:00
qca net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
sja1105 net: dsa: sja1105: bring deferred xmit implementation in line with ocelot-8021q 2021-12-12 12:51:33 +00:00
xrs700x net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
bcm_sf2.c net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
bcm_sf2.h net: dsa: bcm_sf2: setup BCM4908 internal crossbar 2021-03-12 17:06:37 -08:00
bcm_sf2_cfp.c net: dsa: propagate extack to .port_vlan_add 2021-02-14 17:38:11 -08:00
bcm_sf2_regs.h net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s) 2021-03-18 14:44:05 -07:00
dsa_loop.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
dsa_loop.h
dsa_loop_bdinfo.c
Kconfig net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC 2021-10-18 14:02:56 +01:00
lan9303-core.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_i2c.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_mdio.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lantiq_gswip.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC 2021-10-18 14:02:56 +01:00
mt7530.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
mt7530.h net: dsa: mt7530: manually set up VLAN ID 0 2021-08-25 11:09:31 +01:00
mv88e6060.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
mv88e6060.h
qca8k.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
qca8k.h net: dsa: qca8k: add LAG support 2021-11-23 11:53:16 +00:00
realtek-smi-core.c net: dsa: realtek-smi: don't log an error on EPROBE_DEFER 2021-11-29 12:51:37 +00:00
realtek-smi-core.h net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC 2021-10-18 14:02:56 +01:00
rtl8365mb.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-02 11:44:56 -08:00
rtl8366.c net: dsa: rtl8366: Drop and depromote pointless prints 2021-09-27 16:33:46 +01:00
rtl8366rb.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
vitesse-vsc73xx-core.c net: dsa: vsc73xxx: Get rid of duplicate of_node assignment 2021-12-03 14:13:02 +00:00
vitesse-vsc73xx-platform.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
vitesse-vsc73xx-spi.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
vitesse-vsc73xx.h net: dsa: vsc73xxx: Make vsc73xx_remove() return void 2021-11-15 13:15:07 +00:00