Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-10-03 Thread Martin KaFai Lau
On 9/24/24 6:37 PM, Martin KaFai Lau wrote: There are other .sh tests that could better use the test_progs migration. In particular the ones without existing test coverage. For non XDP related, test_tcp_check_syncookie.sh, test_flow_dissector.sh, and test_tc_edt.sh should be the good ones. I

Re: [PATCH net v4 2/2] bpf: selftests: send packet to devmap redirect XDP

2024-10-02 Thread Martin KaFai Lau
On 9/11/24 1:41 AM, Florian Kauer wrote: @@ -25,14 +28,11 @@ static void test_xdp_with_devmap_helpers(void) if (!ASSERT_OK_PTR(skel, "test_xdp_with_devmap_helpers__open_and_load")) return; - dm_fd = bpf_program__fd(skel->progs.xdp_redir_prog); - err = bpf_xdp_att

Re: [PATCH bpf-next v3 2/2] selftests/bpf: Setget_sockopt add a test for tcp over ipv4 via ipv6

2024-09-30 Thread Martin KaFai Lau
On 9/14/24 3:32 AM, Feng zhou wrote: From: Feng Zhou This patch adds a test for TCP over IPv4 via INET6 API. Signed-off-by: Feng Zhou --- .../selftests/bpf/prog_tests/setget_sockopt.c | 33 +++ .../selftests/bpf/progs/setget_sockopt.c | 13 ++-- 2 files changed, 4

Re: [PATCH bpf-next v3 1/2] bpf: Fix bpf_get/setsockopt to tos not take effect when TCP over IPv4 via INET6 API

2024-09-30 Thread Martin KaFai Lau
On 9/14/24 3:32 AM, Feng zhou wrote: From: Feng Zhou when TCP over IPv4 via INET6 API, bpf_get/setsockopt with ipv4 will I think you meant bpf_get/setsockopt with SOL_IP will fail. so s/ipv4/SOL_IP/? fail, because sk->sk_family is AF_INET6. With ipv6 will success, not take effect, because i

Re: [PATCH bpf-next v2 2/2] bpf, selftests: Add test case for cgroup skb to get net_cls classid helpers

2024-09-30 Thread Martin KaFai Lau
On 9/18/24 12:45 AM, Feng zhou wrote: From: Feng Zhou This patch adds a test for cgroup skb to get classid. Signed-off-by: Feng Zhou --- .../bpf/prog_tests/cg_skb_get_classid.c | 87 +++ .../selftests/bpf/progs/cg_skb_get_classid.c | 19 2 files changed, 106 in

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-25 Thread Martin KaFai Lau
On 9/25/24 3:37 AM, Martin KaFai Lau wrote: I am not sure which case in xdp_features.c does not have existing coverage in test_progs. From a quick look, it seems only BPF_MAP_TYPE_CPUMAP is missing (please check)? Re: CPUMAP, I noticed there is a xdp_(cpu)map_attach.c test but it only does

Re: [PATCH net v4 0/2] bpf: devmap: provide rxq after redirect

2024-09-25 Thread Martin KaFai Lau
On 9/19/24 11:12 AM, Paolo Abeni wrote: On 9/11/24 10:41, Florian Kauer wrote: rxq contains a pointer to the device from where the redirect happened. Currently, the BPF program that was executed after a redirect via BPF_MAP_TYPE_DEVMAP* does not have it set. Add bugfix and related selftest. Si

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-24 Thread Martin KaFai Lau
On 9/22/24 12:04 PM, Alexis Lothoré wrote: Hello all, sorry for the slow feedback, I have been off last week. On 9/14/24 15:38, Jakub Kicinski wrote: On Sat, 14 Sep 2024 11:25:47 +0200 Lorenzo Bianconi wrote: On Sep 13, Martin KaFai Lau wrote: test a physical network device that supports a

Re: [RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-24 Thread Martin KaFai Lau
On 9/17/24 6:15 PM, Tiago Lam wrote: On Fri, Sep 13, 2024 at 11:24:09AM -0700, Martin KaFai Lau wrote: On 9/13/24 2:39 AM, Tiago Lam wrote: This follows the same rationale provided for the ipv4 counterpart, where it now runs a reverse socket lookup when source addresses and/or ports are

Re: [PATCH bpf-next v1] selftests/bpf:Enhance bpf ability to detect ksym read error by libcap

2024-09-24 Thread Martin KaFai Lau
On 9/14/24 11:24 AM, Lin Yikai wrote: diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 04716a5e43f1..369c5ad8fc4a 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -183,7 +183,7 @@ NON_CHECK_FEAT_TARGETS

Re: [PATCH bpf-next/net v6 3/3] selftests/bpf: Add mptcp subflow subtest

2024-09-13 Thread Martin KaFai Lau
On 9/11/24 8:16 AM, Matthieu Baerts (NGI0) wrote: +static void test_subflow(void) +{ + int cgroup_fd, prog_fd, err; + struct mptcp_subflow *skel; + struct nstoken *nstoken; + struct bpf_link *link; + + cgroup_fd = test__join_cgroup("/mptcp_subflow"); + if (!ASS

Re: [PATCH bpf-next/net v6 2/3] selftests/bpf: Add getsockopt to inspect mptcp subflow

2024-09-13 Thread Martin KaFai Lau
On 9/11/24 8:16 AM, Matthieu Baerts (NGI0) wrote: diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf.h b/tools/testing/selftests/bpf/progs/mptcp_bpf.h new file mode 100644 index ..179b74c1205f --- /dev/null +++ b/tools/testing/selftests/bpf/progs/mptcp_bpf.h @@ -0,0 +1,42 @@ +/

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-13 Thread Martin KaFai Lau
On 9/10/24 11:10 AM, Alexis Lothoré (eBPF Foundation) wrote: test_xdp_features.sh is a shell script allowing to test that xdp features advertised by an interface are indeed delivered. The test works by starting two instance of the same program, both attaching specific xdp programs to each side of

Re: [RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-13 Thread Martin KaFai Lau
On 9/13/24 2:39 AM, Tiago Lam wrote: This follows the same rationale provided for the ipv4 counterpart, where it now runs a reverse socket lookup when source addresses and/or ports are changed, on sendmsg, to check whether egress traffic should be allowed to go through or not. As with ipv4, the

Re: [PATCH vhost v2 0/7] vdpa/mlx5: Optimze MKEY operations

2024-09-11 Thread Eugenio Perez Martin
On Mon, Sep 9, 2024 at 11:30 AM Dragos Tatulea wrote: > > > > On 30.08.24 12:58, Dragos Tatulea wrote: > > This series improves the time of .set_map() operations by parallelizing > > the MKEY creation and deletion for direct MKEYs. Looking at the top > > level MKEY creation/deletion functions, the

Re: [PATCH mlx5-vhost v2 01/10] net/mlx5: Support throttled commands from async API

2024-09-11 Thread Eugenio Perez Martin
On Mon, Sep 9, 2024 at 11:33 AM Dragos Tatulea wrote: > > > > On 16.08.24 11:01, Dragos Tatulea wrote: > > Currently, commands that qualify as throttled can't be used via the > > async API. That's due to the fact that the throttle semaphore can sleep > > but the async API can't. > > > > This patch

Re: [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume

2024-09-03 Thread Eugenio Perez Martin
On Tue, Sep 3, 2024 at 9:48 AM Dragos Tatulea wrote: > > > > On 03.09.24 09:40, Lei Yang wrote: > > On Mon, Sep 2, 2024 at 7:05 PM Dragos Tatulea wrote: > >> > >> Hi Lei, > >> > >> On 02.09.24 12:03, Lei Yang wrote: > >>> Hi Dragos > >>> > >>> QE tested this series with mellanox nic, it failed wi

Re: [PATCH vhost 7/7] vdpa/mlx5: Postpone MR deletion

2024-08-29 Thread Eugenio Perez Martin
On Thu, Aug 29, 2024 at 5:23 PM Dragos Tatulea wrote: > > > > On 29.08.24 17:07, Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 1:42 PM Dragos Tatulea wrote: > >> > >> Currently, when a new MR is set up, the old MR is deleted. MR deletion > >>

Re: [PATCH vhost 1/7] vdpa/mlx5: Create direct MKEYs in parallel

2024-08-29 Thread Eugenio Perez Martin
On Thu, Aug 29, 2024 at 3:54 PM Dragos Tatulea wrote: > > > > On 29.08.24 15:10, Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 1:41 PM Dragos Tatulea wrote: > >> > >> Use the async interface to issue MTT MKEY creation. > >> Extra care is

Re: [PATCH vhost 7/7] vdpa/mlx5: Postpone MR deletion

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 1:42 PM Dragos Tatulea wrote: > > Currently, when a new MR is set up, the old MR is deleted. MR deletion > is about 30-40% the time of MR creation. As deleting the old MR is not > important for the process of setting up the new MR, this operation > can be postponed. > > Thi

Re: [PATCH vhost 6/7] vdpa/mlx5: Introduce init/destroy for MR resources

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 1:42 PM Dragos Tatulea wrote: > > There's currently not a lot of action happening during > the init/destroy of MR resources. But more will be added > in the upcoming patches. If the series doesn't receive new patches, it is just the next patch :). > > Signed-off-by: Drago

Re: [PATCH vhost 5/7] vdpa/mlx5: Rename mr_mtx -> lock

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 1:42 PM Dragos Tatulea wrote: > > Now that the mr resources have their own namespace in the > struct, give the lock a clearer name. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 2 +-

Re: [PATCH vhost 4/7] vdpa/mlx5: Extract mr members in own resource struct

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 1:42 PM Dragos Tatulea wrote: > > Group all mapping related resources into their own structure. > > Upcoming patches will add more members in this new structure. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez > --- > drivers/vdpa

Re: [PATCH vhost 2/7] vdpa/mlx5: Delete direct MKEYs in parallel

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 1:42 PM Dragos Tatulea wrote: > > Use the async interface to issue MTT MKEY deletion. > > This makes destroy_user_mr() on average 8x times faster. > This number is also dependent on the size of the MR being > deleted. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin

Re: [PATCH vhost 1/7] vdpa/mlx5: Create direct MKEYs in parallel

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 1:41 PM Dragos Tatulea wrote: > > Use the async interface to issue MTT MKEY creation. > Extra care is taken at the allocation of FW input commands > due to the MTT tables having variable sizes depending on > MR. > > The indirect MKEY is still created synchronously at the >

Re: [PATCH vhost v2 10/10] vdpa/mlx5: Parallelize VQ suspend/resume for CVQ MQ command

2024-08-28 Thread Eugenio Perez Martin
On Fri, Aug 16, 2024 at 11:03 AM Dragos Tatulea wrote: > > change_num_qps() is still suspending/resuming VQs one by one. > This change switches to parallel suspend/resume. > > When increasing the number of queues the flow has changed a bit for > simplicity: the setup_vq() function will always be c

Re: [PATCH vhost v2 09/10] vdpa/mlx5: Small improvement for change_num_qps()

2024-08-28 Thread Eugenio Perez Martin
On Fri, Aug 16, 2024 at 11:03 AM Dragos Tatulea wrote: > > change_num_qps() has a lot of multiplications by 2 to convert > the number of VQ pairs to number of VQs. This patch simplifies > the code by doing the VQP -> VQ count conversion at the beginning > in a variable. > > Signed-off-by: Dragos T

Re: [PATCH vhost v2 05/10] vdpa/mlx5: Use async API for vq modify commands

2024-08-28 Thread Eugenio Perez Martin
On Fri, Aug 16, 2024 at 11:02 AM Dragos Tatulea wrote: > > Switch firmware vq modify command to be issued via the async API to > allow future parallelization. The new refactored function applies the > modify on a range of vqs and waits for their execution to complete. > > For now the command is st

Re: [PATCH vhost v2 04/10] vdpa/mlx5: Use async API for vq query command

2024-08-28 Thread Eugenio Perez Martin
On Fri, Aug 16, 2024 at 11:02 AM Dragos Tatulea wrote: > > Switch firmware vq query command to be issued via the async API to > allow future parallelization. > > For now the command is still serial but the infrastructure is there > to issue commands in parallel, including ratelimiting the number >

Re: [PATCH vhost v2 03/10] vdpa/mlx5: Introduce async fw command wrapper

2024-08-28 Thread Eugenio Perez Martin
On Fri, Aug 16, 2024 at 11:02 AM Dragos Tatulea wrote: > > Introduce a new function mlx5_vdpa_exec_async_cmds() which > wraps the mlx5_core async firmware command API in a way > that will be used to parallelize certain operation in this > driver. > > The wrapper deals with the case when mlx5_cmd_e

Re: [PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume

2024-08-07 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 9:24 AM Dragos Tatulea wrote: > > This series parallelizes the mlx5_vdpa device suspend and resume > operations through the firmware async API. The purpose is to reduce live > migration downtime. > > The series starts with changing the VQ suspend and resume commands > to the

Re: [PATCH vhost 4/7] vdpa/mlx5: Use async API for vq modify commands

2024-08-07 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 9:24 AM Dragos Tatulea wrote: > > Switch firmware vq modify command to be issued via the async API to > allow future parallelization. The new refactored function applies the > modify on a range of vqs and waits for their execution to complete. > > For now the command is stil

Re: [PATCH vhost 2/7] vdpa/mlx5: Introduce error logging function

2024-08-06 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 9:24 AM Dragos Tatulea wrote: > > mlx5_vdpa_err() was missing. This patch adds it and uses it in the > necessary places. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Tariq Toukan Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 5 + > drive

Re: [PATCH] tools/virtio:Fix the wrong format specifier

2024-07-24 Thread Eugenio Perez Martin
On Wed, Jul 24, 2024 at 9:44 AM Zhu Jun wrote: > > The unsigned int should use "%u" instead of "%d". > > Signed-off-by: Zhu Jun Reviewed-by: Eugenio Pérez Thanks! > --- > tools/virtio/ringtest/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/virtio/ringte

Re: [PATCH vhost v2 19/24] vdpa/mlx5: Forward error in suspend/resume device

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:28 PM Dragos Tatulea wrote: > > Start using the suspend/resume_vq() error return codes previously added. > > Reviewed-by: Cosmin Ratiu > Reviewed-by: Zhu Yanjun > Signed-off-by: Dragos Tatulea Reviewed-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c |

Re: [PATCH vhost v2 16/24] vdpa/mlx5: Accept Init -> Ready VQ transition in resume_vq()

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:28 PM Dragos Tatulea wrote: > > Until now resume_vq() was used only for the suspend/resume scenario. > This change also allows calling resume_vq() to bring it from Init to > Ready state (VQ initialization). > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu

Re: [PATCH vhost v2 15/24] vdpa/mlx5: Allow creation of blank VQs

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:28 PM Dragos Tatulea wrote: > > Based on the filled flag, create VQs that are filled or blank. > Blank VQs will be filled in later through VQ modify. > > Downstream patches will make use of this to pre-create blank VQs at > vdpa device creation. > s/Downstream/Later/ ?

Re: [PATCH vhost 20/23] vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 11:27 AM Dragos Tatulea wrote: > > On Wed, 2024-06-19 at 17:54 +0200, Eugenio Perez Martin wrote: > > On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > > > > > Currently, hardware VQs are created right when the vdpa device gets into

Re: [PATCH vhost v2 09/24] vdpa/mlx5: Rename init_mvqs

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:27 PM Dragos Tatulea wrote: > > Function is used to set default values, so name it accordingly. > > Signed-off-by: Dragos Tatulea Reviewed-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [PATCH vhost v2 07/24] vdpa/mlx5: Initialize and reset device with one queue pair

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:27 PM Dragos Tatulea wrote: > > The virtio spec says that a vdpa device should start off with one queue > pair. The driver is already compliant. > > This patch moves the initialization to device add and reset times. This > is done in preparation for the pre-creation of h

Re: [PATCH vhost 23/23] vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready()

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > VQ indices in the range [cur_num_qps, max_vqs) represent queues that > have not yet been activated. .set_vq_ready should not activate these > VQs. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez >

Re: [PATCH vhost 22/23] vdpa/mlx5: Don't reset VQs more than necessary

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > The vdpa device can be reset many times in sequence without any > significant state changes in between. Previously this was not a problem: > VQs were torn down only on first reset. But after VQ pre-creation was > introduced, each reset will

Re: [PATCH vhost 21/23] vdpa/mlx5: Re-create HW VQs under certain conditions

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > There are a few conditions under which the hardware VQs need a full > teardown and setup: > > - VQ size changed to something else than default value. Hardware VQ size > modification is not supported. > > - User turns off certain device fe

Re: [PATCH vhost 20/23] vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > Currently, hardware VQs are created right when the vdpa device gets into > DRIVER_OK state. That is easier because most of the VQ state is known by > then. > > This patch switches to creating all VQs and their associated resources > at devi

Re: [PATCH vhost 19/23] vdpa/mlx5: Use suspend/resume during VQP change

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > Resume a VQ if it is already created when the number of VQ pairs > increases. This is done in preparation for VQ pre-creation which is > coming in a later patch. It is necessary because calling setup_vq() on > an already created VQ will ret

Re: [PATCH vhost 17/23] vdpa/mlx5: Consolidate all VQ modify to Ready to use resume_vq()

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > There are a few more places modifying the VQ to Ready directly. Let's > consolidate them into resume_vq(). > > The redundant warnings for resume_vq() errors can also be dropped. > > There is one special case that needs to be handled for vir

Re: [PATCH vhost 16/23] vdpa/mlx5: Add error code for suspend/resume VQ

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > Instead of blindly calling suspend/resume_vqs(), make then return error > codes. > > To keep compatibility, keep suspending or resuming VQs on error and > return the last error code. The assumption here is that the error code > would be the

Re: [PATCH vhost 13/23] vdpa/mlx5: Set mkey modified flags on all VQs

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > Otherwise, when virtqueues are moved from INIT to READY the latest mkey > will not be set appropriately. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c |

Re: [PATCH vhost 12/23] vdpa/mlx5: Start off rqt_size with max VQPs

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > Currently rqt_size is initialized during device flag configuration. > That's because it is the earliest moment when device knows if MQ > (multi queue) is on or off. > > Shift this configuration earlier to device creation time. This implies

Re: [PATCH vhost 11/23] vdpa/mlx5: Set an initial size on the VQ

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > The virtqueue size is a pre-requisite for setting up any virtqueue > resources. For the upcoming optimization of creating virtqueues at > device add, the virtqueue size has to be configured. > > Store the default queue size in struct mlx5_v

Re: [PATCH vhost 08/23] vdpa/mlx5: Clear and reinitialize software VQ data on reset

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: > > The hardware VQ configuration is mirrored by data in struct > mlx5_vdpa_virtqueue . Instead of clearing just a few fields at reset, > fully clear the struct and initialize with the appropriate default > values. > > As clear_vqs_ready() is u

Re: [PATCH vhost 05/23] vdpa/mlx5: Iterate over active VQs during suspend/resume

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: > > No need to iterate over max number of VQs. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [PATCH vhost 06/23] vdpa/mlx5: Remove duplicate suspend code

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: > > Use the dedicated suspend_vqs() function instead. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Reviewed-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 +-- > 1 file changed, 1 insertion(+), 6 dele

Re: [PATCH vhost 04/23] vdpa/mlx5: Drop redundant check in teardown_virtqueues()

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: > > The check is done inside teardown_vq(). > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu Reviewed-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions

Re: [PATCH vhost 03/23] vdpa/mlx5: Drop redundant code

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: Patch message suggestion: Originally, the second loop initialized the CVQ. But (acde3929492b ("vdpa/mlx5: Use consistent RQT size") initialized all the queues in the first loop, so the second iteration in ... > > The second iteration in init_

Re: [PATCH vhost 02/23] vdpa/mlx5: Make setup/teardown_vq_resources() symmetrical

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: > > ... by changing the setup_vq_resources() parameter. s/parameter/parameter type/ ? Either way, Acked-by: Eugenio Pérez > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +

Re: [PATCH vhost 01/23] vdpa/mlx5: Clarify meaning thorough function rename

2024-06-19 Thread Eugenio Perez Martin
On Mon, Jun 17, 2024 at 5:08 PM Dragos Tatulea wrote: > > setup_driver()/teardown_driver() are a bit vague. These functions are > used for virtqueue resources. > > Same for alloc_resources()/teardown_resources(): they represent fixed > resources that are meant to exist during the device lifetime.

Re: [PATCH] dts: imx8mq-librem5: Don't wake up on volume key press

2024-06-10 Thread Martin Kepplinger
the > device. > > Signed-off-by: Guido Günther Reviewed-by: Martin Kepplinger thank you, martin > --- >  arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 -- >  1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/freescale/imx

Re: [PATCH] vhost/vsock: always initialize seqpacket_allow

2024-05-16 Thread Eugenio Perez Martin
On Wed, May 15, 2024 at 5:05 PM Michael S. Tsirkin wrote: > > There are two issues around seqpacket_allow: > 1. seqpacket_allow is not initialized when socket is >created. Thus if features are never set, it will be >read uninitialized. > 2. if VIRTIO_VSOCK_F_SEQPACKET is set and then clear

Re: [PATCH] vhost-vdpa: change ioctl # for VDPA_GET_VRING_SIZE

2024-04-02 Thread Eugenio Perez Martin
On Tue, Apr 2, 2024 at 11:21 PM Michael S. Tsirkin wrote: > > VDPA_GET_VRING_SIZE by mistake uses the already occupied > ioctl # 0x80 and we never noticed - it happens to work > because the direction and size are different, but confuses > tools such as perf which like to look at just the number, >

Re: [PATCH v2] vdpa/mlx5: Allow CVQ size changes

2024-02-27 Thread Eugenio Perez Martin
On Mon, Feb 19, 2024 at 2:09 AM Lei Yang wrote: > > QE tested this patch's V2, qemu no longer print error messages > "qemu-system-x86_64: Insufficient written data (0)" after > enable/disable multi queues multi times inside guest. Both "x-svq=on > '' and without it are all test pass. > > Tested-by

Re: [PATCH V2 3/3] vdpa_sim: flush workers on suspend

2024-02-15 Thread Eugenio Perez Martin
On Wed, Feb 14, 2024 at 8:52 PM Steven Sistare wrote: > > On 2/14/2024 2:39 PM, Eugenio Perez Martin wrote: > > On Wed, Feb 14, 2024 at 6:50 PM Steven Sistare > > wrote: > >> > >> On 2/13/2024 11:10 AM, Eugenio Perez Martin wrote: > >>> On Mon, Feb

Re: [PATCH V2 3/3] vdpa_sim: flush workers on suspend

2024-02-14 Thread Eugenio Perez Martin
On Wed, Feb 14, 2024 at 6:50 PM Steven Sistare wrote: > > On 2/13/2024 11:10 AM, Eugenio Perez Martin wrote: > > On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare > > wrote: > >> > >> Flush to guarantee no workers are running when suspend returns. &g

Re: [PATCH V2 3/3] vdpa_sim: flush workers on suspend

2024-02-13 Thread Eugenio Perez Martin
On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare wrote: > > Flush to guarantee no workers are running when suspend returns. > > Signed-off-by: Steve Sistare > --- > drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/drivers/vdpa/vdpa_sim/vdpa_si

Re: [PATCH V2 1/3] vhost-vdpa: flush workers on suspend

2024-02-13 Thread Eugenio Perez Martin
On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare wrote: > > Flush to guarantee no workers are running when suspend returns. > > Signed-off-by: Steve Sistare Acked-by: Eugenio Pérez Should this have a Fixes tag? > --- > drivers/vhost/vdpa.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --g

Re: [PATCH V2] vdpa: skip suspend/resume ops if not DRIVER_OK

2024-02-13 Thread Eugenio Perez Martin
On Tue, Feb 13, 2024 at 3:26 PM Steve Sistare wrote: > > If a vdpa device is not in state DRIVER_OK, then there is no driver state > to preserve, so no need to call the suspend and resume driver ops. > > Suggested-by: Eugenio Perez Martin " > Signed-off-by: Steve Sistare

Re: [PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-13 Thread Eugenio Perez Martin
On Tue, Feb 13, 2024 at 8:49 AM Eugenio Perez Martin wrote: > > On Mon, Feb 12, 2024 at 9:20 AM Michael S. Tsirkin wrote: > > > > On Fri, Feb 09, 2024 at 02:29:59PM -0800, Steve Sistare wrote: > > > Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK,

Re: [PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-12 Thread Eugenio Perez Martin
On Mon, Feb 12, 2024 at 9:20 AM Michael S. Tsirkin wrote: > > On Fri, Feb 09, 2024 at 02:29:59PM -0800, Steve Sistare wrote: > > Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK, for all > > vdpa devices. > > > > Suggested-by: Eugenio Perez Martin &quo

Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Eugenio Perez Martin
On Tue, Feb 6, 2024 at 3:52 PM Stefano Garzarella wrote: > > If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect > the driver to enable virtqueue before setting DRIVER_OK. If the driver > tries anyway, better to fail right away as soon as we get the ioctl. > Let's also update th

Re: [PATCH V1] vdpa_sim: reset must not run

2024-01-22 Thread Eugenio Perez Martin
On Mon, Jan 22, 2024 at 11:22 AM Stefano Garzarella wrote: > > On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote: > >vdpasim_do_reset sets running to true, which is wrong, as it allows > >vdpasim_kick_vq to post work requests before the device has been > >configured. To fix, do not se

Re: [RFC V1 10/13] vdpa_sim: flush workers on suspend

2024-01-16 Thread Eugenio Perez Martin
On Wed, Jan 10, 2024 at 9:40 PM Steve Sistare wrote: > > To pass ownership of a live vdpa device to a new process, the user > suspends the device, calls VHOST_NEW_OWNER to change the mm, and calls > VHOST_IOTLB_REMAP to change the user virtual addresses to match the new > mm. Flush workers in sus

Re: [RFC V1 09/13] vdpa_sim: reset must not run

2024-01-16 Thread Eugenio Perez Martin
On Wed, Jan 10, 2024 at 9:40 PM Steve Sistare wrote: > > vdpasim_do_reset sets running to true, which is wrong, as it allows > vdpasim_kick_vq to post work requests before the device has been > configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK > is set. > > Signed-off-by: S

Re: [RFC V1 05/13] vhost-vdpa: VHOST_IOTLB_REMAP

2024-01-16 Thread Eugenio Perez Martin
On Wed, Jan 10, 2024 at 9:40 PM Steve Sistare wrote: > > When device ownership is passed to a new process via VHOST_NEW_OWNER, > some devices need to know the new userland addresses of the dma mappings. > Define the new iotlb message type VHOST_IOTLB_REMAP to update the uaddr > of a mapping. The

Re: [PATCH v7 2/3] vduse: Temporarily fail if control queue feature requested

2024-01-09 Thread Eugenio Perez Martin
On Tue, Jan 9, 2024 at 12:11 PM Maxime Coquelin wrote: > > Virtio-net driver control queue implementation is not safe > when used with VDUSE. If the VDUSE application does not > reply to control queue messages, it currently ends up > hanging the kernel thread sending this command. > > Some work is

Re: [PATCH v6 3/3] vduse: enable Virtio-net device type

2024-01-05 Thread Eugenio Perez Martin
On Thu, Jan 4, 2024 at 4:39 PM Maxime Coquelin wrote: > > This patch adds Virtio-net device type to the supported > devices types. > > Initialization fails if the device does not support > VIRTIO_F_VERSION_1 feature, in order to guarantee the > configuration space is read-only. It also fails with

Re: [PATCH v6 2/3] vduse: Temporarily fail if control queue features requested

2024-01-05 Thread Eugenio Perez Martin
On Fri, Jan 5, 2024 at 9:12 AM Maxime Coquelin wrote: > > > > On 1/5/24 03:45, Jason Wang wrote: > > On Thu, Jan 4, 2024 at 11:38 PM Maxime Coquelin > > wrote: > >> > >> Virtio-net driver control queue implementation is not safe > >> when used with VDUSE. If the VDUSE application does not > >> re

Re: [PATCH v6 1/3] vduse: validate block features only with block devices

2024-01-05 Thread Eugenio Perez Martin
On Thu, Jan 4, 2024 at 4:38 PM Maxime Coquelin wrote: > > This patch is preliminary work to enable network device > type support to VDUSE. > > As VIRTIO_BLK_F_CONFIG_WCE shares the same value as > VIRTIO_NET_F_HOST_TSO4, we need to restrict its check > to Virtio-blk device type. > > Acked-by: Jaso

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2024-01-04 Thread Eugenio Perez Martin
On Wed, Jan 3, 2024 at 11:00 AM Yunsheng Lin wrote: > > introduce vhost_net_test basing on virtio_test to test > vhost_net changing in the kernel. > > Signed-off-by: Yunsheng Lin > --- > tools/virtio/Makefile | 8 +- > tools/virtio/vhost_net_test.c | 574 +++

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-21 Thread Eugenio Perez Martin
On Thu, Dec 21, 2023 at 4:07 PM Dragos Tatulea wrote: > > On Thu, 2023-12-21 at 15:55 +0100, Eugenio Perez Martin wrote: > > On Thu, Dec 21, 2023 at 3:38 PM Dragos Tatulea wrote: > > > > > > On Thu, 2023-12-21 at 13:08 +0100, Eugenio Perez Martin wrote: > >

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-21 Thread Eugenio Perez Martin
On Thu, Dec 21, 2023 at 3:38 PM Dragos Tatulea wrote: > > On Thu, 2023-12-21 at 13:08 +0100, Eugenio Perez Martin wrote: > > On Thu, Dec 21, 2023 at 12:52 PM Dragos Tatulea wrote: > > > > > > On Thu, 2023-12-21 at 08:46 +0100, Eugenio Perez Martin wrote: > >

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-21 Thread Eugenio Perez Martin
On Thu, Dec 21, 2023 at 12:52 PM Dragos Tatulea wrote: > > On Thu, 2023-12-21 at 08:46 +0100, Eugenio Perez Martin wrote: > > On Thu, Dec 21, 2023 at 3:03 AM Jason Wang wrote: > > > > > > On Wed, Dec 20, 2023 at 9:32 PM Eugenio Perez Martin > > > wrote: &g

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-20 Thread Eugenio Perez Martin
On Thu, Dec 21, 2023 at 3:03 AM Jason Wang wrote: > > On Wed, Dec 20, 2023 at 9:32 PM Eugenio Perez Martin > wrote: > > > > On Wed, Dec 20, 2023 at 5:06 AM Jason Wang wrote: > > > > > > On Wed, Dec 20, 2023 at 11:46 AM Jason Wang wrote: > > >

Re: [PATCH vhost v4 08/15] vdpa: Block vq state change in DRIVER_OK unless device supports it

2023-12-20 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 7:10 PM Dragos Tatulea wrote: > > Virtqueue state change during DRIVE_OK is not supported by the virtio > standard. Allow this op in DRIVER_OK only for devices that support > changing the state during DRIVER_OK if the device is suspended. > > Signed-off-by: Dragos Tatulea

Re: [PATCH vhost v4 07/15] vdpa: Block vq address change in DRIVER_OK unless device supports it

2023-12-20 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 7:09 PM Dragos Tatulea wrote: > > Virtqueue address change during DRIVE_OK is not supported by the virtio > standard. Allow this op in DRIVER_OK only for devices that support > changing the address during DRIVER_OK if the device is suspended. > > Signed-off-by: Dragos Tatul

Re: [PATCH vhost v4 05/15] vdpa: Accept VHOST_BACKEND_F_CHANGEABLE_VQ_STATE_IN_SUSPEND backend feature

2023-12-20 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 7:09 PM Dragos Tatulea wrote: > > If userland sets this feature, allow it. > > Signed-off-by: Dragos Tatulea > Suggested-by: Eugenio Pérez Acked-by: Eugenio Pérez > --- > drivers/vhost/vdpa.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vhost/vdpa.

Re: [PATCH vhost v4 04/15] vdpa: Accept VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND backend feature

2023-12-20 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 7:09 PM Dragos Tatulea wrote: > > If userland sets this feature, allow it. > > Signed-off-by: Dragos Tatulea > Suggested-by: Eugenio Pérez Acked-by: Eugenio Pérez > --- > drivers/vhost/vdpa.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vhost/vdpa.

Re: [PATCH vhost v4 03/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_STATE_IN_SUSPEND flag

2023-12-20 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 7:09 PM Dragos Tatulea wrote: > > The virtio spec doesn't allow changing virtqueue state after > DRIVER_OK. Some devices do support this operation when the device is > suspended. The VHOST_BACKEND_F_CHANGEABLE_VQ_STATE_IN_SUSPEND flag > advertises this support as a backend

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-20 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 7:09 PM Dragos Tatulea wrote: > > The virtio spec doesn't allow changing virtqueue addresses after > DRIVER_OK. Some devices do support this operation when the device is > suspended. The VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag > advertises this support as a backe

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-20 Thread Eugenio Perez Martin
On Wed, Dec 20, 2023 at 5:06 AM Jason Wang wrote: > > On Wed, Dec 20, 2023 at 11:46 AM Jason Wang wrote: > > > > On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea wrote: > > > > > > The virtio spec doesn't allow changing virtqueue addresses after > > > DRIVER_OK. Some devices do support this operat

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-19 Thread Eugenio Perez Martin
On Tue, Dec 19, 2023 at 12:16 PM Dragos Tatulea wrote: > > On Tue, 2023-12-19 at 08:24 +0100, Eugenio Perez Martin wrote: > > On Mon, Dec 18, 2023 at 2:58 PM Dragos Tatulea wrote: > > > > > > On Mon, 2023-12-18 at 13:06 +0100, Eugenio Perez Martin wrote: > >

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-18 Thread Eugenio Perez Martin
On Mon, Dec 18, 2023 at 2:58 PM Dragos Tatulea wrote: > > On Mon, 2023-12-18 at 13:06 +0100, Eugenio Perez Martin wrote: > > On Mon, Dec 18, 2023 at 11:52 AM Dragos Tatulea wrote: > > > > > > On Mon, 2023-12-18 at 11:16 +0100, Eugenio Perez Martin wrote: > >

Re: [PATCH v6 0/3] Add UFS host controller and Phy nodes for sc7280

2023-12-18 Thread Martin K. Petersen
locking qcm6490-fairphone-fp5 UFS. > Applied to 6.8/scsi-queue, thanks! [1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string https://git.kernel.org/mkp/scsi/c/98bfeda31969 -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-18 Thread Eugenio Perez Martin
On Mon, Dec 18, 2023 at 11:52 AM Dragos Tatulea wrote: > > On Mon, 2023-12-18 at 11:16 +0100, Eugenio Perez Martin wrote: > > On Sat, Dec 16, 2023 at 12:03 PM Dragos Tatulea wrote: > > > > > > On Fri, 2023-12-15 at 18:56 +0100, Eugenio Perez Martin wrote: > >

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-18 Thread Eugenio Perez Martin
On Sat, Dec 16, 2023 at 12:03 PM Dragos Tatulea wrote: > > On Fri, 2023-12-15 at 18:56 +0100, Eugenio Perez Martin wrote: > > On Fri, Dec 15, 2023 at 3:13 PM Dragos Tatulea wrote: > > > > > > On Fri, 2023-12-15 at 12:35 +, Dragos Tatulea wrote: > > &

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-15 Thread Eugenio Perez Martin
On Fri, Dec 15, 2023 at 3:13 PM Dragos Tatulea wrote: > > On Fri, 2023-12-15 at 12:35 +, Dragos Tatulea wrote: > > On Thu, 2023-12-14 at 19:30 +0100, Eugenio Perez Martin wrote: > > > On Thu, Dec 14, 2023 at 4:51 PM Dragos Tatulea > > > wrote: > > >

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-14 Thread Eugenio Perez Martin
gt; > > On 12/12/2023 11:21 AM, Eugenio Perez Martin wrote: > > > > > On Tue, Dec 5, 2023 at 11:46 AM Dragos Tatulea > > > > > wrote: > > > > > > Addresses get set by .set_vq_address. hw vq addresses will be > > > >

Re: [PATCH v6 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string

2023-12-13 Thread Martin K. Petersen
Luca, > Document the compatible string for the UFS found on SC7280. Applied to 6.8/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH vhost v2 6/8] vdpa/mlx5: Use vq suspend/resume during .set_map

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:47 AM Dragos Tatulea wrote: > > Instead of tearing down and setting up vq resources, use vq > suspend/resume during .set_map to speed things up a bit. > > The vq mr is updated with the new mapping while the vqs are suspended. > > If the device doesn't support resumable vq

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:46 AM Dragos Tatulea wrote: > > Addresses get set by .set_vq_address. hw vq addresses will be updated on > next modify_virtqueue. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Gal Pressman > Acked-by: Eugenio Pérez I'm kind of ok with this patch and the next one ab

Re: [PATCH vhost v2 8/8] vdpa/mlx5: Add mkey leak detection

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:47 AM Dragos Tatulea wrote: > > Track allocated mrs in a list and show warning when leaks are detected > on device free or reset. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 2 ++

  1   2   3   4   5   6   7   8   9   10   >