patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Dana Vardi <danat@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>, dpdk-dev <dev@dpdk.org>,
	Liron Himi <lironh@marvell.com>,
	 Tomasz Duszynski <tdu@semihalf.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mvpp2: fix port max speed overflow
Date: Mon, 12 Jul 2021 13:31:40 +0530	[thread overview]
Message-ID: <CALBAE1NRGJp8ywrg2N239xMYGRCW1WMaABZ0P4foGh+ANrUseg@mail.gmail.com> (raw)
In-Reply-To: <20210711131143.11893-1-danat@marvell.com>

On Sun, Jul 11, 2021 at 6:41 PM <danat@marvell.com> wrote:
>
> From: Dana Vardi <danat@marvell.com>
>
> ethtool_cmd_speed return uint32 and after the arithmetic
> operation in mrvl_get_max_rate func the result is out of range.
>
> Fixes: 429c394417 ("net/mvpp2: support traffic manager")
> Cc: tdu@semihalf.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Dana Vardi <danat@marvell.com>
> Reviewed-by: Liron Himi <lironh@marvell.com>


Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/net/mvpp2/mrvl_tm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/mvpp2/mrvl_tm.c b/drivers/net/mvpp2/mrvl_tm.c
> index a3150328d9..4d75f8e915 100644
> --- a/drivers/net/mvpp2/mrvl_tm.c
> +++ b/drivers/net/mvpp2/mrvl_tm.c
> @@ -57,7 +57,7 @@ mrvl_get_max_rate(struct rte_eth_dev *dev, uint64_t *rate)
>
>         close(fd);
>
> -       *rate = ethtool_cmd_speed(&edata) * 1000 * 1000 / 8;
> +       *rate = (uint64_t)ethtool_cmd_speed(&edata) * 1000 * 1000 / 8;
>
>         return 0;
>  }
> --
> 2.17.1
>

      reply	other threads:[~2021-07-12  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 13:11 [dpdk-stable] " danat
2021-07-12  8:01 ` Jerin Jacob [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=CALBAE1NRGJp8ywrg2N239xMYGRCW1WMaABZ0P4foGh+ANrUseg@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=danat@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=lironh@marvell.com \
    --cc=stable@dpdk.org \
    --cc=tdu@semihalf.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).