diff options
-rw-r--r-- | recipes-extended/dpdk/dpdk/dpdk-17.11-Fix-strncpy-error-for-GCC8.patch | 82 | ||||
-rw-r--r-- | recipes-extended/dpdk/dpdk_17.11.6.bb (renamed from recipes-extended/dpdk/dpdk_17.11.3.bb) | 9 |
2 files changed, 6 insertions, 85 deletions
diff --git a/recipes-extended/dpdk/dpdk/dpdk-17.11-Fix-strncpy-error-for-GCC8.patch b/recipes-extended/dpdk/dpdk/dpdk-17.11-Fix-strncpy-error-for-GCC8.patch deleted file mode 100644 index 2014b3e..0000000 --- a/recipes-extended/dpdk/dpdk/dpdk-17.11-Fix-strncpy-error-for-GCC8.patch +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | From 30234e8bf0a8c0fe348aaa147307488f59b3265a Mon Sep 17 00:00:00 2001 | ||
2 | From: He Zhe <zhe.he@windriver.com> | ||
3 | Date: Mon, 13 Aug 2018 20:06:31 +0800 | ||
4 | Subject: [PATCH] dpdk 17.11: Fix strncpy error for GCC8 | ||
5 | |||
6 | GCC 8 adds -Wstringop-truncation. If -Werror=stringop-truncation is | ||
7 | enabled. We will meet errors like the following: | ||
8 | |||
9 | examples/vhost_scsi/scsi.c:213:4: error: 'strncpy' output may be truncated | ||
10 | copying 32 bytes from a string of length 63 [-Werror=stringop-truncation] | ||
11 | | strncpy((char *)vpage->params, bdev->name, 32); | ||
12 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
13 | |||
14 | Upstream-Status: Submitted [stable@dpdk.org] | ||
15 | |||
16 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
17 | --- | ||
18 | examples/ip_pipeline/config_parse_tm.c | 2 +- | ||
19 | examples/ipsec-secgw/parser.c | 2 +- | ||
20 | examples/vhost_scsi/scsi.c | 6 +++--- | ||
21 | 3 files changed, 5 insertions(+), 5 deletions(-) | ||
22 | |||
23 | diff --git a/examples/ip_pipeline/config_parse_tm.c b/examples/ip_pipeline/config_parse_tm.c | ||
24 | index e75eed7..1c945c9 100644 | ||
25 | --- a/examples/ip_pipeline/config_parse_tm.c | ||
26 | +++ b/examples/ip_pipeline/config_parse_tm.c | ||
27 | @@ -352,7 +352,7 @@ tm_cfgfile_load_sched_subport( | ||
28 | char name[CFG_NAME_LEN + 1]; | ||
29 | |||
30 | profile = atoi(entries[j].value); | ||
31 | - strncpy(name, | ||
32 | + memcpy(name, | ||
33 | entries[j].name, | ||
34 | sizeof(name)); | ||
35 | n_tokens = rte_strsplit( | ||
36 | diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c | ||
37 | index 9d0ea46..e0881b7 100644 | ||
38 | --- a/examples/ipsec-secgw/parser.c | ||
39 | +++ b/examples/ipsec-secgw/parser.c | ||
40 | @@ -544,7 +544,7 @@ parse_cfg_file(const char *cfg_filename) | ||
41 | goto error_exit; | ||
42 | } | ||
43 | |||
44 | - strncpy(str + strlen(str), oneline, | ||
45 | + memcpy(str + strlen(str), oneline, | ||
46 | strlen(oneline)); | ||
47 | |||
48 | continue; | ||
49 | diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c | ||
50 | index fd430ec..47c5c83 100644 | ||
51 | --- a/examples/vhost_scsi/scsi.c | ||
52 | +++ b/examples/vhost_scsi/scsi.c | ||
53 | @@ -210,7 +210,7 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev, | ||
54 | break; | ||
55 | case SPC_VPD_UNIT_SERIAL_NUMBER: | ||
56 | hlen = 4; | ||
57 | - strncpy((char *)vpage->params, bdev->name, 32); | ||
58 | + memcpy((char *)vpage->params, bdev->name, 32); | ||
59 | vpage->alloc_len = rte_cpu_to_be_16(32); | ||
60 | break; | ||
61 | case SPC_VPD_DEVICE_IDENTIFICATION: | ||
62 | @@ -247,7 +247,7 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev, | ||
63 | strncpy((char *)desig->desig, "INTEL", 8); | ||
64 | vhost_strcpy_pad((char *)&desig->desig[8], | ||
65 | bdev->product_name, 16, ' '); | ||
66 | - strncpy((char *)&desig->desig[24], bdev->name, 32); | ||
67 | + memcpy((char *)&desig->desig[24], bdev->name, 32); | ||
68 | len += sizeof(struct scsi_desig_desc) + 8 + 16 + 32; | ||
69 | |||
70 | buf += sizeof(struct scsi_desig_desc) + desig->len; | ||
71 | @@ -312,7 +312,7 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev, | ||
72 | bdev->product_name); | ||
73 | |||
74 | /* PRODUCT REVISION LEVEL */ | ||
75 | - strncpy((char *)inqdata->product_rev, "0001", 4); | ||
76 | + memcpy((char *)inqdata->product_rev, "0001", 4); | ||
77 | |||
78 | /* Standard inquiry data ends here. Only populate | ||
79 | * remaining fields if alloc_len indicates enough | ||
80 | -- | ||
81 | 2.7.4 | ||
82 | |||
diff --git a/recipes-extended/dpdk/dpdk_17.11.3.bb b/recipes-extended/dpdk/dpdk_17.11.6.bb index af42ad8..01bacd6 100644 --- a/recipes-extended/dpdk/dpdk_17.11.3.bb +++ b/recipes-extended/dpdk/dpdk_17.11.6.bb | |||
@@ -2,7 +2,7 @@ include dpdk.inc | |||
2 | 2 | ||
3 | STABLE = "-stable" | 3 | STABLE = "-stable" |
4 | BRANCH = "17.11" | 4 | BRANCH = "17.11" |
5 | SRCREV = "01dc7ba3ef05afe7e1e52514a8f5d476b1bf67f1" | 5 | SRCREV = "63d5c53b845d8360c0106374ce76eef9b5478c60" |
6 | 6 | ||
7 | LICENSE = "LGPLv2 & GPLv2" | 7 | LICENSE = "LGPLv2 & GPLv2" |
8 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe\ | 8 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe\ |
@@ -10,7 +10,10 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe\ | |||
10 | 10 | ||
11 | SRC_URI += "\ | 11 | SRC_URI += "\ |
12 | file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \ | 12 | file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \ |
13 | file://dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch \ | ||
14 | file://dpdk-17.11-Fix-strncpy-error-for-GCC8.patch \ | ||
15 | file://dpdk-17.11-mk-disable-warning-for-packed-member-pointer.patch \ | 13 | file://dpdk-17.11-mk-disable-warning-for-packed-member-pointer.patch \ |
16 | " | 14 | " |
15 | |||
16 | do_install_append () { | ||
17 | # Remove the unneeded dir | ||
18 | rm -rf ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
19 | } | ||