[1/3] dmaengine: idxd: Add descriptor definitions for 16 bytes of pattern in memory fill operation

Message ID 20221108003944.2095567-2-fenghua.yu@intel.com
State New
Headers
Series Add descriptor definitions for a few new DSA operations |

Commit Message

Fenghua Yu Nov. 8, 2022, 12:39 a.m. UTC
  The memory fill operation (0x04) can fill in memory with either 8 bytes
or 16 bytes of pattern. To fill in memory with 16 bytes of pattern, the
first 8 bytes are provided in pattern lower in bytes 16-23 and the next
8 bytes are in pattern upper in bytes 40-47 in the descriptor. Currently
only 8 bytes of pattern is enabled.

Add descriptor definitions for pattern lower and pattern upper so that
user can use 16 bytes of pattern to fill memory.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
---
 include/uapi/linux/idxd.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Dave Jiang Nov. 8, 2022, 4:13 p.m. UTC | #1
On 11/7/2022 4:39 PM, Fenghua Yu wrote:
> The memory fill operation (0x04) can fill in memory with either 8 bytes
> or 16 bytes of pattern. To fill in memory with 16 bytes of pattern, the
> first 8 bytes are provided in pattern lower in bytes 16-23 and the next
> 8 bytes are in pattern upper in bytes 40-47 in the descriptor. Currently
> only 8 bytes of pattern is enabled.
> 
> Add descriptor definitions for pattern lower and pattern upper so that
> user can use 16 bytes of pattern to fill memory.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
>   include/uapi/linux/idxd.h | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/linux/idxd.h b/include/uapi/linux/idxd.h
> index 095299c75828..04a2f6411820 100644
> --- a/include/uapi/linux/idxd.h
> +++ b/include/uapi/linux/idxd.h
> @@ -179,6 +179,7 @@ struct dsa_hw_desc {
>   		uint64_t	rdback_addr;
>   		uint64_t	pattern;
>   		uint64_t	desc_list_addr;
> +		uint64_t	pattern_lower;
>   	};
>   	union {
>   		uint64_t	dst_addr;
> @@ -243,6 +244,11 @@ struct dsa_hw_desc {
>   			uint16_t	dest_app_tag_seed;
>   		};
>   
> +		/* Fill */
> +		struct {

I don't think the anon struct is needed here. If there are others, that 
can be added later with the next patch that needs it.

> +			uint64_t	pattern_upper;
> +		};
> +
>   		uint8_t		op_specific[24];
>   	};
>   } __attribute__((packed));
  

Patch

diff --git a/include/uapi/linux/idxd.h b/include/uapi/linux/idxd.h
index 095299c75828..04a2f6411820 100644
--- a/include/uapi/linux/idxd.h
+++ b/include/uapi/linux/idxd.h
@@ -179,6 +179,7 @@  struct dsa_hw_desc {
 		uint64_t	rdback_addr;
 		uint64_t	pattern;
 		uint64_t	desc_list_addr;
+		uint64_t	pattern_lower;
 	};
 	union {
 		uint64_t	dst_addr;
@@ -243,6 +244,11 @@  struct dsa_hw_desc {
 			uint16_t	dest_app_tag_seed;
 		};
 
+		/* Fill */
+		struct {
+			uint64_t	pattern_upper;
+		};
+
 		uint8_t		op_specific[24];
 	};
 } __attribute__((packed));