> From: Aaron Conole
> Date: Thursday, 16 March 2023 at 13:00
> To: d...@openvswitch.org
> Cc: Robin Jarry , Gaetan Rivet , Ilya
> Maximets , Eli Britstein , Maxime
> Coquelin , Jason Gunthorpe ,
> Majd Dibbiny , David Marchand march...@redhat.com>, Simon Ho
> -Original Message-
> From: Aaron Conole mailto:acon...@redhat.com>>
> Date: Wednesday 22 February 2023 at 18:11
> To: "d...@openvswitch.org <mailto:d...@openvswitch.org>"
> mailto:d...@openvswitch.org>>
> Cc: Eli Britstein mailto:e
> -Original Message-
> From: Robin Jarry mailto:rja...@redhat.com>>
> Date: Thursday 23 February 2023 at 22:43
> To: Gaetan Rivet mailto:gaet...@nvidia.com>>, Aaron
> Conole mailto:acon...@redhat.com>>
> Cc: "d...@openvswitch.org &
@openvswitch.org>>, Eli Britstein
> mailto:el...@nvidia.com>>, Gaetan Rivet
> mailto:gaet...@nvidia.com>>, Ilya Maximets
> >, Maxime Coquelin
> mailto:maxime.coque...@redhat.com>>, Jason
> Gunthorpe mailto:j...@nvidia.com>>, Majd Dibbiny
> mailto:m...@nvid
>-Original Message-
>From: dev <mailto:ovs-dev-boun...@openvswitch.org>> on behalf of Eelco Chaudron
>mailto:echau...@redhat.com>>
>Date: Monday 23 January 2023 at 10:44
>To: Gaetan Rivet mailto:gaet...@nvidia.com>>
>Cc: ovs dev mailto:d...@openv
are not undefined
behaviour. Reading an atomic is however less costly than taking and
releasing a lock.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Acked-by: William Tu
---
lib/conntrack-private.h | 2 +-
lib/conntrack-tp.c | 2 +-
lib/conntrack.c | 27
ant structures. This will reduce contention on
'ct_lock', which impairs scalability when the connection tracker is
used by many threads.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/conntrack-private.h | 7 --
lib/conntrack-tp.c | 30 +-
connection insertion path.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Acked-by: William Tu
---
lib/conntrack-private.h | 2 +-
lib/conntrack-tp.c | 54 +++--
lib/conntrack.c | 9 ---
lib/conntrack.h | 2 +-
4 files c
s reducing contention.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/conntrack-private.h | 2 +-
lib/conntrack.c | 70 -
lib/conntrack.h | 2 +-
lib/dpif-netdev.c | 5 +--
4 files changed, 53 insertions(+), 26
etracked.
Paolo's alternative series [2] can also improve the same metric.
I am not sure which one would be best between the two, I am
sending this revised version so that it is available for public
comment.
[1]: https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385470.html
[2]:
https:
the queue.
Once the locks have been reworked, it means neither the dataplane
threads nor 'ct_clean' have to take a lock to update the expiration
lists (assuming the consumer lock is perpetually held by 'ct_clean');
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Brits
port' to user
action cookie.")
Suggested-by: Adrian Moreno
Signed-off-by: Yunjian Wang
Signed-off-by: Gaetan Rivet
---
Following the discussion on the fix
https://patchwork.ozlabs.org/project/openvswitch/patch/1638530715-44436-1-git-send-email-wangyunj...@huawei.com/
I tested it wit
from offload thread.")
Fixes: 62d1c28e9ce0 ("dpif-netdev: Flush offload rules upon port deletion.")
Signed-off-by: Ilya Maximets
Signed-off-by: Gaetan Rivet
---
lib/dpif-netdev.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib
datapath deletion. No further offload request should be found
past a flush, so it is safe to keep this reference in the offload item.
Signed-off-by: Gaetan Rivet
---
lib/dpif-netdev.c | 50 +++
1 file changed, 24 insertions(+), 26 deletions(-)
diff
flow. This problem has been observed while adding
and deleting flows in a loop. To fix this, always enqueue flow
deletion regardless of the flow->mark being set.
Fixes: 241bad15d99a("dpif-netdev: associate flow with a mark id")
Signed-off-by: Sriharsha Basavapatna
Signed-off-by:
excruciatingly slow and could
not progress much. It reached datapath deletion without panicking
and no crash was seen, even though I had to interrupt the test after
a few hours.
Gaetan Rivet (2):
dpif-netdev: Move port flush after datapath reconfiguration
dpif-netdev: Use dp_netdev reference in offload
The rte_flow DPDK API was made thread-safe [1] in release 20.11.
Now that the DPDK offload provider in OVS is thread safe, remove the
locks.
[1]: http://mails.dpdk.org/archives/dev/2020-October/184251.html
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
5c2645 ("dpif-netdev: Make datapath port mutex recursive.")
[2]: 12d0edd75eba ("dpif-netdev: Avoid deadlock with offloading during PMD
thread deletion.").
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c
. The lock is still needed to protect against
changes to netdev port mapping.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 8 ++---
lib/netdev-offload-dpdk.c | 61 ---
2 files changed, 61
of
some latency to manage offloads after an inactivity period.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 109 --
1 file changed, 57 insertions(+), 52 deletions(-)
diff --git a/lib
multiplied by the number of requested
threads and used separately.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 290 --
lib/netdev-offload-dpdk.c | 7 +-
2 files changed, 193 insertions
the offload threads.
To prepare this change, move the mappings within the offload thread
structure.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 45 +
1 file changed, 21 insertions(+), 24 d
The implementation of hardware offload counters in currently meant to be
managed by a single thread. Use the offload thread pool API to manage
one counter per thread.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 16
locks on the rte_flow API,
mutually exclude offload query and deletion from concurrent execution.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 39 ---
1 file changed, 36 insertions(+), 3
introducing parallel
offloads, execute the flush operation in the offload thread.
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 126 --
1 file changed, 122 insertions(+), 4 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib
messages freeing using the RCU.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index c4672e6e5..c3d211858 100644
--- a/lib
ot of memory.
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 137 --
1 file changed, 96 insertions(+), 41 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 24ecaa0a8..e0052a65b 100644
--- a/lib
Use the netdev-offload multithread API to allow multiple thread
allocating marks concurrently.
Initialize only once the pool in a multithread context by using
the ovsthread_once type.
Use the id-fpool module for faster concurrent ID allocation.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli
.
Instead attempt to quiesce every 10 ms at most. While the queue is
empty, the offload thread remains quiescent.
[1]: 81ac8b3b194c ("dpif-netdev: Do RCU synchronization at fixed interval
in PMD main loop.")
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxim
-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/automake.mk | 2 +
lib/mpsc-queue.c| 251 +
lib/mpsc-queue.h| 190 ++
tests/automake.mk | 1 +
tests/library.at| 5 +
tests/test-mpsc-queue.c | 772
Avg
id-fpool new: 9 11 11 10 10 ms
id-fpool del: 5 6 6 5 5 ms
id-fpool mix: 16 16 16 16 16 ms
id-fpool rnd: 20 20 20 20 20 ms
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
The atomic exchange operation is a useful primitive that should be
available as well. Most compilers already expose or offer a way
to use it, but a single symbol needs to be defined.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/ovs-atomic-c++.h
reclamation purposes. In such case, it will get
a default offload thread ID of 0. Care must be taken that using
this thread ID is safe concurrently with the offload threads.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-provider.h | 1
Add a new module offering a helper to compute the Cumulative
Moving Average (CMA) and the Exponential Moving Average (EMA)
of a series of values.
Use the new helpers to add latency metrics in dpif-netdev.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
In the netdev datapath, keep track of the enqueued offloads between
the PMDs and the offload thread. Additionally, query each netdev
for their hardware offload counters.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 90
its
handling of hardware offloads.
Call the new API from dpctl.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpctl.c | 36
lib/dpif-netdev.c | 1 +
lib/dpif-netlink.c | 1 +
lib/dpif-provider.h
The offload management in userspace is done through a separate thread.
The naming of the structure holding the objects used for synchronization
with the dataplane is generic and nondescript.
Clarify the object function by renaming it.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
In the DPDK offload provider, keep track of inserted rte_flow and report
it when queried.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/lib
deletion.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 126 +-
lib/netdev-offload.h | 2 +
2 files changed, 113 insertions(+), 15 deletions(-)
diff --git a/lib/netdev-offload-dpdk.c b
Add a new operation for flow API providers to
uninitialize when the API is disassociated from a netdev.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-provider.h | 3 +++
lib/netdev-offload.c | 4
2 files changed, 7
No unit test exist currently for the ovs-barrier type.
It is however crucial as a building block and should be verified to work
as expected.
Create a simple test verifying the basic function of ovs-barrier.
Integrate the test as part of the test suite.
Signed-off-by: Gaetan Rivet
Reviewed-by
ovs_strlcpy silently fails to copy the thread name if it is too long.
Rename the flow offload thread to differentiate it from the main thread.
Fixes: 02bb2824e51d ("dpif-netdev: do hw flow offload in a thread")
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/dpif-ne
immediately after blocking
on it.
Fixes: d8043da7182a ("ovs-thread: Implement OVS specific barrier.")
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/ovs-thread.c | 61 +++-
lib/ovs-thread.h | 6 ++---
2 files changed, 53
s.
CI result: https://github.com/grivet/ovs/actions/runs/1212804378
Gaetan Rivet (27):
ovs-thread: Fix barrier use-after-free
dpif-netdev: Rename flow offload thread
tests: Add ovs-barrier unit test
netdev: Add flow API uninit function
netdev-offload-dpdk: Use per-netdev offload metadata
are not undefined
behaviour. Reading an atomic is however less costly than taking and
releasing a lock.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Acked-by: William Tu
---
lib/conntrack-private.h | 2 +-
lib/conntrack-tp.c | 2 +-
lib/conntrack.c | 27
ant structures. This will reduce contention on
'ct_lock', which impairs scalability when the connection tracker is
used by many threads.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/conntrack-private.h | 7 --
lib/conntrack-tp.c | 30
connection insertion path.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Acked-by: William Tu
---
lib/conntrack-private.h | 2 +-
lib/conntrack-tp.c | 54 +++--
lib/conntrack.c | 9 ---
lib/conntrack.h | 2 +-
4 files c
The atomic exchange operation is a useful primitive that should be
available as well. Most compiler already expose or offer a way
to use it, but a single symbol needs to be defined.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/ovs-atomic-c++.h | 3 +++
lib/ovs-atomic
s reducing contention.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/conntrack-private.h | 2 +-
lib/conntrack.c | 70 -
lib/conntrack.h | 2 +-
lib/dpif-netdev.c | 5 +--
4 files changed, 53 insertions(+), 26
-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/automake.mk | 2 +
lib/mpsc-queue.c| 251 +
lib/mpsc-queue.h| 190 ++
tests/automake.mk | 1 +
tests/library.at| 5 +
tests/test-mpsc-queue.c | 772
the queue.
Once the locks have been reworked, it means neither the dataplane
threads nor 'ct_clean' have to take a lock to update the expiration
lists (assuming the consumer lock is perpetually held by 'ct_clean');
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Brits
0 32
code \ N 1 2 4 8
Before598 1656 12612 39301 (ms)
After293 337 427 893 (ms)
I replicate the numbers on a 24-cores machine as well.
The benchmark is not very accurate as no core pinning and no isolation is done.
Gaetan Rivet (8):
conntrack: Init hash basi
rrect hash value.
Fixes: 2078901a4c14 ("userspace: Add conntrack timeout policy support.")
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Acked-by: William Tu
---
lib/conntrack.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/conntrack.c b/l
the offload threads.
To prepare this change, move the mappings within the offload thread
structure.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 47 ++-
1 file changed, 22 insertions(+), 25
of
some latency to manage offloads after an inactivity period.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 109 --
1 file changed, 57 insertions(+), 52 deletions(-)
diff --git a/lib
The rte_flow DPDK API was made thread-safe [1] in release 20.11.
Now that the DPDK offload provider in OVS is thread safe, remove the
locks.
[1]: http://mails.dpdk.org/archives/dev/2020-October/184251.html
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
multiplied by the number of requested
threads and used separately.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 304 +-
lib/netdev-offload-dpdk.c | 7 +-
2 files changed, 204 insertions
5c2645 ("dpif-netdev: Make datapath port mutex recursive.")
[2]: 12d0edd75eba ("dpif-netdev: Avoid deadlock with offloading during PMD
thread deletion.").
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c
locks on the rte_flow API,
mutually exclude offload query and deletion from concurrent execution.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 39 ---
1 file changed, 36 insertions(+), 3
. The lock is still needed to protect against
changes to netdev port mapping.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 8 ++---
lib/netdev-offload-dpdk.c | 61 ---
2 files changed, 61
The implementation of hardware offload counters in currently meant to be
managed by a single thread. Use the offload thread pool API to manage
one counter per thread.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 16
introducing parallel
offloads, execute the flush operation in the offload thread.
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 126 --
1 file changed, 122 insertions(+), 4 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib
Use the netdev-offload multithread API to allow multiple thread
allocating marks concurrently.
Initialize only once the pool in a multithread context by using
the ovsthread_once type.
Use the id-fpool module for faster concurrent ID allocation.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli
ot of memory.
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 128 --
1 file changed, 89 insertions(+), 39 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index b8fd49f5d..1d7e55d47 100644
--- a/lib
messages freeing using the RCU.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index e403e461a..75b289904 100644
--- a/lib
.
Instead attempt to quiesce every 10 ms at most. While the queue is
empty, the offload thread remains quiescent.
[1]: 81ac8b3b194c ("dpif-netdev: Do RCU synchronization at fixed interval
in PMD main loop.")
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/dpif-net
Avg
id-fpool new: 9 11 11 10 10 ms
id-fpool del: 5 6 6 5 5 ms
id-fpool mix: 16 16 16 16 16 ms
id-fpool rnd: 20 20 20 20 20 ms
Signed-off-by: Gaetan Rivet
---
lib/automake.mk | 2 +
l
reclamation purposes. In such case, it will get
a default offload thread ID of 0. Care must be taken that using
this thread ID is safe concurrently with the offload threads.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-provider.h | 1
-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/automake.mk | 2 +
lib/mpsc-queue.c| 251 +
lib/mpsc-queue.h| 190 ++
tests/automake.mk | 1 +
tests/library.at| 5 +
tests/test-mpsc-queue.c | 772
The atomic exchange operation is a useful primitive that should be
available as well. Most compiler already expose or offer a way
to use it, but a single symbol needs to be defined.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
---
lib/ovs-atomic-c++.h | 3 +++
lib/ovs-atomic
In the netdev datapath, keep track of the enqueued offloads between
the PMDs and the offload thread. Additionally, query each netdev
for their hardware offload counters.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 90
Add a new module offering a helper to compute the Cumulative
Moving Average (CMA) and the Exponential Moving Average (EMA)
of a series of values.
Use the new helpers to add latency metrics in dpif-netdev.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
The offload management in userspace is done through a separate thread.
The naming of the structure holding the objects used for synchronization
with the dataplane is generic and nondescript.
Clarify the object function by renaming it.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
its
handling of hardware offloads.
Call the new API from dpctl.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpctl.c | 36
lib/dpif-netdev.c | 1 +
lib/dpif-netlink.c | 1 +
lib/dpif-provider.h
deletion.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 131 --
lib/netdev-offload.h | 2 +
2 files changed, 114 insertions(+), 19 deletions(-)
diff --git a/lib/netdev-offload-dpdk.c b
Add a new operation for flow API providers to
uninitialize when the API is disassociated from a netdev.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-provider.h | 3 +++
lib/netdev-offload.c | 4
2 files changed, 7
In the DPDK offload provider, keep track of inserted rte_flow and report
it when queried.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/netdev-offload-dpdk.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/lib
ovs_strlcpy silently fails to copy the thread name if it is too long.
Rename the flow offload thread to differentiate it from the main thread.
Fixes: 02bb2824e51d ("dpif-netdev: do hw flow offload in a thread")
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/dpif-ne
No unit test exist currently for the ovs-barrier type.
It is however crucial as a building block and should be verified to work
as expected.
Create a simple test verifying the basic function of ovs-barrier.
Integrate the test as part of the test suite.
Signed-off-by: Gaetan Rivet
Reviewed-by
immediately after blocking
on it.
Fixes: d8043da7182a ("ovs-thread: Implement OVS specific barrier.")
Signed-off-by: Gaetan Rivet
Reviewed-by: Maxime Coquelin
---
lib/ovs-thread.c | 61 +++-
lib/ovs-thread.h | 6 ++---
2 files changed, 53
ueue rnd: avg 97.2 | stdev 15.7 | max 130 | min64
4 threads:
--
id-fpool rnd: avg 25.6 | stdev2.4 | max28 | min20
seq-pool rnd: avg 89.3 | stdev9.7 | max 101 | min 65
id-queue rnd: avg 347.9 | stdev 44.1 | max 410 | min 236
Gaetan Rivet (27):
ovs
Add a configure option to enable ASAN in a simple way.
Adding an AC variable to allow checking for support in the testsuite.
Signed-off-by: Gaetan Rivet
---
.ci/linux-build.sh | 4 ++--
NEWS | 1 +
acinclude.m4 | 16
configure.ac | 1 +
tests
-rcu-uaf quiesce-start-end
# The testsuite can be used as well
make check TESTSUITEFLAGS='-k rcu'
Signed-off-by: Gaetan Rivet
---
.ci/linux-build.sh | 4 ++
.github/workflows/build-and-test.yml | 7 +++
NEWS |
:
* Rebased on master
* Added documentation in lib/ovs-rcu.h following Ben's suggestion.
CI: https://github.com/grivet/ovs/actions/runs/860557554
Gaetan Rivet (8):
configure: add --enable-asan option
tests: Add ovs-barrier unit test
tests: Add RCU postpone test
tests: Add ASAN use-
-off-by: Gaetan Rivet
---
tests/automake.mk| 1 +
tests/library.at | 33 +++
tests/test-rcu-uaf.c | 98
3 files changed, 132 insertions(+)
create mode 100644 tests/test-rcu-uaf.c
diff --git a/tests/automake.mk b/tests/automake.mk
A mutex is allocated, initialized and destroyed, without being
used in the perthread structure.
Signed-off-by: Gaetan Rivet
---
lib/ovs-rcu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c
index cde1e925b..1866bd308 100644
--- a/lib/ovs-rcu.c
+++ b/lib/ovs
Joining pthreads makes the caller quiescent. It should register as such,
as joined threads may wait on an RCU callback executing before quitting,
deadlocking the caller.
Signed-off-by: Gaetan Rivet
---
lib/ovs-thread.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions
Add a simple postponing test verifying RCU callbacks have executed and
RCU exits in order. Add as part of library unit-tests.
Signed-off-by: Gaetan Rivet
---
tests/library.at | 8 ++-
tests/test-rcu.c | 61
2 files changed, 68 insertions
No unit test exist currently for the ovs-barrier type.
It is however crucial as a building block and should be verified to work
as expected.
Create a simple test verifying the basic function of ovs-barrier.
Integrate the test as part of the test suite.
Signed-off-by: Gaetan Rivet
---
tests
immediately after blocking
on it.
Fixes: d8043da7182a ("ovs-thread: Implement OVS specific barrier.")
Signed-off-by: Gaetan Rivet
---
lib/ovs-thread.c | 61 +++-
lib/ovs-thread.h | 6 ++---
2 files changed, 53 insertions(+), 14 deletions(-)
di
A mutex is allocated, initialized and destroyed, without being
used in the perthread structure.
Signed-off-by: Gaetan Rivet
---
lib/ovs-rcu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c
index cde1e925b..1866bd308 100644
--- a/lib/ovs-rcu.c
+++ b/lib/ovs
Joining pthreads makes the caller quiescent. It should register as such,
as joined threads may wait on an RCU callback executing before quitting,
deadlocking the caller.
Signed-off-by: Gaetan Rivet
---
lib/ovs-thread.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions
immediately after blocking
on it.
Fixes: d8043da7182a ("ovs-thread: Implement OVS specific barrier.")
Signed-off-by: Gaetan Rivet
---
lib/ovs-thread.c | 61 +++-
lib/ovs-thread.h | 6 ++---
2 files changed, 53 insertions(+), 14 deletions(-)
di
-free from ASAN.
They are however thwarted by the RCU, until the blocking mode is enabled.
In that case, they will always abort on the expected error.
The full test-suite can be passed with the blocking RCU mode enabled.
An entry in the CI matrix is created for it. No error has been observed.
Gaetan
-start-end
# The testsuite can be used as well
make check TESTSUITEFLAGS='-k rcu'
Signed-off-by: Gaetan Rivet
---
.ci/linux-build.sh | 4 ++
.github/workflows/build-and-test.yml | 7 +++
NEWS | 1 +
ac
-off-by: Gaetan Rivet
---
tests/automake.mk| 1 +
tests/library.at | 33 +++
tests/test-rcu-uaf.c | 98
3 files changed, 132 insertions(+)
create mode 100644 tests/test-rcu-uaf.c
diff --git a/tests/automake.mk b/tests/automake.mk
Add a simple postponing test verifying RCU callbacks have executed and
RCU exits in order. Add as part of library unit-tests.
Signed-off-by: Gaetan Rivet
---
tests/library.at | 8 ++-
tests/test-rcu.c | 59
2 files changed, 66 insertions
Add a configure option to enable ASAN in a simple way.
Adding an AC variable to allow checking for support in the testsuite.
Signed-off-by: Gaetan Rivet
---
.ci/linux-build.sh | 4 ++--
NEWS | 1 +
acinclude.m4 | 16
configure.ac | 1 +
tests
No unit test exist currently for the ovs-barrier type.
It is however crucial as a building block and should be verified to work
as expected.
Create a simple test verifying the basic function of ovs-barrier.
Integrate the test as part of the test suite.
Signed-off-by: Gaetan Rivet
---
tests
multiplied by the number of requested
threads and used separately.
Signed-off-by: Gaetan Rivet
Reviewed-by: Eli Britstein
Reviewed-by: Maxime Coquelin
---
lib/dpif-netdev.c | 304 +-
lib/netdev-offload-dpdk.c | 7 +-
2 files changed, 204 insertions
1 - 100 of 258 matches
Mail list logo