DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Nicolas Chautru <nicolas.chautru@intel.com>
Cc: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com,
	thomas@monjalon.net, hemant.agrawal@nxp.com,
	mingshan.zhang@intel.com, david.marchand@redhat.com
Subject: Re: [PATCH v1] bbdev: add new operation for FFT processing
Date: Thu, 10 Mar 2022 17:12:38 -0800	[thread overview]
Message-ID: <20220310171238.526eb597@hermes.local> (raw)
In-Reply-To: <1646956157-245769-2-git-send-email-nicolas.chautru@intel.com>

On Thu, 10 Mar 2022 15:49:17 -0800
Nicolas Chautru <nicolas.chautru@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	other threads:[~2022-03-11  1:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 23:49 Nicolas Chautru
2022-03-10 23:49 ` Nicolas Chautru
2022-03-11  1:12   ` Stephen Hemminger [this message]
2022-03-17 18:42     ` Chautru, Nicolas
2022-05-25 22:07   ` Chautru, Nicolas
2022-05-26  6:05     ` Hemant Agrawal
2022-06-07 11:29       ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220310171238.526eb597@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=mingshan.zhang@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=thomas@monjalon.net \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).