# [solved] Error using new PIE network scheduling algorithm

## cgill27

I've compiled PIE "Proportional Integral controller Enhanced" as a module in my 3.14.14 kernel and the module loads fine but tc is not seeing the module.

```

# lsmod

Module                  Size  Used by

sch_pie                 4604  0 

sch_fq_codel            7141  0

```

```
# tc qdisc add dev eth0 root sch_pie                     

RTNETLINK answers: No such file or directory

```

Here is an strace output of the above command and it looks to me like tc is unable to see the module:

```

# cat strace.txt 

execve("/sbin/tc", ["tc", "qdisc", "add", "dev", "eth0", "root", "sch_pie"], [/* 33 vars */]) = 0

brk(0)                                  = 0x19d1000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09fd2dc000

access("/etc/ld.so.preload", R_OK)      = 0

open("/etc/ld.so.preload", O_RDONLY|O_CLOEXEC) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=29, ...}) = 0

mmap(NULL, 29, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x7f09fd2db000

close(3)                                = 0

munmap(0x7f09fd2db000, 29)              = 0

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=60856, ...}) = 0

mmap(NULL, 60856, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f09fd2cd000

close(3)                                = 0

open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0Pj\0\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1042640, ...}) = 0

mmap(NULL, 3137848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f09fcdbe000

mprotect(0x7f09fcebb000, 2097152, PROT_NONE) = 0

mmap(0x7f09fd0bb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfd000) = 0x7f09fd0bb000

close(3)                                = 0

open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\17\0\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=14624, ...}) = 0

mmap(NULL, 2109720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f09fcbba000

mprotect(0x7f09fcbbc000, 2097152, PROT_NONE) = 0

mmap(0x7f09fcdbc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f09fcdbc000

close(3)                                = 0

open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 N\2\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1724664, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09fd2cc000

mmap(NULL, 3837016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f09fc811000

mprotect(0x7f09fc9b0000, 2097152, PROT_NONE) = 0

mmap(0x7f09fcbb0000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19f000) = 0x7f09fcbb0000

mmap(0x7f09fcbb6000, 15448, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f09fcbb6000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09fd2cb000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09fd2ca000

arch_prctl(ARCH_SET_FS, 0x7f09fd2cb700) = 0

mprotect(0x7f09fcbb0000, 16384, PROT_READ) = 0

mprotect(0x7f09fcdbc000, 4096, PROT_READ) = 0

mprotect(0x7f09fd0bb000, 4096, PROT_READ) = 0

mprotect(0x640000, 4096, PROT_READ)     = 0

mprotect(0x7f09fd2dd000, 4096, PROT_READ) = 0

munmap(0x7f09fd2cd000, 60856)           = 0

brk(0)                                  = 0x19d1000

brk(0x19f2000)                          = 0x19f2000

open("/proc/net/psched", O_RDONLY)      = 3

fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09fd2db000

read(3, "000003e8 00000040 000f4240 3b9ac"..., 1024) = 36

close(3)                                = 0

munmap(0x7f09fd2db000, 4096)            = 0

socket(PF_NETLINK, SOCK_RAW, 0)         = 3

setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0

setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0

bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0

getsockname(3, {sa_family=AF_NETLINK, pid=8214, groups=00000000}, [12]) = 0

open("/lib64/tc//q_sch_pie.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

sendto(3, "\34\0\0\0\22\0\1\3\2\27\340S\0\0\0\0\0\0\0\0\10\0\35\0\1\0\0\0", 28, 0, NULL, 0) = 28

recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"P\2\0\0\20\0\2\0\2\27\340S\26 \0\0\0\0\4\3\1\0\0\0I\0\1\0\0\0\0\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 1200

recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\2\27\340S\26 \0\0\0\0\0\0", 16384}], msg_controllen=0, msg_flags=0}, 0) = 20

sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0$\0\5\6\3\27\340S\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\377\377\377\377"..., 48}], msg_controllen=0, msg_flags=0}, 0) = 48

recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"D\0\0\0\2\0\0\0\3\27\340S\26 \0\0\376\377\377\3770\0\0\0$\0\5\6\3\27\340S"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 68

write(2, "RTNETLINK answers: No such file "..., 45RTNETLINK answers: No such file or directory

) = 45

close(3)                                = 0

exit_group(2)                           = ?

+++ exited with 2 +++

```

This must be the error but I'm not sure what to do next:

"open("/lib64/tc//q_sch_pie.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)"

Any ideas?Last edited by cgill27 on Wed Aug 06, 2014 12:34 am; edited 3 times in total

----------

## cgill27

Specifying 'pie' instead of 'sch_pie' I no longer get an error, but the 'tc qdisc show' shows 'Unknown qdisc'

```

# tc qdisc show dev eth0

qdisc pie 8001: root refcnt 2 [Unknown qdisc, optlen=56]

```

----------

## cgill27

Problem solved.

Was using the wrong scheduler name in the tc add qdisc command, also need to use a newer tc version.

"PIE support in iproute2/tc was added in Jan 2014 and merged in version 3.14 of iproute2"

----------

