* [PATCH 0/6] remove check around pthread_mutex_init()
@ 2025-01-12 18:58 Ariel Otilibili
2025-01-12 18:58 ` [PATCH 1/6] raw/ifpga: " Ariel Otilibili
` (9 more replies)
0 siblings, 10 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Maxime Coquelin, Chenbo Xia, Ziyang Xuan,
Xiaoyun Wang, Gaetan Rivet, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Ajit Khaparde,
Somnath Kotur, Rosen Xu
Hello,
This series addresses Bugzilla ID 1586; the man says
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Meaning, the check around around pthread_mutex_init() is needless.
Thank you,
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Ariel Otilibili (6):
raw/ifpga: remove check around pthread_mutex_init()
net/bnxt: remove check around pthread_mutex_init()
common/cnxk: remove check around pthread_mutex_init()
net/failsafe: remove check around pthread_mutex_init()
net/hinic: remove check around pthread_mutex_init()
lib/vhost: remove check around pthread_mutex_init()
drivers/common/cnxk/roc_bphy_cgx.c | 5 +--
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++---------------
drivers/net/bnxt/bnxt_txq.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +--
drivers/net/failsafe/failsafe.c | 6 +--
drivers/net/hinic/base/hinic_compat.h | 8 +---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +--
drivers/raw/ifpga/base/opae_spi_transaction.c | 10 +----
lib/vhost/socket.c | 14 +------
13 files changed, 22 insertions(+), 104 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/6] raw/ifpga: remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
@ 2025-01-12 18:58 ` Ariel Otilibili
2025-01-12 18:58 ` [PATCH 2/6] net/bnxt: " Ariel Otilibili
` (8 subsequent siblings)
9 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +----
drivers/raw/ifpga/base/opae_spi_transaction.c | 10 +---------
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c b/drivers/raw/ifpga/base/opae_intel_max10.c
index d5a9ceb6e355..58c884a8d8e1 100644
--- a/drivers/raw/ifpga/base/opae_intel_max10.c
+++ b/drivers/raw/ifpga/base/opae_intel_max10.c
@@ -1486,10 +1486,7 @@ intel_max10_device_init(struct intel_max10_device *dev)
if (ret)
return ret;
- ret = pthread_mutex_init(&dev->bmc_ops.lock, NULL);
- if (ret)
- return ret;
-
+ pthread_mutex_init(&dev->bmc_ops.lock, NULL);
if (!dev->bmc_ops.mutex)
dev->bmc_ops.mutex = &dev->bmc_ops.lock;
}
diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 21015eb95ef5..95efcbbecb0a 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -507,11 +507,7 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
if (!spi_tran_dev->buffer)
goto err;
- ret = pthread_mutex_init(&spi_tran_dev->lock, NULL);
- if (ret) {
- dev_err(spi_tran_dev, "fail to init mutex lock\n");
- goto err;
- }
+ pthread_mutex_init(&spi_tran_dev->lock, NULL);
if (dev->mutex) {
dev_info(NULL, "use multi-process mutex in spi\n");
spi_tran_dev->mutex = dev->mutex;
@@ -521,10 +517,6 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
}
return spi_tran_dev;
-
-err:
- opae_free(spi_tran_dev);
- return NULL;
}
void spi_transaction_remove(struct spi_transaction_dev *dev)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 2/6] net/bnxt: remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
2025-01-12 18:58 ` [PATCH 1/6] raw/ifpga: " Ariel Otilibili
@ 2025-01-12 18:58 ` Ariel Otilibili
2025-01-12 18:58 ` [PATCH 3/6] common/cnxk: " Ariel Otilibili
` (7 subsequent siblings)
9 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++++--------------------
drivers/net/bnxt/bnxt_txq.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +-----
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +---
7 files changed, 14 insertions(+), 64 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ef8a928c9170..3a88cdc94128 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5821,31 +5821,12 @@ static int bnxt_get_config(struct bnxt *bp)
static int
bnxt_init_locks(struct bnxt *bp)
{
- int err;
+ pthread_mutex_init(&bp->flow_lock, NULL);
+ pthread_mutex_init(&bp->def_cp_lock, NULL);
+ pthread_mutex_init(&bp->health_check_lock, NULL);
+ pthread_mutex_init(&bp->err_recovery_lock, NULL);
- err = pthread_mutex_init(&bp->flow_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize flow_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->def_cp_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize def_cp_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->health_check_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize health_check_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
- if (err)
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize err_recovery_lock");
-
- return err;
+ return 0;
}
/* This should be called after we have queried trusted VF cap */
@@ -6746,7 +6727,7 @@ static void bnxt_free_rep_info(struct bnxt *bp)
static int bnxt_init_rep_info(struct bnxt *bp)
{
- int i = 0, rc;
+ int i = 0;
if (bp->rep_info)
return 0;
@@ -6770,14 +6751,9 @@ static int bnxt_init_rep_info(struct bnxt *bp)
for (i = 0; i < BNXT_MAX_CFA_CODE; i++)
bp->cfa_code_map[i] = BNXT_VF_IDX_INVALID;
- rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize vfr_start_lock");
- bnxt_free_rep_info(bp);
- return rc;
- }
+ pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- return rc;
+ return 0;
}
static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index c8649359923f..ab561585d771 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -198,11 +198,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
goto err;
}
- rc = pthread_mutex_init(&txq->txq_lock, NULL);
- if (rc != 0) {
- PMD_DRV_LOG_LINE(ERR, "TxQ mutex init failed!");
- goto err;
- }
+ pthread_mutex_init(&txq->txq_lock, NULL);
return 0;
err:
bnxt_tx_queue_release_op(eth_dev, queue_idx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 1bfc88cf79ef..0c03ae7a8349 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -188,7 +188,6 @@ ulp_session_init(struct bnxt *bp,
struct rte_pci_device *pci_dev;
struct rte_pci_addr *pci_addr;
struct bnxt_ulp_session_state *session;
- int rc = 0;
if (!bp)
return NULL;
@@ -215,12 +214,7 @@ ulp_session_init(struct bnxt *bp,
session->pci_info.domain = pci_addr->domain;
session->pci_info.bus = pci_addr->bus;
memcpy(session->dsn, bp->dsn, sizeof(session->dsn));
- rc = pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "mutex create failed\n");
- pthread_mutex_unlock(&bnxt_ulp_global_mutex);
- return NULL;
- }
+ pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
STAILQ_INSERT_TAIL(&bnxt_ulp_session_list,
session, next);
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index fa7e8fe00077..4a1ccfa2a36d 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -1472,11 +1472,7 @@ ulp_tf_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
/* Initialize ulp dparms with values devargs passed */
rc = ulp_tf_dparms_init(bp, bp->ulp_ctx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 6d7ec0ffec79..508c194d0490 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -993,11 +993,7 @@ ulp_tfc_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
rc = ulp_tfc_dparms_init(bp, bp->ulp_ctx, ulp_dev_id);
if (rc) {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 67489b76f390..f9d069f4e17e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -129,11 +129,7 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
ulp_fc_info->fc_ops = fc_ops;
ulp_fc_info->flags = flags;
- rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Failed to initialize fc mutex\n");
- goto error;
- }
+ pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
/* Add the FC info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_fc_info_set(ctxt, ulp_fc_info);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 3c75a6b43721..7b7c10d3602e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -412,11 +412,7 @@ ulp_ha_mgr_init(struct bnxt_ulp_context *ulp_ctx)
/* Add the HA info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_ha_info_set(ulp_ctx, ha_info);
- rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Failed to initialize ha mutex");
- goto cleanup;
- }
+ pthread_mutex_init(&ha_info->ha_lock, NULL);
rc = ulp_ha_mgr_timer_start(ulp_ctx->cfg_data);
if (rc) {
PMD_DRV_LOG_LINE(ERR, "Unable to start timer CB");
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 3/6] common/cnxk: remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
2025-01-12 18:58 ` [PATCH 1/6] raw/ifpga: " Ariel Otilibili
2025-01-12 18:58 ` [PATCH 2/6] net/bnxt: " Ariel Otilibili
@ 2025-01-12 18:58 ` Ariel Otilibili
2025-01-12 18:58 ` [PATCH 4/6] net/failsafe: " Ariel Otilibili
` (6 subsequent siblings)
9 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/common/cnxk/roc_bphy_cgx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c
index 4f43605e1031..882cf654743b 100644
--- a/drivers/common/cnxk/roc_bphy_cgx.c
+++ b/drivers/common/cnxk/roc_bphy_cgx.c
@@ -189,14 +189,11 @@ int
roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx)
{
uint64_t val;
- int ret;
if (!roc_cgx || !roc_cgx->bar0_va || !roc_cgx->bar0_pa)
return -EINVAL;
- ret = pthread_mutex_init(&roc_cgx->lock, NULL);
- if (ret)
- return ret;
+ pthread_mutex_init(&roc_cgx->lock, NULL);
val = roc_bphy_cgx_read(roc_cgx, 0, CGX_CMRX_RX_LMACS);
val = FIELD_GET(CGX_CMRX_RX_LMACS_LMACS, val);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 4/6] net/failsafe: remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (2 preceding siblings ...)
2025-01-12 18:58 ` [PATCH 3/6] common/cnxk: " Ariel Otilibili
@ 2025-01-12 18:58 ` Ariel Otilibili
2025-01-12 18:58 ` [PATCH 5/6] net/hinic: " Ariel Otilibili
` (5 subsequent siblings)
9 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/failsafe/failsafe.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 32811403b4c8..e1c77cdf4fd1 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -147,11 +147,7 @@ fs_mutex_init(struct fs_priv *priv)
ERROR("Cannot set mutex type - %s", strerror(ret));
return ret;
}
- ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
- if (ret) {
- ERROR("Cannot initiate mutex - %s", strerror(ret));
- return ret;
- }
+ pthread_mutex_init(&priv->hotplug_mutex, &attr);
return 0;
}
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 5/6] net/hinic: remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (3 preceding siblings ...)
2025-01-12 18:58 ` [PATCH 4/6] net/failsafe: " Ariel Otilibili
@ 2025-01-12 18:58 ` Ariel Otilibili
2025-01-12 18:58 ` [PATCH 6/6] lib/vhost: " Ariel Otilibili
` (4 subsequent siblings)
9 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/hinic/base/hinic_compat.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index ab9d1b9a0214..8f5763fbfc9d 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -200,13 +200,9 @@ static inline u16 ilog2(u32 n)
static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex,
const pthread_mutexattr_t *mattr)
{
- int err;
-
- err = pthread_mutex_init(pthreadmutex, mattr);
- if (unlikely(err))
- PMD_DRV_LOG(ERR, "Fail to initialize mutex, error: %d", err);
+ pthread_mutex_init(pthreadmutex, mattr);
- return err;
+ return 0;
}
static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 6/6] lib/vhost: remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (4 preceding siblings ...)
2025-01-12 18:58 ` [PATCH 5/6] net/hinic: " Ariel Otilibili
@ 2025-01-12 18:58 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
` (3 subsequent siblings)
9 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 18:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
lib/vhost/socket.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index d29d15494c8e..531aa8adc06c 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -498,11 +498,7 @@ vhost_user_reconnect_init(void)
{
int ret;
- ret = pthread_mutex_init(&reconn_list.mutex, NULL);
- if (ret < 0) {
- VHOST_CONFIG_LOG("thread", ERR, "%s: failed to initialize mutex", __func__);
- return ret;
- }
+ pthread_mutex_init(&reconn_list.mutex, NULL);
TAILQ_INIT(&reconn_list.head);
ret = rte_thread_create_internal_control(&reconn_tid, "vhost-reco",
@@ -921,11 +917,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
goto out;
}
TAILQ_INIT(&vsocket->conn_list);
- ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
- if (ret) {
- VHOST_CONFIG_LOG(path, ERR, "failed to init connection mutex");
- goto out_free;
- }
+ pthread_mutex_init(&vsocket->conn_mutex, NULL);
if (!strncmp("/dev/vduse/", path, strlen("/dev/vduse/")))
vsocket->is_vduse = true;
@@ -1034,8 +1026,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
if (pthread_mutex_destroy(&vsocket->conn_mutex)) {
VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
}
-out_free:
- vhost_user_socket_mem_free(vsocket);
out:
pthread_mutex_unlock(&vhost_user.mutex);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 0/6] remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (5 preceding siblings ...)
2025-01-12 18:58 ` [PATCH 6/6] lib/vhost: " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 1/6] raw/ifpga: " Ariel Otilibili
` (5 more replies)
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
` (2 subsequent siblings)
9 siblings, 6 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Chenbo Xia, Ziyang Xuan, Xiaoyun Wang,
Gaetan Rivet, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
Satha Rao, Harman Kalra, Ajit Khaparde, Somnath Kotur, Rosen Xu
Hello,
This series addresses Bugzilla ID 1586; the man says
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Meaning, the check around around pthread_mutex_init() is needless.
Thank you,
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
---
v2
* fix build issues
v1 (https://inbox.dpdk.org/dev/20250112185842.9752-1-otilibil@eurecom.fr/#t)
Ariel Otilibili (6):
raw/ifpga: remove check around pthread_mutex_init()
net/bnxt: remove check around pthread_mutex_init()
common/cnxk: remove check around pthread_mutex_init()
net/failsafe: remove check around pthread_mutex_init()
net/hinic: remove check around pthread_mutex_init()
lib/vhost: remove check around pthread_mutex_init()
drivers/common/cnxk/roc_bphy_cgx.c | 5 +--
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++---------------
drivers/net/bnxt/bnxt_txq.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +--
drivers/net/failsafe/failsafe.c | 6 +--
drivers/net/hinic/base/hinic_compat.h | 8 +---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +--
drivers/raw/ifpga/base/opae_spi_transaction.c | 11 ++---
lib/vhost/socket.c | 14 +------
13 files changed, 24 insertions(+), 103 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 1/6] raw/ifpga: remove check around pthread_mutex_init()
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 2/6] net/bnxt: " Ariel Otilibili
` (4 subsequent siblings)
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +----
drivers/raw/ifpga/base/opae_spi_transaction.c | 11 +++--------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c b/drivers/raw/ifpga/base/opae_intel_max10.c
index d5a9ceb6e355..58c884a8d8e1 100644
--- a/drivers/raw/ifpga/base/opae_intel_max10.c
+++ b/drivers/raw/ifpga/base/opae_intel_max10.c
@@ -1486,10 +1486,7 @@ intel_max10_device_init(struct intel_max10_device *dev)
if (ret)
return ret;
- ret = pthread_mutex_init(&dev->bmc_ops.lock, NULL);
- if (ret)
- return ret;
-
+ pthread_mutex_init(&dev->bmc_ops.lock, NULL);
if (!dev->bmc_ops.mutex)
dev->bmc_ops.mutex = &dev->bmc_ops.lock;
}
diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 21015eb95ef5..49d51c7bc3ab 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -494,7 +494,6 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
int chipselect)
{
struct spi_transaction_dev *spi_tran_dev;
- int ret;
spi_tran_dev = opae_malloc(sizeof(struct spi_transaction_dev));
if (!spi_tran_dev)
@@ -507,11 +506,7 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
if (!spi_tran_dev->buffer)
goto err;
- ret = pthread_mutex_init(&spi_tran_dev->lock, NULL);
- if (ret) {
- dev_err(spi_tran_dev, "fail to init mutex lock\n");
- goto err;
- }
+ pthread_mutex_init(&spi_tran_dev->lock, NULL);
if (dev->mutex) {
dev_info(NULL, "use multi-process mutex in spi\n");
spi_tran_dev->mutex = dev->mutex;
@@ -523,8 +518,8 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
return spi_tran_dev;
err:
- opae_free(spi_tran_dev);
- return NULL;
+ opae_free(spi_tran_dev);
+ return NULL;
}
void spi_transaction_remove(struct spi_transaction_dev *dev)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 2/6] net/bnxt: remove check around pthread_mutex_init()
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 1/6] raw/ifpga: " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 3/6] common/cnxk: " Ariel Otilibili
` (3 subsequent siblings)
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++++--------------------
drivers/net/bnxt/bnxt_txq.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +-----
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +---
7 files changed, 14 insertions(+), 64 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ef8a928c9170..3a88cdc94128 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5821,31 +5821,12 @@ static int bnxt_get_config(struct bnxt *bp)
static int
bnxt_init_locks(struct bnxt *bp)
{
- int err;
+ pthread_mutex_init(&bp->flow_lock, NULL);
+ pthread_mutex_init(&bp->def_cp_lock, NULL);
+ pthread_mutex_init(&bp->health_check_lock, NULL);
+ pthread_mutex_init(&bp->err_recovery_lock, NULL);
- err = pthread_mutex_init(&bp->flow_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize flow_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->def_cp_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize def_cp_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->health_check_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize health_check_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
- if (err)
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize err_recovery_lock");
-
- return err;
+ return 0;
}
/* This should be called after we have queried trusted VF cap */
@@ -6746,7 +6727,7 @@ static void bnxt_free_rep_info(struct bnxt *bp)
static int bnxt_init_rep_info(struct bnxt *bp)
{
- int i = 0, rc;
+ int i = 0;
if (bp->rep_info)
return 0;
@@ -6770,14 +6751,9 @@ static int bnxt_init_rep_info(struct bnxt *bp)
for (i = 0; i < BNXT_MAX_CFA_CODE; i++)
bp->cfa_code_map[i] = BNXT_VF_IDX_INVALID;
- rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize vfr_start_lock");
- bnxt_free_rep_info(bp);
- return rc;
- }
+ pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- return rc;
+ return 0;
}
static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index c8649359923f..ab561585d771 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -198,11 +198,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
goto err;
}
- rc = pthread_mutex_init(&txq->txq_lock, NULL);
- if (rc != 0) {
- PMD_DRV_LOG_LINE(ERR, "TxQ mutex init failed!");
- goto err;
- }
+ pthread_mutex_init(&txq->txq_lock, NULL);
return 0;
err:
bnxt_tx_queue_release_op(eth_dev, queue_idx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 1bfc88cf79ef..0c03ae7a8349 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -188,7 +188,6 @@ ulp_session_init(struct bnxt *bp,
struct rte_pci_device *pci_dev;
struct rte_pci_addr *pci_addr;
struct bnxt_ulp_session_state *session;
- int rc = 0;
if (!bp)
return NULL;
@@ -215,12 +214,7 @@ ulp_session_init(struct bnxt *bp,
session->pci_info.domain = pci_addr->domain;
session->pci_info.bus = pci_addr->bus;
memcpy(session->dsn, bp->dsn, sizeof(session->dsn));
- rc = pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "mutex create failed\n");
- pthread_mutex_unlock(&bnxt_ulp_global_mutex);
- return NULL;
- }
+ pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
STAILQ_INSERT_TAIL(&bnxt_ulp_session_list,
session, next);
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index fa7e8fe00077..4a1ccfa2a36d 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -1472,11 +1472,7 @@ ulp_tf_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
/* Initialize ulp dparms with values devargs passed */
rc = ulp_tf_dparms_init(bp, bp->ulp_ctx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 6d7ec0ffec79..508c194d0490 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -993,11 +993,7 @@ ulp_tfc_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
rc = ulp_tfc_dparms_init(bp, bp->ulp_ctx, ulp_dev_id);
if (rc) {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 67489b76f390..f9d069f4e17e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -129,11 +129,7 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
ulp_fc_info->fc_ops = fc_ops;
ulp_fc_info->flags = flags;
- rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Failed to initialize fc mutex\n");
- goto error;
- }
+ pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
/* Add the FC info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_fc_info_set(ctxt, ulp_fc_info);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 3c75a6b43721..7b7c10d3602e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -412,11 +412,7 @@ ulp_ha_mgr_init(struct bnxt_ulp_context *ulp_ctx)
/* Add the HA info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_ha_info_set(ulp_ctx, ha_info);
- rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Failed to initialize ha mutex");
- goto cleanup;
- }
+ pthread_mutex_init(&ha_info->ha_lock, NULL);
rc = ulp_ha_mgr_timer_start(ulp_ctx->cfg_data);
if (rc) {
PMD_DRV_LOG_LINE(ERR, "Unable to start timer CB");
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 3/6] common/cnxk: remove check around pthread_mutex_init()
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 1/6] raw/ifpga: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 2/6] net/bnxt: " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 4/6] net/failsafe: " Ariel Otilibili
` (2 subsequent siblings)
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/common/cnxk/roc_bphy_cgx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c
index 4f43605e1031..882cf654743b 100644
--- a/drivers/common/cnxk/roc_bphy_cgx.c
+++ b/drivers/common/cnxk/roc_bphy_cgx.c
@@ -189,14 +189,11 @@ int
roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx)
{
uint64_t val;
- int ret;
if (!roc_cgx || !roc_cgx->bar0_va || !roc_cgx->bar0_pa)
return -EINVAL;
- ret = pthread_mutex_init(&roc_cgx->lock, NULL);
- if (ret)
- return ret;
+ pthread_mutex_init(&roc_cgx->lock, NULL);
val = roc_bphy_cgx_read(roc_cgx, 0, CGX_CMRX_RX_LMACS);
val = FIELD_GET(CGX_CMRX_RX_LMACS_LMACS, val);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 4/6] net/failsafe: remove check around pthread_mutex_init()
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
` (2 preceding siblings ...)
2025-01-12 19:30 ` [PATCH v2 3/6] common/cnxk: " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 5/6] net/hinic: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 6/6] lib/vhost: " Ariel Otilibili
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/failsafe/failsafe.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 32811403b4c8..e1c77cdf4fd1 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -147,11 +147,7 @@ fs_mutex_init(struct fs_priv *priv)
ERROR("Cannot set mutex type - %s", strerror(ret));
return ret;
}
- ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
- if (ret) {
- ERROR("Cannot initiate mutex - %s", strerror(ret));
- return ret;
- }
+ pthread_mutex_init(&priv->hotplug_mutex, &attr);
return 0;
}
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 5/6] net/hinic: remove check around pthread_mutex_init()
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
` (3 preceding siblings ...)
2025-01-12 19:30 ` [PATCH v2 4/6] net/failsafe: " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 6/6] lib/vhost: " Ariel Otilibili
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/hinic/base/hinic_compat.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index ab9d1b9a0214..8f5763fbfc9d 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -200,13 +200,9 @@ static inline u16 ilog2(u32 n)
static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex,
const pthread_mutexattr_t *mattr)
{
- int err;
-
- err = pthread_mutex_init(pthreadmutex, mattr);
- if (unlikely(err))
- PMD_DRV_LOG(ERR, "Fail to initialize mutex, error: %d", err);
+ pthread_mutex_init(pthreadmutex, mattr);
- return err;
+ return 0;
}
static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 6/6] lib/vhost: remove check around pthread_mutex_init()
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
` (4 preceding siblings ...)
2025-01-12 19:30 ` [PATCH v2 5/6] net/hinic: " Ariel Otilibili
@ 2025-01-12 19:30 ` Ariel Otilibili
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 19:30 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
lib/vhost/socket.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index d29d15494c8e..531aa8adc06c 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -498,11 +498,7 @@ vhost_user_reconnect_init(void)
{
int ret;
- ret = pthread_mutex_init(&reconn_list.mutex, NULL);
- if (ret < 0) {
- VHOST_CONFIG_LOG("thread", ERR, "%s: failed to initialize mutex", __func__);
- return ret;
- }
+ pthread_mutex_init(&reconn_list.mutex, NULL);
TAILQ_INIT(&reconn_list.head);
ret = rte_thread_create_internal_control(&reconn_tid, "vhost-reco",
@@ -921,11 +917,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
goto out;
}
TAILQ_INIT(&vsocket->conn_list);
- ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
- if (ret) {
- VHOST_CONFIG_LOG(path, ERR, "failed to init connection mutex");
- goto out_free;
- }
+ pthread_mutex_init(&vsocket->conn_mutex, NULL);
if (!strncmp("/dev/vduse/", path, strlen("/dev/vduse/")))
vsocket->is_vduse = true;
@@ -1034,8 +1026,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
if (pthread_mutex_destroy(&vsocket->conn_mutex)) {
VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
}
-out_free:
- vhost_user_socket_mem_free(vsocket);
out:
pthread_mutex_unlock(&vhost_user.mutex);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 0/6] remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (6 preceding siblings ...)
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 1/6] raw/ifpga: " Ariel Otilibili
` (6 more replies)
2025-01-13 17:19 ` [PATCH 0/1] eal/linux: Remove unused values Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
9 siblings, 7 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Maxime Coquelin, Chenbo Xia, Ziyang Xuan,
Xiaoyun Wang, Gaetan Rivet, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Ajit Khaparde,
Somnath Kotur, Rosen Xu
Hello,
This series addresses Bugzilla ID 1586; the man says
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Meaning, the check around around pthread_mutex_init() is needless.
Thank you,
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
---
v3
* fix style issues
v2 (https://inbox.dpdk.org/dev/20250112193043.67372-1-otilibil@eurecom.fr/)
* fix build issues
v1 (https://inbox.dpdk.org/dev/20250112185842.9752-1-otilibil@eurecom.fr/#t)
Ariel Otilibili (6):
raw/ifpga: remove check around pthread_mutex_init()
net/bnxt: remove check around pthread_mutex_init()
common/cnxk: remove check around pthread_mutex_init()
net/failsafe: remove check around pthread_mutex_init()
net/hinic: remove check around pthread_mutex_init()
lib/vhost: remove check around pthread_mutex_init()
drivers/common/cnxk/roc_bphy_cgx.c | 5 +--
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++---------------
drivers/net/bnxt/bnxt_txq.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +--
drivers/net/failsafe/failsafe.c | 6 +--
drivers/net/hinic/base/hinic_compat.h | 8 +---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +--
drivers/raw/ifpga/base/opae_spi_transaction.c | 7 +---
lib/vhost/socket.c | 14 +------
13 files changed, 22 insertions(+), 101 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 1/6] raw/ifpga: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 2/6] net/bnxt: " Ariel Otilibili
` (5 subsequent siblings)
6 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +----
drivers/raw/ifpga/base/opae_spi_transaction.c | 7 +------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c b/drivers/raw/ifpga/base/opae_intel_max10.c
index d5a9ceb6e355..58c884a8d8e1 100644
--- a/drivers/raw/ifpga/base/opae_intel_max10.c
+++ b/drivers/raw/ifpga/base/opae_intel_max10.c
@@ -1486,10 +1486,7 @@ intel_max10_device_init(struct intel_max10_device *dev)
if (ret)
return ret;
- ret = pthread_mutex_init(&dev->bmc_ops.lock, NULL);
- if (ret)
- return ret;
-
+ pthread_mutex_init(&dev->bmc_ops.lock, NULL);
if (!dev->bmc_ops.mutex)
dev->bmc_ops.mutex = &dev->bmc_ops.lock;
}
diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 21015eb95ef5..14ea93cb43df 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -494,7 +494,6 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
int chipselect)
{
struct spi_transaction_dev *spi_tran_dev;
- int ret;
spi_tran_dev = opae_malloc(sizeof(struct spi_transaction_dev));
if (!spi_tran_dev)
@@ -507,11 +506,7 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
if (!spi_tran_dev->buffer)
goto err;
- ret = pthread_mutex_init(&spi_tran_dev->lock, NULL);
- if (ret) {
- dev_err(spi_tran_dev, "fail to init mutex lock\n");
- goto err;
- }
+ pthread_mutex_init(&spi_tran_dev->lock, NULL);
if (dev->mutex) {
dev_info(NULL, "use multi-process mutex in spi\n");
spi_tran_dev->mutex = dev->mutex;
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 2/6] net/bnxt: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 1/6] raw/ifpga: " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 3/6] common/cnxk: " Ariel Otilibili
` (4 subsequent siblings)
6 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++++--------------------
drivers/net/bnxt/bnxt_txq.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +-----
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +---
7 files changed, 14 insertions(+), 64 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ef8a928c9170..3a88cdc94128 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5821,31 +5821,12 @@ static int bnxt_get_config(struct bnxt *bp)
static int
bnxt_init_locks(struct bnxt *bp)
{
- int err;
+ pthread_mutex_init(&bp->flow_lock, NULL);
+ pthread_mutex_init(&bp->def_cp_lock, NULL);
+ pthread_mutex_init(&bp->health_check_lock, NULL);
+ pthread_mutex_init(&bp->err_recovery_lock, NULL);
- err = pthread_mutex_init(&bp->flow_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize flow_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->def_cp_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize def_cp_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->health_check_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize health_check_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
- if (err)
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize err_recovery_lock");
-
- return err;
+ return 0;
}
/* This should be called after we have queried trusted VF cap */
@@ -6746,7 +6727,7 @@ static void bnxt_free_rep_info(struct bnxt *bp)
static int bnxt_init_rep_info(struct bnxt *bp)
{
- int i = 0, rc;
+ int i = 0;
if (bp->rep_info)
return 0;
@@ -6770,14 +6751,9 @@ static int bnxt_init_rep_info(struct bnxt *bp)
for (i = 0; i < BNXT_MAX_CFA_CODE; i++)
bp->cfa_code_map[i] = BNXT_VF_IDX_INVALID;
- rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize vfr_start_lock");
- bnxt_free_rep_info(bp);
- return rc;
- }
+ pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- return rc;
+ return 0;
}
static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index c8649359923f..ab561585d771 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -198,11 +198,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
goto err;
}
- rc = pthread_mutex_init(&txq->txq_lock, NULL);
- if (rc != 0) {
- PMD_DRV_LOG_LINE(ERR, "TxQ mutex init failed!");
- goto err;
- }
+ pthread_mutex_init(&txq->txq_lock, NULL);
return 0;
err:
bnxt_tx_queue_release_op(eth_dev, queue_idx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 1bfc88cf79ef..0c03ae7a8349 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -188,7 +188,6 @@ ulp_session_init(struct bnxt *bp,
struct rte_pci_device *pci_dev;
struct rte_pci_addr *pci_addr;
struct bnxt_ulp_session_state *session;
- int rc = 0;
if (!bp)
return NULL;
@@ -215,12 +214,7 @@ ulp_session_init(struct bnxt *bp,
session->pci_info.domain = pci_addr->domain;
session->pci_info.bus = pci_addr->bus;
memcpy(session->dsn, bp->dsn, sizeof(session->dsn));
- rc = pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "mutex create failed\n");
- pthread_mutex_unlock(&bnxt_ulp_global_mutex);
- return NULL;
- }
+ pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
STAILQ_INSERT_TAIL(&bnxt_ulp_session_list,
session, next);
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index fa7e8fe00077..4a1ccfa2a36d 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -1472,11 +1472,7 @@ ulp_tf_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
/* Initialize ulp dparms with values devargs passed */
rc = ulp_tf_dparms_init(bp, bp->ulp_ctx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 6d7ec0ffec79..508c194d0490 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -993,11 +993,7 @@ ulp_tfc_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
rc = ulp_tfc_dparms_init(bp, bp->ulp_ctx, ulp_dev_id);
if (rc) {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 67489b76f390..f9d069f4e17e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -129,11 +129,7 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
ulp_fc_info->fc_ops = fc_ops;
ulp_fc_info->flags = flags;
- rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Failed to initialize fc mutex\n");
- goto error;
- }
+ pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
/* Add the FC info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_fc_info_set(ctxt, ulp_fc_info);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 3c75a6b43721..7b7c10d3602e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -412,11 +412,7 @@ ulp_ha_mgr_init(struct bnxt_ulp_context *ulp_ctx)
/* Add the HA info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_ha_info_set(ulp_ctx, ha_info);
- rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Failed to initialize ha mutex");
- goto cleanup;
- }
+ pthread_mutex_init(&ha_info->ha_lock, NULL);
rc = ulp_ha_mgr_timer_start(ulp_ctx->cfg_data);
if (rc) {
PMD_DRV_LOG_LINE(ERR, "Unable to start timer CB");
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 3/6] common/cnxk: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 1/6] raw/ifpga: " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 2/6] net/bnxt: " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 4/6] net/failsafe: " Ariel Otilibili
` (3 subsequent siblings)
6 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/common/cnxk/roc_bphy_cgx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c
index 4f43605e1031..882cf654743b 100644
--- a/drivers/common/cnxk/roc_bphy_cgx.c
+++ b/drivers/common/cnxk/roc_bphy_cgx.c
@@ -189,14 +189,11 @@ int
roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx)
{
uint64_t val;
- int ret;
if (!roc_cgx || !roc_cgx->bar0_va || !roc_cgx->bar0_pa)
return -EINVAL;
- ret = pthread_mutex_init(&roc_cgx->lock, NULL);
- if (ret)
- return ret;
+ pthread_mutex_init(&roc_cgx->lock, NULL);
val = roc_bphy_cgx_read(roc_cgx, 0, CGX_CMRX_RX_LMACS);
val = FIELD_GET(CGX_CMRX_RX_LMACS_LMACS, val);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 4/6] net/failsafe: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
` (2 preceding siblings ...)
2025-01-12 20:20 ` [PATCH v3 3/6] common/cnxk: " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-13 19:10 ` Stephen Hemminger
2025-01-12 20:20 ` [PATCH v3 5/6] net/hinic: " Ariel Otilibili
` (2 subsequent siblings)
6 siblings, 1 reply; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/failsafe/failsafe.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 32811403b4c8..e1c77cdf4fd1 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -147,11 +147,7 @@ fs_mutex_init(struct fs_priv *priv)
ERROR("Cannot set mutex type - %s", strerror(ret));
return ret;
}
- ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
- if (ret) {
- ERROR("Cannot initiate mutex - %s", strerror(ret));
- return ret;
- }
+ pthread_mutex_init(&priv->hotplug_mutex, &attr);
return 0;
}
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 5/6] net/hinic: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
` (3 preceding siblings ...)
2025-01-12 20:20 ` [PATCH v3 4/6] net/failsafe: " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-13 19:09 ` Stephen Hemminger
2025-01-12 20:20 ` [PATCH v3 6/6] lib/vhost: " Ariel Otilibili
2025-01-13 19:11 ` [PATCH v3 0/6] " Stephen Hemminger
6 siblings, 1 reply; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
drivers/net/hinic/base/hinic_compat.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index ab9d1b9a0214..8f5763fbfc9d 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -200,13 +200,9 @@ static inline u16 ilog2(u32 n)
static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex,
const pthread_mutexattr_t *mattr)
{
- int err;
-
- err = pthread_mutex_init(pthreadmutex, mattr);
- if (unlikely(err))
- PMD_DRV_LOG(ERR, "Fail to initialize mutex, error: %d", err);
+ pthread_mutex_init(pthreadmutex, mattr);
- return err;
+ return 0;
}
static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v3 6/6] lib/vhost: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
` (4 preceding siblings ...)
2025-01-12 20:20 ` [PATCH v3 5/6] net/hinic: " Ariel Otilibili
@ 2025-01-12 20:20 ` Ariel Otilibili
2025-01-13 19:11 ` [PATCH v3 0/6] " Stephen Hemminger
6 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-12 20:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Ariel Otilibili
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
---
lib/vhost/socket.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index d29d15494c8e..531aa8adc06c 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -498,11 +498,7 @@ vhost_user_reconnect_init(void)
{
int ret;
- ret = pthread_mutex_init(&reconn_list.mutex, NULL);
- if (ret < 0) {
- VHOST_CONFIG_LOG("thread", ERR, "%s: failed to initialize mutex", __func__);
- return ret;
- }
+ pthread_mutex_init(&reconn_list.mutex, NULL);
TAILQ_INIT(&reconn_list.head);
ret = rte_thread_create_internal_control(&reconn_tid, "vhost-reco",
@@ -921,11 +917,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
goto out;
}
TAILQ_INIT(&vsocket->conn_list);
- ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
- if (ret) {
- VHOST_CONFIG_LOG(path, ERR, "failed to init connection mutex");
- goto out_free;
- }
+ pthread_mutex_init(&vsocket->conn_mutex, NULL);
if (!strncmp("/dev/vduse/", path, strlen("/dev/vduse/")))
vsocket->is_vduse = true;
@@ -1034,8 +1026,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
if (pthread_mutex_destroy(&vsocket->conn_mutex)) {
VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
}
-out_free:
- vhost_user_socket_mem_free(vsocket);
out:
pthread_mutex_unlock(&vhost_user.mutex);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 0/1] eal/linux: Remove unused values
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (7 preceding siblings ...)
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
@ 2025-01-13 17:19 ` Ariel Otilibili
2025-01-13 17:19 ` [PATCH 1/1] " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
9 siblings, 1 reply; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-13 17:19 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Didier Pallard, Edwin Brossette, Olivier Matz,
Thierry Herbelot, stable
Hello,
This patch clears out a static analysis warning.
Your feedback is much appreciated,
Ariel Otilibili (1):
eal/linux: Remove unused values
lib/eal/linux/eal_dev.c | 3 ---
1 file changed, 3 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 1/1] eal/linux: Remove unused values
2025-01-13 17:19 ` [PATCH 0/1] eal/linux: Remove unused values Ariel Otilibili
@ 2025-01-13 17:19 ` Ariel Otilibili
0 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-13 17:19 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Didier Pallard, Edwin Brossette, Olivier Matz,
Thierry Herbelot, stable
Found by static analysis:
In dev_uev_socket_fd_create(), fd is assigned before a return,
and not used.
The same for the variables buf and i in dev_uev_parse().
Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle")
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")
Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
---
lib/eal/linux/eal_dev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index e63f24d108c7..be97f56424de 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -129,7 +129,6 @@ dev_uev_socket_fd_create(void)
return 0;
err:
close(fd);
- fd = -1;
return ret;
}
@@ -165,8 +164,6 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
* uevent from udev.
*/
if (!strncmp(buf, "libudev", 7)) {
- buf += 7;
- i += 7;
return -1;
}
if (!strncmp(buf, "ACTION=", 7)) {
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v3 5/6] net/hinic: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 5/6] net/hinic: " Ariel Otilibili
@ 2025-01-13 19:09 ` Stephen Hemminger
0 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2025-01-13 19:09 UTC (permalink / raw)
To: Ariel Otilibili; +Cc: dev, Thomas Monjalon, David Marchand
On Sun, 12 Jan 2025 21:20:20 +0100
Ariel Otilibili <otilibil@eurecom.fr> wrote:
> diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
> index ab9d1b9a0214..8f5763fbfc9d 100644
> --- a/drivers/net/hinic/base/hinic_compat.h
> +++ b/drivers/net/hinic/base/hinic_compat.h
> @@ -200,13 +200,9 @@ static inline u16 ilog2(u32 n)
> static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex,
> const pthread_mutexattr_t *mattr)
> {
> - int err;
> -
> - err = pthread_mutex_init(pthreadmutex, mattr);
> - if (unlikely(err))
> - PMD_DRV_LOG(ERR, "Fail to initialize mutex, error: %d", err);
> + pthread_mutex_init(pthreadmutex, mattr);
>
> - return err;
> + return 0;
> }
Could be a tail call here, if you want.
return pthread_mutex_init(pthradmutex, mattr);
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v3 4/6] net/failsafe: remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 4/6] net/failsafe: " Ariel Otilibili
@ 2025-01-13 19:10 ` Stephen Hemminger
0 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2025-01-13 19:10 UTC (permalink / raw)
To: Ariel Otilibili; +Cc: dev, Thomas Monjalon, David Marchand
On Sun, 12 Jan 2025 21:20:19 +0100
Ariel Otilibili <otilibil@eurecom.fr> wrote:
> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
> index 32811403b4c8..e1c77cdf4fd1 100644
> --- a/drivers/net/failsafe/failsafe.c
> +++ b/drivers/net/failsafe/failsafe.c
> @@ -147,11 +147,7 @@ fs_mutex_init(struct fs_priv *priv)
> ERROR("Cannot set mutex type - %s", strerror(ret));
> return ret;
> }
> - ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
> - if (ret) {
> - ERROR("Cannot initiate mutex - %s", strerror(ret));
> - return ret;
> - }
> + pthread_mutex_init(&priv->hotplug_mutex, &attr);
> return 0;
Could be a tail call here.
return pthread_mutex_init(&priv->hotplug_mutex, &attr);
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v3 0/6] remove check around pthread_mutex_init()
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
` (5 preceding siblings ...)
2025-01-12 20:20 ` [PATCH v3 6/6] lib/vhost: " Ariel Otilibili
@ 2025-01-13 19:11 ` Stephen Hemminger
2025-01-14 8:22 ` Ariel Otilibili-Anieli
6 siblings, 1 reply; 36+ messages in thread
From: Stephen Hemminger @ 2025-01-13 19:11 UTC (permalink / raw)
To: Ariel Otilibili
Cc: dev, Thomas Monjalon, David Marchand, Maxime Coquelin,
Chenbo Xia, Ziyang Xuan, Xiaoyun Wang, Gaetan Rivet,
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Harman Kalra, Ajit Khaparde, Somnath Kotur, Rosen Xu
On Sun, 12 Jan 2025 21:20:15 +0100
Ariel Otilibili <otilibil@eurecom.fr> wrote:
> Hello,
>
> This series addresses Bugzilla ID 1586; the man says
>
> > pthread_mutex_init always returns 0. The other mutex functions
> > return 0 on success and a non-zero error code on error.
>
> Meaning, the check around around pthread_mutex_init() is needless.
>
> Thank you,
>
> Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
> Bugzilla ID: 1586
LGTM
Series-Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 0/6] remove check around pthread_mutex_init()
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (8 preceding siblings ...)
2025-01-13 17:19 ` [PATCH 0/1] eal/linux: Remove unused values Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 1/6] raw/ifpga: " Ariel Otilibili
` (5 more replies)
9 siblings, 6 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Maxime Coquelin, Chenbo Xia, Ziyang Xuan,
Xiaoyun Wang, Gaetan Rivet, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Ajit Khaparde,
Somnath Kotur, Rosen Xu
Hello,
This series addresses Bugzilla ID 1586; the man says
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Meaning, the check around around pthread_mutex_init() is needless.
```
$ git grep -Pn '=\s?pthread_mutex_init\('
drivers/common/cnxk/roc_bphy_cgx.c:197: ret = pthread_mutex_init(&roc_cgx->lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5826: err = pthread_mutex_init(&bp->flow_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5832: err = pthread_mutex_init(&bp->def_cp_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5838: err = pthread_mutex_init(&bp->health_check_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5844: err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:6773: rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
drivers/net/bnxt/bnxt_txq.c:201: rc = pthread_mutex_init(&txq->txq_lock, NULL);
drivers/net/bnxt/tf_ulp/bnxt_ulp.c:218: rc = pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c:1475: rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c:996: rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c:132: rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c:415: rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
drivers/net/failsafe/failsafe.c:150: ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
drivers/net/hinic/base/hinic_compat.h:205: err = pthread_mutex_init(pthreadmutex, mattr);
drivers/raw/ifpga/base/opae_intel_max10.c:1489: ret = pthread_mutex_init(&dev->bmc_ops.lock, NULL);
drivers/raw/ifpga/base/opae_spi_transaction.c:510: ret = pthread_mutex_init(&spi_tran_dev->lock, NULL);
lib/vhost/socket.c:501: ret = pthread_mutex_init(&reconn_list.mutex, NULL);
lib/vhost/socket.c:924: ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
```
Thank you,
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Series-Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
v4
* addressed feedback, turned returns into tail calls
* reworded the cover letter
v3 (https://inbox.dpdk.org/dev/20250112202021.179634-1-otilibil@eurecom.fr/)
* fix style issues
v2 (https://inbox.dpdk.org/dev/20250112193043.67372-1-otilibil@eurecom.fr/)
* fix build issues
v1 (https://inbox.dpdk.org/dev/20250112185842.9752-1-otilibil@eurecom.fr/#t)
Ariel Otilibili (6):
raw/ifpga: remove check around pthread_mutex_init()
net/bnxt: remove check around pthread_mutex_init()
common/cnxk: remove check around pthread_mutex_init()
net/failsafe: remove check around pthread_mutex_init()
net/hinic: remove check around pthread_mutex_init()
lib/vhost: remove check around pthread_mutex_init()
drivers/common/cnxk/roc_bphy_cgx.c | 5 +--
drivers/net/bnxt/bnxt_ethdev.c | 40 ++++---------------
drivers/net/bnxt/bnxt_txq.c | 7 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +--
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +--
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +--
drivers/net/failsafe/failsafe.c | 8 +---
drivers/net/hinic/base/hinic_compat.h | 8 +---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +--
drivers/raw/ifpga/base/opae_spi_transaction.c | 7 +---
lib/vhost/socket.c | 14 +------
13 files changed, 21 insertions(+), 105 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 1/6] raw/ifpga: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 2/6] net/bnxt: " Ariel Otilibili
` (4 subsequent siblings)
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Rosen Xu
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Cc: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/raw/ifpga/base/opae_intel_max10.c | 5 +----
drivers/raw/ifpga/base/opae_spi_transaction.c | 7 +------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c b/drivers/raw/ifpga/base/opae_intel_max10.c
index d5a9ceb6e355..58c884a8d8e1 100644
--- a/drivers/raw/ifpga/base/opae_intel_max10.c
+++ b/drivers/raw/ifpga/base/opae_intel_max10.c
@@ -1486,10 +1486,7 @@ intel_max10_device_init(struct intel_max10_device *dev)
if (ret)
return ret;
- ret = pthread_mutex_init(&dev->bmc_ops.lock, NULL);
- if (ret)
- return ret;
-
+ pthread_mutex_init(&dev->bmc_ops.lock, NULL);
if (!dev->bmc_ops.mutex)
dev->bmc_ops.mutex = &dev->bmc_ops.lock;
}
diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 21015eb95ef5..14ea93cb43df 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -494,7 +494,6 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
int chipselect)
{
struct spi_transaction_dev *spi_tran_dev;
- int ret;
spi_tran_dev = opae_malloc(sizeof(struct spi_transaction_dev));
if (!spi_tran_dev)
@@ -507,11 +506,7 @@ struct spi_transaction_dev *spi_transaction_init(struct altera_spi_device *dev,
if (!spi_tran_dev->buffer)
goto err;
- ret = pthread_mutex_init(&spi_tran_dev->lock, NULL);
- if (ret) {
- dev_err(spi_tran_dev, "fail to init mutex lock\n");
- goto err;
- }
+ pthread_mutex_init(&spi_tran_dev->lock, NULL);
if (dev->mutex) {
dev_info(NULL, "use multi-process mutex in spi\n");
spi_tran_dev->mutex = dev->mutex;
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 2/6] net/bnxt: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 1/6] raw/ifpga: " Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 3/6] common/cnxk: " Ariel Otilibili
` (3 subsequent siblings)
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Ajit Khaparde, Somnath Kotur
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bnxt/bnxt_ethdev.c | 40 +++++---------------------
drivers/net/bnxt/bnxt_txq.c | 7 +----
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +-----
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +---
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +---
7 files changed, 13 insertions(+), 66 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ef8a928c9170..21e9aa902c68 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5821,31 +5821,12 @@ static int bnxt_get_config(struct bnxt *bp)
static int
bnxt_init_locks(struct bnxt *bp)
{
- int err;
+ pthread_mutex_init(&bp->flow_lock, NULL);
+ pthread_mutex_init(&bp->def_cp_lock, NULL);
+ pthread_mutex_init(&bp->health_check_lock, NULL);
+ pthread_mutex_init(&bp->err_recovery_lock, NULL);
- err = pthread_mutex_init(&bp->flow_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize flow_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->def_cp_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize def_cp_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->health_check_lock, NULL);
- if (err) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize health_check_lock");
- return err;
- }
-
- err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
- if (err)
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize err_recovery_lock");
-
- return err;
+ return 0;
}
/* This should be called after we have queried trusted VF cap */
@@ -6746,7 +6727,7 @@ static void bnxt_free_rep_info(struct bnxt *bp)
static int bnxt_init_rep_info(struct bnxt *bp)
{
- int i = 0, rc;
+ int i = 0;
if (bp->rep_info)
return 0;
@@ -6770,14 +6751,7 @@ static int bnxt_init_rep_info(struct bnxt *bp)
for (i = 0; i < BNXT_MAX_CFA_CODE; i++)
bp->cfa_code_map[i] = BNXT_VF_IDX_INVALID;
- rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Unable to initialize vfr_start_lock");
- bnxt_free_rep_info(bp);
- return rc;
- }
-
- return rc;
+ return pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
}
static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index c8649359923f..3938ebc7091d 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -198,12 +198,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
goto err;
}
- rc = pthread_mutex_init(&txq->txq_lock, NULL);
- if (rc != 0) {
- PMD_DRV_LOG_LINE(ERR, "TxQ mutex init failed!");
- goto err;
- }
- return 0;
+ return pthread_mutex_init(&txq->txq_lock, NULL);
err:
bnxt_tx_queue_release_op(eth_dev, queue_idx);
return rc;
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 1bfc88cf79ef..0c03ae7a8349 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -188,7 +188,6 @@ ulp_session_init(struct bnxt *bp,
struct rte_pci_device *pci_dev;
struct rte_pci_addr *pci_addr;
struct bnxt_ulp_session_state *session;
- int rc = 0;
if (!bp)
return NULL;
@@ -215,12 +214,7 @@ ulp_session_init(struct bnxt *bp,
session->pci_info.domain = pci_addr->domain;
session->pci_info.bus = pci_addr->bus;
memcpy(session->dsn, bp->dsn, sizeof(session->dsn));
- rc = pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "mutex create failed\n");
- pthread_mutex_unlock(&bnxt_ulp_global_mutex);
- return NULL;
- }
+ pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
STAILQ_INSERT_TAIL(&bnxt_ulp_session_list,
session, next);
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index fa7e8fe00077..4a1ccfa2a36d 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -1472,11 +1472,7 @@ ulp_tf_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
/* Initialize ulp dparms with values devargs passed */
rc = ulp_tf_dparms_init(bp, bp->ulp_ctx);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 6d7ec0ffec79..508c194d0490 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -993,11 +993,7 @@ ulp_tfc_init(struct bnxt *bp,
goto jump_to_error;
}
- rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Unable to initialize flow db lock\n");
- goto jump_to_error;
- }
+ pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
rc = ulp_tfc_dparms_init(bp, bp->ulp_ctx, ulp_dev_id);
if (rc) {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 67489b76f390..f9d069f4e17e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -129,11 +129,7 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
ulp_fc_info->fc_ops = fc_ops;
ulp_fc_info->flags = flags;
- rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
- if (rc) {
- BNXT_DRV_DBG(ERR, "Failed to initialize fc mutex\n");
- goto error;
- }
+ pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
/* Add the FC info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_fc_info_set(ctxt, ulp_fc_info);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 3c75a6b43721..7b7c10d3602e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -412,11 +412,7 @@ ulp_ha_mgr_init(struct bnxt_ulp_context *ulp_ctx)
/* Add the HA info tbl to the ulp context. */
bnxt_ulp_cntxt_ptr2_ha_info_set(ulp_ctx, ha_info);
- rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
- if (rc) {
- PMD_DRV_LOG_LINE(ERR, "Failed to initialize ha mutex");
- goto cleanup;
- }
+ pthread_mutex_init(&ha_info->ha_lock, NULL);
rc = ulp_ha_mgr_timer_start(ulp_ctx->cfg_data);
if (rc) {
PMD_DRV_LOG_LINE(ERR, "Unable to start timer CB");
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 3/6] common/cnxk: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 1/6] raw/ifpga: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 2/6] net/bnxt: " Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 4/6] net/failsafe: " Ariel Otilibili
` (2 subsequent siblings)
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>
Cc: Kiran Kumar K <kirankumark@marvell.com>
Cc: Sunil Kumar Kori <skori@marvell.com>
Cc: Satha Rao <skoteshwar@marvell.com>
Cc: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/cnxk/roc_bphy_cgx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c
index 4f43605e1031..882cf654743b 100644
--- a/drivers/common/cnxk/roc_bphy_cgx.c
+++ b/drivers/common/cnxk/roc_bphy_cgx.c
@@ -189,14 +189,11 @@ int
roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx)
{
uint64_t val;
- int ret;
if (!roc_cgx || !roc_cgx->bar0_va || !roc_cgx->bar0_pa)
return -EINVAL;
- ret = pthread_mutex_init(&roc_cgx->lock, NULL);
- if (ret)
- return ret;
+ pthread_mutex_init(&roc_cgx->lock, NULL);
val = roc_bphy_cgx_read(roc_cgx, 0, CGX_CMRX_RX_LMACS);
val = FIELD_GET(CGX_CMRX_RX_LMACS_LMACS, val);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 4/6] net/failsafe: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (2 preceding siblings ...)
2025-01-14 7:50 ` [PATCH v4 3/6] common/cnxk: " Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 5/6] net/hinic: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 6/6] lib/vhost: " Ariel Otilibili
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Gaetan Rivet
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Cc: Gaetan Rivet <grive@u256.net>
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/failsafe/failsafe.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 32811403b4c8..3e590d38f71a 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -147,12 +147,8 @@ fs_mutex_init(struct fs_priv *priv)
ERROR("Cannot set mutex type - %s", strerror(ret));
return ret;
}
- ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
- if (ret) {
- ERROR("Cannot initiate mutex - %s", strerror(ret));
- return ret;
- }
- return 0;
+
+ return pthread_mutex_init(&priv->hotplug_mutex, &attr);
}
static int
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 5/6] net/hinic: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (3 preceding siblings ...)
2025-01-14 7:50 ` [PATCH v4 4/6] net/failsafe: " Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 6/6] lib/vhost: " Ariel Otilibili
5 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Ziyang Xuan, Xiaoyun Wang
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Cc: Ziyang Xuan <xuanziyang2@huawei.com>
Cc: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/hinic/base/hinic_compat.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index ab9d1b9a0214..d3994c50e939 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -200,13 +200,7 @@ static inline u16 ilog2(u32 n)
static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex,
const pthread_mutexattr_t *mattr)
{
- int err;
-
- err = pthread_mutex_init(pthreadmutex, mattr);
- if (unlikely(err))
- PMD_DRV_LOG(ERR, "Fail to initialize mutex, error: %d", err);
-
- return err;
+ return pthread_mutex_init(pthreadmutex, mattr);
}
static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v4 6/6] lib/vhost: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
` (4 preceding siblings ...)
2025-01-14 7:50 ` [PATCH v4 5/6] net/hinic: " Ariel Otilibili
@ 2025-01-14 7:50 ` Ariel Otilibili
2025-01-14 8:48 ` Maxime Coquelin
5 siblings, 1 reply; 36+ messages in thread
From: Ariel Otilibili @ 2025-01-14 7:50 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Maxime Coquelin, Chenbo Xia
> pthread_mutex_init always returns 0. The other mutex functions
> return 0 on success and a non-zero error code on error.
Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
Bugzilla ID: 1586
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Chenbo Xia <chenbox@nvidia.com>
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/vhost/socket.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index d29d15494c8e..531aa8adc06c 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -498,11 +498,7 @@ vhost_user_reconnect_init(void)
{
int ret;
- ret = pthread_mutex_init(&reconn_list.mutex, NULL);
- if (ret < 0) {
- VHOST_CONFIG_LOG("thread", ERR, "%s: failed to initialize mutex", __func__);
- return ret;
- }
+ pthread_mutex_init(&reconn_list.mutex, NULL);
TAILQ_INIT(&reconn_list.head);
ret = rte_thread_create_internal_control(&reconn_tid, "vhost-reco",
@@ -921,11 +917,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
goto out;
}
TAILQ_INIT(&vsocket->conn_list);
- ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
- if (ret) {
- VHOST_CONFIG_LOG(path, ERR, "failed to init connection mutex");
- goto out_free;
- }
+ pthread_mutex_init(&vsocket->conn_mutex, NULL);
if (!strncmp("/dev/vduse/", path, strlen("/dev/vduse/")))
vsocket->is_vduse = true;
@@ -1034,8 +1026,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
if (pthread_mutex_destroy(&vsocket->conn_mutex)) {
VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
}
-out_free:
- vhost_user_socket_mem_free(vsocket);
out:
pthread_mutex_unlock(&vhost_user.mutex);
--
2.30.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v3 0/6] remove check around pthread_mutex_init()
2025-01-13 19:11 ` [PATCH v3 0/6] " Stephen Hemminger
@ 2025-01-14 8:22 ` Ariel Otilibili-Anieli
0 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili-Anieli @ 2025-01-14 8:22 UTC (permalink / raw)
To: Stephen Hemminger
Cc: dev, Thomas Monjalon, David Marchand, Maxime Coquelin,
Chenbo Xia, Ziyang Xuan, Xiaoyun Wang, Gaetan Rivet,
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Harman Kalra, Ajit Khaparde, Somnath Kotur, Rosen Xu
Hi Stephen,
On Monday, January 13, 2025 20:11 CET, Stephen Hemminger <stephen@networkplumber.org> wrote:
> On Sun, 12 Jan 2025 21:20:15 +0100
> Ariel Otilibili <otilibil@eurecom.fr> wrote:
>
>
>
> LGTM
> Series-Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Thanks for having looked into the series. Herewith a new version, I addressed your feedback,
https://inbox.dpdk.org/dev/20250114075033.2027286-1-otilibil@eurecom.fr/
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v4 6/6] lib/vhost: remove check around pthread_mutex_init()
2025-01-14 7:50 ` [PATCH v4 6/6] lib/vhost: " Ariel Otilibili
@ 2025-01-14 8:48 ` Maxime Coquelin
2025-01-14 11:03 ` Ariel Otilibili-Anieli
0 siblings, 1 reply; 36+ messages in thread
From: Maxime Coquelin @ 2025-01-14 8:48 UTC (permalink / raw)
To: Ariel Otilibili, dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand, Chenbo Xia
On 1/14/25 8:50 AM, Ariel Otilibili wrote:
>> pthread_mutex_init always returns 0. The other mutex functions
>> return 0 on success and a non-zero error code on error.
>
> Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html
> Bugzilla ID: 1586
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Cc: Chenbo Xia <chenbox@nvidia.com>
> Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> lib/vhost/socket.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
> index d29d15494c8e..531aa8adc06c 100644
> --- a/lib/vhost/socket.c
> +++ b/lib/vhost/socket.c
> @@ -498,11 +498,7 @@ vhost_user_reconnect_init(void)
> {
> int ret;
>
> - ret = pthread_mutex_init(&reconn_list.mutex, NULL);
> - if (ret < 0) {
> - VHOST_CONFIG_LOG("thread", ERR, "%s: failed to initialize mutex", __func__);
> - return ret;
> - }
> + pthread_mutex_init(&reconn_list.mutex, NULL);
> TAILQ_INIT(&reconn_list.head);
>
> ret = rte_thread_create_internal_control(&reconn_tid, "vhost-reco",
> @@ -921,11 +917,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
> goto out;
> }
> TAILQ_INIT(&vsocket->conn_list);
> - ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
> - if (ret) {
> - VHOST_CONFIG_LOG(path, ERR, "failed to init connection mutex");
> - goto out_free;
> - }
> + pthread_mutex_init(&vsocket->conn_mutex, NULL);
>
> if (!strncmp("/dev/vduse/", path, strlen("/dev/vduse/")))
> vsocket->is_vduse = true;
> @@ -1034,8 +1026,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
> if (pthread_mutex_destroy(&vsocket->conn_mutex)) {
> VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
> }
> -out_free:
> - vhost_user_socket_mem_free(vsocket);
> out:
> pthread_mutex_unlock(&vhost_user.mutex);
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v4 6/6] lib/vhost: remove check around pthread_mutex_init()
2025-01-14 8:48 ` Maxime Coquelin
@ 2025-01-14 11:03 ` Ariel Otilibili-Anieli
0 siblings, 0 replies; 36+ messages in thread
From: Ariel Otilibili-Anieli @ 2025-01-14 11:03 UTC (permalink / raw)
To: Maxime Coquelin
Cc: dev, Stephen Hemminger, Thomas Monjalon, David Marchand, Chenbo Xia
Hello Maxime,
On Tuesday, January 14, 2025 09:48 CET, Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
>
>
> On 1/14/25 8:50 AM, Ariel Otilibili wrote:
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
Thanks!
Have a good day,
Ariel
> Thanks,
> Maxime
>
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2025-01-14 11:03 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-12 18:58 [PATCH 0/6] remove check around pthread_mutex_init() Ariel Otilibili
2025-01-12 18:58 ` [PATCH 1/6] raw/ifpga: " Ariel Otilibili
2025-01-12 18:58 ` [PATCH 2/6] net/bnxt: " Ariel Otilibili
2025-01-12 18:58 ` [PATCH 3/6] common/cnxk: " Ariel Otilibili
2025-01-12 18:58 ` [PATCH 4/6] net/failsafe: " Ariel Otilibili
2025-01-12 18:58 ` [PATCH 5/6] net/hinic: " Ariel Otilibili
2025-01-12 18:58 ` [PATCH 6/6] lib/vhost: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 0/6] " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 1/6] raw/ifpga: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 2/6] net/bnxt: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 3/6] common/cnxk: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 4/6] net/failsafe: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 5/6] net/hinic: " Ariel Otilibili
2025-01-12 19:30 ` [PATCH v2 6/6] lib/vhost: " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 0/6] " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 1/6] raw/ifpga: " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 2/6] net/bnxt: " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 3/6] common/cnxk: " Ariel Otilibili
2025-01-12 20:20 ` [PATCH v3 4/6] net/failsafe: " Ariel Otilibili
2025-01-13 19:10 ` Stephen Hemminger
2025-01-12 20:20 ` [PATCH v3 5/6] net/hinic: " Ariel Otilibili
2025-01-13 19:09 ` Stephen Hemminger
2025-01-12 20:20 ` [PATCH v3 6/6] lib/vhost: " Ariel Otilibili
2025-01-13 19:11 ` [PATCH v3 0/6] " Stephen Hemminger
2025-01-14 8:22 ` Ariel Otilibili-Anieli
2025-01-13 17:19 ` [PATCH 0/1] eal/linux: Remove unused values Ariel Otilibili
2025-01-13 17:19 ` [PATCH 1/1] " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 0/6] remove check around pthread_mutex_init() Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 1/6] raw/ifpga: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 2/6] net/bnxt: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 3/6] common/cnxk: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 4/6] net/failsafe: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 5/6] net/hinic: " Ariel Otilibili
2025-01-14 7:50 ` [PATCH v4 6/6] lib/vhost: " Ariel Otilibili
2025-01-14 8:48 ` Maxime Coquelin
2025-01-14 11:03 ` Ariel Otilibili-Anieli
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).