tc commands in yocto


scott.threet@...
 

I am trying to run tc commands, specifically tc qdisc add dev ppp0 root netem delay 2000ms to add network latency so I can check that things at least won't break when network connection is poor

whenever I run that command I get:

RTNETLINK answers: Operation not supported

 

I have the following in my kernel defconfig (tried several combinations with parts of them, these options are taken from 3 sources who all say to enable different config options for tc for some reason):

CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_CSZ=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_DSMARK=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=y
CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_CLS_RSVP=y
CONFIG_NET_CLS_RSVP6=y
CONFIG_NET_CLS_POLICE=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_ATM=y
CONFIG_NET_SCH_MULTIQ=y
CONFIG_NET_SCH_NETEM=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_SCSI_NETLINK=y

 

 

thanks for any help


scott.threet@...
 

I figured out why it isn't working when I finally managed to figure out how to check what kernel parameters the kernel was built with (/proc/config.gz); those configuration options are not actually a part of the kernel configuration, though I haven't been able to figure out why

 

as part of the do_configure step my defconfig (including those parameters) is copied to .config and this works correctly; but then if I run do_compile those configuration options (as well as several others) are removed from .config; though I haven't been able to find out how that happens; as far as I can tell the do_compile just runs kernel_do_compile which just does something like "oe_runmake Image CC="$SOME_FLAGS_FOR_CROSS_COMPILER" $LOADADDR_COMMAND" and then makes dtbs

 

any ideas why the configuration set in .config is not being used?


scott.threet@...
 

well now I feel dumb; I figured out the problem; all those lines like:

# CONFIG_NET_SCHED is not set

are not comments (even if code highlighting thinks they are), they unset the settings, once I removed that from my defconfig it works