d761fec5f6
- Applied all the fixes recommended by upstream for v2.2 stable release(bsc#981996). [+0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch, +0009-bonding-copy-entire-config-structure-in-mode-4.patch, +0010-bonding-fix-active-slaves-with-no-primary.patch, +0011-bonding-do-not-ignore-multicast-in-mode-4.patch, +0012-bonding-do-not-activate-slave-twice.patch, +0013-bonding-fix-crash-when-no-slave-device.patch, +0014-bonding-fix-detach-of-bonded-device.patch, +0015-bonding-fix-detach-of-slave-devices.patch, +0016-eal-linux-support-built-in-kernel-modules.patch, +0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch, +0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch, +0019-i40e-base-fix-driver-load-failure.patch, +0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch, +0021-i40e-fix-inverted-check-for-no-refcount.patch, +0022-i40e-fix-overflow.patch, +0023-i40e-fix-VLAN-filtering.patch, +0024-mempool-fix-leak-when-creation-fails.patch, +0025-pcap-fix-captured-frame-length.patch, +0026-port-fix-crash-for-ethdev-writer-nodrop.patch, +0027-port-fix-crash-for-ring-writer-nodrop.patch, +0028-tools-fix-unbinding-failure-handling.patch, +0029-tools-support-Python-3-in-bind-script.patch, +0030-tools-support-binding-to-built-in-kernel-modules.patch, +0031-vhost-fix-leak-of-fds-and-mmaps.patch, +0032-virtio-fix-crash-in-statistics-functions.patch, +0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch, +0034-virtio-fix-restart.patch] OBS-URL: https://build.opensuse.org/request/show/399089 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=3
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
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(-)
|
|
|
|
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
|
|
index 8931b8e..c10eeff 100644
|
|
--- a/drivers/net/i40e/i40e_rxtx.c
|
|
+++ b/drivers/net/i40e/i40e_rxtx.c
|
|
@@ -192,7 +192,7 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword)
|
|
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,
|
|
@@ -718,7 +718,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
|
|
--
|
|
2.6.2
|
|
|