net/octeontx2: fix packet type get overflow
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Wed, 14 Aug 2019 09:41:13 +0000 (15:11 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
commit7557f2fbde4fbd8682526c24743792df26a2b27a
treea624b26a90ecd9ebae39d18ee79058ef1ecb10fc
parent54773be154dadf40480f315ebc5691a65cc9f4aa
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 <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/octeontx2/otx2_lookup.c