From: Simon Horman <horms@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Shannon Nelson <shannon.nelson@amd.com>,
Jiri Pirko <jiri@resnulli.us>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] netdevsim: print human readable IP address
Date: Wed, 9 Oct 2024 13:21:22 +0100 [thread overview]
Message-ID: <20241009122122.GO99782@kernel.org> (raw)
In-Reply-To: <20241008122134.4343-2-liuhangbin@gmail.com>
On Tue, Oct 08, 2024 at 12:21:33PM +0000, Hangbin Liu wrote:
> Currently, IPSec addresses are printed in hexadecimal format, which is
> not user-friendly. e.g.
>
> # cat /sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
> SA count=2 tx=20
> sa[0] rx ipaddr=0x00000000 00000000 00000000 0100a8c0
> sa[0] spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
> sa[0] key=0x3167608a ca4f1397 43565909 941fa627
> sa[1] tx ipaddr=0x00000000 00000000 00000000 00000000
> sa[1] spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
> sa[1] key=0x3167608a ca4f1397 43565909 941fa627
>
> This patch updates the code to print the IPSec address in a human-readable
> format for easier debug. e.g.
>
> # cat /sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
> SA count=4 tx=40
> sa[0] tx ipaddr=0.0.0.0
> sa[0] spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
> sa[0] key=0x3167608a ca4f1397 43565909 941fa627
> sa[1] rx ipaddr=192.168.0.1
> sa[1] spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
> sa[1] key=0x3167608a ca4f1397 43565909 941fa627
> sa[2] tx ipaddr=::
> sa[2] spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
> sa[2] key=0x3167608a ca4f1397 43565909 941fa627
> sa[3] rx ipaddr=2000::1
> sa[3] spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
> sa[3] key=0x3167608a ca4f1397 43565909 941fa627
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-10-09 12:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 12:21 [PATCH net-next 0/2] netdevsim: better ipsec output format Hangbin Liu
2024-10-08 12:21 ` [PATCH net-next 1/2] netdevsim: print human readable IP address Hangbin Liu
2024-10-09 12:21 ` Simon Horman [this message]
2024-10-09 15:22 ` Stanislav Fomichev
2024-10-10 3:00 ` Hangbin Liu
2024-10-08 12:21 ` [PATCH net-next 2/2] netdevsim: copy addresses for both in and out paths Hangbin Liu
2024-10-09 12:21 ` Simon Horman
2024-10-09 17:13 ` [PATCH net-next 0/2] netdevsim: better ipsec output format Jakub Kicinski
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=20241009122122.GO99782@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shannon.nelson@amd.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.