From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B0EB5A2EEB for ; Fri, 13 Sep 2019 16:10:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64ABF1F04E; Fri, 13 Sep 2019 16:10:53 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 120D51F04A for ; Fri, 13 Sep 2019 16:10:52 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id m11so62810520ioo.0 for ; Fri, 13 Sep 2019 07:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GkVtcwCwdcJNv0JiyzhXe26oAXjzBSYo1N63mr0TyVk=; b=VNDLL/75F2GC+ySvWfXV3A1GWl5Z77UlwgLnHorPuj2zlIs4YFTbNwl4L5tFVeCyMj /rA5nsTSiarsJ/mfs4+w42ARUeEOamTi6ZrGDGzgBPrYKbHRXyjOmy97+68ShRZ6Pr6N TsgThtuYq/Tnt7YtNL6nKQWdlsRnzl6p+J0ZkErDM5vClcEBawjRAt2G5dLoL4wEv9S/ 7MpvFAIZ4g7ilA3gEaKy/BKUKBvjkg9H+0IMXGG4fCDdZ6Fvz7ap7O7nfhWp+g7gMrds N+Tjt7ZrCICNMZ0ivLQIq00pxkDMkQEmRp4q1k0RqtSGgurM4msz++fSA+znmGZmwjj1 tpvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GkVtcwCwdcJNv0JiyzhXe26oAXjzBSYo1N63mr0TyVk=; b=UJKk/2MhbDxvuvZIpWbSzP/jo7413SLbpFMu7SG0fY13iO3AcIXP7eFykDbLFIRONe vCaA21Olwvns4M59rMz/HXS0Eaoh6WATF5BOfAiqsl2epaLof4Nn+dFCBsl2t0MTDUpt /9PYo4yccsMYYg4VwTWMqqtKrGE+vp227kmWylFMk9IjDyqAM8mRIoK4a8n3wyYvOunD tnZb40BWFpTRQDPsMtdtDbdu0LQmNviGSt8H2vYABHmJwj9I9DWX7Zbxw1JrRTEDv7W4 rtNDz7M3++ACNrm4OuJ9zEaOTqEW8KbLepZ+7Se5G2Z1Wb0QPKrdlpaf4zp09hN5Z6vV aYdg== X-Gm-Message-State: APjAAAXDYIxmWPtpcg5ksLya3tU9psyAcouhVSlC/9vpkQKHc1vzY28g qeac5TicJITAP9GaIIMENlL7Id7RX9EemnayBis= X-Google-Smtp-Source: APXvYqyOz6alg/60DTnA/dCR38rkSZ1zj9WZRIA86z0ETykGfK8uGqb3dY/4cPHKGp9lhuVlKpuiGsAbw8qIxnl1r/o= X-Received: by 2002:a6b:c895:: with SMTP id y143mr29716iof.271.1568383851154; Fri, 13 Sep 2019 07:10:51 -0700 (PDT) MIME-Version: 1.0 References: <20190814094114.882-1-pbhagavatula@marvell.com> In-Reply-To: <20190814094114.882-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Fri, 13 Sep 2019 19:40:40 +0530 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [patch] net/octeontx2: fix ptype get overflow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Aug 14, 2019 at 3:11 PM wrote: > > From: Pavan Nikhilesh > > 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 Acked-by: Jerin Jacob > --- > 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 >