Hello,
I am extending a custom driver for enetc on ls1028ardb to also support the TSN features of the board.
Now as soon as I enable the credit based shaper, no packets are transmitted. I have configured two TX BDR with prios 0 and 7 and set the PTC7CBSR0 and PTC7CBSR1 registers. But no matter which credit or bandwidth values I use, no data gets transmitted from either ring as soon as the CBSE bit is set. It is simply filling up until full.
I looked into the LSDK driver implementation and also only find these registers configured for CBS as described in the manual. Is there any hidden configuration I missed? Or are there more constrains to have a valid CBS configuration?
解決済! 解決策の投稿を見る。
For the curious reader:
I was finally able to get TSN on ENETC working. The difference was in the IEEE1588 Timer Module configuration.
After decreasing the CLK_PERIOD to 5 or 4 and recalculating TMR_ADD accordingly it is now functional.
For the curious reader:
I was finally able to get TSN on ENETC working. The difference was in the IEEE1588 Timer Module configuration.
After decreasing the CLK_PERIOD to 5 or 4 and recalculating TMR_ADD accordingly it is now functional.
I have the same problem with other TSN features as well, e.g. Qbv scheduler. Once enabled, only a single frame is transmitted.
I assume there is a dependant timing/frequency configuration I am missing? IEEE1588 clock is already initialized and running and the speed value is set to 1Gbps.
For the same environment and steps, LSDK driver is working well, right?
do you use ptp4l to do the time synchronization?
you can dump the related registers and compare them with that in LSDK driver.
PTP synchronization is needed, so you should enable it.
you can test your code in LSDK's environment, just replace ENET driver using your driver.
it can exclude some interference factors.
for ENETC port,
if want to enable CBS, should make sure the other TC (that are numerically higher than this TC) have been enabled.
if want to disable CBS, should make sure the other TC (that are numerically lower than this TC) have been disabled.
you can refer to the function enetc_set_cbs in drivers/net/ethernet/freescale/enetc/enetc_tsn.c,
Thanks
I know, for this reason I have only enabled the highest TC 7.
As I mentioned in my original post I took the code in enetc_set_cbs as reference and configured the same registers.
For CBS test, should send the frames using the corresponding queue, for example "pktgen -q ...".
you can refer to " 4.1.4.1.5.2 Using CBS Qdisc to setup Qav" of real-time-edge RM.
can also use "ethtool -S enox" command to show the rx/tx counter, it can help to find why the packets are blocked.
Thanks