* [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len
[not found] <20230302202211.170017-1-hernan.vargas@intel.com>
@ 2023-03-02 20:21 ` Hernan Vargas
2023-03-06 13:17 ` Maxime Coquelin
2023-03-02 20:21 ` [PATCH v3 02/17] test/bbdev: extend HARQ tolerance Hernan Vargas
2023-03-02 20:21 ` [PATCH v3 03/17] test/bbdev: remove check for invalid opaque data Hernan Vargas
2 siblings, 1 reply; 4+ messages in thread
From: Hernan Vargas @ 2023-03-02 20:21 UTC (permalink / raw)
To: dev, gakhil, trix, maxime.coquelin
Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Fix segmentation fault happening in corner case in test-bbdev.
This fault could happen when running some specific vectors which size
are not supported by the PMD.
Fixes: 335c11fd276 ("app/bbdev: support HARQ validation")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 45e1780df772..027f32cbf1b7 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -84,7 +84,7 @@
/* Increment for next code block in external HARQ memory */
#define HARQ_INCR 32768
/* Headroom for filler LLRs insertion in HARQ buffer */
-#define FILLER_HEADROOM 1024
+#define FILLER_HEADROOM 2048
/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */
#define N_ZC_1 66 /* N = 66 Zc for BG 1 */
#define N_ZC_2 50 /* N = 50 Zc for BG 2 */
@@ -2111,9 +2111,9 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
ops_ld->n_filler;
if (data_len > deRmOutSize)
data_len = deRmOutSize;
- if (data_len > orig_op->segments[i].length)
- data_len = orig_op->segments[i].length;
}
+ if (data_len > orig_op->segments[i].length)
+ data_len = orig_op->segments[i].length;
/*
* HARQ output can have minor differences
* due to integer representation and related scaling
--
2.37.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 02/17] test/bbdev: extend HARQ tolerance
[not found] <20230302202211.170017-1-hernan.vargas@intel.com>
2023-03-02 20:21 ` [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len Hernan Vargas
@ 2023-03-02 20:21 ` Hernan Vargas
2023-03-02 20:21 ` [PATCH v3 03/17] test/bbdev: remove check for invalid opaque data Hernan Vargas
2 siblings, 0 replies; 4+ messages in thread
From: Hernan Vargas @ 2023-03-02 20:21 UTC (permalink / raw)
To: dev, gakhil, trix, maxime.coquelin
Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
HARQ memory implementation could have different size assumptions.
Extending HARQ tolerance to cover different implementations.
Fixes: 335c11fd276 ("app/bbdev: support HARQ validation")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 027f32cbf1b7..74e7e1394092 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -95,6 +95,7 @@
#define K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
#define K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
+#define HARQ_MEM_TOLERANCE 256
static struct test_bbdev_vector test_vector;
/* Switch between PMD and Interrupt for throughput TC */
@@ -2090,13 +2091,17 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
uint16_t data_len = rte_pktmbuf_data_len(m) - offset;
total_data_size += orig_op->segments[i].length;
- TEST_ASSERT(orig_op->segments[i].length <
- (uint32_t)(data_len + 64),
+ TEST_ASSERT(orig_op->segments[i].length < (uint32_t)(data_len + HARQ_MEM_TOLERANCE),
"Length of segment differ in original (%u) and filled (%u) op",
orig_op->segments[i].length, data_len);
harq_orig = (int8_t *) orig_op->segments[i].addr;
harq_out = rte_pktmbuf_mtod_offset(m, int8_t *, offset);
+ /* Cannot compare HARQ output data for such cases */
+ if ((ldpc_llr_decimals > 1) && ((ops_ld->op_flags & RTE_BBDEV_LDPC_LLR_COMPRESSION)
+ || (ops_ld->op_flags & RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION)))
+ break;
+
if (!(ldpc_cap_flags &
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_FILLERS
) || (ops_ld->op_flags &
@@ -2172,7 +2177,7 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
/* Validate total mbuf pkt length */
uint32_t pkt_len = rte_pktmbuf_pkt_len(op->data) - op->offset;
- TEST_ASSERT(total_data_size < pkt_len + 64,
+ TEST_ASSERT(total_data_size < pkt_len + HARQ_MEM_TOLERANCE,
"Length of data differ in original (%u) and filled (%u) op",
total_data_size, pkt_len);
--
2.37.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 03/17] test/bbdev: remove check for invalid opaque data
[not found] <20230302202211.170017-1-hernan.vargas@intel.com>
2023-03-02 20:21 ` [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len Hernan Vargas
2023-03-02 20:21 ` [PATCH v3 02/17] test/bbdev: extend HARQ tolerance Hernan Vargas
@ 2023-03-02 20:21 ` Hernan Vargas
2 siblings, 0 replies; 4+ messages in thread
From: Hernan Vargas @ 2023-03-02 20:21 UTC (permalink / raw)
To: dev, gakhil, trix, maxime.coquelin
Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Assert also if the opaque data is invalid.
Fixes: 335c11fd276 ("app/bbdev: support HARQ validation")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 74e7e1394092..95d63a3548f5 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -78,7 +78,6 @@
#define SYNC_WAIT 0
#define SYNC_START 1
-#define INVALID_OPAQUE -1
#define INVALID_QUEUE_ID -1
/* Increment for next code block in external HARQ memory */
@@ -1951,10 +1950,9 @@ check_enc_status_and_ordering(struct rte_bbdev_enc_op *op,
"op_status (%d) != expected_status (%d)",
op->status, expected_status);
- if (op->opaque_data != (void *)(uintptr_t)INVALID_OPAQUE)
- TEST_ASSERT((void *)(uintptr_t)order_idx == op->opaque_data,
- "Ordering error, expected %p, got %p",
- (void *)(uintptr_t)order_idx, op->opaque_data);
+ TEST_ASSERT((void *)(uintptr_t)order_idx == op->opaque_data,
+ "Ordering error, expected %p, got %p",
+ (void *)(uintptr_t)order_idx, op->opaque_data);
return TEST_SUCCESS;
}
--
2.37.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len
2023-03-02 20:21 ` [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len Hernan Vargas
@ 2023-03-06 13:17 ` Maxime Coquelin
0 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2023-03-06 13:17 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
On 3/2/23 21:21, Hernan Vargas wrote:
> Fix segmentation fault happening in corner case in test-bbdev.
> This fault could happen when running some specific vectors which size
> are not supported by the PMD.
>
> Fixes: 335c11fd276 ("app/bbdev: support HARQ validation")
The Fixes tag is still wrong, the SHA-1 should be 12 chars.
I'll fix it when applying
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 45e1780df772..027f32cbf1b7 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -84,7 +84,7 @@
> /* Increment for next code block in external HARQ memory */
> #define HARQ_INCR 32768
> /* Headroom for filler LLRs insertion in HARQ buffer */
> -#define FILLER_HEADROOM 1024
> +#define FILLER_HEADROOM 2048
> /* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */
> #define N_ZC_1 66 /* N = 66 Zc for BG 1 */
> #define N_ZC_2 50 /* N = 50 Zc for BG 2 */
> @@ -2111,9 +2111,9 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
> ops_ld->n_filler;
> if (data_len > deRmOutSize)
> data_len = deRmOutSize;
> - if (data_len > orig_op->segments[i].length)
> - data_len = orig_op->segments[i].length;
> }
> + if (data_len > orig_op->segments[i].length)
> + data_len = orig_op->segments[i].length;
> /*
> * HARQ output can have minor differences
> * due to integer representation and related scaling
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-06 13:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230302202211.170017-1-hernan.vargas@intel.com>
2023-03-02 20:21 ` [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len Hernan Vargas
2023-03-06 13:17 ` Maxime Coquelin
2023-03-02 20:21 ` [PATCH v3 02/17] test/bbdev: extend HARQ tolerance Hernan Vargas
2023-03-02 20:21 ` [PATCH v3 03/17] test/bbdev: remove check for invalid opaque data Hernan Vargas
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).