[1/6] baseband: introduce NXP LA12xx driver
Checks
Commit Message
This patch introduce the baseband device drivers for NXP's
LA1200 series software defined baseband modem.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/baseband/la12xx/bbdev_la12xx.c | 110 ++++++++++++++++++
.../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 38 ++++++
drivers/baseband/la12xx/meson.build | 6 +
drivers/baseband/la12xx/version.map | 3 +
drivers/baseband/meson.build | 2 +-
5 files changed, 158 insertions(+), 1 deletion(-)
create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c
create mode 100644 drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
create mode 100644 drivers/baseband/la12xx/meson.build
create mode 100644 drivers/baseband/la12xx/version.map
Comments
On Thu, Mar 18, 2021 at 7:38 AM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> This patch introduce the baseband device drivers for NXP's
> LA1200 series software defined baseband modem.
Such a series deserves a cover letter.
You should copy bbdev maintainer and cryptodev subtree maintainer.
Quickly looked at the series, I see no change on the bbdev unit test code.
Are those tests running fine with no modification (I sure hope so, but
I want a confirmation).
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> drivers/baseband/la12xx/bbdev_la12xx.c | 110 ++++++++++++++++++
> .../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 38 ++++++
> drivers/baseband/la12xx/meson.build | 6 +
> drivers/baseband/la12xx/version.map | 3 +
> drivers/baseband/meson.build | 2 +-
> 5 files changed, 158 insertions(+), 1 deletion(-)
> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c
> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
> create mode 100644 drivers/baseband/la12xx/meson.build
> create mode 100644 drivers/baseband/la12xx/version.map
>
[snip]
> +};
> +
> +RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv);
> +RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_la12xx);
Quick glance at this patch, no need for an alias.
Alias are for maintaining compatibility when drivers are renamed but
this is a new driver.
On 3/18/2021 8:23 PM, David Marchand wrote:
> On Thu, Mar 18, 2021 at 7:38 AM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>> This patch introduce the baseband device drivers for NXP's
>> LA1200 series software defined baseband modem.
> Such a series deserves a cover letter.
Ok. I will do that in v2.
> You should copy bbdev maintainer and cryptodev subtree maintainer.
Yes, changing the Akhil's id. He moved on.
>
> Quickly looked at the series, I see no change on the bbdev unit test code.
> Are those tests running fine with no modification (I sure hope so, but
> I want a confirmation).
>
Good catch! Yes, we have made the changes and we are in the process of
cleaning them up.
We will be posting them to mailing list soon.
>> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> ---
>> drivers/baseband/la12xx/bbdev_la12xx.c | 110 ++++++++++++++++++
>> .../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 38 ++++++
>> drivers/baseband/la12xx/meson.build | 6 +
>> drivers/baseband/la12xx/version.map | 3 +
>> drivers/baseband/meson.build | 2 +-
>> 5 files changed, 158 insertions(+), 1 deletion(-)
>> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c
>> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
>> create mode 100644 drivers/baseband/la12xx/meson.build
>> create mode 100644 drivers/baseband/la12xx/version.map
>>
> [snip]
>
>> +};
>> +
>> +RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv);
>> +RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_la12xx);
> Quick glance at this patch, no need for an alias.
> Alias are for maintaining compatibility when drivers are renamed but
> this is a new driver.
Ok.
>
>
Hi Hemant/Nipun,
Could you please send a new version soon?
If review is completed, I would like to take it in RC1, i.e. 15th March.
Regards,
Akhil
>
> On 3/18/2021 8:23 PM, David Marchand wrote:
> > On Thu, Mar 18, 2021 at 7:38 AM Hemant Agrawal
> <hemant.agrawal@nxp.com> wrote:
> >> This patch introduce the baseband device drivers for NXP's
> >> LA1200 series software defined baseband modem.
> > Such a series deserves a cover letter.
> Ok. I will do that in v2.
> > You should copy bbdev maintainer and cryptodev subtree maintainer.
> Yes, changing the Akhil's id. He moved on.
> >
> > Quickly looked at the series, I see no change on the bbdev unit test code.
> > Are those tests running fine with no modification (I sure hope so, but
> > I want a confirmation).
> >
> Good catch! Yes, we have made the changes and we are in the process of
> cleaning them up.
>
> We will be posting them to mailing list soon.
>
> >> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> ---
> >> drivers/baseband/la12xx/bbdev_la12xx.c | 110
> ++++++++++++++++++
> >> .../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 38 ++++++
> >> drivers/baseband/la12xx/meson.build | 6 +
> >> drivers/baseband/la12xx/version.map | 3 +
> >> drivers/baseband/meson.build | 2 +-
> >> 5 files changed, 158 insertions(+), 1 deletion(-)
> >> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c
> >> create mode 100644
> drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
> >> create mode 100644 drivers/baseband/la12xx/meson.build
> >> create mode 100644 drivers/baseband/la12xx/version.map
> >>
> > [snip]
> >
> >> +};
> >> +
> >> +RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv);
> >> +RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_la12xx);
> > Quick glance at this patch, no need for an alias.
> > Alias are for maintaining compatibility when drivers are renamed but
> > this is a new driver.
> Ok.
> >
> >
On 4/8/2021 2:25 PM, Akhil Goyal wrote:
> Hi Hemant/Nipun,
>
> Could you please send a new version soon?
> If review is completed, I would like to take it in RC1, i.e. 15th March.
yes, we are working on fixing few things. We will send it by weekend.
Regards,
Hemant
> Regards,
> Akhil
>> On 3/18/2021 8:23 PM, David Marchand wrote:
>>> On Thu, Mar 18, 2021 at 7:38 AM Hemant Agrawal
>> <hemant.agrawal@nxp.com> wrote:
>>>> This patch introduce the baseband device drivers for NXP's
>>>> LA1200 series software defined baseband modem.
>>> Such a series deserves a cover letter.
>> Ok. I will do that in v2.
>>> You should copy bbdev maintainer and cryptodev subtree maintainer.
>> Yes, changing the Akhil's id. He moved on.
>>> Quickly looked at the series, I see no change on the bbdev unit test code.
>>> Are those tests running fine with no modification (I sure hope so, but
>>> I want a confirmation).
>>>
>> Good catch! Yes, we have made the changes and we are in the process of
>> cleaning them up.
>>
>> We will be posting them to mailing list soon.
>>
>>>> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
>>>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>>>> ---
>>>> drivers/baseband/la12xx/bbdev_la12xx.c | 110
>> ++++++++++++++++++
>>>> .../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 38 ++++++
>>>> drivers/baseband/la12xx/meson.build | 6 +
>>>> drivers/baseband/la12xx/version.map | 3 +
>>>> drivers/baseband/meson.build | 2 +-
>>>> 5 files changed, 158 insertions(+), 1 deletion(-)
>>>> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c
>>>> create mode 100644
>> drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
>>>> create mode 100644 drivers/baseband/la12xx/meson.build
>>>> create mode 100644 drivers/baseband/la12xx/version.map
>>>>
>>> [snip]
>>>
>>>> +};
>>>> +
>>>> +RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv);
>>>> +RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_la12xx);
>>> Quick glance at this patch, no need for an alias.
>>> Alias are for maintaining compatibility when drivers are renamed but
>>> this is a new driver.
>> Ok.
>>>
Note that I did not review this serie yet as v2 was pending (+ did not receive the initial serie). Planning to send comments once that v2 is formally shared.
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, April 8, 2021 1:56 AM
> To: hemant.agrawal@nxp.com; David Marchand
> <david.marchand@redhat.com>
> Cc: dev <dev@dpdk.org>; Nipun Gupta <nipun.gupta@nxp.com>; Chautru,
> Nicolas <nicolas.chautru@intel.com>
> Subject: RE: [EXT] Re: [dpdk-dev] [PATCH 1/6] baseband: introduce NXP
> LA12xx driver
>
> Hi Hemant/Nipun,
>
> Could you please send a new version soon?
> If review is completed, I would like to take it in RC1, i.e. 15th March.
>
> Regards,
> Akhil
> >
> > On 3/18/2021 8:23 PM, David Marchand wrote:
> > > On Thu, Mar 18, 2021 at 7:38 AM Hemant Agrawal
> > <hemant.agrawal@nxp.com> wrote:
> > >> This patch introduce the baseband device drivers for NXP's
> > >> LA1200 series software defined baseband modem.
> > > Such a series deserves a cover letter.
> > Ok. I will do that in v2.
> > > You should copy bbdev maintainer and cryptodev subtree maintainer.
> > Yes, changing the Akhil's id. He moved on.
> > >
> > > Quickly looked at the series, I see no change on the bbdev unit test code.
> > > Are those tests running fine with no modification (I sure hope so,
> > > but I want a confirmation).
> > >
> > Good catch! Yes, we have made the changes and we are in the process of
> > cleaning them up.
> >
> > We will be posting them to mailing list soon.
> >
> > >> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> > >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > >> ---
> > >> drivers/baseband/la12xx/bbdev_la12xx.c | 110
> > ++++++++++++++++++
> > >> .../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 38 ++++++
> > >> drivers/baseband/la12xx/meson.build | 6 +
> > >> drivers/baseband/la12xx/version.map | 3 +
> > >> drivers/baseband/meson.build | 2 +-
> > >> 5 files changed, 158 insertions(+), 1 deletion(-)
> > >> create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c
> > >> create mode 100644
> > drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
> > >> create mode 100644 drivers/baseband/la12xx/meson.build
> > >> create mode 100644 drivers/baseband/la12xx/version.map
> > >>
> > > [snip]
> > >
> > >> +};
> > >> +
> > >> +RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv);
> > >> +RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_la12xx);
> > > Quick glance at this patch, no need for an alias.
> > > Alias are for maintaining compatibility when drivers are renamed but
> > > this is a new driver.
> > Ok.
> > >
> > >
new file mode 100644
@@ -0,0 +1,110 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020-2021 NXP
+ */
+
+#include <string.h>
+
+#include <rte_common.h>
+#include <rte_bus_vdev.h>
+#include <rte_malloc.h>
+#include <rte_ring.h>
+#include <rte_kvargs.h>
+
+#include <rte_bbdev.h>
+#include <rte_bbdev_pmd.h>
+
+#include <bbdev_la12xx_pmd_logs.h>
+
+#define DRIVER_NAME baseband_la12xx
+
+RTE_LOG_REGISTER(bbdev_la12xx_logtype, pmd.bb.la12xx, NOTICE);
+
+/* private data structure */
+struct bbdev_la12xx_private {
+ unsigned int max_nb_queues; /**< Max number of queues */
+};
+/* Create device */
+static int
+la12xx_bbdev_create(struct rte_vdev_device *vdev)
+{
+ struct rte_bbdev *bbdev;
+ const char *name = rte_vdev_device_name(vdev);
+
+ PMD_INIT_FUNC_TRACE();
+
+ bbdev = rte_bbdev_allocate(name);
+ if (bbdev == NULL)
+ return -ENODEV;
+
+ bbdev->data->dev_private = rte_zmalloc(name,
+ sizeof(struct bbdev_la12xx_private),
+ RTE_CACHE_LINE_SIZE);
+ if (bbdev->data->dev_private == NULL) {
+ rte_bbdev_release(bbdev);
+ return -ENOMEM;
+ }
+
+ bbdev->dev_ops = NULL;
+ bbdev->device = &vdev->device;
+ bbdev->data->socket_id = 0;
+ bbdev->intr_handle = NULL;
+
+ /* register rx/tx burst functions for data path */
+ bbdev->dequeue_enc_ops = NULL;
+ bbdev->dequeue_dec_ops = NULL;
+ bbdev->enqueue_enc_ops = NULL;
+ bbdev->enqueue_dec_ops = NULL;
+
+ return 0;
+}
+
+/* Initialise device */
+static int
+la12xx_bbdev_probe(struct rte_vdev_device *vdev)
+{
+ const char *name;
+
+ PMD_INIT_FUNC_TRACE();
+
+ if (vdev == NULL)
+ return -EINVAL;
+
+ name = rte_vdev_device_name(vdev);
+ if (name == NULL)
+ return -EINVAL;
+
+ return la12xx_bbdev_create(vdev);
+}
+
+/* Uninitialise device */
+static int
+la12xx_bbdev_remove(struct rte_vdev_device *vdev)
+{
+ struct rte_bbdev *bbdev;
+ const char *name;
+
+ PMD_INIT_FUNC_TRACE();
+
+ if (vdev == NULL)
+ return -EINVAL;
+
+ name = rte_vdev_device_name(vdev);
+ if (name == NULL)
+ return -EINVAL;
+
+ bbdev = rte_bbdev_get_named_dev(name);
+ if (bbdev == NULL)
+ return -EINVAL;
+
+ rte_free(bbdev->data->dev_private);
+
+ return rte_bbdev_release(bbdev);
+}
+
+static struct rte_vdev_driver bbdev_la12xx_pmd_drv = {
+ .probe = la12xx_bbdev_probe,
+ .remove = la12xx_bbdev_remove
+};
+
+RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv);
+RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_la12xx);
new file mode 100644
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 NXP
+ */
+
+#ifndef _BBDEV_LA12XX_PMD_LOGS_H_
+#define _BBDEV_LA12XX_PMD_LOGS_H_
+
+#define BBDEV_LA12XX_PMD_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, bbdev_la12xx_logtype, "bbdev_la12xx: " \
+ fmt "\n", ##args)
+
+#define BBDEV_LA12XX_PMD_DEBUG(fmt, args...) \
+ rte_log(RTE_LOG_DEBUG, bbdev_la12xx_logtype, "bbdev_la12xx: %s(): "\
+ fmt "\n", __func__, ##args)
+
+#define PMD_INIT_FUNC_TRACE() BBDEV_LA12XX_PMD_DEBUG(">>")
+
+#define BBDEV_LA12XX_PMD_CRIT(fmt, args...) \
+ BBDEV_LA12XX_PMD_LOG(CRIT, fmt, ## args)
+#define BBDEV_LA12XX_PMD_INFO(fmt, args...) \
+ BBDEV_LA12XX_PMD_LOG(INFO, fmt, ## args)
+#define BBDEV_LA12XX_PMD_ERR(fmt, args...) \
+ BBDEV_LA12XX_PMD_LOG(ERR, fmt, ## args)
+#define BBDEV_LA12XX_PMD_WARN(fmt, args...) \
+ BBDEV_LA12XX_PMD_LOG(WARNING, fmt, ## args)
+
+/* DP Logs, toggled out at compile time if level lower than current level */
+#define BBDEV_LA12XX_PMD_DP_LOG(level, fmt, args...) \
+ RTE_LOG_DP(level, PMD, fmt, ## args)
+
+#define BBDEV_LA12XX_PMD_DP_DEBUG(fmt, args...) \
+ BBDEV_LA12XX_PMD_DP_LOG(DEBUG, fmt, ## args)
+#define BBDEV_LA12XX_PMD_DP_INFO(fmt, args...) \
+ BBDEV_LA12XX_PMD_DP_LOG(INFO, fmt, ## args)
+#define BBDEV_LA12XX_PMD_DP_WARN(fmt, args...) \
+ BBDEV_LA12XX_PMD_DP_LOG(WARNING, fmt, ## args)
+
+#endif /* _BBDEV_LA12XX_PMD_LOGS_H_ */
new file mode 100644
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2020-2021 NXP
+
+deps += ['bbdev', 'bus_vdev', 'ring']
+
+sources = files('bbdev_la12xx.c')
new file mode 100644
@@ -0,0 +1,3 @@
+DPDK_21 {
+ local: *;
+};
@@ -5,4 +5,4 @@ if is_windows
subdir_done()
endif
-drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec', 'acc100']
+drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec', 'acc100', 'la12xx']