patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Morten Brørup" <mb@smartsharesystems.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	"dpdk stable" <stable@dpdk.org>
Subject: patch 'common/sfc_efx/base: use C11 static assert' has been queued to stable release 21.11.7
Date: Tue,  5 Mar 2024 15:34:27 +0000	[thread overview]
Message-ID: <20240305153449.263666-54-ktraynor@redhat.com> (raw)
In-Reply-To: <20240305153449.263666-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.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 03/11/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/82aea5d9b46d7bb62c4b18e9a91033a1583287ea

Thanks.

Kevin

---
From 82aea5d9b46d7bb62c4b18e9a91033a1583287ea Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 11 Feb 2024 21:48:59 -0800
Subject: [PATCH] common/sfc_efx/base: use C11 static assert
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ]

The sfc base code had its own definition of static assertions
using the out of bound array access hack. Replace it with a
static_assert like rte_common.h.

The use of null pointer to compute offset is not always a constant
in older versions of clang. Use standard offsetof() instead.

Fixes: f67e4719147d ("net/sfc/base: fix coding style")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 398eb8dbd2..74fcd06583 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -8,4 +8,6 @@
 #define	_SYS_EFX_H
 
+#include <assert.h>
+
 #include "efx_annote.h"
 #include "efsys.h"
@@ -18,6 +20,12 @@ extern "C" {
 #endif
 
-#define	EFX_STATIC_ASSERT(_cond)		\
-	((void)sizeof (char[(_cond) ? 1 : -1]))
+/*
+ * Triggers an error at compilation time if the condition is false.
+ *
+ * The  { } exists to workaround a bug in clang (#55821)
+ * where it would not handle _Static_assert in a switch case.
+ */
+#define	EFX_STATIC_ASSERT(_cond) \
+	{ static_assert((_cond), #_cond); }
 
 #define	EFX_ARRAY_SIZE(_array)			\
@@ -25,5 +33,5 @@ extern "C" {
 
 #define	EFX_FIELD_OFFSET(_type, _field)		\
-	((size_t)&(((_type *)0)->_field))
+	offsetof(_type, _field)
 
 /* The macro expands divider twice */
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.932739434 +0000
+++ 0054-common-sfc_efx-base-use-C11-static-assert.patch	2024-03-05 14:08:54.695520884 +0000
@@ -1 +1 @@
-From 047d7032b76a226f2f1c36775688950933f9121b Mon Sep 17 00:00:00 2001
+From 82aea5d9b46d7bb62c4b18e9a91033a1583287ea Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 3312c2fa8f..5773cb00b3 100644
+index 398eb8dbd2..74fcd06583 100644


  parent reply	other threads:[~2024-03-05 15:36 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 15:33 patch 'hash: remove some dead code' " Kevin Traynor
2024-03-05 15:33 ` patch 'regexdev: fix logtype register' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/iavf: fix memory leak on security context error' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ice: fix link update' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ice: fix tunnel TSO capabilities' " Kevin Traynor
2024-03-05 15:33 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Kevin Traynor
2024-03-05 15:33 ` patch 'ci: update versions of actions in GHA' " Kevin Traynor
2024-03-05 15:33 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Kevin Traynor
2024-03-05 15:33 ` patch 'eal: verify strdup return' " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/dpaa: " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/fslmc: " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/vdev: " Kevin Traynor
2024-03-05 15:33 ` patch 'dma/idxd: " Kevin Traynor
2024-03-05 15:33 ` patch 'event/cnxk: " Kevin Traynor
2024-03-05 15:33 ` patch 'net/failsafe: fix memory leak in args parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'app/dumpcap: verify strdup return' " Kevin Traynor
2024-03-05 15:33 ` patch 'app/pdump: " Kevin Traynor
2024-03-05 15:33 ` patch 'app/crypto-perf: " Kevin Traynor
2024-03-05 15:33 ` patch 'test: " Kevin Traynor
2024-03-05 15:33 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'common/mlx5: fix calloc parameters' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/bnx2x: " Kevin Traynor
2024-03-05 15:33 ` patch 'net/nfp: " Kevin Traynor
2024-03-05 15:33 ` patch 'build: fix linker warnings about undefined symbols' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix virtqueue access check in vhost-user setup' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/virtio: remove duplicate queue xstats' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Kevin Traynor
2024-03-05 15:34 ` patch 'cryptodev: remove unused extern variable' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/cnxk: fix memory leak in CPT init' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix next segment mbuf' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix data comparison' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix encrypt operation verification' " Kevin Traynor
2024-03-05 15:34 ` patch 'event/cnxk: fix dequeue timeout configuration' " Kevin Traynor
2024-03-05 15:34 ` patch 'test/event: skip test if no driver is present' " Kevin Traynor
2024-03-05 15:34 ` patch 'doc: fix commands in eventdev test tool guide' " Kevin Traynor
2024-03-05 15:34 ` patch 'ethdev: fix NVGRE encap flow action description' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/af_xdp: fix memzone leak on config failure' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: refactor VF mailbox message struct' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: refactor PF " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix VF multiple count on one reset' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix disable command with firmware' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix reset level comparison' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: remove QinQ insert support for VF' " Kevin Traynor
2024-03-05 15:34 ` patch 'doc: add --latencystats option in testpmd guide' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Kevin Traynor
2024-03-05 15:34 ` patch 'drivers/net: fix buffer overflow for packet types list' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/ionic: fix RSS query' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/ionic: fix device close' " Kevin Traynor
2024-03-05 15:34 ` Kevin Traynor [this message]
2024-03-05 15:34 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Kevin Traynor
2024-03-05 15:34 ` patch 'net: add macros for VLAN metadata parsing' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/netvsc: fix " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix array overflow' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix backward firmware compatibility' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: modify locking for representor Tx' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/cnxk: fix flow RSS configuration' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/cnxk: fix mbox region copy' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix jump action validation' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix GENEVE TLV option management' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/mlx5: fix duplicate read of general capabilities' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix stats query crash in secondary process' " Kevin Traynor
2024-03-05 15:34 ` patch 'telemetry: fix connected clients count' " Kevin Traynor
2024-03-05 15:34 ` patch 'telemetry: fix empty JSON dictionaries' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240305153449.263666-54-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=mb@smartsharesystems.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).