|
Revision tags: v24.11, v24.11-rc4 |
|
| #
0cbf2752 |
| 20-Nov-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: avoid potential unaligned data
The buffer used to construct headers (which contain 32 bit values) was declared as uint8_t which can lead to unaligned access. Change to declare buffer as uint
pcapng: avoid potential unaligned data
The buffer used to construct headers (which contain 32 bit values) was declared as uint8_t which can lead to unaligned access. Change to declare buffer as uint32_t.
Fixes: dc2d6d20047e ("pcapng: avoid using alloca") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
|
Revision tags: v24.11-rc3, v24.11-rc2, v24.11-rc1 |
|
| #
6db35853 |
| 13-Sep-2024 |
Oleksandr Nahnybida <oleksandrn@interfacemasters.com> |
pcapng: fix handling of chained mbufs
The pcapng generates corrupted files when dealing with chained mbufs. This issue arises because in rte_pcapng_copy the length of the EPB block is incorrectly ca
pcapng: fix handling of chained mbufs
The pcapng generates corrupted files when dealing with chained mbufs. This issue arises because in rte_pcapng_copy the length of the EPB block is incorrectly calculated using the data_len of the first mbuf instead of the pkt_len, despite that rte_pcapng_write_packets correctly writing the mbuf chain to disk.
This fix ensures that the block length is calculated based on the pkt_len, aligning it with the actual data written to disk.
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Cc: stable@dpdk.org
Signed-off-by: Oleksandr Nahnybida <oleksandrn@interfacemasters.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
|
Revision tags: v24.07, v24.07-rc4, v24.07-rc3, v24.07-rc2, v24.07-rc1 |
|
| #
06f69f8f |
| 21-May-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: add memcpy check
When adding option with no data, the rte_pcapng_add_option would call memcpy with src of NULL and size of zero. This generates a warning if fortify is enabled.
Bugzilla ID:
pcapng: add memcpy check
When adding option with no data, the rte_pcapng_add_option would call memcpy with src of NULL and size of zero. This generates a warning if fortify is enabled.
Bugzilla ID: 1446 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
|
Revision tags: v24.03, v24.03-rc4, v24.03-rc3, v24.03-rc2, v24.03-rc1, v23.11, v23.11-rc4 |
|
| #
dc2d6d20 |
| 17-Nov-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: avoid using alloca
The function alloca() like VLA's has problems if the caller passes a large value. Instead use a fixed size buffer (2K) which will be more than sufficient for the info rela
pcapng: avoid using alloca
The function alloca() like VLA's has problems if the caller passes a large value. Instead use a fixed size buffer (2K) which will be more than sufficient for the info related blocks in the file. Add bounds checks as well.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
| #
16659193 |
| 17-Nov-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: modify timestamp calculation
The computation of timestamp is best done in the part of pcapng library that is in secondary process. The secondary process is already doing a bunch of system ca
pcapng: modify timestamp calculation
The computation of timestamp is best done in the part of pcapng library that is in secondary process. The secondary process is already doing a bunch of system calls which makes it not performance sensitive. This does change the rte_pcapng_copy() and rte_pcapng_write_stats() functions which were experimental before 23.11.
Simplify the computation of nanoseconds from TSC to a two step process which avoids numeric overflow issues. The previous code was not thread safe as well.
Fixes: c882eb544842 ("pcapng: fix timestamp wrapping in output files") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
|
Revision tags: v23.11-rc3, v23.11-rc2, v23.11-rc1, v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2, v23.07-rc1, v23.03, v23.03-rc4, v23.03-rc3, v23.03-rc2, v23.03-rc1 |
|
| #
beb43124 |
| 19-Feb-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: build on Windows
Allow building on Windows, need to provide some compatibility wrappers for writev() and if_nametoindex().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acke
pcapng: build on Windows
Allow building on Windows, need to provide some compatibility wrappers for writev() and if_nametoindex().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
show more ...
|
| #
c1abd1e9 |
| 09-Feb-2023 |
Amit Prakash Shukla <amitprakashs@marvell.com> |
pcapng: support comment in enhanced packet block
This change enhances rte_pcapng_copy to have comment in enhanced packet block.
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-b
pcapng: support comment in enhanced packet block
This change enhances rte_pcapng_copy to have comment in enhanced packet block.
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| #
d1da6d0d |
| 04-Jan-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: require per-interface information
This changes the API for how pcapng is used. Before each interface was automatically added to the capture file. Now the application must add each interface
pcapng: require per-interface information
This changes the API for how pcapng is used. Before each interface was automatically added to the capture file. Now the application must add each interface. Note: API changes are allowed because this is an experimental interface.
This allows application to specify extra meta data like interface name, description and packet filter.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
|
Revision tags: v22.11, v22.11-rc4, v22.11-rc3, v22.11-rc2, v22.11-rc1 |
|
| #
d2e3c4b8 |
| 26-Jul-2022 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: record received RSS hash in pcap file
There is an option for recording RSS hash with packets in the pcapng standard. This implements this for all received packets.
There is a corner case th
pcapng: record received RSS hash in pcap file
There is an option for recording RSS hash with packets in the pcapng standard. This implements this for all received packets.
There is a corner case that can not be addressed with current DPDK API's. If using rte_flow() and some hardware it is possible to write a flow rule that uses another hash function like XOR. But there is no API that records this, or provides the algorithm info on a per-packet basis.
Wireshark recently merged support for displaying the recorded hash option (for, yet to be released, version 4.1).
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Tested-by: Ben Magistro <koncept1@gmail.com>
show more ...
|
| #
0744f1c9 |
| 01-Aug-2022 |
Mário Kuka <kuka@cesnet.cz> |
pcapng: fix write more packets than IOV_MAX limit
The rte_pcapng_write_packets() function fails when we try to write more packets than the IOV_MAX limit. writev() system call is limited by the IOV_M
pcapng: fix write more packets than IOV_MAX limit
The rte_pcapng_write_packets() function fails when we try to write more packets than the IOV_MAX limit. writev() system call is limited by the IOV_MAX limit. The iovcnt argument is valid if it is greater than 0 and less than or equal to IOV_MAX as defined in <limits.h>.
To avoid this problem, we can check that all segments of the next packet will fit into the iovec buffer, whose capacity will be limited by the IOV_MAX limit. If not, we flush the current iovec buffer to the file by calling writev() and, if successful, fit the current packet at the beginning of the flushed iovec buffer.
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Cc: stable@dpdk.org
Signed-off-by: Mário Kuka <kuka@cesnet.cz> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| #
1acb7f54 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
dev: hide driver object
Make rte_driver opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver defi
dev: hide driver object
Make rte_driver opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver definition. Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_driver objects, mark this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Akhil Goyal <gakhil@marvell.com> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
show more ...
|
| #
a04322f6 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus: hide bus object
Make rte_bus opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition an
bus: hide bus object
Make rte_bus opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
| #
770ebc06 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API. Move it to rte_eal.h. With this step, rte_eal.h does not depend on rte_bus.h and rte_de
bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API. Move it to rte_eal.h. With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h. Fix existing code that was relying on these implicit inclusions.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
|
Revision tags: v22.07, v22.07-rc4, v22.07-rc3, v22.07-rc2, v22.07-rc1 |
|
| #
c882eb54 |
| 17-May-2022 |
Quentin Armitage <quentin@armitage.org.uk> |
pcapng: fix timestamp wrapping in output files
In pcap_tsc_to_ns(), delta * NSEC_PER_SEC will overflow approx 8 seconds after pcap_init is called when using a TSC with a frequency of 2.5GHz.
To avo
pcapng: fix timestamp wrapping in output files
In pcap_tsc_to_ns(), delta * NSEC_PER_SEC will overflow approx 8 seconds after pcap_init is called when using a TSC with a frequency of 2.5GHz.
To avoid the overflow, update the saved time and TSC value once delta >= tsc_hz.
Fixes: 8d23ce8f5ee ("pcapng: add new library for writing pcapng files") Cc: stable@dpdk.org
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1 |
|
| #
442878db |
| 10-Feb-2022 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: handle failure of link status query
If rte_ethlink_get fails, the code can just not add speed to the pcap file.
Coverity issue: 373664 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writ
pcapng: handle failure of link status query
If rte_ethlink_get fails, the code can just not add speed to the pcap file.
Coverity issue: 373664 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| #
30a1de10 |
| 15-Feb-2022 |
Sean Morrissey <sean.morrissey@intel.com> |
lib: remove unneeded header includes
These header includes have been flagged by the iwyu_tool and removed.
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2 |
|
| #
ae1702ff |
| 29-Oct-2021 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: use new ethdev namespace
RTE_ prefix was added by commit 295968d17407 ("ethdev: add namespace")
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")
Signed-off-by: Step
pcapng: use new ethdev namespace
RTE_ prefix was added by commit 295968d17407 ("ethdev: add namespace")
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
|
Revision tags: v21.11-rc1 |
|
| #
daa02b5c |
| 15-Oct-2021 |
Olivier Matz <olivier.matz@6wind.com> |
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Sign
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
| #
8d23ce8f |
| 20-Oct-2021 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: add new library for writing pcapng files
This is utility library for writing pcapng format files used by Wireshark family of utilities. Older tcpdump also knows how to read (but not write) t
pcapng: add new library for writing pcapng files
This is utility library for writing pcapng format files used by Wireshark family of utilities. Older tcpdump also knows how to read (but not write) this format.
See https://github.com/pcapng/pcapng/
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Reshma Pattan <reshma.pattan@intel.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
show more ...
|