Giter Club home page Giter Club logo

Comments (15)

thombashi avatar thombashi commented on May 29, 2024

Thank you for your report.

I suppose that the error message indicates that missing kernel module that required for incoming packet settings.

Could you confirm that your environment has installed sch_netem module?
How to do that is described in README Troubleshooting section.

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

Thanks for your reply
I tried execute the command modprobe sch_netem,and it execute successfully
but after that,this error still exist

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

I test it in another machine,it gives me the same error
I think it maybe not the sch_netem error,it maybe parsing's error

from tcconfig.

thombashi avatar thombashi commented on May 29, 2024

Thank you for confirmation.

Looks like we need some more information to solve the issue.
Since parse error message and RTNETLINK answers: Operation not supported are output by Linux.

Would you tell below information?:

  • Linux distribution version
  • iproute2 package version
  • tcconfig version
  • tcconfig execution log with --debug option
  • output of modinfo sch_netem

I've succeeded to execute your command in the following environment:

  • Linux distribution version: Debian 8.6
  • iproute2 package version: 3.16.0-2
  • tcconfig version: 0.6.6

output of modinfo sch_netem

modinfo sch_netem
filename:       /lib/modules/3.16.0-4-amd64/kernel/net/sched/sch_netem.ko
license:        GPL
depends:
intree:         Y
vermagic:       3.16.0-4-amd64 SMP mod_unload modversions

and please execute the following commands and post the results to identify the problem more detailed.
(tcset execute following commands with your options.)

ip link add ifb6682 type ifb
ip link set dev ifb6682 up
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1a1a: action mirred egress redirect dev ifb6682
tc qdisc add dev ifb6682 root handle 1a1a: prio
tc filter add dev ifb6682 protocol ip parent 1a1a: prio 2 u32 match ip src 0.0.0.0/0 flowid 1a1a:3
tc qdisc add dev ifb6682 parent 1a1a:3 handle 1a25: netem
tc qdisc add dev ifb6682 parent 1a25:3 handle 20: tbf rate 1000.000000kbit buffer 1600 limit 10000

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

Thanks for your detailed reply

  • Linux distribute version: Armbian(Base on debian,running at devices like raspberry pi)
  • iproute2 package version: 3.16.0-2
  • tcconfig version: 0.7.0-alpha-1

output of modinfo sch_netem

filename:       /lib/modules/3.4.112-sun4i/kernel/net/sched/sch_netem.ko
license:        GPL
srcversion:     B9EA1B74A8886503607B4DA
depends:
intree:         Y
vermagic:       3.4.112-sun4i preempt mod_unload modversions ARMv7 p2v8

Using debug in the command,and the output

[2016-11-26 14:11:34.994536] DEBUG: subprocrunner: lsmod | grep sch_netem
[2016-11-26 14:11:35.067716] DEBUG: subprocrunner: modprobe ifb
[2016-11-26 14:11:35.165137] WARNING: subprocrunner: returncode=1, stderr=modprobe: FATAL: Module ifb not found.
[2016-11-26 14:11:35.175483] DEBUG: subprocrunner: ip link add ifb6682 type ifb
[2016-11-26 14:11:35.265925] WARNING: subprocrunner: returncode=2, stderr=RTNETLINK answers: Operation not supported
[2016-11-26 14:11:35.269572] DEBUG: subprocrunner: ip link set dev ifb6682 up
[2016-11-26 14:11:35.301738] WARNING: subprocrunner: returncode=1, stderr=Cannot find device "ifb6682"
[2016-11-26 14:11:35.305019] DEBUG: subprocrunner: tc qdisc add dev eth0 ingress
[2016-11-26 14:11:35.324930] WARNING: subprocrunner: returncode=2, stderr=RTNETLINK answers: No such file or directory
[2016-11-26 14:11:35.333623] DEBUG: subprocrunner: tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1a1a: action mirred egress redirect dev ifb6682
[2016-11-26 14:11:35.365144] WARNING: subprocrunner: returncode=1, stderr=Cannot find device "ifb6682"
bad action parsing
parse_action: bad value (5:mirred)!
Illegal "action"
[2016-11-26 14:11:35.369221] DEBUG: subprocrunner: tc qdisc add dev ifb6682 root handle 1a1a: prio
[2016-11-26 14:11:35.396180] WARNING: subprocrunner: returncode=1, stderr=Cannot find device "ifb6682"
[2016-11-26 14:11:35.399954] DEBUG: subprocrunner: tc filter add dev ifb6682 protocol ip parent 1a1a: prio 2 u32 match ip src 0.0.0.0/0 flowid 1a1a:3
[2016-11-26 14:11:35.426431] WARNING: subprocrunner: returncode=1, stderr=Cannot find device "ifb6682"
[2016-11-26 14:11:35.430244] DEBUG: subprocrunner: tc qdisc add dev ifb6682 parent 1a1a:3 handle 1a25: netem
[2016-11-26 14:11:35.456429] WARNING: subprocrunner: returncode=1, stderr=Cannot find device "ifb6682"
[2016-11-26 14:11:35.460291] DEBUG: subprocrunner: tc qdisc add dev ifb6682 parent 1a25:3 handle 20: tbf rate 1000.000000kbit buffer 1600 limit 10000
[2016-11-26 14:11:35.486867] WARNING: subprocrunner: returncode=1, stderr=Cannot find device "ifb6682"

For some reason,I will test your tc command later,Then I will give you the feedback

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

How can I revover my previous setting If I execute this commands

ip link add ifb6682 type ifb
ip link set dev ifb6682 up
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1a1a: action mirred egress redirect dev ifb6682
tc qdisc add dev ifb6682 root handle 1a1a: prio
tc filter add dev ifb6682 protocol ip parent 1a1a: prio 2 u32 match ip src 0.0.0.0/0 flowid 1a1a:3
tc qdisc add dev ifb6682 parent 1a1a:3 handle 1a25: netem
tc qdisc add dev ifb6682 parent 1a25:3 handle 20: tbf rate 1000.000000kbit buffer 1600 limit 10000

I am afraid of not know how to recover it,for there are some important service running at this system

from tcconfig.

thombashi avatar thombashi commented on May 29, 2024

You can remove existing tc settings with following commands:

tc qdisc del dev eth0 root
tc qdisc del dev eth0 ingress
tc qdisc del dev ifb6682 root
ip link set dev ifb6682 down
ip link delete ifb6682 type ifb

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

This is the result of the tc command

root@cubieboard:~# ip link add ifb6682 type ifb
RTNETLINK answers: Operation not supported
root@cubieboard:~# ip link set dev ifb6682 up
Cannot find device "ifb6682"
root@cubieboard:~# tc qdisc add dev eth0 ingress
RTNETLINK answers: No such file or directory
root@cubieboard:~# tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1a1a: action mirred egress redirect dev ifb6682
Cannot find device "ifb6682"
bad action parsing
parse_action: bad value (5:mirred)!
Illegal "action"
root@cubieboard:~# tc qdisc add dev ifb6682 root handle 1a1a: prio
Cannot find device "ifb6682"
root@cubieboard:~# tc filter add dev ifb6682 protocol ip parent 1a1a: prio 2 u32 match ip src 0.0.0.0/0 flowid 1a1a:3
Cannot find device "ifb6682"
root@cubieboard:~# tc qdisc add dev ifb6682 parent 1a1a:3 handle 1a25: netem
Cannot find device "ifb6682"
root@cubieboard:~# tc qdisc add dev ifb6682 parent 1a25:3 handle 20: tbf rate 1000.000000kbit buffer 1600 limit 10000
Cannot find device "ifb6682"

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

it seems there isn't the ifb6682 devices

from tcconfig.

thombashi avatar thombashi commented on May 29, 2024

Thank you for information.

The cause may be Linux kernel configuration. Could you check that?

sch_netem module and tc will require enabled certain kernel configs to be used.
followings are required configs (and my Debian environment configs):

cat /boot/config-3.16.0-4-amd64 | egrep "NETFILTER_NETLINK=|NETFILTER_NETLINK_QUEUE=|NETFILTER_NETLINK_LOG=|NF_CT_NETLINK=|SCSI_NETLINK=|IP_ADVANCED_ROUTER=|NET_SCH_INGRESS=|NET_SCHED=|IP_MULTIPLE_TABLES=|NETFILTER_XT_TARGET_MARK="
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CT_NETLINK=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_INGRESS=m
CONFIG_SCSI_NETLINK=y

These configs need to either y or m.
Default kernel configs of Armbian may different from Debian.
How about your environments?
(name of the /boot/config-3.16.0-4-amd64 may change depends on environment.)

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

It seems that I lost the CONFIG_NET_SCH_INGRESS=m config

root@cubieboard:/boot# cat config-3.4.112-sun4i | egrep "NETFILTER_NETLINK=|NETFILTER_NETLINK_QUEUE=|NETFILTER_NETLINK_LOG=|NF_CT_NETLINK=|SCSI_NETLINK=|IP_ADVANCED_ROUTER=|NET_SCH_INGRESS=|NET_SCHED=|IP_MULTIPLE_TABLES=|NETFILTER_XT_TARGET_MARK="
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CT_NETLINK=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NET_SCHED=y
CONFIG_SCSI_NETLINK=y

from tcconfig.

thombashi avatar thombashi commented on May 29, 2024

In that case, you would need to enable the config and recompile the kernel.

Seemingly, Armbian provide a means to change kernel configuration with their build script.
https://github.com/igorpecovnik/lib

How to change kernel configuration?

from tcconfig.

1558204459 avatar 1558204459 commented on May 29, 2024

Oh,thank you very much,thanks for your patiance
Tcconfig is a very good tool. I have ever thought of the such tool before
It save us lots of time , and it is very easy to use
Thanks again!!

from tcconfig.

thombashi avatar thombashi commented on May 29, 2024

You are welcome.
I'm glad it is helpful to you 😃.

from tcconfig.

thombashi avatar thombashi commented on May 29, 2024

I've added your case to the troubleshooting (http://tcconfig.readthedocs.io/en/latest/pages/troubleshooting.html#id1).
So, I'll close the issue.

Thank you for the issue anyway.
Feel free to reopen.

from tcconfig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.