Error in changing traffic classification of CAKE in OpenWrt

Hello,

I am currently using OpenWrt (version: 19.07.7) on Virtual Box (version: 6.1). I also have a Linux machine that I use in order to ssh to OpenWrt and route synthetic traffic to it. I am trying to change the traffic classification of the CAKE algorithm on OpenWrt using "tc filter replace" scripts. Specifically, I have a loop of 10 iterations and in each iteration, I commit a different mapping of ToS byte values to CAKE's priority classes (called TINs). For example, I use the following script to map ToS = 0x00 to TIN 8 (I have 256 scripts for ToS = 0x00 to 0xFF):

tc filter replace dev eth1 parent 1: protocol all u32 match ip tos 0x00 0xff action skbedit priority 1:8

However, I can only commit these scripts for 8 iterations and after that I get the following error:

RTNETLINK answers: Invalid argument
We have an error talking to the kernel

I was wondering why this is happening after 8 iterations and if there are any solutions to avoid this error?
Thanks.