[v1,3/9] baseband/acc: remove interrupt support on VRB1

Message ID 20230209221929.265059-4-nicolas.chautru@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series baseband/acc: VRB PMD fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chautru, Nicolas Feb. 9, 2023, 10:19 p.m. UTC
  Not enabling interrupt in VRB1 PMD variant to avoid
potential corner case.

Fixes: 3cabc8eaf524 ("baseband/acc200: support interrupt")
Cc: stable@dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/acc/rte_vrb_pmd.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Maxime Coquelin Feb. 10, 2023, 8:31 a.m. UTC | #1
On 2/9/23 23:19, Nicolas Chautru wrote:
> Not enabling interrupt in VRB1 PMD variant to avoid
> potential corner case.
> 
> Fixes: 3cabc8eaf524 ("baseband/acc200: support interrupt")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   drivers/baseband/acc/rte_vrb_pmd.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
> index c43c08afe8..a111836e51 100644
> --- a/drivers/baseband/acc/rte_vrb_pmd.c
> +++ b/drivers/baseband/acc/rte_vrb_pmd.c
> @@ -586,6 +586,14 @@ vrb_intr_enable(struct rte_bbdev *dev)
>   {
>   	int ret;
>   	struct acc_device *d = dev->data->dev_private;
> +
> +	if (d->device_variant == VRB1_VARIANT) {
> +		/* On VRB1: cannot enable MSI/IR to avoid potential back-pressure corner case. */
> +		rte_bbdev_log(ERR, "VRB1 (%s) doesn't support any MSI/MSI-X interrupt\n",
> +				dev->data->name);
> +		return -ENOTSUP;
> +	}
> +
>   	/*
>   	 * MSI/MSI-X are supported.
>   	 * Option controlled by vfio-intr through EAL parameter.

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
index c43c08afe8..a111836e51 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -586,6 +586,14 @@  vrb_intr_enable(struct rte_bbdev *dev)
 {
 	int ret;
 	struct acc_device *d = dev->data->dev_private;
+
+	if (d->device_variant == VRB1_VARIANT) {
+		/* On VRB1: cannot enable MSI/IR to avoid potential back-pressure corner case. */
+		rte_bbdev_log(ERR, "VRB1 (%s) doesn't support any MSI/MSI-X interrupt\n",
+				dev->data->name);
+		return -ENOTSUP;
+	}
+
 	/*
 	 * MSI/MSI-X are supported.
 	 * Option controlled by vfio-intr through EAL parameter.