Lines Matching +full:rx +full:- +full:eq

2 # SPDX-License-Identifier: GPL-2.0
12 readonly KSFT_TEST="${MPTCP_LIB_KSFT_TEST:-$(basename "${0}" .sh)}"
14 # These variables are used in some selftests, read-only
15 declare -rx MPTCP_LIB_EVENT_CREATED=1 # MPTCP_EVENT_CREATED
16 declare -rx MPTCP_LIB_EVENT_ESTABLISHED=2 # MPTCP_EVENT_ESTABLISHED
17 declare -rx MPTCP_LIB_EVENT_CLOSED=3 # MPTCP_EVENT_CLOSED
18 declare -rx MPTCP_LIB_EVENT_ANNOUNCED=6 # MPTCP_EVENT_ANNOUNCED
19 declare -rx MPTCP_LIB_EVENT_REMOVED=7 # MPTCP_EVENT_REMOVED
20 declare -rx MPTCP_LIB_EVENT_SUB_ESTABLISHED=10 # MPTCP_EVENT_SUB_ESTABLISHED
21 declare -rx MPTCP_LIB_EVENT_SUB_CLOSED=11 # MPTCP_EVENT_SUB_CLOSED
22 declare -rx MPTCP_LIB_EVENT_SUB_PRIORITY=13 # MPTCP_EVENT_SUB_PRIORITY
23 declare -rx MPTCP_LIB_EVENT_LISTENER_CREATED=15 # MPTCP_EVENT_LISTENER_CREATED
24 declare -rx MPTCP_LIB_EVENT_LISTENER_CLOSED=16 # MPTCP_EVENT_LISTENER_CLOSED
26 declare -rx MPTCP_LIB_AF_INET=2
27 declare -rx MPTCP_LIB_AF_INET6=10
34 MPTCP_LIB_TEST_FORMAT="%02u %-50s"
37 # only if supported (or forced) and not disabled, see no-color.org
38 if { [ -t 1 ] || [ "${SELFTESTS_MPTCP_LIB_COLOR_FORCE:-}" = "1" ]; } &&
39 [ "${NO_COLOR:-}" != "1" ]; then
56 [ "${SELFTESTS_MPTCP_LIB_OVERRIDE_FLAKY:-}" = 1 ]
65 echo -e "${MPTCP_LIB_START_PRINT:-}${*}${MPTCP_LIB_COLOR_RESET}"
114 [ "${SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES:-}" = "1" ]
131 if [ -f "${f}" ]; then
158 grep -q " ${sym}" /proc/kallsyms
193 if [ "${SELFTESTS_MPTCP_LIB_NO_KVERSION_CHECK:-}" = "1" ]; then
197 v=$(uname -r | cut -d'.' -f1,2)
201 if [ "${maj}" -gt "${exp_maj}" ] ||
202 { [ "${maj}" -eq "${exp_maj}" ] && [ "${min}" -ge "${exp_min}" ]; }; then
218 if [[ "${subtest}" == *" - ${KSFT_TEST}: ${*%% #*}" ]]; then
241 time+="$((MPTCP_LIB_SUBTESTS_LAST_TS_MS - ts_prev_ms))ms"
243 MPTCP_LIB_SUBTESTS+=("${result} ${id} - ${KSFT_TEST}: ${*} ${time}")
292 if [ ${#MPTCP_LIB_SUBTESTS[@]} -eq 0 ] ||
293 [ "${SELFTESTS_MPTCP_LIB_NO_TAP:-}" = "1" ]; then
313 grep "${2}" | sed -n 's/.*\('"${1}"':\)\([0-9a-f:.]*\).*$/\2/p;q'
318 grep "${4:-}" "${2}" | mptcp_lib_get_info_value "${1}" "^type:${3:-1},"
323 [ "${1}" -eq 0 ] && return 0
325 kill -SIGUSR1 "${1}" > /dev/null 2>&1
332 [ -z "${1##*:*}" ]
341 count=$(ip netns exec "${ns}" nstat -asz "${counter}" |
343 if [ -z "${count}" ]; then
357 echo -e "\nMPTCP_TEST_FILE_END_MARKER" >> "${name}"
362 ls -l "${1}" 1>&2
364 tail -c 27 "${1}"
400 if [ ${cmd_ret} -ne 0 ]; then
418 if ! ip -Version &> /dev/null; then
424 if ! tc -help &> /dev/null; then
430 if ! ss -h | grep -q MPTCP; then
436 if ! "${tool}" -V &> /dev/null; then
457 ip netns exec "${!netns}" sysctl -q net.mptcp.enabled=1
458 ip netns exec "${!netns}" sysctl -q net.ipv4.conf.all.rp_filter=0
459 ip netns exec "${!netns}" sysctl -q net.ipv4.conf.default.rp_filter=0
468 rm -f /tmp/"${netns}".{nstat,out}
475 declare -n pid="${3}"
479 mptcp_lib_kill_wait "${pid:-0}"
561 IFS=, read -r id ip flags dev port <<< "${entry}"
563 echo -n "${ip}"
564 [ -n "${port}" ] && echo -n " port ${port}"
565 echo -n " id ${id}"
566 [ -n "${flags}" ] && echo -n " ${flags}"
567 [ -n "${dev}" ] && echo -n " dev ${dev}"
570 echo -n "id ${id}"
571 echo -n " flags ${flags//" "/","}"
572 [ -n "${dev}" ] && echo -n " dev ${dev}"
573 echo -n " ${ip}"
574 [ -n "${port}" ] && echo -n " ${port}"
585 ip -n "${ns}" mptcp endpoint show id "${id}"
597 ip -n "${ns}" mptcp limits set add_addr_accepted "${addrs}" subflows "${subflows}"
622 ip -n "${ns}" mptcp endpoint add "${addr}" ${flags//","/" "} \
636 [ "${id}" -ne 0 ] && addr=''
637 ip -n "${ns}" mptcp endpoint delete id "${id}" ${addr:+"${addr}"}
647 ip -n "${ns}" mptcp endpoint flush
657 ip -n "${ns}" mptcp endpoint show
670 ip -n "${ns}" mptcp endpoint change id "${id}" ${flags//","/" "}