summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-01 23:03:07 -0700
committerSaul Wold <sgw@linux.intel.com>2017-08-02 08:44:31 -0700
commite03cdba151d514a56a0c5dcf7490ce8486a54bb6 (patch)
treee3e1c07bf3aa092e23b73cf9df90563d14533e30 /common
parent740e34f1e7d8cfd6bfd4bda8f78d9763d8cb0ae2 (diff)
downloadmeta-intel-e03cdba151d514a56a0c5dcf7490ce8486a54bb6.tar.gz
dpdk: Fix build with examples
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common')
-rw-r--r--common/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch44
-rw-r--r--common/recipes-extended/dpdk/dpdk_17.05.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/common/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch b/common/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch
new file mode 100644
index 00000000..cc8041e7
--- /dev/null
+++ b/common/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch
@@ -0,0 +1,44 @@
1From 3924f5df5aca5ba23abbe9a84173280ede8be2dd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 1 Aug 2017 20:18:46 -0700
4Subject: [PATCH] examples: Fix maybe-uninitialized warning
5
6Initialize arrays to 0, makes compiler happy about
7
8error: 'vals[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 examples/qos_sched/args.c | 2 +-
13 examples/vhost/virtio_net.c | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
17index 476a0ee..fd601c3 100644
18--- a/examples/qos_sched/args.c
19+++ b/examples/qos_sched/args.c
20@@ -241,7 +241,7 @@ static int
21 app_parse_flow_conf(const char *conf_str)
22 {
23 int ret;
24- uint32_t vals[5];
25+ uint32_t vals[5] = {0};
26 struct flow_conf *pconf;
27 uint64_t mask;
28
29diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c
30index cc2c3d8..16b5392 100644
31--- a/examples/vhost/virtio_net.c
32+++ b/examples/vhost/virtio_net.c
33@@ -327,7 +327,7 @@ vs_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id,
34 {
35 struct vhost_queue *queue;
36 struct rte_vhost_vring *vr;
37- uint32_t desc_indexes[MAX_PKT_BURST];
38+ uint32_t desc_indexes[MAX_PKT_BURST] = {0};
39 uint32_t used_idx;
40 uint32_t i = 0;
41 uint16_t free_entries;
42--
432.13.3
44
diff --git a/common/recipes-extended/dpdk/dpdk_17.05.bb b/common/recipes-extended/dpdk/dpdk_17.05.bb
index 9c23fadd..1a696ede 100644
--- a/common/recipes-extended/dpdk/dpdk_17.05.bb
+++ b/common/recipes-extended/dpdk/dpdk_17.05.bb
@@ -2,6 +2,7 @@ include dpdk.inc
2 2
3SRC_URI += "\ 3SRC_URI += "\
4 file://dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch \ 4 file://dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch \
5 file://0001-examples-Fix-maybe-uninitialized-warning.patch \
5 " 6 "
6 7
7SRC_URI[dpdk.md5sum] = "39c4e1110dd1ef9dab33edbae820f939" 8SRC_URI[dpdk.md5sum] = "39c4e1110dd1ef9dab33edbae820f939"