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 963D8454E9 for ; Tue, 25 Jun 2024 02:01:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90CCE4278E; Tue, 25 Jun 2024 02:01:47 +0200 (CEST) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id 2ABE740EDD for ; Tue, 25 Jun 2024 02:01:47 +0200 (CEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42172ed3487so37424195e9.0 for ; Mon, 24 Jun 2024 17:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273707; x=1719878507; 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=c5bqBzRU8S+dhpYWiX7QtwmcunY3akLoG3ML+b4Ttwk=; b=Rl1DaiVoHYu+K9yG4ug2XE9Z5NNtPDqg7MeGPjjGcrMsvHD6hd5YtM56uA8HLTztvr NN8faA+IF2cyvleHoGMi0vvf1UcEzTiYj0xbXUB2QO4oCUgOEW/BaB10NYmmxcW6adh8 LU5O+mtOhV69mVM6/+uZD3FNfuNnb/Hvhmgp8c+ZnH14ynpXlFEXa2idXn/3VY7S8zbs ZdnukdTV/7HnmMOYAaEPuYMrTp95//2z2SxwLXjJJD/cKejSsUlLKYjAma4lC5Qgnjuy B+AQnR2kohSQbZjSq1/eJm/4T7cNU1ITPtGkL1b/p6ruyhD2ZhFT1PnNPeVIfRyj+sKW 1hsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273707; x=1719878507; 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=c5bqBzRU8S+dhpYWiX7QtwmcunY3akLoG3ML+b4Ttwk=; b=ownkYmXeSCyvfDEBjQc0AnoX+7KaslR4rXkFBYDQq2bZp5OpyGXVu5BGHC8j0xwDin 2s5H/FH9OpzzVSn7GSwwa3aNtlrCRtRw430VdXELuCr5Nj7/4tKpwji5iIP4cj5sIEvB Gal5iqB6IzwhWo1ehSoV1zn9+c8A2BytKNKfkOKXPA5GQghVK213XGGKKu4gtPKiX/J/ l7exMPcNlS2Gfs3r5wxoHwbCPG7A67FR+mT4Z39L3XOKg49Y8I5MwtIxP2hXPjvf1QpX bPxUcJJYrS29aCTaxDS45d420HUyH5OoG4Q/ttL42DkyRYAb7+H2GCVDTlGE7U4pWplT UvbA== X-Forwarded-Encrypted: i=1; AJvYcCUbez7Z6rIVVT2Q2HezNIu970+lin4eaXjDEhL6GeiSiodgN9XrjbMKdRuDMzDUj+BR6LkwDqslEHazFZTVseU= X-Gm-Message-State: AOJu0Yz3BHj/kc4tCKfxV44akNOKtdKZ1n86gNeCfwBjg/df6CUMUi8L geE2VSqPv1PHxjDyKOEPbMWOQCZwxklgAKED5fCDMksQZZDf4F22NWXirg== X-Google-Smtp-Source: AGHT+IEd5sQOTNNbShDYw43QxwOwF3DgW8Niej9qOl+EIn3II3iGhunqHgX3l6cogT9kBq62ZPR6CQ== X-Received: by 2002:a05:600c:3225:b0:421:9fc4:7490 with SMTP id 5b1f17b1804b1-42489e3a9a0mr50072865e9.11.1719273706745; Mon, 24 Jun 2024 17:01:46 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36638ab8334sm11305535f8f.48.2024.06.24.17.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:01:46 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Harry van Haaren , dpdk stable Subject: patch 'event/sw: fix warning from useless snprintf' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:34 +0100 Message-Id: <20240624235907.885628-48-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/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/ae651a5adb9e83ccef322c2a1f125585ab4dde74 Thanks. Luca Boccassi --- >From ae651a5adb9e83ccef322c2a1f125585ab4dde74 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 23 Apr 2024 20:45:40 -0700 Subject: [PATCH] event/sw: fix warning from useless snprintf [ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ] With GCC-14, this warning is generated: drivers/event/sw/sw_evdev.c:263:3: warning: snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i); ^ Yet the whole printf to the buf is unnecessary. The type string argument has never been implemented, and should just be NULL. Removing the unnecessary snprintf, then means IQ_ROB_NAMESIZE can be removed. Fixes: 5ffb2f142d95 ("event/sw: support event queues") Signed-off-by: Stephen Hemminger Acked-by: Harry van Haaren --- drivers/event/sw/iq_chunk.h | 2 -- drivers/event/sw/sw_evdev.c | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h index 31d013eab7..7820815c38 100644 --- a/drivers/event/sw/iq_chunk.h +++ b/drivers/event/sw/iq_chunk.h @@ -9,8 +9,6 @@ #include #include -#define IQ_ROB_NAMESIZE 12 - struct sw_queue_chunk { struct rte_event events[SW_EVS_PER_Q_CHUNK]; struct sw_queue_chunk *next; diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 2a2763ee9b..09200c9188 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -228,9 +228,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type, const struct rte_event_queue_conf *queue_conf) { unsigned int i; - int dev_id = sw->data->dev_id; int socket_id = sw->data->socket_id; - char buf[IQ_ROB_NAMESIZE]; struct sw_qid *qid = &sw->qids[idx]; /* Initialize the FID structures to no pinning (-1), and zero packets */ @@ -260,8 +258,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type, goto cleanup; } - snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i); - qid->reorder_buffer = rte_zmalloc_socket(buf, + qid->reorder_buffer = rte_zmalloc_socket(NULL, window_size * sizeof(qid->reorder_buffer[0]), 0, socket_id); if (!qid->reorder_buffer) { -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:16.373261981 +0100 +++ 0048-event-sw-fix-warning-from-useless-snprintf.patch 2024-06-25 00:22:13.177185486 +0100 @@ -1 +1 @@ -From 510e2b655b46d91d3cc189882e6392afdc0363ff Mon Sep 17 00:00:00 2001 +From ae651a5adb9e83ccef322c2a1f125585ab4dde74 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 7a7a8782e6..e638142dbc 100644 +index 31d013eab7..7820815c38 100644 @@ -37 +38 @@ - struct __rte_cache_aligned sw_queue_chunk { + struct sw_queue_chunk { @@ -41 +42 @@ -index 1c01b069fe..19a52afc7d 100644 +index 2a2763ee9b..09200c9188 100644