[PATCH net-next] net: dsa: mt7530: Add TBF qdisc offload support

Lorenzo Bianconi lorenzo at kernel.org
Thu Oct 31 07:19:39 PDT 2024


> On 31/10/2024 11:00, Lorenzo Bianconi wrote:
> > > On 30/10/2024 22:29, Lorenzo Bianconi wrote:
> > > > Introduce port_setup_tc callback in mt7530 dsa driver in order to enable
> > > > dsa ports rate shaping via hw Token Bucket Filter (TBF) for hw switched
> > > > traffic. Enable hw TBF just for EN7581 SoC for the moment.
> > > 
> > > Is this because you didn't test it on the other models? Let me know if
> > > that's the case and I'll test it.
> > 
> > yep, exactly. I have tested it just on EN7581 since I do not have any other
> > boards for testing at the moment. If you confirm it works on other SoCs too,
> > I can remove the limitation.
> 
> Seems to be working fine on MT7530. As we have tested this on the oldest
> and newest models that use this switching IP, I'm going to assume it will
> work on the other models as well. You can remove the limitation. Also,
> please change MT7530_ERLCR_P and MT7530_GERLCR to MT753X_ERLCR_P and
> MT753X_GERLCR.

ack, thx for testing. I will fix it in v2.

Regards,
Lorenzo

> 
> tc qdisc add dev lan4 root tbf rate 10mbit burst 10kb latency 50ms
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec  5.88 MBytes  9.85 Mbits/sec    4             sender
> [  5]   0.00-5.00   sec  5.50 MBytes  9.23 Mbits/sec                  receiver
> 
> tc qdisc del dev lan4 root
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec   469 MBytes   786 Mbits/sec    0             sender
> [  5]   0.00-5.00   sec   468 MBytes   785 Mbits/sec                  receiver
> 
> tc qdisc add dev lan4 root tbf rate 11mbit burst 10kb latency 50ms
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec  6.38 MBytes  10.7 Mbits/sec    6             sender
> [  5]   0.00-5.00   sec  6.00 MBytes  10.1 Mbits/sec                  receiver
> 
> tc qdisc del dev lan4 root
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec   467 MBytes   783 Mbits/sec    0             sender
> [  5]   0.00-5.00   sec   466 MBytes   783 Mbits/sec                  receiver
> 
> tc qdisc add dev lan4 root tbf rate 11mbit burst 10kb latency 50ms
> tc qdisc replace dev lan4 root tbf rate 10mbit burst 10kb latency 50ms
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec  5.88 MBytes  9.85 Mbits/sec    4             sender
> [  5]   0.00-5.00   sec  5.50 MBytes  9.23 Mbits/sec                  receiver
> 
> Arınç
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20241031/25870b10/attachment.sig>


More information about the Linux-mediatek mailing list