[2/4] net/mlx5: add new fields in Rx completion entry

Message ID 20180626113723.33035-2-yskoh@mellanox.com (mailing list archive)
State Superseded, archived
Headers
Series [1/4] net/mlx5: change return value of Rx completion poll |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Yongseok Koh June 26, 2018, 11:37 a.m. UTC
  Stride index is added to mlx5_mini_cqe8 structure and WQE ID is added to
mlx5_cqe structure.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_prm.h  | 9 +++++++--
 drivers/net/mlx5/mlx5_rxtx.h | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)
  

Comments

Yongseok Koh June 26, 2018, 11:39 a.m. UTC | #1
> On Jun 26, 2018, at 4:37 AM, Yongseok Koh <yskoh@mellanox.com> wrote:
> 
> Stride index is added to mlx5_mini_cqe8 structure and WQE ID is added to
> mlx5_cqe structure.
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
> ---

Please disregard this patchset. It has been sent mistakenly.
Will send out v2.

Thanks,
Yongseok
  

Patch

diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 0cf370cd7..f9fae1e50 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -240,7 +240,9 @@  struct mlx5_cqe {
 	uint8_t padding[64];
 #endif
 	uint8_t pkt_info;
-	uint8_t rsvd0[11];
+	uint8_t rsvd0;
+	uint16_t wqe_id;
+	uint8_t rsvd3[8];
 	uint32_t rx_hash_res;
 	uint8_t rx_hash_type;
 	uint8_t rsvd1[11];
@@ -285,7 +287,10 @@  struct mlx5_cqe {
 struct mlx5_mini_cqe8 {
 	union {
 		uint32_t rx_hash_result;
-		uint32_t checksum;
+		struct {
+			uint16_t checksum;
+			uint16_t stride_idx;
+		};
 		struct {
 			uint16_t wqe_counter;
 			uint8_t  s_wqe_opcode;
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index f53bb43c3..04a432adf 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -362,7 +362,7 @@  static inline int
 check_cqe_seen(volatile struct mlx5_cqe *cqe)
 {
 	static const uint8_t magic[] = "seen";
-	volatile uint8_t (*buf)[sizeof(cqe->rsvd0)] = &cqe->rsvd0;
+	volatile uint8_t (*buf)[sizeof(cqe->rsvd1)] = &cqe->rsvd1;
 	int ret = 1;
 	unsigned int i;