Skip to content

Commit c4019b7

Browse files
authored
Merge pull request #225 from CESNET/fix-input-check-actually-parsed
dpdk - fix checking if any packet has actually been parsed
2 parents ebb8d77 + bc2024b commit c4019b7

File tree

8 files changed

+2874
-3
lines changed

8 files changed

+2874
-3
lines changed

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2024-10-17 ipfixprobe-4.13.0
2+
* usability: introduce docker/podman container to convert PCAP files to CSV
3+
* IPFIX: fix order of TCP options flags
4+
* basicplus: update TCP options mask across flow packets
5+
* utils: introduce memcpy_le32toh() for ipfix representation
6+
* wg: fix parsing and exporting byte order (IPFIX)
7+
* DPDK-ring: optimization: prefetch; read timestamp from HW metadata if available
8+
* cache: optimization - prefetch
9+
* IPv6: fix header parsing
10+
* DPDK&DPDK-ring: fix use of parse_packet(), skip invalid packets causing crash
11+
112
2024-08-28 ipfixprobe-4.12.0
213
* ipfix plugin: support lz4 compression
314
* ipfixprobe: possibility to set workers affinity

Doxyfile

Lines changed: 2819 additions & 0 deletions
Large diffs are not rendered by default.

Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,3 +336,7 @@ deb:
336336
else
337337
endif
338338

339+
.PHONY: doc
340+
doc:
341+
doxygen
342+

NEWS

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2024-10-17 (Tomas Cejka): doc: include generated Doxyfile to create documentation
2+
2024-10-17 (Tomas Cejka): doc: add doxygen comment for parse_packet()
3+
2024-10-16 (Jan Sobol): dpdk-ring - fix checking if any packet has actually been parsed
4+
2024-10-16 (Jan Sobol): dpdk - fix checking if any packet has actually been parsed
5+
2024-10-02 (Damir Zainullin): Fix IPv6 header parsing
6+
2024-09-30 (Pavel Šiška): Merge pull request #220 from CESNET/prefetch-optimizations
7+
2024-09-30 (Pavel Šiška): Merge pull request #219 from CESNET/dpdk-ring-metadata-timestamp
8+
2024-09-30 (Pavel Šiška): Merge pull request #215 from CESNET/new-version
9+
2024-09-26 (Jan Sobol): cache - prefetch flow records before checking their expiration
10+
2024-09-26 (Jan Sobol): dpdk-ring - prefetch dequeued packets before processing
11+
2024-09-25 (Jan Sobol): dpdk-ring - read timestamp from hw metadata if available
12+
2024-09-20 (Tomas Cejka): Merge pull request #216 from CESNET/ipfixprobe-docker-wrapper
13+
2024-09-19 (Tomas Cejka): dist: include docker/ files into distribution archive
14+
2024-09-19 (Jan Sobol): wg - fix parsing and exporting byte order
15+
2024-09-19 (Jan Sobol): utils - introduce memcpy_le32toh function
16+
2024-09-18 (Jan Sobol): basicplus test - fix reference values of tcp options
17+
2024-09-18 (Jan Sobol): basicplus - update tcp options mask across flow packets
18+
2024-09-18 (Jan Sobol): parser - fix order of tcp options flags according to ipfix standard https://www.iana.org/assignments/ipfix/ipfix.xhtml, entity 209 - tcpOptions
19+
2024-09-17 (Jaroslav Pesek): process container - introduce docker/podman container wrapper for processing pcaps to csvs
20+
121
2024-08-28 (Pavel Siska): ipfixprobed - add new option LZ4_COMPRESSION to init script and config example
222
2024-08-28 (Pavel Siska): README.md - add LZ4 compression info
323
2024-08-28 (Jakub Antonín Štigler): ipfix plugin: add lz4 compression

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ([2.69])
5-
AC_INIT([ipfixprobe], [4.12.0], [[email protected]])
5+
AC_INIT([ipfixprobe], [4.13.0], [[email protected]])
66

77
AC_CONFIG_SRCDIR([main.cpp])
88
AC_CONFIG_HEADERS([config.h])

input/dpdk-ring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ InputPlugin::Result DpdkRingReader::get(PacketBlock& packets)
211211
m_stats.receivedPackets += pkts_read_;
212212
m_stats.receivedBytes += packets.bytes;
213213

214-
return Result::PARSED;
214+
return opt.pblock->cnt ? Result::PARSED : Result::NOT_PARSED;
215215
}
216216

217217
telemetry::Content DpdkRingReader::get_queue_telemetry()

input/dpdk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ InputPlugin::Result DpdkReader::get(PacketBlock& packets)
292292
m_stats.receivedPackets += receivedPackets;
293293
m_stats.receivedBytes += packets.bytes;
294294

295-
return Result::PARSED;
295+
return packets.cnt ? Result::PARSED : Result::NOT_PARSED;
296296
}
297297

298298
}

input/parser.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ typedef struct parser_opt_s {
6666
int datalink;
6767
} parser_opt_t;
6868

69+
/**
70+
* \brief Parse one packet and update output metadata in `opt`, and statistics in `stats`.
71+
*
72+
* The function updates the metadata (using `opt->pblock->cnt` index) when the
73+
* packet is successfully parsed. On error, the packet metadata at
74+
* `opt->pblock->cnt` index are invalid and the index points to the same place.
75+
* The caller must ensure `opt->pblock->size` is higher the `opt->pblock->cnt`;
76+
* this is checked and in case of no free space, `parse_packet()` returns
77+
* without any action.
78+
79+
* \param [out] opt Pointer to the structure with an output list of parsed packet metadata.
80+
* \param [out] stats Structure with the ipfixprobe statistics counters.
81+
* \param [in] ts Timestamp of the current packet
82+
* \param [in] data Input data, i.e., pointer to beginning of the packet header.
83+
* \param [in] len Original size of the packet to process.
84+
* \param [in] caplen Capture length - actual size of the packet, i.e., number of bytes that are available in data.
85+
*/
6986
void parse_packet(parser_opt_t *opt, ParserStats& stats, struct timeval ts, const uint8_t *data, uint16_t len, uint16_t caplen);
7087

7188
}

0 commit comments

Comments
 (0)