1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/dsa/sja1105
Vladimir Oltean 180a7419fe net: dsa: sja1105: complete tc-cbs offload support on SJA1110
The blamed commit left this delta behind:

  struct sja1105_cbs_entry {
 -	u64 port;
 -	u64 prio;
 +	u64 port; /* Not used for SJA1110 */
 +	u64 prio; /* Not used for SJA1110 */
  	u64 credit_hi;
  	u64 credit_lo;
  	u64 send_slope;
  	u64 idle_slope;
  };

but did not actually implement tc-cbs offload fully for the new switch.
The offload is accepted, but it doesn't work.

The difference compared to earlier switch generations is that now, the
table of CBS shapers is sparse, because there are many more shapers, so
the mapping between a {port, prio} and a table index is static, rather
than requiring us to store the port and prio into the sja1105_cbs_entry.

So, the problem is that the code programs the CBS shaper parameters at a
dynamic table index which is incorrect.

All that needs to be done for SJA1110 CBS shapers to work is to bypass
the logic which allocates shapers in a dense manner, as for SJA1105, and
use the fixed mapping instead.

Fixes: 3e77e59bf8 ("net: dsa: sja1105: add support for the SJA1110 switch family")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-09-06 06:23:05 +01:00
..
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX 2021-06-08 14:37:16 -07:00
sja1105.h net: dsa: sja1105: complete tc-cbs offload support on SJA1110 2023-09-06 06:23:05 +01:00
sja1105_clocking.c net: dsa: sja1105: parse {rx, tx}-internal-delay-ps properties for RGMII delays 2021-10-20 11:32:28 +01:00
sja1105_devlink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-08 18:19:59 -08:00
sja1105_dynamic_config.c net: dsa: sja1105: serialize access to the dynamic config interface 2021-10-25 12:59:41 +01:00
sja1105_dynamic_config.h net: dsa: sja1105: add support for the SJA1110 switch family 2021-06-08 14:37:16 -07:00
sja1105_ethtool.c net: dsa: sja1105: don't use burst SPI reads for port statistics 2021-05-21 14:01:41 -07:00
sja1105_flower.c net: flow_dissector: Use 64bits for used_keys 2023-07-31 09:11:24 +01:00
sja1105_main.c net: dsa: sja1105: complete tc-cbs offload support on SJA1110 2023-09-06 06:23:05 +01:00
sja1105_mdio.c net: dsa: sja1105: use xpcs_create_mdiodev() 2023-06-05 11:26:02 +01:00
sja1105_ptp.c net: dsa: sja1105: always enable the send_meta options 2023-07-04 19:42:27 +01:00
sja1105_ptp.h Revert "net: dsa: move sja1110_process_meta_tstamp inside the tagging protocol driver" 2021-12-12 12:51:34 +00:00
sja1105_spi.c net: dsa: sja1105: complete tc-cbs offload support on SJA1110 2023-09-06 06:23:05 +01:00
sja1105_static_config.c net: update NXP copyright text 2021-09-17 13:52:17 +01:00
sja1105_static_config.h net: update NXP copyright text 2021-09-17 13:52:17 +01:00
sja1105_tas.c net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum 2023-05-31 10:00:30 +01:00
sja1105_tas.h net: dsa: sja1105: dimension the data structures for a larger port count 2021-05-24 13:59:03 -07:00
sja1105_vl.c net: dsa: tag_8021q: rename dsa_8021q_bridge_tx_fwd_offload_vid 2022-02-27 11:06:14 +00:00
sja1105_vl.h net: update NXP copyright text 2021-09-17 13:52:17 +01:00