From: Stefano Brivio <sbrivio@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH net v2 2/2] selftests: pmtu: add explicit tests for PMTU exceptions cleanup
Date: Mon, 25 Feb 2019 12:35:11 +0100 [thread overview]
Message-ID: <20190225123511.2eb7c352@redhat.com> (raw)
In-Reply-To: <6d6f6a2512743d6e1968dbfe765eb85b478bd033.1551093086.git.pabeni@redhat.com>
Just three minor details, feel free to ignore:
On Mon, 25 Feb 2019 12:13:46 +0100
Paolo Abeni <pabeni@redhat.com> wrote:
> @@ -1006,6 +1017,60 @@ test_pmtu_vti6_link_change_mtu() {
> return ${fail}
> }
>
> +chk_command() {
All the other functions checking something are called 'check_*'.
> + cmd=${1}
> +
> + if ! which ${cmd} > /dev/null 2>&1; then
> + err " missing required command: '${cmd}'"
> + return 1
> + fi
> + return 0
> +}
> +
> +test_cleanup_vxlanX_exception() {
> + outer="${1}"
> + encap="vxlan"
> + ll_mtu=4000
> +
> + chk_command taskset || return 2
> + chk_command timeout || return 2
> + cpu_list=$(grep -m 2 processor /proc/cpuinfo | cut -d ' ' -f 2)
> +
> + setup namespaces routing ${encap}${outer} || return 2
> + trace "${ns_a}" ${encap}_a "${ns_b}" ${encap}_b \
> + "${ns_a}" veth_A-R1 "${ns_r1}" veth_R1-A \
> + "${ns_b}" veth_B-R1 "${ns_r1}" veth_R1-B
> +
> + # Create route exception by exceeding link layer MTU
> + mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
> + mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
> + mtu "${ns_b}" veth_B-R1 ${ll_mtu}
> + mtu "${ns_r1}" veth_R1-B ${ll_mtu}
> +
> + mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
> + mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
> +
> + # Fill exception cache for multiple CPUs (2)
> + # we can always use inner IPv4 for that
> + for cpu in ${cpu_list}; do
> + taskset --cpu-list ${cpu} ${ns_a} ping -q -M want -i 0.1 -w 1 -s $((${ll_mtu} + 500)) ${tunnel4_b_addr} > /dev/null
> + done
> +
> + if ! timeout 1 ${ns_a} ip link del dev veth_A-R1; then
> + err " can't delete veth device in a timely manner, PMTU dst likely leaked"
> + return 1
> + fi
> + return 0
No need for explicit return 0.
> +}
> +
> +test_pmtu_ipv6_exception_cleanup() {
> + test_cleanup_vxlanX_exception 6 vxlan
> +}
> +
> +test_pmtu_ipv4_exception_cleanup() {
> + test_cleanup_vxlanX_exception 4 vxlan
This function now takes just one argument.
--
Stefano
next prev parent reply other threads:[~2019-02-25 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 11:13 [PATCH net v2 0/2] selftests: pmtu: fix and increase coverage Paolo Abeni
2019-02-25 11:13 ` [PATCH net v2 1/2] selftests: pmtu: disable DAD in all namespaces Paolo Abeni
2019-02-25 11:13 ` [PATCH net v2 2/2] selftests: pmtu: add explicit tests for PMTU exceptions cleanup Paolo Abeni
2019-02-25 11:35 ` Stefano Brivio [this message]
2019-02-25 12:33 ` Sabrina Dubroca
2019-02-25 12:56 ` Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190225123511.2eb7c352@redhat.com \
--to=sbrivio@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.