LS1021ATSN, mqprio with tc qdisc compatible ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1021ATSN, mqprio with tc qdisc compatible ?

Jump to solution
3,499 Views
Waner
Contributor III

Hello, I am actually using NXP LS1021ATSN board in order to configure an ethernet interface with a priority hardware queues system for TSN packets. But I have some trouble with this and I would like to have your help.

 

1) Is every interfaces compatible with what I want to do ? (does it works on both ethX and swpX interfaces ?)

 

2) I tried to configure swp4 interface with tc qdisc mqprio. First, the board told me that it does not know "mqprio" queue. So I checked in the kernel configuration and I added MQPRIO drivers. Now when I try, it told me "Error : Operation not supported".

 

Can you help me with these issues ?

 

Thanks.

0 Kudos
1 Solution
3,369 Views
yipingwang
NXP TechSupport
NXP TechSupport

First of all,  it is need to be clear about the ls1021atsn hardware structure. As below. See attached picture 1.  LS1021 internal link to the SJA1105. Ethx shows in Linux are the ports eth0/eth1 which links to ls1021. It only supports 1 RX ring and 1 TX ring per CPU. It is not support the mqprio offloading. We called theses ports are the ethernet port as end station.

Swp0~swp3 are linking to the sja1105 chips are as switch ports.

 

There are some different for the switch ports and end station ports.

Endstation ports: the data from ram to buffer ring depends on the queues of ls1021 ethernet ports. So user could make enqueue discipline at software level. That means how enqueue frames to the queue buffer. By default, Linux kernel choose pfifo_fast as enqueue method. That is why you could see tc qdisc show dev eno0 qdisc mq 0: root qdisc pfifo_fast 0: parent :8 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

 

But as switching, the frame input from one port and output to another port normally. There are 8 traffic classes ingress/egress in each port. If we do not set anything mapping discipline, all the frames would ingress at traffic class 0 and egress to class 0. So by default, the frames ingress to which traffic class by the PCP value in the VLAN tag.

 

If you really want to tracking the queues status. You could use command ethtool:

 

Ethtool -S swp0

 

And to see how many queues and frame counters. Please note that the swpX are the virtual ports not really ports as ethX, they are showing frame counters pass to the CPU.

TC commands for switch are not all supported depends on the Linux driver, would not showing the queue message by default(tc show qdisc command). But we had more Qdisc features on filtering for filtering the different type of frames and TSN taprio Qdisc, CBS Qdisc.  Take taprio Qdisc as example:

 

[root@LS1021ATSN ~] # tc qdisc replace dev swp2 parent root handle 100 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 sched-entry S 5 5000 sched-entry S 7 6000 sched-entry S 7 6000 flags 2 [root@LS1021ATSN ~] # tc qdisc show dev swp2 qdisc taprio 100: root refcnt 9 tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 offset 4 count 1 offset 5 count 1 offset 6 count 1 offset 7 count 1

clockid invalid flags 0x7d8f4   base-time 0 cycle-time 17000 cycle-time-extension 0

        index 0 cmd S gatemask 0x5 interval 5000

        index 1 cmd S gatemask 0x7 interval 6000

        index 2 cmd S gatemask 0x7 interval 6000

 

qdisc pfifo 0: parent 100:8 limit 1000p

qdisc pfifo 0: parent 100:7 limit 1000p

qdisc pfifo 0: parent 100:6 limit 1000p

qdisc pfifo 0: parent 100:5 limit 1000p

qdisc pfifo 0: parent 100:4 limit 1000p

qdisc pfifo 0: parent 100:3 limit 1000p

qdisc pfifo 0: parent 100:2 limit 1000p

qdisc pfifo 0: parent 100:1 limit 1000p

[root@LS1021ATSN ~] #

 

sja1105 (for switch ports) driver dont support mqprio offload either. However, mqprio can be used in non-offload mode (remove "hw 1").

On SJA1105, if the switch ports are in operating mode 1 or 3 (see here for details):

 

https://www.kernel.org/doc/html/latest/networking/dsa/sja1105.html#traffic-support

 

then the skb->priority value translates into a VLAN PCP inserted in the DSA tag, so the packet is transmitted in that priority queue.

The mapping is as follows:

User space app opens a socket and uses the SO_PRIORITY API to set a certain QoS priority for packets enqueued through it. The packet enters the kernel and is assigned a certain skb->priority. The packet enters the qdisc of the egress interface, and the queue is selected based on the "map" between skb->priority and queue.

The Ethernet driver interprets the queue mapping in a custom way. In the case of sja1105, as mentioned, this translates to a certain VLAN PCP communicated between the DSA master (eth2) and the CPU port of the switch. This VLAN PCP is part of the "DSA tag" of the switch and is not seen on the wire itself. It is only seen in "tcpdump -i eth2 -e -n -Q out".

View solution in original post

13 Replies
3,481 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. Ethx are the port of ls1021, and swpx are the ports of sja1105 which are switch  ports. I think swpX would qualify the your requirement.

2. You need to update the iproute2 to the latest version. But most possibly is that kernel need to config the option:

CONFIG_NET_SCH_MQPRIO=y

Also better to enable more qdisc option:

CONFIG_NET_SCH_TAPRIO=y

CONFIG_NET_SCH_ETF=y

CONFIG_NET_SCH_CBS=y

CONFIG_NET_SCH_MULTIQ=y

CONFIG_NET_SCH_INGRESS=y

CONFIG_NET_CLS_FLOWER=y

0 Kudos
3,445 Views
Waner
Contributor III

@yipingwang I made all the kernel modifications, I rebuild everything, replace uImage, device tree and all the rootfs.tar on the sd card, but I have this answers again : 

 

> tc qdisc add dev swp4 root handle 1: mqprio num_tc 8 map 1 2 3 4 5 6 7 hw 1

RTNETLINK answers: Operation not supported

 

tc qdisc add dev eth1 root handle 1: mqprio num_tc 8 map 1 2 3 4 5 6 7 hw 1

RTNETLINK answers: Invalid argument

 

I have tested both eth1 and swp4 to see, but it seems to have another problem. I can't see where does it come. 

 

I show here the result of strace with the command on swp4 : 

execve("/sbin/tc", ["tc", "qdisc", "add", "dev", "swp4", "root", "handle", "1:", "mqprio", "num_tc", "8", "map", "1", "2", "3", "4", "5", "6", "7", "hw", "1"], 0xbe8ecd60 /* 13 vars */) = 0
brk(NULL) = 0x82000
uname({sysname="Linux", nodename="LS1021ATSN", ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f22000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260\26\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13736, ...}) = 0
mmap2(NULL, 78004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ee8000
mprotect(0xb6eeb000, 61440, PROT_NONE) = 0
mmap2(0xb6efa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb6efa000
close(3) = 0
openat(AT_FDCWD, "/lib/libcap.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0L\20\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=17916, ...}) = 0
mmap2(NULL, 82240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ed3000
mprotect(0xb6ed6000, 65536, PROT_NONE) = 0
mmap2(0xb6ee6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xb6ee6000
close(3) = 0
openat(AT_FDCWD, "/lib/libm.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\240r\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=353628, ...}) = 0
mmap2(NULL, 417904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e6c000
mprotect(0xb6ec2000, 61440, PROT_NONE) = 0
mmap2(0xb6ed1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x55000) = 0xb6ed1000
close(3) = 0
openat(AT_FDCWD, "/lib/libdl.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\230\t\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9600, ...}) = 0
mmap2(NULL, 73916, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e59000
mprotect(0xb6e5b000, 61440, PROT_NONE) = 0
mmap2(0xb6e6a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb6e6a000
close(3) = 0
openat(AT_FDCWD, "/lib/libxtables.so.12", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\350'\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=42736, ...}) = 0
mmap2(NULL, 118036, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e3c000
mprotect(0xb6e46000, 61440, PROT_NONE) = 0
mmap2(0xb6e55000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0xb6e55000
mmap2(0xb6e57000, 7444, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6e57000
close(3) = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0Iw\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=926456, ...}) = 0
mmap2(NULL, 996012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6d48000
mprotect(0xb6e26000, 65536, PROT_NONE) = 0
mmap2(0xb6e36000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xde000) = 0xb6e36000
mmap2(0xb6e39000, 8876, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6e39000
close(3) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f20000
set_tls(0xb6f204d0) = 0
mprotect(0xb6e36000, 8192, PROT_READ) = 0
mprotect(0xb6e6a000, 4096, PROT_READ) = 0
mprotect(0xb6e55000, 4096, PROT_READ) = 0
mprotect(0xb6ed1000, 4096, PROT_READ) = 0
mprotect(0xb6ee6000, 4096, PROT_READ) = 0
mprotect(0xb6efa000, 4096, PROT_READ) = 0
mprotect(0x79000, 4096, PROT_READ) = 0
mprotect(0xb6f24000, 4096, PROT_READ) = 0
brk(NULL) = 0x82000
brk(0xa3000) = 0xa3000
openat(AT_FDCWD, "/proc/net/psched", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "000003e8 00000040 000f4240 3b9ac"..., 1024) = 36
close(3) = 0
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0
setsockopt(3, SOL_NETLINK, NETLINK_EXT_ACK, [1], 4) = 0
bind(3, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, nl_pid=614, nl_groups=00000000}, [12]) = 0
openat(AT_FDCWD, "/usr/lib/tc//q_mqprio.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
send(3, {{len=40, type=RTM_GETLINK, flags=NLM_F_REQUEST|NLM_F_DUMP, seq=1581099290, pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=0, ifi_flags=0, ifi_change=0}, {{nla_len=8, nla_type=IFLA_EXT0
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 3812
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{{len=1316, type=RTM_NEWLINK, flags=NLM_F_MULTI, seq=1581099290, pid=614}, {ifi_family=AF_UNSPEC, i2
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 2444
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{{len=832, type=RTM_NEWLINK, flags=NLM_F_MULTI, seq=1581099290, pid=614}, {ifi_family=AF_UNSPEC, if4
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 14240
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{{len=1612, type=RTM_NEWLINK, flags=NLM_F_MULTI, seq=1581099290, pid=614}, {ifi_family=AF_UNSPEC, i0
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=20, type=NLMSG_DONE, flags=NLM_F_MULTI, seq=1581099290, pid=614}, 0}, iov_len=32768}], msg_iov0
sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=136, type=RTM_NEWQDISC, flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL|NLM_F_CREATE, seq=1581099291,6
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 156
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=156, type=NLMSG_ERROR, flags=0, seq=1581099291, pid=614}, {error=-EOPNOTSUPP, msg={{len=136, t6
write(2, "RTNETLINK answers: Operation not"..., 43RTNETLINK answers: Operation not supported
) = 43
close(3) = 0
exit_group(2) = ?

 

*****and here the result of strace with eth1 tc command*********

 

execve("/sbin/tc", ["tc", "qdisc", "add", "dev", "swp4", "root", "handle", "1:", "mqprio", "num_tc", "8", "map", "1", "2", "3", "4", "5", "6", "7", "hw", "1"], 0xbe8ecd60 /* 13 vars */) = 0
brk(NULL) = 0x82000
uname({sysname="Linux", nodename="LS1021ATSN", ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f22000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/neon/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/neon", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/vfp", 0xbeaa2130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260\26\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13736, ...}) = 0
mmap2(NULL, 78004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ee8000
mprotect(0xb6eeb000, 61440, PROT_NONE) = 0
mmap2(0xb6efa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb6efa000
close(3) = 0
openat(AT_FDCWD, "/lib/libcap.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0L\20\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=17916, ...}) = 0
mmap2(NULL, 82240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ed3000
mprotect(0xb6ed6000, 65536, PROT_NONE) = 0
mmap2(0xb6ee6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xb6ee6000
close(3) = 0
openat(AT_FDCWD, "/lib/libm.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\240r\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=353628, ...}) = 0
mmap2(NULL, 417904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e6c000
mprotect(0xb6ec2000, 61440, PROT_NONE) = 0
mmap2(0xb6ed1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x55000) = 0xb6ed1000
close(3) = 0
openat(AT_FDCWD, "/lib/libdl.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\230\t\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9600, ...}) = 0
mmap2(NULL, 73916, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e59000
mprotect(0xb6e5b000, 61440, PROT_NONE) = 0
mmap2(0xb6e6a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb6e6a000
close(3) = 0
openat(AT_FDCWD, "/lib/libxtables.so.12", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\350'\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=42736, ...}) = 0
mmap2(NULL, 118036, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e3c000
[root@LS1021ATSN ~] # strace tc qdisc add dev eth1 root handle 1: mqprio num_tc 8 map 1 2 3 4 5 6 7 hw 1
execve("/sbin/tc", ["tc", "qdisc", "add", "dev", "eth1", "root", "handle", "1:", "mqprio", "num_tc", "8", "map", "1", "2", "3", "4", "5", "6", "7", "hw", "1"], 0xbed0ed60 /* 13 vars */) = 0
brk(NULL) = 0x82000
uname({sysname="Linux", nodename="LS1021ATSN", ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fb4000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/neon/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/neon", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/v7l/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v7l", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/neon/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/neon", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/neon/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/neon", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/v7l/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/v7l", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/neon/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/neon/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/neon/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/neon", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/vfp/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/lib/vfp", 0xbe850130) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libmnl.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260\26\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13736, ...}) = 0
mmap2(NULL, 78004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f7a000
mprotect(0xb6f7d000, 61440, PROT_NONE) = 0
mmap2(0xb6f8c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb6f8c000
close(3) = 0
openat(AT_FDCWD, "/lib/libcap.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0L\20\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=17916, ...}) = 0
mmap2(NULL, 82240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f65000
mprotect(0xb6f68000, 65536, PROT_NONE) = 0
mmap2(0xb6f78000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xb6f78000
close(3) = 0
openat(AT_FDCWD, "/lib/libm.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\240r\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=353628, ...}) = 0
mmap2(NULL, 417904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6efe000
mprotect(0xb6f54000, 61440, PROT_NONE) = 0
mmap2(0xb6f63000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x55000) = 0xb6f63000
close(3) = 0
openat(AT_FDCWD, "/lib/libdl.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\230\t\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9600, ...}) = 0
mmap2(NULL, 73916, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6eeb000
mprotect(0xb6eed000, 61440, PROT_NONE) = 0
mmap2(0xb6efc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb6efc000
close(3) = 0
openat(AT_FDCWD, "/lib/libxtables.so.12", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\350'\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=42736, ...}) = 0
mmap2(NULL, 118036, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ece000
mprotect(0xb6ed8000, 61440, PROT_NONE) = 0
mmap2(0xb6ee7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0xb6ee7000
mmap2(0xb6ee9000, 7444, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6ee9000
close(3) = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0Iw\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=926456, ...}) = 0
mmap2(NULL, 996012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6dda000
mprotect(0xb6eb8000, 65536, PROT_NONE) = 0
mmap2(0xb6ec8000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xde000) = 0xb6ec8000
mmap2(0xb6ecb000, 8876, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6ecb000
close(3) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fb2000
set_tls(0xb6fb24d0) = 0
mprotect(0xb6ec8000, 8192, PROT_READ) = 0
mprotect(0xb6efc000, 4096, PROT_READ) = 0
mprotect(0xb6ee7000, 4096, PROT_READ) = 0
mprotect(0xb6f63000, 4096, PROT_READ) = 0
mprotect(0xb6f78000, 4096, PROT_READ) = 0
mprotect(0xb6f8c000, 4096, PROT_READ) = 0
mprotect(0x79000, 4096, PROT_READ) = 0
mprotect(0xb6fb6000, 4096, PROT_READ) = 0
brk(NULL) = 0x82000
brk(0xa3000) = 0xa3000
openat(AT_FDCWD, "/proc/net/psched", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "000003e8 00000040 000f4240 3b9ac"..., 1024) = 36
close(3) = 0
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0
setsockopt(3, SOL_NETLINK, NETLINK_EXT_ACK, [1], 4) = 0
bind(3, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, nl_pid=619, nl_groups=00000000}, [12]) = 0
openat(AT_FDCWD, "/usr/lib/tc//q_mqprio.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
send(3, {{len=40, type=RTM_GETLINK, flags=NLM_F_REQUEST|NLM_F_DUMP, seq=1581099354, pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=0, ifi_flags=0, ifi_change=0}, {{nla_len=8, nla_type=IFLA_EXT0
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 3812
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{{len=1316, type=RTM_NEWLINK, flags=NLM_F_MULTI, seq=1581099354, pid=619}, {ifi_family=AF_UNSPEC, i2
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 2444
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{{len=832, type=RTM_NEWLINK, flags=NLM_F_MULTI, seq=1581099354, pid=619}, {ifi_family=AF_UNSPEC, if4
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 14240
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{{len=1612, type=RTM_NEWLINK, flags=NLM_F_MULTI, seq=1581099354, pid=619}, {ifi_family=AF_UNSPEC, i0
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=20, type=NLMSG_DONE, flags=NLM_F_MULTI, seq=1581099354, pid=619}, 0}, iov_len=32768}], msg_iov0
sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=136, type=RTM_NEWQDISC, flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL|NLM_F_CREATE, seq=1581099355,6
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 156
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=156, type=NLMSG_ERROR, flags=0, seq=1581099355, pid=619}, {error=-EINVAL, msg={{len=136, type=6
write(2, "RTNETLINK answers: Invalid argum"..., 36RTNETLINK answers: Invalid argument
) = 36
close(3) = 0
exit_group(2) = ?
+++ exited with 2 +++

 

0 Kudos
3,431 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check whether Kernel option "CONFIG_NET_SCHED" was enabled.

Enable following configs in kernel when using Linux traffic control (tc):
Symbol: NET_SCH_MQPRIO [=y] && NET_SCH_CBS [=y] && NET_SCH_TAPRIO [=y]
[*] Networking support --->
Networking options --->
[*] QoS and/or fair queueing --->
<*> Credit Based Shaper (CBS)
<*> Time Aware Priority (taprio) Scheduler
<*> Multi-queue priority scheduler (MQPRIO)
[*] Actions --->
<*> Traffic Policing
<*> Generic actions
<*> Redirecting and Mirroring
<*> SKB Editing
<*> Vlan manipulation
<*> Frame gate entry list control tc action

Please refer to the troubleshooting in https://tcconfig.readthedocs.io/en/latest/pages/troubleshooting.html

If your problem remains, please provide your Linux Kernel configuration file.

0 Kudos
3,423 Views
Waner
Contributor III

Hi @yipingwang ,

I followed the steps that you gave me (the configuration was already good for me), but I added some options in my Linux configuration thanks to the troubleshooting link. 

 

But the result is exactly the same, the operation is not supported. 

Find enclosed my .config Linux file (this is a zip because I cannot just put a .config file, i add the same in .txt format). 

Thanks for all. 

 

0 Kudos
3,407 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please enable CONFIG_NET_SCH_MULTIQ=y in your Linux Kernel configuration file.

I just discussed with Linux SDK development team.

The queue priority mapping are set by default already.

So the command:

 tc qdisc add dev swp4 root handle 1: mqprio num_tc 8 map 1 2 3 4 5 6 7 hw 1

is not supported .

Means, You do not need to set this command but queues are set already by priority like that way.

 

tc qdisc add dev eth1 root handle 1: mqprio num_tc 8 map 1 2 3 4 5 6 7 hw 1

Eth1 is the port of ls1021 chip. It is not a multi queue port I think. So the command is not supported any way.

0 Kudos
3,397 Views
Waner
Contributor III

HI @yipingwang ,

I added the last kernel configuration that you gave me but it does not change anything. 

Concerning the ethX port, ok I understand that I will have to use swpX interface anyway. 

But I am little bit troubled with the answer of SDK team. If I check the default queuing discipline on swp4 interface for example, I have this : 

 

> tc qdisc show dev swp4

qdisc noqueue 0: root refcnt 2

 

If we refer to tc man page, noqueue discipline does not take any shapper or any scheduler to manage traffic and works such as a traditionnal FIFO, which is not what I am looking for. Does the SDK team agree with that ? And if they are true and the priority queuing discipline is already put in place by default, how can I check that ? 

0 Kudos
3,370 Views
yipingwang
NXP TechSupport
NXP TechSupport

First of all,  it is need to be clear about the ls1021atsn hardware structure. As below. See attached picture 1.  LS1021 internal link to the SJA1105. Ethx shows in Linux are the ports eth0/eth1 which links to ls1021. It only supports 1 RX ring and 1 TX ring per CPU. It is not support the mqprio offloading. We called theses ports are the ethernet port as end station.

Swp0~swp3 are linking to the sja1105 chips are as switch ports.

 

There are some different for the switch ports and end station ports.

Endstation ports: the data from ram to buffer ring depends on the queues of ls1021 ethernet ports. So user could make enqueue discipline at software level. That means how enqueue frames to the queue buffer. By default, Linux kernel choose pfifo_fast as enqueue method. That is why you could see tc qdisc show dev eno0 qdisc mq 0: root qdisc pfifo_fast 0: parent :8 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

 

But as switching, the frame input from one port and output to another port normally. There are 8 traffic classes ingress/egress in each port. If we do not set anything mapping discipline, all the frames would ingress at traffic class 0 and egress to class 0. So by default, the frames ingress to which traffic class by the PCP value in the VLAN tag.

 

If you really want to tracking the queues status. You could use command ethtool:

 

Ethtool -S swp0

 

And to see how many queues and frame counters. Please note that the swpX are the virtual ports not really ports as ethX, they are showing frame counters pass to the CPU.

TC commands for switch are not all supported depends on the Linux driver, would not showing the queue message by default(tc show qdisc command). But we had more Qdisc features on filtering for filtering the different type of frames and TSN taprio Qdisc, CBS Qdisc.  Take taprio Qdisc as example:

 

[root@LS1021ATSN ~] # tc qdisc replace dev swp2 parent root handle 100 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 sched-entry S 5 5000 sched-entry S 7 6000 sched-entry S 7 6000 flags 2 [root@LS1021ATSN ~] # tc qdisc show dev swp2 qdisc taprio 100: root refcnt 9 tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 offset 4 count 1 offset 5 count 1 offset 6 count 1 offset 7 count 1

clockid invalid flags 0x7d8f4   base-time 0 cycle-time 17000 cycle-time-extension 0

        index 0 cmd S gatemask 0x5 interval 5000

        index 1 cmd S gatemask 0x7 interval 6000

        index 2 cmd S gatemask 0x7 interval 6000

 

qdisc pfifo 0: parent 100:8 limit 1000p

qdisc pfifo 0: parent 100:7 limit 1000p

qdisc pfifo 0: parent 100:6 limit 1000p

qdisc pfifo 0: parent 100:5 limit 1000p

qdisc pfifo 0: parent 100:4 limit 1000p

qdisc pfifo 0: parent 100:3 limit 1000p

qdisc pfifo 0: parent 100:2 limit 1000p

qdisc pfifo 0: parent 100:1 limit 1000p

[root@LS1021ATSN ~] #

 

sja1105 (for switch ports) driver dont support mqprio offload either. However, mqprio can be used in non-offload mode (remove "hw 1").

On SJA1105, if the switch ports are in operating mode 1 or 3 (see here for details):

 

https://www.kernel.org/doc/html/latest/networking/dsa/sja1105.html#traffic-support

 

then the skb->priority value translates into a VLAN PCP inserted in the DSA tag, so the packet is transmitted in that priority queue.

The mapping is as follows:

User space app opens a socket and uses the SO_PRIORITY API to set a certain QoS priority for packets enqueued through it. The packet enters the kernel and is assigned a certain skb->priority. The packet enters the qdisc of the egress interface, and the queue is selected based on the "map" between skb->priority and queue.

The Ethernet driver interprets the queue mapping in a custom way. In the case of sja1105, as mentioned, this translates to a certain VLAN PCP communicated between the DSA master (eth2) and the CPU port of the switch. This VLAN PCP is part of the "DSA tag" of the switch and is not seen on the wire itself. It is only seen in "tcpdump -i eth2 -e -n -Q out".

3,334 Views
Waner
Contributor III

Hi @yipingwang ,

I really need to thank you about your answer very well written and constructive. It could be added to your official documentation concerning TSN. 

Thanks again for your time, I put the topic in solved. 

0 Kudos
3,396 Views
Waner
Contributor III

Edit : the strange thing is that I can configure a taprio queuing discipline which is based on a mqprio configuration : 

> tc qdisc add dev swp4 root handle 1: taprio num_tc 3 map 0 1 2 \
> queues 1@0 1@1 1@2 \
> sched-entry S 01 300000 \
> sched-entry S 02 300000 \
> sched-entry S 04 300000 clockid CLOCK_TAI

 

This command works but is using SO_TXTIME socket param, but I want to use SO_PRIORITY that is why I want an mqprio queue. 

Moreover, we are supposed to configure an mqprio queue before making a taprio queue as I saw on the net. 

0 Kudos
3,477 Views
Waner
Contributor III

Hi @yipingwang 

 

Thanks for your answer, I modified the linux configuration and replaced my uImage and dtb as well. Do you know how to put new modules on my sd boot card ? 

0 Kudos
3,476 Views
Waner
Contributor III

(I am not very fluent with linux drivers and modules for instance)

0 Kudos
3,485 Views
Waner
Contributor III

Edit : 

commands made : 

> tc qdisc show dev eth1

qdisc mq 0: root
qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

 

So this is the default configuration of the port for instance. Then :

 

> tc qdisc add dev eth1 root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 hw 1

RTNETLINK answers: Operation not supported

0 Kudos
3,479 Views
yipingwang
NXP TechSupport
NXP TechSupport

You need to add NET_SCH_INGRESS and CONFIG_NET_SCHED in Linux Kernel configuration file.

0 Kudos