bc4e8ca6a4
1. downlod dpdk 2.2.0 debian spec wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0.orig.tar.gz wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.debian.tar.xz dpkg-source -x dpdk_2.2.0-0ubuntu8.dsc Change-Id: Icb9aaf51982fa944e2b8a477c2816bf501ba2e03 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
Description: backport of dpdk 16.04-rc1 fix for LP: #1559981
|
|
|
|
Forwarded: n/a (already upstream)
|
|
Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
|
Last-Update: 2016-03-20
|
|
|
|
From c7a4ff80722e9237a4c504106d21ba5ca27d8df2 Mon Sep 17 00:00:00 2001
|
|
From: Helin Zhang <helin.zhang@intel.com>
|
|
Date: Sat, 12 Mar 2016 00:50:58 +0800
|
|
Subject: [PATCH] i40e: fix overflow
|
|
|
|
The array 'ptype_table' was defined in depth of 'UINT8_MAX' which
|
|
is 255, while the querying index could be from 0 to 255. The issue
|
|
can be fixed with expanding the array to one more element.
|
|
|
|
Fixes: 9571ea028489 ("i40e: replace some offload flags with unified packet type")
|
|
|
|
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
|
|
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
|
|
---
|
|
drivers/net/i40e/i40e_rxtx.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
Index: dpdk/drivers/net/i40e/i40e_rxtx.c
|
|
===================================================================
|
|
--- dpdk.orig/drivers/net/i40e/i40e_rxtx.c
|
|
+++ dpdk/drivers/net/i40e/i40e_rxtx.c
|
|
@@ -198,7 +198,7 @@ i40e_get_iee15888_flags(struct rte_mbuf
|
|
static inline uint32_t
|
|
i40e_rxd_pkt_type_mapping(uint8_t ptype)
|
|
{
|
|
- static const uint32_t ptype_table[UINT8_MAX] __rte_cache_aligned = {
|
|
+ static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = {
|
|
/* L2 types */
|
|
/* [0] reserved */
|
|
[1] = RTE_PTYPE_L2_ETHER,
|
|
@@ -724,7 +724,7 @@ i40e_rxd_pkt_type_mapping(uint8_t ptype)
|
|
/* All others reserved */
|
|
};
|
|
|
|
- return ptype_table[ptype];
|
|
+ return type_table[ptype];
|
|
}
|
|
|
|
#define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03
|