[dpdk-dev] [PATCH v10 06/16] dma/idxd: add datapath structures

fengchengwen fengchengwen at huawei.com
Wed Oct 20 09:44:28 CEST 2021


On 2021/10/19 22:10, Kevin Laatz wrote:
> Add data structures required for the data path for IDXD devices.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Signed-off-by: Kevin Laatz <kevin.laatz at intel.com>
> Reviewed-by: Conor Walsh <conor.walsh at intel.com>
> ---
>  drivers/dma/idxd/idxd_bus.c      |  1 +
>  drivers/dma/idxd/idxd_common.c   | 33 +++++++++++++++++++++++++
>  drivers/dma/idxd/idxd_hw_defs.h  | 41 ++++++++++++++++++++++++++++++++
>  drivers/dma/idxd/idxd_internal.h |  4 ++++
>  drivers/dma/idxd/idxd_pci.c      |  2 ++
>  5 files changed, 81 insertions(+)

[snip]

> +/**
> + * Hardware descriptor used by DSA hardware, for both bursts and
> + * for individual operations.
> + */
> +struct idxd_hw_desc {
> +	uint32_t pasid;
> +	uint32_t op_flags;
> +	rte_iova_t completion;
> +
> +	RTE_STD_C11
> +	union {
> +		rte_iova_t src;      /* source address for copy ops etc. */
> +		rte_iova_t desc_addr; /* descriptor pointer for batch */
> +	};
> +	rte_iova_t dst;
> +
> +	uint32_t size;    /* length of data for op, or batch size */
> +
> +	uint16_t intr_handle; /* completion interrupt handle */
> +
> +	/* remaining 26 bytes are reserved */
> +	uint16_t __reserved[13];

The non-reserved take about 30+B, and the struct align 64, so the __reserved[13] could delete.

It's a minor problem, so:
Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>

> +} __rte_aligned(64);
> +
>  #define IDXD_COMP_STATUS_INCOMPLETE        0
>  #define IDXD_COMP_STATUS_SUCCESS           1
>  #define IDXD_COMP_STATUS_INVALID_OPCODE 0x10
> diff --git a/drivers/dma/idxd/idxd_internal.h b/drivers/dma/idxd/idxd_internal.h
> index 8473bf939f..5e253fdfbc 100644
> --- a/drivers/dma/idxd/idxd_internal.h
> +++ b/drivers/dma/idxd/idxd_internal.h
> @@ -40,6 +40,8 @@ struct idxd_pci_common {
>  };

[snip]




More information about the dev mailing list