From: Pavan Nikhilesh Date: Wed, 14 Aug 2019 09:41:13 +0000 (+0530) Subject: net/octeontx2: fix packet type get overflow X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7557f2fbde4fbd8682526c24743792df26a2b27a;p=dpdk.git net/octeontx2: fix packet type get overflow 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. Fixes: 6e892eabce11 ("net/octeontx2: support packet type") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c index 99199d08ac..3347e7014f 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)