MLX5_SET(rqc, rqc, counter_set_id, params->q_counter);
 
        MLX5_SET(wq, wq, log_hairpin_data_sz, params->log_data_size);
+       MLX5_SET(wq, wq, log_hairpin_num_packets, params->log_num_packets);
 
        return mlx5_core_create_rq(mdev, in, MLX5_ST_SZ_BYTES(create_rq_in), rqn);
 }
        MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST);
 
        MLX5_SET(wq, wq, log_hairpin_data_sz, params->log_data_size);
+       MLX5_SET(wq, wq, log_hairpin_num_packets, params->log_num_packets);
 
        return mlx5_core_create_sq(mdev, in, MLX5_ST_SZ_BYTES(create_sq_in), sqn);
 }
 
        u8         log_max_hairpin_queues[0x5];
        u8         reserved_at_3c8[0x3];
        u8         log_max_hairpin_wq_data_sz[0x5];
-       u8         reserved_at_3d0[0xb];
+       u8         reserved_at_3d0[0x3];
+       u8         log_max_hairpin_num_packets[0x5];
+       u8         reserved_at_3d8[0x3];
        u8         log_max_wq_sz[0x5];
 
        u8         nic_vport_change_event[0x1];
        u8         reserved_at_118[0x3];
        u8         log_wq_sz[0x5];
 
-       u8         reserved_at_120[0xb];
+       u8         reserved_at_120[0x3];
+       u8         log_hairpin_num_packets[0x5];
+       u8         reserved_at_128[0x3];
        u8         log_hairpin_data_sz[0x5];
        u8         reserved_at_130[0x5];