* [PATCH v2 04/37] baseband/acc100: free SW ring mem for reconfiguration
[not found] <20220820023157.189047-1-hernan.vargas@intel.com>
@ 2022-08-20 2:31 ` Hernan Vargas
2022-09-14 19:22 ` Maxime Coquelin
2022-08-20 2:31 ` [PATCH v2 05/37] baseband/acc100: memory leak fix Hernan Vargas
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Hernan Vargas @ 2022-08-20 2:31 UTC (permalink / raw)
To: dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Free base address of unaligned memory for SW rings to manage the missed
corner case when there is a reconfiguration.
Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 7349bb5bad..349b8be5c1 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -340,6 +340,8 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc100_device *d,
int i = 0;
uint32_t q_sw_ring_size = ACC100_MAX_QUEUE_DEPTH * get_desc_len();
uint32_t dev_sw_ring_size = q_sw_ring_size * num_queues;
+ /* Free first in case this is a reconfiguration */
+ rte_free(d->sw_rings_base);
/* Find an aligned block of memory to store sw rings */
while (i < ACC100_SW_RING_MEM_ALLOC_ATTEMPTS) {
@@ -768,6 +770,7 @@ acc100_dev_close(struct rte_bbdev *dev)
rte_free(d->tail_ptrs);
rte_free(d->info_ring);
rte_free(d->sw_rings_base);
+ rte_free(d->harq_layout);
d->sw_rings_base = NULL;
}
/* Ensure all in flight HW transactions are completed */
@@ -4665,7 +4668,8 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d,
}
printf("Number of 5GUL engines %d\n", numEngines);
- rte_free(d->sw_rings_base);
+ if (d->sw_rings_base != NULL)
+ rte_free(d->sw_rings_base);
usleep(ACC100_LONG_WAIT);
}
--
2.37.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 04/37] baseband/acc100: free SW ring mem for reconfiguration
2022-08-20 2:31 ` [PATCH v2 04/37] baseband/acc100: free SW ring mem for reconfiguration Hernan Vargas
@ 2022-09-14 19:22 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2022-09-14 19:22 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
On 8/20/22 04:31, Hernan Vargas wrote:
> Free base address of unaligned memory for SW rings to manage the missed
> corner case when there is a reconfiguration.
>
> Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc100/rte_acc100_pmd.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 7349bb5bad..349b8be5c1 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -340,6 +340,8 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc100_device *d,
> int i = 0;
> uint32_t q_sw_ring_size = ACC100_MAX_QUEUE_DEPTH * get_desc_len();
> uint32_t dev_sw_ring_size = q_sw_ring_size * num_queues;
> + /* Free first in case this is a reconfiguration */
> + rte_free(d->sw_rings_base);
>
> /* Find an aligned block of memory to store sw rings */
> while (i < ACC100_SW_RING_MEM_ALLOC_ATTEMPTS) {
> @@ -768,6 +770,7 @@ acc100_dev_close(struct rte_bbdev *dev)
> rte_free(d->tail_ptrs);
> rte_free(d->info_ring);
> rte_free(d->sw_rings_base);
> + rte_free(d->harq_layout);
> d->sw_rings_base = NULL;
> }
> /* Ensure all in flight HW transactions are completed */
> @@ -4665,7 +4668,8 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d,
> }
> printf("Number of 5GUL engines %d\n", numEngines);
>
> - rte_free(d->sw_rings_base);
> + if (d->sw_rings_base != NULL)
> + rte_free(d->sw_rings_base);
No need to check it is not NULL, rte_free() takes care of it.
> usleep(ACC100_LONG_WAIT);
> }
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 05/37] baseband/acc100: memory leak fix
[not found] <20220820023157.189047-1-hernan.vargas@intel.com>
2022-08-20 2:31 ` [PATCH v2 04/37] baseband/acc100: free SW ring mem for reconfiguration Hernan Vargas
@ 2022-08-20 2:31 ` Hernan Vargas
2022-09-14 8:50 ` Maxime Coquelin
2022-08-20 2:31 ` [PATCH v2 31/37] baseband/acc100: fix clearing PF IR outside handler Hernan Vargas
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Hernan Vargas @ 2022-08-20 2:31 UTC (permalink / raw)
To: dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Move check for undefined device before allocating queue data structure.
Coverity issue: 375803, 375813, 375819, 375827, 375831
Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 349b8be5c1..586d06d1b3 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -828,6 +828,10 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
struct acc100_queue *q;
int16_t q_idx;
+ if (d == NULL) {
+ rte_bbdev_log(ERR, "Undefined device");
+ return -ENODEV;
+ }
/* Allocate the queue data structure. */
q = rte_zmalloc_socket(dev->device->driver->name, sizeof(*q),
RTE_CACHE_LINE_SIZE, conf->socket);
@@ -835,10 +839,6 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
rte_bbdev_log(ERR, "Failed to allocate queue memory");
return -ENOMEM;
}
- if (d == NULL) {
- rte_bbdev_log(ERR, "Undefined device");
- return -ENODEV;
- }
q->d = d;
q->ring_addr = RTE_PTR_ADD(d->sw_rings, (d->sw_ring_size * queue_id));
--
2.37.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 05/37] baseband/acc100: memory leak fix
2022-08-20 2:31 ` [PATCH v2 05/37] baseband/acc100: memory leak fix Hernan Vargas
@ 2022-09-14 8:50 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2022-09-14 8:50 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
Hi Hernan,
On 8/20/22 04:31, Hernan Vargas wrote:
> Move check for undefined device before allocating queue data structure.
>
> Coverity issue: 375803, 375813, 375819, 375827, 375831
> Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
> Cc: stable@dpdk.org
Please add fixes at the beginning of the series to ease back-porting by
LTS maintainers.
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 349b8be5c1..586d06d1b3 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -828,6 +828,10 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
> struct acc100_queue *q;
> int16_t q_idx;
>
> + if (d == NULL) {
> + rte_bbdev_log(ERR, "Undefined device");
> + return -ENODEV;
> + }
> /* Allocate the queue data structure. */
> q = rte_zmalloc_socket(dev->device->driver->name, sizeof(*q),
> RTE_CACHE_LINE_SIZE, conf->socket);
> @@ -835,10 +839,6 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
> rte_bbdev_log(ERR, "Failed to allocate queue memory");
> return -ENOMEM;
> }
> - if (d == NULL) {
> - rte_bbdev_log(ERR, "Undefined device");
> - return -ENODEV;
> - }
>
> q->d = d;
> q->ring_addr = RTE_PTR_ADD(d->sw_rings, (d->sw_ring_size * queue_id));
With patch reordering done:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 31/37] baseband/acc100: fix clearing PF IR outside handler
[not found] <20220820023157.189047-1-hernan.vargas@intel.com>
2022-08-20 2:31 ` [PATCH v2 04/37] baseband/acc100: free SW ring mem for reconfiguration Hernan Vargas
2022-08-20 2:31 ` [PATCH v2 05/37] baseband/acc100: memory leak fix Hernan Vargas
@ 2022-08-20 2:31 ` Hernan Vargas
2022-09-15 10:22 ` Maxime Coquelin
2022-08-20 2:31 ` [PATCH v2 33/37] baseband/acc100: set device min alignment to 1 Hernan Vargas
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Hernan Vargas @ 2022-08-20 2:31 UTC (permalink / raw)
To: dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Clearing of PF info ring outside of handler may cause interrupt to be
missed.
A condition in the ACC100 PMD implementation may cause an interrupt
functional handler call to be missed due to related bit being cleared
when checking PF info ring status.
Fixes: 06531464151 ("baseband/acc100: support interrupt")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 72e46953ee..4596f5df42 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -437,11 +437,12 @@ acc100_check_ir(struct acc100_device *acc100_dev)
while (ring_data->valid) {
if ((ring_data->int_nb < ACC100_PF_INT_DMA_DL_DESC_IRQ) || (
ring_data->int_nb >
- ACC100_PF_INT_DMA_DL5G_DESC_IRQ))
+ ACC100_PF_INT_DMA_DL5G_DESC_IRQ)) {
rte_bbdev_log(WARNING, "InfoRing: ITR:%d Info:0x%x",
ring_data->int_nb, ring_data->detailed_info);
- /* Initialize Info Ring entry and move forward */
- ring_data->val = 0;
+ /* Initialize Info Ring entry and move forward */
+ ring_data->val = 0;
+ }
info_ring_head++;
ring_data = acc100_dev->info_ring +
(info_ring_head & ACC100_INFO_RING_MASK);
--
2.37.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 31/37] baseband/acc100: fix clearing PF IR outside handler
2022-08-20 2:31 ` [PATCH v2 31/37] baseband/acc100: fix clearing PF IR outside handler Hernan Vargas
@ 2022-09-15 10:22 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2022-09-15 10:22 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
On 8/20/22 04:31, Hernan Vargas wrote:
> Clearing of PF info ring outside of handler may cause interrupt to be
> missed.
> A condition in the ACC100 PMD implementation may cause an interrupt
> functional handler call to be missed due to related bit being cleared
> when checking PF info ring status.
>
> Fixes: 06531464151 ("baseband/acc100: support interrupt")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc100/rte_acc100_pmd.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 72e46953ee..4596f5df42 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -437,11 +437,12 @@ acc100_check_ir(struct acc100_device *acc100_dev)
> while (ring_data->valid) {
> if ((ring_data->int_nb < ACC100_PF_INT_DMA_DL_DESC_IRQ) || (
> ring_data->int_nb >
> - ACC100_PF_INT_DMA_DL5G_DESC_IRQ))
> + ACC100_PF_INT_DMA_DL5G_DESC_IRQ)) {
> rte_bbdev_log(WARNING, "InfoRing: ITR:%d Info:0x%x",
> ring_data->int_nb, ring_data->detailed_info);
> - /* Initialize Info Ring entry and move forward */
> - ring_data->val = 0;
> + /* Initialize Info Ring entry and move forward */
> + ring_data->val = 0;
> + }
> info_ring_head++;
> ring_data = acc100_dev->info_ring +
> (info_ring_head & ACC100_INFO_RING_MASK);
Please moved it at the beginning of the series.
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 33/37] baseband/acc100: set device min alignment to 1
[not found] <20220820023157.189047-1-hernan.vargas@intel.com>
` (2 preceding siblings ...)
2022-08-20 2:31 ` [PATCH v2 31/37] baseband/acc100: fix clearing PF IR outside handler Hernan Vargas
@ 2022-08-20 2:31 ` Hernan Vargas
2022-09-15 10:24 ` Maxime Coquelin
2022-08-20 2:31 ` [PATCH v2 36/37] baseband/acc100: make HARQ layout memory 4GB Hernan Vargas
2022-08-20 2:31 ` [PATCH v2 37/37] baseband/acc100: reset pointer after rte_free Hernan Vargas
5 siblings, 1 reply; 12+ messages in thread
From: Hernan Vargas @ 2022-08-20 2:31 UTC (permalink / raw)
To: dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Historical mistakes, there should be no 64B alignment requirement for
the buffer being processed. Any 1B alignment is sufficient.
Fixes: 9200ffa5cd5 ("baseband/acc100: add info get function")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 0e72bc1f57..461ebe67cd 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1201,7 +1201,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
d->acc100_conf.q_ul_4g.num_qgroups - 1;
dev_info->default_queue_conf = default_queue_conf;
dev_info->cpu_flag_reqs = NULL;
- dev_info->min_alignment = 64;
+ dev_info->min_alignment = 1;
dev_info->capabilities = bbdev_capabilities;
#ifdef ACC100_EXT_MEM
dev_info->harq_buffer_size = d->ddr_size;
--
2.37.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 33/37] baseband/acc100: set device min alignment to 1
2022-08-20 2:31 ` [PATCH v2 33/37] baseband/acc100: set device min alignment to 1 Hernan Vargas
@ 2022-09-15 10:24 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2022-09-15 10:24 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
On 8/20/22 04:31, Hernan Vargas wrote:
> Historical mistakes, there should be no 64B alignment requirement for
> the buffer being processed. Any 1B alignment is sufficient.
>
> Fixes: 9200ffa5cd5 ("baseband/acc100: add info get function")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 0e72bc1f57..461ebe67cd 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -1201,7 +1201,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
> d->acc100_conf.q_ul_4g.num_qgroups - 1;
> dev_info->default_queue_conf = default_queue_conf;
> dev_info->cpu_flag_reqs = NULL;
> - dev_info->min_alignment = 64;
> + dev_info->min_alignment = 1;
> dev_info->capabilities = bbdev_capabilities;
> #ifdef ACC100_EXT_MEM
> dev_info->harq_buffer_size = d->ddr_size;
Move it at the beginning of the series.
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 36/37] baseband/acc100: make HARQ layout memory 4GB
[not found] <20220820023157.189047-1-hernan.vargas@intel.com>
` (3 preceding siblings ...)
2022-08-20 2:31 ` [PATCH v2 33/37] baseband/acc100: set device min alignment to 1 Hernan Vargas
@ 2022-08-20 2:31 ` Hernan Vargas
2022-09-15 11:33 ` Maxime Coquelin
2022-08-20 2:31 ` [PATCH v2 37/37] baseband/acc100: reset pointer after rte_free Hernan Vargas
5 siblings, 1 reply; 12+ messages in thread
From: Hernan Vargas @ 2022-08-20 2:31 UTC (permalink / raw)
To: dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
HARQ layout memory should be 4GB instead of 2GB.
Fixes: 4cf90079797 ("baseband/acc100: add HW register definitions")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
drivers/baseband/acc100/acc100_pmd.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/baseband/acc100/acc100_pmd.h b/drivers/baseband/acc100/acc100_pmd.h
index 27801767b7..f9ccb1ea8e 100644
--- a/drivers/baseband/acc100/acc100_pmd.h
+++ b/drivers/baseband/acc100/acc100_pmd.h
@@ -61,8 +61,10 @@
#define ACC100_SIZE_64MBYTE (64*1024*1024)
/* Number of elements in an Info Ring */
#define ACC100_INFO_RING_NUM_ENTRIES 1024
-/* Number of elements in HARQ layout memory */
-#define ACC100_HARQ_LAYOUT (64*1024*1024)
+/* Number of elements in HARQ layout memory
+ * 128M x 32kB = 4GB addressable memory
+ */
+#define ACC100_HARQ_LAYOUT (128*1024*1024)
/* Assume offset for HARQ in memory */
#define ACC100_HARQ_OFFSET (32*1024)
#define ACC100_HARQ_OFFSET_SHIFT 15
--
2.37.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 36/37] baseband/acc100: make HARQ layout memory 4GB
2022-08-20 2:31 ` [PATCH v2 36/37] baseband/acc100: make HARQ layout memory 4GB Hernan Vargas
@ 2022-09-15 11:33 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2022-09-15 11:33 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
On 8/20/22 04:31, Hernan Vargas wrote:
> HARQ layout memory should be 4GB instead of 2GB.
>
> Fixes: 4cf90079797 ("baseband/acc100: add HW register definitions")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc100/acc100_pmd.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/baseband/acc100/acc100_pmd.h b/drivers/baseband/acc100/acc100_pmd.h
> index 27801767b7..f9ccb1ea8e 100644
> --- a/drivers/baseband/acc100/acc100_pmd.h
> +++ b/drivers/baseband/acc100/acc100_pmd.h
> @@ -61,8 +61,10 @@
> #define ACC100_SIZE_64MBYTE (64*1024*1024)
> /* Number of elements in an Info Ring */
> #define ACC100_INFO_RING_NUM_ENTRIES 1024
> -/* Number of elements in HARQ layout memory */
> -#define ACC100_HARQ_LAYOUT (64*1024*1024)
> +/* Number of elements in HARQ layout memory
> + * 128M x 32kB = 4GB addressable memory
> + */
> +#define ACC100_HARQ_LAYOUT (128*1024*1024)
> /* Assume offset for HARQ in memory */
> #define ACC100_HARQ_OFFSET (32*1024)
> #define ACC100_HARQ_OFFSET_SHIFT 15
Please move it to the top of the series for next revision.
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 37/37] baseband/acc100: reset pointer after rte_free
[not found] <20220820023157.189047-1-hernan.vargas@intel.com>
` (4 preceding siblings ...)
2022-08-20 2:31 ` [PATCH v2 36/37] baseband/acc100: make HARQ layout memory 4GB Hernan Vargas
@ 2022-08-20 2:31 ` Hernan Vargas
2022-09-15 11:34 ` Maxime Coquelin
5 siblings, 1 reply; 12+ messages in thread
From: Hernan Vargas @ 2022-08-20 2:31 UTC (permalink / raw)
To: dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable
Set local pointer to NULL after rte_free.
This needs to be set explicitly since logic may check for null pointers.
Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index be4c1d07ed..7755d6402f 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -793,6 +793,9 @@ acc100_dev_close(struct rte_bbdev *dev)
rte_free(d->sw_rings_base);
rte_free(d->harq_layout);
d->sw_rings_base = NULL;
+ d->tail_ptrs = NULL;
+ d->info_ring = NULL;
+ d->harq_layout = NULL;
}
/* Ensure all in flight HW transactions are completed */
usleep(ACC100_LONG_WAIT);
--
2.37.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 37/37] baseband/acc100: reset pointer after rte_free
2022-08-20 2:31 ` [PATCH v2 37/37] baseband/acc100: reset pointer after rte_free Hernan Vargas
@ 2022-09-15 11:34 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2022-09-15 11:34 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable
On 8/20/22 04:31, Hernan Vargas wrote:
> Set local pointer to NULL after rte_free.
> This needs to be set explicitly since logic may check for null pointers.
>
> Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc100/rte_acc100_pmd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index be4c1d07ed..7755d6402f 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -793,6 +793,9 @@ acc100_dev_close(struct rte_bbdev *dev)
> rte_free(d->sw_rings_base);
> rte_free(d->harq_layout);
> d->sw_rings_base = NULL;
> + d->tail_ptrs = NULL;
> + d->info_ring = NULL;
> + d->harq_layout = NULL;
> }
> /* Ensure all in flight HW transactions are completed */
> usleep(ACC100_LONG_WAIT);
Please move it to the top of the series as this is a fix.
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread