#ifndef __BBDEV_LA12XX_H__
#define __BBDEV_LA12XX_H__
-#define BBDEV_IPC_ENC_OP_TYPE 1
-#define BBDEV_IPC_DEC_OP_TYPE 2
-
-#define MAX_LDPC_ENC_FECA_QUEUES 4
-#define MAX_LDPC_DEC_FECA_QUEUES 4
-
#define MAX_CHANNEL_DEPTH 16
/* private data structure */
struct bbdev_la12xx_private {
- void *ipc_priv;
+ ipc_userspace_t *ipc_priv;
uint8_t num_valid_queues;
uint8_t max_nb_queues;
uint8_t num_ldpc_enc_queues;
struct bbdev_la12xx_q_priv {
struct bbdev_la12xx_private *bbdev_priv;
uint32_t q_id; /**< Channel ID */
- uint32_t feca_blk_id; /** FECA block ID for processing */
+ uint32_t feca_blk_id; /**< FECA block ID for processing */
uint32_t feca_blk_id_be32; /**< FECA Block ID for this queue */
- uint8_t en_napi; /* 0: napi disabled, 1: napi enabled */
+ uint8_t en_napi; /**< 0: napi disabled, 1: napi enabled */
uint16_t queue_size; /**< Queue depth */
int32_t eventfd; /**< Event FD value */
enum rte_bbdev_op_type op_type; /**< Operation type */
uint32_t la12xx_core_id;
- /* LA12xx core ID on which this will be scheduled */
+ /**< LA12xx core ID on which this will be scheduled */
struct rte_mempool *mp; /**< Pool from where buffers would be cut */
void *bbdev_op[MAX_CHANNEL_DEPTH];
/**< Stores bbdev op for each index */
#define lower_32_bits(x) ((uint32_t)((uint64_t)x))
#define upper_32_bits(x) ((uint32_t)(((uint64_t)(x) >> 16) >> 16))
-
+#define join_32_bits(upper, lower) \
+ ((size_t)(((uint64_t)(upper) << 32) | (uint32_t)(lower)))
#endif