[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHS8izNwYgweZvD+hQgx_k5wjMDG1W5_rscXq_C8oVMdg546Tw@mail.gmail.com>
Date: Thu, 3 Oct 2024 00:26:28 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: Stanislav Fomichev <sdf@...ichev.me>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com
Subject: Re: [PATCH net-next v2 10/12] selftests: ncdevmem: Run selftest when
none of the -s or -c has been provided
On Mon, Sep 30, 2024 at 10:18 AM Stanislav Fomichev <sdf@...ichev.me> wrote:
>
> This will be used as a 'probe' mode in the selftest to check whether
> the device supports the devmem or not.
It's not really 'probing'. Running ncdevmem with -s or -c does the
data path tests. Running ncdevmem without does all the control path
tests in run_devmem_tests(). It's not just probing driver for support,
it's mean to catch bugs. Maybe rename to 'control path tests' or
'config tests' instead of probing.
> Use hard-coded queue layout
> (two last queues) and prevent user from passing custom -q and/or -t.
>
> Cc: Mina Almasry <almasrymina@...gle.com>
> Signed-off-by: Stanislav Fomichev <sdf@...ichev.me>
> ---
> tools/testing/selftests/net/ncdevmem.c | 27 +++++++++++++++++++-------
> 1 file changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/tools/testing/selftests/net/ncdevmem.c b/tools/testing/selftests/net/ncdevmem.c
> index 900a661a61af..9b0a81b12eac 100644
> --- a/tools/testing/selftests/net/ncdevmem.c
> +++ b/tools/testing/selftests/net/ncdevmem.c
> @@ -688,17 +688,26 @@ int main(int argc, char *argv[])
> }
> }
>
> - if (!server_ip)
> - error(1, 0, "Missing -s argument\n");
> -
> - if (!port)
> - error(1, 0, "Missing -p argument\n");
> -
> if (!ifname)
> error(1, 0, "Missing -f argument\n");
>
> ifindex = if_nametoindex(ifname);
>
> + if (!server_ip && !client_ip) {
> + if (start_queue != -1)
> + error(1, 0, "don't support custom start queue for probing\n");
> + if (num_queues != 1)
> + error(1, 0, "don't support custom number of queues for probing\n");
> +
Remove the start_queue + num_queues check here please. I would like to
be able to run the control path tests binding dmabuf to all the queues
or 1 of the queues or some of the queues.
--
Thanks,
Mina
Powered by blists - more mailing lists