DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Pavan Nikhilesh <pbhagavatula@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	 Kiran Kumar K <kirankumark@marvell.com>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [patch] net/octeontx2: fix ptype get overflow
Date: Fri, 13 Sep 2019 19:40:40 +0530	[thread overview]
Message-ID: <CALBAE1MPbqmc=F7i89K9y3S0kXbm-Uobcri4CM5jh4CTJ2hJMw@mail.gmail.com> (raw)
In-Reply-To: <20190814094114.882-1-pbhagavatula@marvell.com>

On Wed, Aug 14, 2019 at 3:11 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> The function `rte_eth_dev_get_supported_ptypes` expects the underlying
> ethernet device to return array of supported ptypes. The ethernet device
> needs to set `RTE_PTYPE_UNKNOWN` as the last element which signifies
> thats its the end of the ptype array.
> Else the function `rte_eth_dev_get_supported_ptypes` might overflow.
>

Cc: stable@dpdk.org

> Fixes: 6e892eabce11 ("net/octeontx2: support packet type")
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>


> ---
>  drivers/net/octeontx2/otx2_lookup.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
> index 99199d08a..3347e7014 100644
> --- a/drivers/net/octeontx2/otx2_lookup.c
> +++ b/drivers/net/octeontx2/otx2_lookup.c
> @@ -53,6 +53,7 @@ otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
>                 RTE_PTYPE_INNER_L4_UDP,  /* LH */
>                 RTE_PTYPE_INNER_L4_SCTP, /* LH */
>                 RTE_PTYPE_INNER_L4_ICMP, /* LH */
> +               RTE_PTYPE_UNKNOWN,
>         };
>
>         if (dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)
> --
> 2.17.1
>

  reply	other threads:[~2019-09-13 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14  9:41 pbhagavatula
2019-09-13 14:10 ` Jerin Jacob [this message]
2019-09-23  7:48   ` Jerin Jacob

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='CALBAE1MPbqmc=F7i89K9y3S0kXbm-Uobcri4CM5jh4CTJ2hJMw@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.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).