* [dpdk-dev] [PATCH] net/bonding: check dequeue result before proceeding
@ 2018-01-22 16:43 Radu Nicolau
2018-01-23 17:43 ` Mcnamara, John
2018-01-24 13:11 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
0 siblings, 2 replies; 4+ messages in thread
From: Radu Nicolau @ 2018-01-22 16:43 UTC (permalink / raw)
To: dev
Cc: marko.kovacevic, john.mcnamara, declan.doherty, ferruh.yigit,
Radu Nicolau
Fixes Coverity issue 257015
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 158f3aa..cc06ff4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1435,17 +1435,17 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
if (likely(rte_ring_empty(port->tx_ring)))
continue;
- rte_ring_dequeue(port->tx_ring, (void **)&ctrl_pkt);
-
- slave_tx_count = rte_eth_tx_burst(slave_port_ids[i],
+ if (rte_ring_dequeue(port->tx_ring,
+ (void **)&ctrl_pkt) != -ENOENT) {
+ slave_tx_count = rte_eth_tx_burst(slave_port_ids[i],
bd_tx_q->queue_id, &ctrl_pkt, 1);
-
- /*
- * re-enqueue LAG control plane packets to buffering
- * ring if transmission fails so the packet isn't lost.
- */
- if (slave_tx_count != 1)
- rte_ring_enqueue(port->tx_ring, ctrl_pkt);
+ /*
+ * re-enqueue LAG control plane packets to buffering
+ * ring if transmission fails so the packet isn't lost.
+ */
+ if (slave_tx_count != 1)
+ rte_ring_enqueue(port->tx_ring, ctrl_pkt);
+ }
}
return total_tx_count;
--
2.7.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/bonding: check dequeue result before proceeding
2018-01-22 16:43 [dpdk-dev] [PATCH] net/bonding: check dequeue result before proceeding Radu Nicolau
@ 2018-01-23 17:43 ` Mcnamara, John
2018-01-24 13:11 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
1 sibling, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2018-01-23 17:43 UTC (permalink / raw)
To: Nicolau, Radu, dev; +Cc: Kovacevic, Marko, Doherty, Declan, Yigit, Ferruh
> -----Original Message-----
> From: Nicolau, Radu
> Sent: Monday, January 22, 2018 4:44 PM
> To: dev@dpdk.org
> Cc: Kovacevic, Marko <marko.kovacevic@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> Yigit, Ferruh <ferruh.yigit@intel.com>; Nicolau, Radu
> <radu.nicolau@intel.com>
> Subject: [PATCH] net/bonding: check dequeue result before proceeding
>
> Fixes Coverity issue 257015
>
Hi Radu,
You should also include the fixes line in the commit message and CC stable@dpdk.org as well:
Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Coverity issue: 257015
Cc: stable@dpdk.org
John
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] net/bonding: check dequeue result before proceeding
2018-01-22 16:43 [dpdk-dev] [PATCH] net/bonding: check dequeue result before proceeding Radu Nicolau
2018-01-23 17:43 ` Mcnamara, John
@ 2018-01-24 13:11 ` Radu Nicolau
2018-01-25 14:21 ` Ferruh Yigit
1 sibling, 1 reply; 4+ messages in thread
From: Radu Nicolau @ 2018-01-24 13:11 UTC (permalink / raw)
To: dev
Cc: marko.kovacevic, john.mcnamara, declan.doherty, ferruh.yigit,
Radu Nicolau, stable
Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Coverity issue: 257015
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: updated commit message
drivers/net/bonding/rte_eth_bond_pmd.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 158f3aa..cc06ff4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1435,17 +1435,17 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
if (likely(rte_ring_empty(port->tx_ring)))
continue;
- rte_ring_dequeue(port->tx_ring, (void **)&ctrl_pkt);
-
- slave_tx_count = rte_eth_tx_burst(slave_port_ids[i],
+ if (rte_ring_dequeue(port->tx_ring,
+ (void **)&ctrl_pkt) != -ENOENT) {
+ slave_tx_count = rte_eth_tx_burst(slave_port_ids[i],
bd_tx_q->queue_id, &ctrl_pkt, 1);
-
- /*
- * re-enqueue LAG control plane packets to buffering
- * ring if transmission fails so the packet isn't lost.
- */
- if (slave_tx_count != 1)
- rte_ring_enqueue(port->tx_ring, ctrl_pkt);
+ /*
+ * re-enqueue LAG control plane packets to buffering
+ * ring if transmission fails so the packet isn't lost.
+ */
+ if (slave_tx_count != 1)
+ rte_ring_enqueue(port->tx_ring, ctrl_pkt);
+ }
}
return total_tx_count;
--
2.7.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/bonding: check dequeue result before proceeding
2018-01-24 13:11 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
@ 2018-01-25 14:21 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2018-01-25 14:21 UTC (permalink / raw)
To: Radu Nicolau, dev; +Cc: marko.kovacevic, john.mcnamara, declan.doherty, stable
On 1/24/2018 1:11 PM, Radu Nicolau wrote:
> Coverity issue: 257015
> Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-25 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 16:43 [dpdk-dev] [PATCH] net/bonding: check dequeue result before proceeding Radu Nicolau
2018-01-23 17:43 ` Mcnamara, John
2018-01-24 13:11 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2018-01-25 14:21 ` Ferruh Yigit
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).