[v1] dma/idxd: add completion status for page fault

Message ID 20220823144700.718995-1-sean.morrissey@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v1] dma/idxd: add completion status for page fault |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Sean Morrissey Aug. 23, 2022, 2:47 p.m. UTC
  Add a status for page faults to be used when getting the
completion status of an operation.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
---
 drivers/dma/idxd/idxd_common.c  | 2 ++
 drivers/dma/idxd/idxd_hw_defs.h | 1 +
 2 files changed, 3 insertions(+)
  

Comments

Thomas Monjalon Oct. 3, 2022, 5:34 p.m. UTC | #1
23/08/2022 16:47, Sean Morrissey:
> Add a status for page faults to be used when getting the
> completion status of an operation.
> 
> Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>

Applied, thanks.
  

Patch

diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c
index c77200a457..6fe8ad4884 100644
--- a/drivers/dma/idxd/idxd_common.c
+++ b/drivers/dma/idxd/idxd_common.c
@@ -169,6 +169,8 @@  get_comp_status(struct idxd_completion *c)
 	case IDXD_COMP_STATUS_INCOMPLETE:
 	case IDXD_COMP_STATUS_SUCCESS:
 		return RTE_DMA_STATUS_SUCCESSFUL;
+	case IDXD_COMP_STATUS_PAGE_FAULT:
+		return RTE_DMA_STATUS_PAGE_FAULT;
 	case IDXD_COMP_STATUS_INVALID_OPCODE:
 		return RTE_DMA_STATUS_INVALID_OPCODE;
 	case IDXD_COMP_STATUS_INVALID_SIZE:
diff --git a/drivers/dma/idxd/idxd_hw_defs.h b/drivers/dma/idxd/idxd_hw_defs.h
index 2a219c1312..a38540f283 100644
--- a/drivers/dma/idxd/idxd_hw_defs.h
+++ b/drivers/dma/idxd/idxd_hw_defs.h
@@ -48,6 +48,7 @@  struct idxd_hw_desc {
 
 #define IDXD_COMP_STATUS_INCOMPLETE        0
 #define IDXD_COMP_STATUS_SUCCESS           1
+#define IDXD_COMP_STATUS_PAGE_FAULT     0X03
 #define IDXD_COMP_STATUS_INVALID_OPCODE 0x10
 #define IDXD_COMP_STATUS_INVALID_SIZE   0x13
 #define IDXD_COMP_STATUS_SKIPPED        0xFF /* not official IDXD error, needed as placeholder */