diff mbox series

[ovs-dev,v2,05/28] dpif-netdev: Rename flow offload thread

Message ID fc2cb23bbb405a9b8805d2f7ac5f6d6e283442e9.1618236421.git.grive@u256.net
State Changes Requested
Headers show
Series dpif-netdev: Parallel offload processing | expand

Commit Message

Gaetan Rivet April 12, 2021, 3:19 p.m. UTC
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 <grive@u256.net>
---
 lib/dpif-netdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Maxime Coquelin April 21, 2021, 2:51 p.m. UTC | #1
On 4/12/21 5:19 PM, Gaetan Rivet wrote:
> 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 <grive@u256.net>
> ---
>  lib/dpif-netdev.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 

If a new revision is needed, maybe move this fix at the beginning of the
series to avoid apply conflicts.

Other than that it looks good to me:

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
diff mbox series

Patch

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 2832671d8..ae08fa3b8 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -2786,8 +2786,7 @@  queue_netdev_flow_del(struct dp_netdev_pmd_thread *pmd,
 
     if (ovsthread_once_start(&offload_thread_once)) {
         xpthread_cond_init(&dp_flow_offload.cond, NULL);
-        ovs_thread_create("dp_netdev_flow_offload",
-                          dp_netdev_flow_offload_main, NULL);
+        ovs_thread_create("hw_offload", dp_netdev_flow_offload_main, NULL);
         ovsthread_once_done(&offload_thread_once);
     }
 
@@ -2810,8 +2809,7 @@  queue_netdev_flow_put(struct dp_netdev_pmd_thread *pmd,
 
     if (ovsthread_once_start(&offload_thread_once)) {
         xpthread_cond_init(&dp_flow_offload.cond, NULL);
-        ovs_thread_create("dp_netdev_flow_offload",
-                          dp_netdev_flow_offload_main, NULL);
+        ovs_thread_create("hw_offload", dp_netdev_flow_offload_main, NULL);
         ovsthread_once_done(&offload_thread_once);
     }