From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Igor Romanov <igor.romanov@oktetlabs.ru>,
Andy Moreton <amoreton@xilinx.com>,
Ivan Malov <ivan.malov@oktetlabs.ru>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
dev@dpdk.org, Raslan Darawsheh <rasland@nvidia.com>
Subject: [dpdk-dev] [PATCH] net/sfc: fix build when assert enabled
Date: Wed, 13 Oct 2021 16:20:27 +0100 [thread overview]
Message-ID: <20211013152027.2480175-1-ferruh.yigit@intel.com> (raw)
When 'RTE_ENABLE_ASSERT' is enabled (meson -Dc_args=-DRTE_ENABLE_ASSERT)
build fails:
../drivers/net/sfc/sfc_repr.c: In function ‘sfc_repr_start’:
../drivers/net/sfc/sfc_repr.c:251:20:
warning: implicit declaration of function ‘sfc_repr_lock_is_locked’;
did you mean ‘rte_spinlock_is_locked’?
[-Wimplicit-function-declaration]
251 | SFC_ASSERT(sfc_repr_lock_is_locked(sr));
| ^~~~~~~~~~~~~~~~~~~~~~~
Fixes: c85675423f01 ("net/sfc: implement port representor start and stop")
Reported-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: igor.romanov@oktetlabs.ru
The patch that cause the build error is still in next-net, if the patch
is good it can be squashed into the relevant patch in next-net.
---
drivers/net/sfc/sfc_repr.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c
index 6ec83873abd1..02131ce3675d 100644
--- a/drivers/net/sfc/sfc_repr.c
+++ b/drivers/net/sfc/sfc_repr.c
@@ -248,7 +248,9 @@ sfc_repr_start(struct rte_eth_dev *dev)
sfcr_info(sr, "entry");
+#ifdef RTE_LIBRTE_SFC_EFX_DEBUG
SFC_ASSERT(sfc_repr_lock_is_locked(sr));
+#endif
switch (sr->state) {
case SFC_ETHDEV_CONFIGURED:
@@ -319,7 +321,9 @@ sfc_repr_stop(struct rte_eth_dev *dev)
sfcr_info(sr, "entry");
+#ifdef RTE_LIBRTE_SFC_EFX_DEBUG
SFC_ASSERT(sfc_repr_lock_is_locked(sr));
+#endif
switch (sr->state) {
case SFC_ETHDEV_STARTED:
@@ -477,7 +481,9 @@ sfc_repr_configure(struct sfc_repr *sr, uint16_t nb_rx_queues,
sfcr_info(sr, "entry");
+#ifdef RTE_LIBRTE_SFC_EFX_DEBUG
SFC_ASSERT(sfc_repr_lock_is_locked(sr));
+#endif
ret = sfc_repr_check_conf(sr, nb_rx_queues, conf);
if (ret != 0)
@@ -786,7 +792,9 @@ sfc_repr_tx_queue_release(struct rte_eth_dev *dev, uint16_t tx_queue_id)
static void
sfc_repr_close(struct sfc_repr *sr)
{
+#ifdef RTE_LIBRTE_SFC_EFX_DEBUG
SFC_ASSERT(sfc_repr_lock_is_locked(sr));
+#endif
SFC_ASSERT(sr->state == SFC_ETHDEV_CONFIGURED);
sr->state = SFC_ETHDEV_CLOSING;
--
2.31.1
next reply other threads:[~2021-10-13 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 15:20 Ferruh Yigit [this message]
2021-10-13 16:32 ` [dpdk-dev] [PATCH v2] " Andrew Rybchenko
2021-10-13 17:16 ` Ferruh Yigit
2021-10-13 16:35 ` [dpdk-dev] [PATCH] " Andrew Rybchenko
2021-10-13 16:50 ` Ferruh Yigit
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=20211013152027.2480175-1-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=amoreton@xilinx.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=igor.romanov@oktetlabs.ru \
--cc=ivan.malov@oktetlabs.ru \
--cc=rasland@nvidia.com \
/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).