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 AA82145DB9 for ; Wed, 27 Nov 2024 18:23:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A30C9402DE; Wed, 27 Nov 2024 18:23:40 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id D0A1040A89 for ; Wed, 27 Nov 2024 18:23:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=do3xYUnQP/ZuxC8eckYvp2i+3KXy7wH4Glh5X5d2bXc=; b=ROkEbkFllo4U95x1IJwCWsmHPOIN9YtHbdL7Odb4EGSnHvCUIHDdijBF804Bd3yl0jdYwc CPvzzHOZBUXdVABkrDCVgVbFoKAuLjE75UZbbr4DuL0uWQeLIZgJS6CzTEW56u2qDmoc9v XCumbOSiBBXBHcGDh39ZjMQDVoZ8wcA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-7kcsLUv5PlGRcTB423Anqw-1; Wed, 27 Nov 2024 12:23:36 -0500 X-MC-Unique: 7kcsLUv5PlGRcTB423Anqw-1 X-Mimecast-MFC-AGG-ID: 7kcsLUv5PlGRcTB423Anqw Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0160C1955F56; Wed, 27 Nov 2024 17:23:35 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5BD0E300019E; Wed, 27 Nov 2024 17:23:33 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Bruce Richardson , Abhinandan Gujjar , dpdk stable Subject: patch 'test/event: avoid duplicate initialization' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:19:05 +0000 Message-ID: <20241127171916.690404-118-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: RFAwB-R1JXJ0H6VWbugEAtQI_jZiavvoAI6D59Pplyg_1732728215 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ce0f3e1995cd023925a7447a0ceea0538aff08e1 Thanks. Kevin --- >From ce0f3e1995cd023925a7447a0ceea0538aff08e1 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 ea14094f02..3dab1ac797 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -590,19 +590,15 @@ 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, + }; } -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:41.967252979 +0000 +++ 0118-test-event-avoid-duplicate-initialization.patch 2024-11-27 17:17:38.356270052 +0000 @@ -1 +1 @@ -From 8c08b10d047ac64fb98709871b192698663af7d7 Mon Sep 17 00:00:00 2001 +From ce0f3e1995cd023925a7447a0ceea0538aff08e1 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 ea14094f02..3dab1ac797 100644 @@ -25 +26 @@ -@@ -1155,19 +1155,15 @@ configure_cryptodev(void) +@@ -590,19 +590,15 @@ configure_cryptodev(void)