Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
76 stars 79 forks source link

Not able to configure time aware shaper #67

Open joschi2804 opened 3 years ago

joschi2804 commented 3 years ago

Hello,

does KSZ9477 not support time aware shaper? I tried to set tas qdisc with tc command: tc -d qdisc replace dev eth0 parent root handle 100 taprio num_tc 2 map 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 queues 1@0 1@1 base-time 1618273428 sched-entry S 01 300000 sched-entry S 02 300000 clockid CLOCK_TAI

I got "_Unknown qdisc "taprio", hence option "numtc" is unparsable" error. The kernel version is 4.9.143

If it's not working with tc tool, is it maybe possible to enable time aware shaper with the internal switch registers? If yes, how can i enable them?

BR

triha2work commented 3 years ago

The driver does not support the tc command. The sysfs mechanism is used to configure the switch. Look for the SPI device at /sys/bus/spi/devices/spi1.0. The device name comes from the bus and chip select. There are sw and several sw# with a number, which are used for port configuration. Use "echo 1 > sw/info" to turn on verbose mode. Use "cat " to get some information from the file. Use the "avb=1" driver parameter to enable most of the AVB functions in the driver. After that go into the appropriate port directory like sw1. Check the tc map with "cat 1_tc_map" which shows which VLAN priority maps to which queue. "echo 3 > 1_q_index" to select queue 3. Check the current setting with "cat 1_q_scheduling" and "cat 1_q_shaping." The bandwidth then can be set with "echo 10000 > 1_q_admin_mbps" for 10 Mbps. Send traffic to port 1 to come out of port 2. Check the MIB counters of port 2 with "cat 1_mib." There should be tx_discards number.

kcn21 commented 2 years ago

Hello,

does KSZ9477 not support time aware shaper? I tried to set tas qdisc with tc command: tc -d qdisc replace dev eth0 parent root handle 100 taprio num_tc 2 map 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 queues 1@0 1@1 base-time 1618273428 sched-entry S 01 300000 sched-entry S 02 300000 clockid CLOCK_TAI

I got "_Unknown qdisc "taprio", hence option "numtc" is unparsable" error. The kernel version is 4.9.143

If it's not working with tc tool, is it maybe possible to enable time aware shaper with the internal switch registers? If yes, how can i enable them?

BR

Yes @joschi2804 , Same error for me. Do you know the solution ? @triha2work there is no driver problem at my end it supports tc commands.