* [dpdk-stable] [PATCH 1/8] net/mlx4: fix Tx packet drop application report
[not found] <1511871570-16826-1-git-send-email-matan@mellanox.com>
@ 2017-11-28 12:19 ` Matan Azrad
2017-12-06 10:57 ` Adrien Mazarguil
[not found] ` <1512571693-15338-1-git-send-email-matan@mellanox.com>
1 sibling, 1 reply; 4+ messages in thread
From: Matan Azrad @ 2017-11-28 12:19 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, stable
When invalid lkey is sent to HW, HW sends an error notification in
completion function.
The previous code wouldn't crash but doesn't add any application report
in case of completion error, so application cannot know that packet
actually was dropped in case of invalid lkey.
Return back the lkey validation to Tx path.
Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx4/mlx4_rxtx.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index 2bfa8b1..0d008ed 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -468,7 +468,6 @@ struct pv {
/* Memory region key (big endian) for this memory pool. */
lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(sbuf));
dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
/* Calculate the needed work queue entry size for this packet */
if (unlikely(dseg->lkey == rte_cpu_to_be_32((uint32_t)-1))) {
/* MR does not exist. */
@@ -486,7 +485,6 @@ struct pv {
(sq->head & sq->txbb_cnt) ? 0 : 1);
return -1;
}
-#endif /* NDEBUG */
if (likely(sbuf->data_len)) {
byte_count = rte_cpu_to_be_32(sbuf->data_len);
} else {
@@ -636,7 +634,6 @@ struct pv {
/* Memory region key (big endian). */
lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(buf));
dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
if (unlikely(dseg->lkey ==
rte_cpu_to_be_32((uint32_t)-1))) {
/* MR does not exist. */
@@ -655,7 +652,6 @@ struct pv {
elt->buf = NULL;
break;
}
-#endif /* NDEBUG */
/* Never be TXBB aligned, no need compiler barrier. */
dseg->byte_count = rte_cpu_to_be_32(buf->data_len);
/* Fill the control parameters for this packet. */
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [PATCH 1/8] net/mlx4: fix Tx packet drop application report
2017-11-28 12:19 ` [dpdk-stable] [PATCH 1/8] net/mlx4: fix Tx packet drop application report Matan Azrad
@ 2017-12-06 10:57 ` Adrien Mazarguil
0 siblings, 0 replies; 4+ messages in thread
From: Adrien Mazarguil @ 2017-12-06 10:57 UTC (permalink / raw)
To: Matan Azrad; +Cc: dev, stable
On Tue, Nov 28, 2017 at 12:19:23PM +0000, Matan Azrad wrote:
> When invalid lkey is sent to HW, HW sends an error notification in
> completion function.
>
> The previous code wouldn't crash but doesn't add any application report
> in case of completion error, so application cannot know that packet
> actually was dropped in case of invalid lkey.
>
> Return back the lkey validation to Tx path.
>
> Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path")
> Cc: stable@dpdk.org
>
> Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v2 1/8] net/mlx4: fix Tx packet drop application report
[not found] ` <1512571693-15338-1-git-send-email-matan@mellanox.com>
@ 2017-12-06 14:48 ` Matan Azrad
[not found] ` <1512583076-5592-1-git-send-email-matan@mellanox.com>
1 sibling, 0 replies; 4+ messages in thread
From: Matan Azrad @ 2017-12-06 14:48 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, stable
When invalid lkey is sent to HW, HW sends an error notification in
completion function.
The previous code wouldn't crash but doesn't add any application report
in case of completion error, so application cannot know that packet
actually was dropped in case of invalid lkey.
Return back the lkey validation to Tx path.
Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx4/mlx4_rxtx.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index 2bfa8b1..0d008ed 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -468,7 +468,6 @@ struct pv {
/* Memory region key (big endian) for this memory pool. */
lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(sbuf));
dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
/* Calculate the needed work queue entry size for this packet */
if (unlikely(dseg->lkey == rte_cpu_to_be_32((uint32_t)-1))) {
/* MR does not exist. */
@@ -486,7 +485,6 @@ struct pv {
(sq->head & sq->txbb_cnt) ? 0 : 1);
return -1;
}
-#endif /* NDEBUG */
if (likely(sbuf->data_len)) {
byte_count = rte_cpu_to_be_32(sbuf->data_len);
} else {
@@ -636,7 +634,6 @@ struct pv {
/* Memory region key (big endian). */
lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(buf));
dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
if (unlikely(dseg->lkey ==
rte_cpu_to_be_32((uint32_t)-1))) {
/* MR does not exist. */
@@ -655,7 +652,6 @@ struct pv {
elt->buf = NULL;
break;
}
-#endif /* NDEBUG */
/* Never be TXBB aligned, no need compiler barrier. */
dseg->byte_count = rte_cpu_to_be_32(buf->data_len);
/* Fill the control parameters for this packet. */
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v3 1/8] net/mlx4: fix Tx packet drop application report
[not found] ` <1512583076-5592-1-git-send-email-matan@mellanox.com>
@ 2017-12-06 17:57 ` Matan Azrad
0 siblings, 0 replies; 4+ messages in thread
From: Matan Azrad @ 2017-12-06 17:57 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, stable
When invalid lkey is sent to HW, HW sends an error notification in
completion function.
The previous code wouldn't crash but doesn't add any application report
in case of completion error, so application cannot know that packet
actually was dropped in case of invalid lkey.
Return back the lkey validation to Tx path.
Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx4/mlx4_rxtx.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index 2bfa8b1..0d008ed 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -468,7 +468,6 @@ struct pv {
/* Memory region key (big endian) for this memory pool. */
lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(sbuf));
dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
/* Calculate the needed work queue entry size for this packet */
if (unlikely(dseg->lkey == rte_cpu_to_be_32((uint32_t)-1))) {
/* MR does not exist. */
@@ -486,7 +485,6 @@ struct pv {
(sq->head & sq->txbb_cnt) ? 0 : 1);
return -1;
}
-#endif /* NDEBUG */
if (likely(sbuf->data_len)) {
byte_count = rte_cpu_to_be_32(sbuf->data_len);
} else {
@@ -636,7 +634,6 @@ struct pv {
/* Memory region key (big endian). */
lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(buf));
dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
if (unlikely(dseg->lkey ==
rte_cpu_to_be_32((uint32_t)-1))) {
/* MR does not exist. */
@@ -655,7 +652,6 @@ struct pv {
elt->buf = NULL;
break;
}
-#endif /* NDEBUG */
/* Never be TXBB aligned, no need compiler barrier. */
dseg->byte_count = rte_cpu_to_be_32(buf->data_len);
/* Fill the control parameters for this packet. */
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-06 17:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1511871570-16826-1-git-send-email-matan@mellanox.com>
2017-11-28 12:19 ` [dpdk-stable] [PATCH 1/8] net/mlx4: fix Tx packet drop application report Matan Azrad
2017-12-06 10:57 ` Adrien Mazarguil
[not found] ` <1512571693-15338-1-git-send-email-matan@mellanox.com>
2017-12-06 14:48 ` [dpdk-stable] [PATCH v2 " Matan Azrad
[not found] ` <1512583076-5592-1-git-send-email-matan@mellanox.com>
2017-12-06 17:57 ` [dpdk-stable] [PATCH v3 " Matan Azrad
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).