tc are used in some test scripts: mptcp_connect.sh, mptcp_join.sh and
simult_flows.sh. It makes sense to check if tc is installed before running
these scripts, just like other tools. So this patch add 'tc' check for
mptcp_lib_check_tools(), and check it in these test scripts.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
 
 mptcp_lib_check_mptcp
 mptcp_lib_check_kallsyms
-mptcp_lib_check_tools ip
+mptcp_lib_check_tools ip tc
 
 sin=$(mktemp)
 sout=$(mktemp)
 
 
        mptcp_lib_check_mptcp
        mptcp_lib_check_kallsyms
-       mptcp_lib_check_tools ip ss "${iptables}" "${ip6tables}"
+       mptcp_lib_check_tools ip tc ss "${iptables}" "${ip6tables}"
 
        sin=$(mktemp)
        sout=$(mktemp)
 
                                exit ${KSFT_SKIP}
                        fi
                        ;;
+               "tc")
+                       if ! tc -help &> /dev/null; then
+                               mptcp_lib_pr_skip "Could not run test without tc tool"
+                               exit ${KSFT_SKIP}
+                       fi
+                       ;;
                "ss")
                        if ! ss -h | grep -q MPTCP; then
                                mptcp_lib_pr_skip "ss tool does not support MPTCP"
 
 }
 
 mptcp_lib_check_mptcp
-mptcp_lib_check_tools ip
+mptcp_lib_check_tools ip tc
 
 #  "$ns1"              ns2                    ns3
 #     ns1eth1    ns2eth1   ns2eth3      ns3eth1