From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FEF745D31 for ; Wed, 27 Nov 2024 01:54:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 712A3402E0; Wed, 27 Nov 2024 01:54:45 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 73A2D427E3 for ; Wed, 27 Nov 2024 01:54:43 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-434aa472617so1734935e9.3 for ; Tue, 26 Nov 2024 16:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732668883; x=1733273683; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Rm/ipYCW0VHehTBuguMBkH0/jjtKxLVGZY8Gjp5yHk=; b=XSFoyqT5G3vS5Pf9MpDFYAcGzQreRXyC31iaWfhPSNS0tJ9gi1xAWh42XtERYppUy1 kvtzumiIGGGgsYsaKUdBC3dtszJrw/Jb4ejeXUdz6v1nZzvG0PEsaTPAqR9vMZ9/Teor vCV1dyrPKidQYyGKTDiTpawTcEwAXr7QgSPJIX66mnngJDoYKytOv0nUpqsMCBsSXJrK 0i+R3ug8j0u+TdPvBIz2KuFeWRPhwdZGlzz+4kSkAOBTwogaIYQ+ygiKaKbu8BohD3KW EPkgkBdaRsXjPqkNKHw95VzFpGQTWyNP8xMnIwtv9IhN5/ncNg26btaJJm1LO+XbSb4F 1rpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732668883; x=1733273683; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Rm/ipYCW0VHehTBuguMBkH0/jjtKxLVGZY8Gjp5yHk=; b=QjNrX1KnkK/OltZegrZufXtKZ4BnlKlfRQ6NYXbyQWA6C1khCIAxaVPN7QzAWQCtE3 4XsK/ovQHJp3a9linTB+kK32bts07MUMbT4oQvaFgCi1A1wTAfvBxTnzTRHKwc2ymg2k QPd5UEgHdXnAS1zhHKeidDBuKvNyxyaHgbfX69Duv9xLdCQbPrwYvXcuYQ8pYMuYIFUw aozQpM+wuKypeMdvDTnhrGQ1TTkDvdc2qK6FdoDyopGrx23AczjWK2JzTGI/kQ1yS31y HvVNLBBiLW28BGKKbk5NYF2VfeKW82YQWU/ttpR4YKfKDBW6kbyaNnwc55LfmNxr/SUr Gofw== X-Forwarded-Encrypted: i=1; AJvYcCW34YsUihHH1bKcO0XNdZCh8ZnOsbGsppq1L9tmnx9TLC7GJDE+G7VNwJa9OIPSpqwWf3Wb74U=@dpdk.org X-Gm-Message-State: AOJu0YyBeIOq2bRlSEBCaiT4vFwDRgEsM2MUkJ9Fv1IIsBeGlzmXTL0L 3SFjPR3FaenJZnZVUC5u9kj14h7XDaHYfB07SWT1/vDyH89HqGvD X-Gm-Gg: ASbGncu3Zo70opRG951CZGFW7UG3y7D71/XlHQ4ZwDOsXFeZ7Ei9cMQQCxCxfVKbjft VrPQD7s5ntGZcTfrLNrTfvu8ZZqQKHJklQ502YDWxE9qAm8cnEtaBvFfenv7v0QDBxVAjqK6vZo Rrg9KwPo0iuqU2KrzWqLs87aA2+QTX+bKffVHnTjsGspYJkB7M3lr3GmRFBTxn3zviBLqhYmfrk 7KLEeJi5Uf1AVR3CXqg+MTNi5y6NBLBLLRdhvTRXWyIocu6L66k29Xm X-Google-Smtp-Source: AGHT+IFiK56azQTduF6VqgU13UVoiYZbf/g7ECKjy4wz/sKSnCWxHg8oZ25i+yWaEEvJLp7O/8R5AA== X-Received: by 2002:a05:600c:4510:b0:431:6060:8b16 with SMTP id 5b1f17b1804b1-434a9df0a3amr10629375e9.30.1732668882915; Tue, 26 Nov 2024 16:54:42 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:2203:ead5:e694:df3c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434aa7cd066sm3675135e9.21.2024.11.26.16.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 16:54:42 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Bruce Richardson , Abhinandan Gujjar , dpdk stable Subject: patch 'test/event: avoid duplicate initialization' has been queued to stable release 22.11.7 Date: Wed, 27 Nov 2024 00:54:29 +0000 Message-ID: <20241127005435.188430-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241127005435.188430-1-luca.boccassi@gmail.com> References: <20241120234215.233355-28-luca.boccassi@gmail.com> <20241127005435.188430-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c6448283e306cd3535b274a9612ee2b958e0b9aa Thanks. Luca Boccassi --- >From c6448283e306cd3535b274a9612ee2b958e0b9aa Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 21 Nov 2024 10:23:25 -0800 Subject: [PATCH] test/event: avoid duplicate initialization [ upstream commit 8c08b10d047ac64fb98709871b192698663af7d7 ] The event_dev_config initialization had duplicate assignments to the same element. Change to use structure initialization so that compiler will catch this type of bug. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson Acked-by: Abhinandan Gujjar --- app/test/test_event_crypto_adapter.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 3d720fe68b..7e38f8bfb9 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -1040,21 +1040,17 @@ configure_cryptodev(void) static inline void evdev_set_conf_values(struct rte_event_dev_config *dev_conf, - struct rte_event_dev_info *info) + const struct rte_event_dev_info *info) { - memset(dev_conf, 0, sizeof(struct rte_event_dev_config)); - dev_conf->dequeue_timeout_ns = info->min_dequeue_timeout_ns; - dev_conf->nb_event_ports = NB_TEST_PORTS; - dev_conf->nb_event_queues = NB_TEST_QUEUES; - dev_conf->nb_event_queue_flows = info->max_event_queue_flows; - dev_conf->nb_event_port_dequeue_depth = - info->max_event_port_dequeue_depth; - dev_conf->nb_event_port_enqueue_depth = - info->max_event_port_enqueue_depth; - dev_conf->nb_event_port_enqueue_depth = - info->max_event_port_enqueue_depth; - dev_conf->nb_events_limit = - info->max_num_events; + *dev_conf = (struct rte_event_dev_config) { + .dequeue_timeout_ns = info->min_dequeue_timeout_ns, + .nb_event_ports = NB_TEST_PORTS, + .nb_event_queues = NB_TEST_QUEUES, + .nb_event_queue_flows = info->max_event_queue_flows, + .nb_event_port_dequeue_depth = info->max_event_port_dequeue_depth, + .nb_event_port_enqueue_depth = info->max_event_port_enqueue_depth, + .nb_events_limit = info->max_num_events, + }; } static int -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 00:29:59.612751023 +0000 +++ 0003-test-event-avoid-duplicate-initialization.patch 2024-11-27 00:29:59.504711022 +0000 @@ -1 +1 @@ -From 8c08b10d047ac64fb98709871b192698663af7d7 Mon Sep 17 00:00:00 2001 +From c6448283e306cd3535b274a9612ee2b958e0b9aa Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8c08b10d047ac64fb98709871b192698663af7d7 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 9d38a66bfa..ab24e30a97 100644 +index 3d720fe68b..7e38f8bfb9 100644 @@ -25 +26 @@ -@@ -1154,21 +1154,17 @@ configure_cryptodev(void) +@@ -1040,21 +1040,17 @@ configure_cryptodev(void)