diff mbox series

[v1,3/5] baseband/fpga_5gnr_fec: add check for HARQ input length

Message ID 20220509201734.946900-4-hernan.vargas@intel.com (mailing list archive)
State Superseded
Delegated to: akhil goyal
Headers show
Series baseband/fpga_5gnr: maintenance changes to fpga_5gnr PMD | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Vargas, Hernan May 9, 2022, 8:17 p.m. UTC
Add new case DESC_ERR_HARQ_INPUT_LEN to check for valid HARQ input
length.

Signed-off-by: Hernan <hernan.vargas@intel.com>
---
 drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h     | 1 +
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 3 +++
 2 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h b/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
index 993cf61974..e3038112fa 100644
--- a/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
+++ b/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
@@ -107,6 +107,7 @@  enum {
 	DESC_ERR_DESC_READ_FAIL = 0x8,
 	DESC_ERR_DESC_READ_TIMEOUT = 0x9,
 	DESC_ERR_DESC_READ_TLP_POISONED = 0xA,
+	DESC_ERR_HARQ_INPUT_LEN = 0xB,
 	DESC_ERR_CB_READ_FAIL = 0xC,
 	DESC_ERR_CB_READ_TIMEOUT = 0xD,
 	DESC_ERR_CB_READ_TLP_POISONED = 0xE,
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 435b4d90d8..2d4b58067d 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -848,6 +848,9 @@  check_desc_error(uint32_t error_code) {
 	case DESC_ERR_DESC_READ_TLP_POISONED:
 		rte_bbdev_log(ERR, "Descriptor read TLP poisoned");
 		break;
+	case DESC_ERR_HARQ_INPUT_LEN:
+		rte_bbdev_log(ERR, "HARQ input length is invalid");
+		break;
 	case DESC_ERR_CB_READ_FAIL:
 		rte_bbdev_log(ERR, "Unsuccessful completion for code block");
 		break;