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 7C8D8A0613 for ; Mon, 23 Sep 2019 09:48:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43ACD1BEA7; Mon, 23 Sep 2019 09:48:39 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id ACF891BEA5 for ; Mon, 23 Sep 2019 09:48:37 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id c6so17930667ioo.13 for ; Mon, 23 Sep 2019 00:48:37 -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=HispEX0g05mCqaiEYuvX03RHV74QQ6HFdw7BQY+49LQ=; b=bw0B/J+aJPbziIWaKFV0IZDU3XO9me6TCp9qmwUZuB6H5RkiQjf2Z03ChbAnnYrgza 7x8SedqLn0gqEQjpCWaXRE2qeajA8P/XbP5nP6hbb6obef8O4WvnviKyVpJIt9zZ/kV2 kv1srACSh8RztLrTgbfLV5OjlG+2PrmdgGAfBw3o12o6DgAbb87tJwSsVW942Vj7uUQs RMgHvGqRxn/hx2mccwIdAG2TEdAPYsCEgajCVRKb+Tb7Fi4mhhI+y9gOd3cCfF8NUooJ q3l7lfZeMxtG/T2j1BBIxOHTomUlnCyM2S1X6dwpr1LoT2p2x1UCpB+phl6cXMXGp+Ey md9A== 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=HispEX0g05mCqaiEYuvX03RHV74QQ6HFdw7BQY+49LQ=; b=Cd4L2Af46m5a1Tp+MkjTeSbSyaBhynEisVL3cMe4r7bjnJpjUUbcfk1rupRIFaCANv bVjTS6iYwLXzXGyKis2ZGEcIimURR6mZWN5xsnes5xAm3xmYT0wIWC1SVPzYQ8MDpz00 ySiR+C8XecjdX6Z76Z1aItOCWbi7JrdUbM26xYA69aJuV5HZTcypabppAbcJI2qxa12V dh7vE7q+Xr8J7pWDSwY6QGF8It3Rabnxlt7Mg6QLWYoXJjmB2jxzpAlL3f/B6eNOY4hA QillBC9J94N4N7RqL539zX8SmW6IguwvOgph2O6jSEJuKIuQIW4p/eiqnHrSEW8iqOrl Cw+g== X-Gm-Message-State: APjAAAXlN7sZ7lB+5BTh7W9REw2czyhLUSRXiUBGcfbFjjl1RVlFrM48 4HHSbRBdCMxuoIGF0J6myYUA3R6X6W+5OZUZE2s= X-Google-Smtp-Source: APXvYqwwjM90Vbu3Xu+AB32tzpX5Pw4FaVD44Skf45hKwPF3MbFh5ll2GPtzHBx1T5v96rUWHbHk02+bDF36u/mvG1I= X-Received: by 2002:a02:ac82:: with SMTP id x2mr32891598jan.34.1569224916830; Mon, 23 Sep 2019 00:48:36 -0700 (PDT) MIME-Version: 1.0 References: <20190814094114.882-1-pbhagavatula@marvell.com> In-Reply-To: From: Jerin Jacob Date: Mon, 23 Sep 2019 13:18:25 +0530 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , dev@dpdk.org, Ferruh Yigit 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 Fri, Sep 13, 2019 at 7:40 PM Jerin Jacob wrote: > > 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 Applied to dpdk-next-net-mrvl/master. Thanks > > > > --- > > 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 > >