All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Joe Damato <jdamato@fastly.com>
Cc: netdev@vger.kernel.org, pabeni@redhat.com,
	namangulati@google.com, edumazet@google.com,
	amritha.nambiar@intel.com, sridhar.samudrala@intel.com,
	sdf@fomichev.me, peter@typeblog.net, m2shafiei@uwaterloo.ca,
	bjorn@rivosinc.com, hch@infradead.org, willy@infradead.org,
	willemdebruijn.kernel@gmail.com, skhawaja@google.com,
	Martin Karsten <mkarsten@uwaterloo.ca>,
	"David S. Miller" <davem@davemloft.net>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	linux-kernel@vger.kernel.org (open list),
	linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST
	FRAMEWORK)
Subject: Re: [PATCH net-next v3 6/7] selftests: net: Add busy_poll_test
Date: Fri, 1 Nov 2024 06:34:26 -0700	[thread overview]
Message-ID: <20241101063426.2e1423a8@kernel.org> (raw)
In-Reply-To: <20241101004846.32532-7-jdamato@fastly.com>

On Fri,  1 Nov 2024 00:48:33 +0000 Joe Damato wrote:
> +	ip netns exec nscl nc -N 192.168.1.1 48675 < $tmp_file

Thanks a lot for adding the test. Could you replace nc with socat or
a similar tool? There are multiple incompatible implementations of
netcat packaged by various distros, we get:

# selftests: net: busy_poll_test.sh
# nc: invalid option -- 'N'
# Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING.

nc is a known PITA.

> +	# set the suspend parameter for the server via its IFIDX
> +
> +	DUMP_CMD="${YNL_PATH} --spec ${SPEC_PATH} --dump napi-get --json=\"{\\\"ifindex\\\": ${NSIM_DEV_1_IFIDX}}\" --output-json"
> +	NSIM_DEV_1_NAPIID=$(ip netns exec nssv bash -c "$DUMP_CMD")
> +	NSIM_DEV_1_NAPIID=$(echo $NSIM_DEV_1_NAPIID | jq '.[] | .id')
> +
> +	SUSPEND_CMD="${YNL_PATH} --spec ${SPEC_PATH} --do napi-set --json=\"{\\\"id\\\": ${NSIM_DEV_1_NAPIID}, \\\"irq-suspend-timeout\\\": 20000000, \\\"gro-flush-timeout\\\": 50000, \\\"defer-hard-irqs\\\": 100}\""
> +	NSIM_DEV_1_SETCONFIG=$(ip netns exec nssv bash -c "$SUSPEND_CMD")

Can you try to run this test in installed mode?

https://docs.kernel.org/dev-tools/kselftest.html#install-selftests

IIRC YNL moves around when we install, you'd either need to do
autodetection of the path (see tools/testing/selftests/net/lib/py/ynl.py
and if you go down this route please move the helper which exports the
YNL variables to lib.sh so other tests can reuse); or teach the C code
to do the setup, you can link against YNL fairly easily (look at where
ncdevmem is added in the Makefile, it uses YNL)

  reply	other threads:[~2024-11-01 13:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01  0:48 [PATCH net-next v3 0/7] Suspend IRQs during application busy periods Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 1/7] net: Add napi_struct parameter irq_suspend_timeout Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 2/7] net: Suspend softirq when prefer_busy_poll is set Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 3/7] net: Add control functions for irq suspension Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 4/7] eventpoll: Trigger napi_busy_loop, if prefer_busy_poll is set Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 5/7] eventpoll: Control irq suspension for prefer_busy_poll Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 6/7] selftests: net: Add busy_poll_test Joe Damato
2024-11-01 13:34   ` Jakub Kicinski [this message]
2024-11-01 20:15     ` Joe Damato
2024-11-01  0:48 ` [PATCH net-next v3 7/7] docs: networking: Describe irq suspension Joe Damato
2024-11-01  3:47   ` Samudrala, Sridhar
2024-11-01  4:39     ` Joe Damato
2024-11-01 21:01       ` Samudrala, Sridhar
2024-11-01 21:46         ` Martin Karsten

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=20241101063426.2e1423a8@kernel.org \
    --to=kuba@kernel.org \
    --cc=amritha.nambiar@intel.com \
    --cc=bjorn@rivosinc.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hch@infradead.org \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=m2shafiei@uwaterloo.ca \
    --cc=mkarsten@uwaterloo.ca \
    --cc=namangulati@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peter@typeblog.net \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=skhawaja@google.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=willy@infradead.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.