From: Tom Rix <trix@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>,
dev@dpdk.org, gakhil@marvell.com
Cc: thomas@monjalon.net, ray.kinsella@intel.com,
bruce.richardson@intel.com, hemant.agrawal@nxp.com,
mingshan.zhang@intel.com, david.marchand@redhat.com
Subject: Re: [PATCH v2 3/5] baseband/acc100: configuration of ACC101 from PF
Date: Sun, 8 May 2022 06:38:21 -0700 [thread overview]
Message-ID: <8384fb18-ce2d-a6e3-2930-c519f3b2139b@redhat.com> (raw)
In-Reply-To: <1651083423-33202-4-git-send-email-nicolas.chautru@intel.com>
On 4/27/22 11:17 AM, Nicolas Chautru wrote:
> Adding companion function specific to ACC100 and it
> can be called from bbdev-test when running from PF.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 57 ++++++
> drivers/baseband/acc100/rte_acc100_cfg.h | 17 ++
> drivers/baseband/acc100/rte_acc100_pmd.c | 302 +++++++++++++++++++++++++++++++
> drivers/baseband/acc100/version.map | 2 +-
> 4 files changed, 377 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 0fa119a..baf5f6d 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -63,6 +63,8 @@
> #define ACC100_QMGR_INVALID_IDX -1
> #define ACC100_QMGR_RR 1
> #define ACC100_QOS_GBR 0
> +#define ACC101PF_DRIVER_NAME ("intel_acc101_pf")
> +#define ACC101VF_DRIVER_NAME ("intel_acc101_vf")
A dup from patch 1
> #endif
>
> #define OPS_CACHE_SIZE 256U
> @@ -765,6 +767,61 @@ typedef int (test_case_function)(struct active_device *ad,
> "Failed to configure ACC100 PF for bbdev %s",
> info->dev_name);
> }
> + if ((get_init_device() == true) &&
> + (!strcmp(info->drv.driver_name, ACC101PF_DRIVER_NAME))) {
> + struct rte_acc100_conf conf;
Mixing up acc100 and acc101 ?
If this actually works, combine the two.
> + unsigned int i;
> +
> + printf("Configure ACC101 FEC Driver %s with default values\n",
> + info->drv.driver_name);
> +
> + /* clear default configuration before initialization */
> + memset(&conf, 0, sizeof(struct rte_acc100_conf));
> +
> + /* Always set in PF mode for built-in configuration */
> + conf.pf_mode_en = true;
> + for (i = 0; i < RTE_ACC100_NUM_VFS; ++i) {
> + conf.arb_dl_4g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_dl_4g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_dl_4g[i].round_robin_weight = ACC100_QMGR_RR;
> + conf.arb_ul_4g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_ul_4g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_ul_4g[i].round_robin_weight = ACC100_QMGR_RR;
> + conf.arb_dl_5g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_dl_5g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_dl_5g[i].round_robin_weight = ACC100_QMGR_RR;
> + conf.arb_ul_5g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_ul_5g[i].gbr_threshold1 = ACC100_QOS_GBR;
> + conf.arb_ul_5g[i].round_robin_weight = ACC100_QMGR_RR;
> + }
> +
> + conf.input_pos_llr_1_bit = true;
> + conf.output_pos_llr_1_bit = true;
> + conf.num_vf_bundles = 1; /**< Number of VF bundles to setup */
> +
> + conf.q_ul_4g.num_qgroups = ACC100_QMGR_NUM_QGS;
> + conf.q_ul_4g.first_qgroup_index = ACC100_QMGR_INVALID_IDX;
> + conf.q_ul_4g.num_aqs_per_groups = ACC100_QMGR_NUM_AQS;
> + conf.q_ul_4g.aq_depth_log2 = ACC100_QMGR_AQ_DEPTH;
> + conf.q_dl_4g.num_qgroups = ACC100_QMGR_NUM_QGS;
> + conf.q_dl_4g.first_qgroup_index = ACC100_QMGR_INVALID_IDX;
> + conf.q_dl_4g.num_aqs_per_groups = ACC100_QMGR_NUM_AQS;
> + conf.q_dl_4g.aq_depth_log2 = ACC100_QMGR_AQ_DEPTH;
> + conf.q_ul_5g.num_qgroups = ACC100_QMGR_NUM_QGS;
> + conf.q_ul_5g.first_qgroup_index = ACC100_QMGR_INVALID_IDX;
> + conf.q_ul_5g.num_aqs_per_groups = ACC100_QMGR_NUM_AQS;
> + conf.q_ul_5g.aq_depth_log2 = ACC100_QMGR_AQ_DEPTH;
> + conf.q_dl_5g.num_qgroups = ACC100_QMGR_NUM_QGS;
> + conf.q_dl_5g.first_qgroup_index = ACC100_QMGR_INVALID_IDX;
> + conf.q_dl_5g.num_aqs_per_groups = ACC100_QMGR_NUM_AQS;
> + conf.q_dl_5g.aq_depth_log2 = ACC100_QMGR_AQ_DEPTH;
> +
> + /* setup PF with configuration information */
> + ret = rte_acc101_configure(info->dev_name, &conf);
> + TEST_ASSERT_SUCCESS(ret,
> + "Failed to configure ACC101 PF for bbdev %s",
> + info->dev_name);
> + }
> #endif
> /* Let's refresh this now this is configured */
> rte_bbdev_info_get(dev_id, info);
> diff --git a/drivers/baseband/acc100/rte_acc100_cfg.h b/drivers/baseband/acc100/rte_acc100_cfg.h
> index d233e42..2e3c43f 100644
> --- a/drivers/baseband/acc100/rte_acc100_cfg.h
> +++ b/drivers/baseband/acc100/rte_acc100_cfg.h
This file marks its API as experimental though the acc100 has been used
in production for some time.
It is important that the API be stable.
Is this an oversight ?
Or what is needed to stabilize the API ?
> @@ -106,6 +106,23 @@ struct rte_acc100_conf {
> int
> rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf);
>
> +/**
> + * Configure a ACC101 device
> + *
> + * @param dev_name
> + * The name of the device. This is the short form of PCI BDF, e.g. 00:01.0.
> + * It can also be retrieved for a bbdev device from the dev_name field in the
> + * rte_bbdev_info structure returned by rte_bbdev_info_get().
> + * @param conf
> + * Configuration to apply to ACC101 HW.
> + *
> + * @return
> + * Zero on success, negative value on failure.
> + */
> +__rte_experimental
> +int
> +rte_acc101_configure(const char *dev_name, struct rte_acc100_conf *conf);
I am finding seeing acc100* structs in acc101 function parameters confusing.
Maybe a general renaming of acc100 -> acc10x for the common parts.
Will we have this problem on acc120 or acc200 ?
Maybe shorten everything now to acc
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index daf2ce0..b03cedc 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -4921,3 +4921,305 @@ static int acc100_pci_remove(struct rte_pci_device *pci_dev)
> rte_bbdev_log_debug("PF Tip configuration complete for %s", dev_name);
> return 0;
> }
> +
> +
> +/* Initial configuration of a ACC101 device prior to running configure() */
> +int
> +rte_acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
> +{
This is very similar to the acc100 configure function.
It would be good if these could be combined.
Tom
next prev parent reply other threads:[~2022-05-08 13:38 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 18:16 [PATCH v2 0/5] drivers/baseband: PMD to support ACC101 device Nicolas Chautru
2022-04-27 18:16 ` [PATCH v2 1/5] baseband/acc100: introduce PMD for ACC101 Nicolas Chautru
2022-05-08 13:02 ` Tom Rix
2022-05-09 21:23 ` Chautru, Nicolas
2022-05-10 8:52 ` Thomas Monjalon
2022-05-10 11:55 ` Tom Rix
2022-05-23 17:53 ` Chautru, Nicolas
2022-04-27 18:17 ` [PATCH v2 2/5] baseband/acc100: modify validation code " Nicolas Chautru
2022-05-08 13:07 ` Tom Rix
2022-05-09 21:27 ` Chautru, Nicolas
2022-04-27 18:17 ` [PATCH v2 3/5] baseband/acc100: configuration of ACC101 from PF Nicolas Chautru
2022-05-08 13:38 ` Tom Rix [this message]
2022-05-09 21:36 ` Chautru, Nicolas
2022-05-10 12:02 ` Tom Rix
2022-04-27 18:17 ` [PATCH v2 4/5] baseband/acc100: start explicitly PF Monitor from PMD Nicolas Chautru
2022-05-08 13:44 ` Tom Rix
2022-05-09 22:07 ` Chautru, Nicolas
2022-04-27 18:17 ` [PATCH v2 5/5] baseband/acc100: add protection for some negative scenario Nicolas Chautru
2022-05-08 13:55 ` Tom Rix
2022-05-09 21:45 ` Chautru, Nicolas
2022-05-10 12:11 ` Tom Rix
2022-05-10 14:44 ` Thomas Monjalon
2022-05-16 20:48 ` [PATCH v3 0/4] drivers/baseband: PMD to support ACC101 device Nicolas Chautru
2022-05-16 20:48 ` [PATCH v3 1/4] baseband/acc100: introduce PMD for ACC101 Nicolas Chautru
2022-05-19 19:55 ` Maxime Coquelin
2022-05-16 20:48 ` [PATCH v3 2/4] baseband/acc100: modify validation code " Nicolas Chautru
2022-05-16 20:48 ` [PATCH v3 3/4] baseband/acc100: configuration of ACC101 from PF Nicolas Chautru
2022-05-19 20:13 ` Maxime Coquelin
2022-05-23 17:06 ` Chautru, Nicolas
2022-05-16 20:48 ` [PATCH v3 4/4] baseband/acc100: add protection for some negative scenario Nicolas Chautru
2022-05-19 19:51 ` [PATCH v3 0/4] drivers/baseband: PMD to support ACC101 device Tom Rix
2022-05-23 21:25 ` [PATCH v4 0/5] drivers/baseband: PMD to support ACC100/ACC101 devices Nicolas Chautru
2022-05-23 21:25 ` [PATCH v4 1/5] baseband/acc100: update companion PF configure function Nicolas Chautru
2022-05-23 21:25 ` [PATCH v4 2/5] baseband/acc100: add protection for some negative scenario Nicolas Chautru
2022-05-23 21:25 ` [PATCH v4 3/5] baseband/acc100: introduce PMD for ACC101 Nicolas Chautru
2022-05-23 21:25 ` [PATCH v4 4/5] baseband/acc100: modify validation code " Nicolas Chautru
2022-05-23 21:25 ` [PATCH v4 5/5] baseband/acc100: configuration of ACC101 from PF Nicolas Chautru
2022-05-24 0:08 ` [PATCH v5 0/5] drivers/baseband: PMD to support ACC100/ACC101 devices Nicolas Chautru
2022-05-24 0:08 ` [PATCH v5 1/5] baseband/acc100: update companion PF configure function Nicolas Chautru
2022-05-24 0:08 ` [PATCH v5 2/5] baseband/acc100: add protection for some negative scenario Nicolas Chautru
2022-05-24 0:08 ` [PATCH v5 3/5] baseband/acc100: introduce PMD for ACC101 Nicolas Chautru
2022-05-24 0:08 ` [PATCH v5 4/5] baseband/acc100: modify validation code " Nicolas Chautru
2022-05-25 14:33 ` Maxime Coquelin
2022-05-25 22:15 ` Chautru, Nicolas
2022-05-31 7:59 ` Maxime Coquelin
2022-05-31 18:19 ` Chautru, Nicolas
2022-05-24 0:08 ` [PATCH v5 5/5] baseband/acc100: configuration of ACC101 from PF Nicolas Chautru
2022-05-25 13:24 ` Maxime Coquelin
2022-05-25 22:09 ` Chautru, Nicolas
2022-05-26 0:49 ` [PATCH v6 0/5] drivers/baseband: PMD to support ACC100/ACC101 devices Nicolas Chautru
2022-05-26 0:55 ` Nicolas Chautru
2022-05-26 0:55 ` [PATCH v6 1/5] baseband/acc100: update companion PF configure function Nicolas Chautru
2022-05-26 0:55 ` [PATCH v6 2/5] baseband/acc100: add protection for some negative scenario Nicolas Chautru
2022-05-26 0:55 ` [PATCH v6 3/5] baseband/acc100: introduce PMD for ACC101 Nicolas Chautru
2022-05-30 7:40 ` [EXT] " Akhil Goyal
2022-05-31 18:59 ` Chautru, Nicolas
2022-05-26 0:55 ` [PATCH v6 4/5] baseband/acc100: modify validation code " Nicolas Chautru
2022-05-31 8:02 ` Maxime Coquelin
2022-05-31 18:16 ` Chautru, Nicolas
2022-05-26 0:55 ` [PATCH v6 5/5] baseband/acc100: configuration of ACC101 from PF Nicolas Chautru
2022-05-31 7:35 ` Maxime Coquelin
2022-05-31 18:28 ` Chautru, Nicolas
2022-05-31 22:31 ` [PATCH v7 0/6] drivers/baseband: PMD to support ACC100/ACC101 devices Nicolas Chautru
2022-05-31 22:31 ` [PATCH v7 1/6] baseband/acc100: update companion PF configure function Nicolas Chautru
2022-06-02 9:49 ` Kevin Traynor
2022-06-02 16:52 ` Chautru, Nicolas
2022-06-03 20:25 ` Vargas, Hernan
2022-05-31 22:31 ` [PATCH v7 2/6] baseband/acc100: add protection for some negative scenario Nicolas Chautru
2022-06-02 8:21 ` Maxime Coquelin
2022-05-31 22:31 ` [PATCH v7 3/6] baseband/acc100: remove RTE prefix for internal macro Nicolas Chautru
2022-06-01 14:11 ` Maxime Coquelin
2022-06-01 17:15 ` [EXT] " Akhil Goyal
2022-06-02 12:57 ` Maxime Coquelin
2022-05-31 22:31 ` [PATCH v7 4/6] baseband/acc100: introduce PMD for ACC101 Nicolas Chautru
2022-06-02 12:23 ` Maxime Coquelin
2022-05-31 22:31 ` [PATCH v7 5/6] baseband/acc100: modify validation code " Nicolas Chautru
2022-06-03 20:23 ` Vargas, Hernan
2022-05-31 22:31 ` [PATCH v7 6/6] baseband/acc100: configuration of ACC101 from PF Nicolas Chautru
2022-06-02 8:33 ` Maxime Coquelin
2022-06-06 14:54 ` [PATCH v7 0/6] drivers/baseband: PMD to support ACC100/ACC101 devices Chautru, Nicolas
2022-06-06 15:03 ` Akhil Goyal
2022-06-06 16:18 ` Chautru, Nicolas
2022-06-15 14:08 ` [EXT] " Akhil Goyal
2022-06-22 11:50 ` Akhil Goyal
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=8384fb18-ce2d-a6e3-2930-c519f3b2139b@redhat.com \
--to=trix@redhat.com \
--cc=bruce.richardson@intel.com \
--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=ray.kinsella@intel.com \
--cc=thomas@monjalon.net \
/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).