From: Paolo Abeni <pabeni@redhat.com>
To: Hangbin Liu <liuhangbin@gmail.com>, netdev@vger.kernel.org
Cc: Jay Vosburgh <jv@jvosburgh.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Shuah Khan <shuah@kernel.org>, Petr Machata <petrm@nvidia.com>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCHv2 net 2/2] selftests: bonding: add ipsec offload test
Date: Tue, 23 Sep 2025 10:32:22 +0200 [thread overview]
Message-ID: <ae9f772b-d1fb-4688-a809-b4507060d205@redhat.com> (raw)
In-Reply-To: <20250918020202.440904-2-liuhangbin@gmail.com>
On 9/18/25 4:02 AM, Hangbin Liu wrote:
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond_ipsec_offload.sh b/tools/testing/selftests/drivers/net/bonding/bond_ipsec_offload.sh
> new file mode 100755
> index 000000000000..4b19949a4c33
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/bonding/bond_ipsec_offload.sh
> @@ -0,0 +1,154 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +
> +# IPsec over bonding offload test:
> +#
> +# +----------------+
> +# | bond0 |
> +# | | |
> +# | eth0 eth1 |
> +# +---+-------+----+
> +#
> +# We use netdevsim instead of physical interfaces
> +#-------------------------------------------------------------------
> +# Example commands
> +# ip x s add proto esp src 192.0.2.1 dst 192.0.2.2 \
> +# spi 0x07 mode transport reqid 0x07 replay-window 32 \
> +# aead 'rfc4106(gcm(aes))' 1234567890123456dcba 128 \
> +# sel src 192.0.2.1/24 dst 192.0.2.2/24
> +# offload dev bond0 dir out
> +# ip x p add dir out src 192.0.2.1/24 dst 192.0.2.2/24 \
> +# tmpl proto esp src 192.0.2.1 dst 192.0.2.2 \
> +# spi 0x07 mode transport reqid 0x07
> +#
> +#-------------------------------------------------------------------
> +
> +lib_dir=$(dirname "$0")
> +source "$lib_dir"/../../../net/lib.sh
> +algo="aead rfc4106(gcm(aes)) 0x3132333435363738393031323334353664636261 128"
> +srcip=192.0.2.1
> +dstip=192.0.2.2
> +ipsec0=/sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
> +ipsec1=/sys/kernel/debug/netdevsim/netdevsim0/ports/1/ipsec
> +active_slave=""
> +
> +active_slave_changed()
> +{
> + local old_active_slave=$1
> + local new_active_slave=$(ip -n ${ns} -d -j link show bond0 | \
> + jq -r ".[].linkinfo.info_data.active_slave")
shell check is not super happy about the lack of double quotes around
the variables (above and many places below) and about declaring the
variable and assigning it to a subshell in the same statement.
I think it's better to address such warnings for consistency.
Thanks,
Paolo
next prev parent reply other threads:[~2025-09-23 8:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 2:02 [PATCHv2 net 1/2] bonding: fix xfrm offload feature setup on active-backup mode Hangbin Liu
2025-09-18 2:02 ` [PATCHv2 net 2/2] selftests: bonding: add ipsec offload test Hangbin Liu
2025-09-23 8:32 ` Paolo Abeni [this message]
2025-09-23 9:12 ` Hangbin Liu
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=ae9f772b-d1fb-4688-a809-b4507060d205@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
/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.