On Thu, 10 Mar 2022 15:49:17 -0800
Nicolas Chautru <nicolas.chau...@intel.com> wrote:

> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
> index aaee7b7..a72ecba 100644
> --- a/lib/bbdev/rte_bbdev.c
> +++ b/lib/bbdev/rte_bbdev.c
> @@ -850,6 +850,9 @@ struct rte_bbdev *
>       case RTE_BBDEV_OP_LDPC_ENC:
>               result = sizeof(struct rte_bbdev_enc_op);
>               break;
> +     case RTE_BBDEV_OP_FFT:
> +             result = sizeof(struct rte_bbdev_fft_op);
> +             break;
>       default:
>               break;
>       }
> @@ -873,6 +876,10 @@ struct rte_bbdev *
>               struct rte_bbdev_enc_op *op = element;
>               memset(op, 0, mempool->elt_size);
>               op->mempool = mempool;
> +     } else if (type == RTE_BBDEV_OP_FFT) {
> +             struct rte_bbdev_fft_op *op = element;
> +             memset(op, 0, mempool->elt_size);
> +             op->mempool = mempool;
>       }
>  }
>  
> @@ -1123,6 +1130,7 @@ struct rte_mempool *
>               "RTE_BBDEV_OP_TURBO_ENC",
>               "RTE_BBDEV_OP_LDPC_DEC",
>               "RTE_BBDEV_OP_LDPC_ENC",
> +             "RTE_BBDEV_OP_FFT",
>       };
>  
>       if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h
> index b88c881..e9ca673 100644
> --- a/lib/bbdev/rte_bbdev.h
> +++ b/lib/bbdev/rte_bbdev.h
> @@ -380,6 +380,12 @@ typedef uint16_t (*rte_bbdev_enqueue_dec_ops_t)(
>               struct rte_bbdev_dec_op **ops,
>               uint16_t num);
>  
> +/** @internal Enqueue fft operations for processing on queue of a device. */
> +typedef uint16_t (*rte_bbdev_enqueue_fft_ops_t)(
> +             struct rte_bbdev_queue_data *q_data,
> +             struct rte_bbdev_fft_op **ops,
> +             uint16_t num);
> +
>  /** @internal Dequeue encode operations from a queue of a device. */
>  typedef uint16_t (*rte_bbdev_dequeue_enc_ops_t)(
>               struct rte_bbdev_queue_data *q_data,
> @@ -390,6 +396,11 @@ typedef uint16_t (*rte_bbdev_dequeue_dec_ops_t)(
>               struct rte_bbdev_queue_data *q_data,
>               struct rte_bbdev_dec_op **ops, uint16_t num);
>  
> +/** @internal Dequeue fft operations from a queue of a device. */
> +typedef uint16_t (*rte_bbdev_dequeue_fft_ops_t)(
> +             struct rte_bbdev_queue_data *q_data,
> +             struct rte_bbdev_fft_op **ops, uint16_t num);
> +
>  #define RTE_BBDEV_NAME_MAX_LEN  64  /**< Max length of device name */
>  
>  /**
> @@ -438,6 +449,10 @@ struct __rte_cache_aligned rte_bbdev {
>       rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops;
>       /** Dequeue decode function */
>       rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops;
> +     /** Enqueue FFT function */
> +     rte_bbdev_enqueue_fft_ops_t enqueue_fft_ops;
> +     /** Dequeue FFT function */
> +     rte_bbdev_dequeue_fft_ops_t dequeue_fft_ops;
>       const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by PMD */
>       struct rte_bbdev_data *data;  /**< Pointer to device data */
>       enum rte_bbdev_state state;  /**< If device is currently used or not */


Since rte_bbdev is exposed in rte_bbdev.h it can not be changed without
breaking ABI. It would have been better if data structure was better hidden 
(hint).
But you can't change it now until 22.11

Reply via email to