diff --git a/0020-pdump-fix-pcap_dump-coredump.patch b/0020-pdump-fix-pcap_dump-coredump.patch new file mode 100644 index 0000000000000000000000000000000000000000..ec4d0093ad57e41d59dd6df66c2d6f0f5d93c529 --- /dev/null +++ b/0020-pdump-fix-pcap_dump-coredump.patch @@ -0,0 +1,32 @@ +From c02e48b92050856389403518be8bb70a4fdda551 Mon Sep 17 00:00:00 2001 +From: jiangheng12 +Date: Thu, 8 Jun 2023 20:59:15 +0800 +Subject: [PATCH] pdump: fix pcap_dump coredump + +--- + drivers/net/pcap/pcap_ethdev.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c +index ec29fd6..40ad166 100644 +--- a/drivers/net/pcap/pcap_ethdev.c ++++ b/drivers/net/pcap/pcap_ethdev.c +@@ -408,8 +408,13 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) + * in the mbuf (when the mbuf is contiguous) or, otherwise, + * a pointer to temp_data after copying into it. + */ +- pcap_dump((u_char *)dumper, &header, +- rte_pktmbuf_read(mbuf, 0, caplen, temp_data)); ++ const void *sp = rte_pktmbuf_read(mbuf, 0, caplen, temp_data); ++ if (sp == NULL) { ++ rte_pktmbuf_free(mbuf); ++ continue; ++ } else { ++ pcap_dump((u_char *)dumper, &header, sp); ++ } + + num_tx++; + tx_bytes += caplen; +-- +2.23.0 + diff --git a/dpdk.spec b/dpdk.spec index 83742bf1d45707d884fcb2106d24188f5aa73b95..38d0cb5f75269c3fb1ec3de6c42eadbcbf6d7116 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 21.11 -Release: 48 +Release: 49 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 21.11 @@ -330,10 +330,12 @@ Patch6306: 0306-net-hns3-fix-device-start-return-value.patch Patch6307: 0307-net-hns3-fix-uninitialized-variable.patch Patch6308: 0308-net-hns3-refactor-code.patch Patch6309: 0309-net-hns3-fix-inaccurate-log.patch -Patch9310: 0310-net-hns3-fix-redundant-line-break-in-log.patch -Patch9311: 0311-ethdev-add-API-to-check-if-queue-is-valid.patch -Patch9312: 0312-app-testpmd-fix-segment-fault-with-invalid-queue-ID.patch -Patch9313: 0313-net-hns3-fix-IMP-reset-trigger.patch +Patch6310: 0310-net-hns3-fix-redundant-line-break-in-log.patch +Patch6311: 0311-ethdev-add-API-to-check-if-queue-is-valid.patch +Patch6312: 0312-app-testpmd-fix-segment-fault-with-invalid-queue-ID.patch +Patch6313: 0313-net-hns3-fix-IMP-reset-trigger.patch + +Patch9020: 0020-pdump-fix-pcap_dump-coredump.patch Summary: Data Plane Development Kit core Group: System Environment/Libraries @@ -478,6 +480,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko /usr/sbin/depmod %changelog +* Tue Jun 13 2023 jiangheng - 21.11-49 +- pdump: fix pcap_dump coredump + * Fir Jun 09 2023 jiangheng - 21.11-48 - distinguish self and upstream patches number