patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>,
	dev@dpdk.org, gakhil@marvell.com, trix@redhat.com
Cc: thomas@monjalon.net, ray.kinsella@intel.com,
	bruce.richardson@intel.com, hemant.agrawal@nxp.com,
	hernan.vargas@intel.com, david.marchand@redhat.com,
	stable@dpdk.org
Subject: Re: [PATCH v7 2/6] baseband/acc100: add protection for some negative scenario
Date: Thu, 2 Jun 2022 10:21:13 +0200	[thread overview]
Message-ID: <2a7ef4f9-5499-d6fa-190a-3559d9e3c9f1@redhat.com> (raw)
In-Reply-To: <1654036307-182860-3-git-send-email-nicolas.chautru@intel.com>



On 6/1/22 00:31, Nicolas Chautru wrote:
> Catch exception in PMD in case of invalid input parameter.
> 
> Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   drivers/baseband/acc100/rte_acc100_pmd.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 79bee43..32c8bc2 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -1236,6 +1236,8 @@
>   			return (bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * z_c;
>   	}
>   	/* LBRM case - includes a division by N */
> +	if (unlikely(z_c == 0))
> +		return 0;
>   	if (rv_index == 1)
>   		return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb)
>   				/ n) * z_c;
> @@ -1764,6 +1766,10 @@
>   
>   	/* Soft output */
>   	if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
> +		if (op->turbo_dec.soft_output.data == 0) {
> +			rte_bbdev_log(ERR, "Soft output is not defined");
> +			return -1;
> +		}
>   		if (check_bit(op->turbo_dec.op_flags,
>   				RTE_BBDEV_TURBO_EQUALIZER))
>   			*s_out_length = e;

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

Thanks,
Maxime


      reply	other threads:[~2022-06-02  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1651083423-33202-1-git-send-email-nicolas.chautru@intel.com>
     [not found] ` <1653341116-50325-1-git-send-email-nicolas.chautru@intel.com>
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
     [not found] ` <1653350912-53876-1-git-send-email-nicolas.chautru@intel.com>
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
     [not found]   ` <1653526523-68839-1-git-send-email-nicolas.chautru@intel.com>
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
     [not found]   ` <1654036307-182860-1-git-send-email-nicolas.chautru@intel.com>
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 [this message]

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=2a7ef4f9-5499-d6fa-190a-3559d9e3c9f1@redhat.com \
    --to=maxime.coquelin@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=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=ray.kinsella@intel.com \
    --cc=stable@dpdk.org \
    --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).