net/pcap: build on Windows
Status from this message: Applied, thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest3 patches 1 replyApplied
- v43 patches 5 repliesSuperseded
- v33 patches 3 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 6 patches | 29 replies | Applied | |
| v1 | 6 patches | 3 replies | Superseded |
Changes in v5 from the cover letter
* Add timespec_get() shim for FreeBSD < 12.2 (CI, Thomas).
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | eal: add timespec_get shimlib/ lib/ | +49 | 0 replies | |
| 2/3 | net/pcap: move OS-dependent code to separate filesdrivers/ drivers/ drivers/ +2 more | +136 | 0 replies | |
| 3/3 | net/pcap: build on Windowsconfig/ doc/ drivers/ +3 more | +138 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Jie Zhou | Nick Connolly | Ferruh Yigit | Tyler Retzlaff |
|---|---|---|---|---|
| 1/3 | A-b | A-b | ||
| 2/3 | R-b | |||
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [dpdk-dev] [PATCH v5 0/3] net/pcap: build on Windows
Most modern and actively maintained distribution of libpcap for Windows is Npcap [1]. It currently doesn't provide a pkg-config file [2]. By default it is installed to C:\Program Files\Npcap and can be located using standard environment variables [3]:
$env:C_INCLUDE_PATH += ";C:\Program Files\Npcap"
$env:LIBRARY_PATH += ";C:\Program Files\Npcap\Lib\x64" # MinGW
$env:LINK += ' /LIBPATH:"C:\Program Files\Npcap\Lib\x64"' # ClangThe following libpcap.pc also works if placed in PKG_CONFIG_PATH:
prefix="C:/Program Files/Npcap"
Name: libpcap
Version: 1.10
Description: Platform-independent network traffic capture library
Cflags: -I${prefix}/Include
Libs: -L${prefix}/Lib/x64 -lwpcapExample of collecting packets from an interface to a file:
.\build\examples\dpdk-skeleton.exe `
--vdev "eth_pcap0,iface=\Device\NPF_{DDD48985-A77C-4FC9-AF48-61E547C8797E}" `
--vdev "eth_pcap1,tx_pcap=capture.pcap"Interface name can be obtained as follows, with Wireshark installed:
& "C:\Program Files\Wireshark\tshark.exe" -D
[1]: https://nmap.org/npcap
[2]: https://github.com/nmap/npcap/issues/299
[3]: https://mesonbuild.com/Reference-manual.html#compiler-object
v5:
* Add timespec_get() shim for FreeBSD < 12.2 (CI, Thomas).
Dmitry Kozlyuk (3):
eal: add timespec_get shim
net/pcap: move OS-dependent code to separate files net/pcap: build on Windows
config/meson.build | 9 +-
doc/guides/rel_notes/release_21_05.rst | 4 +
drivers/net/pcap/meson.build | 16 +--
.../pcap/{rte_eth_pcap.c => pcap_ethdev.c} | 109 +++-------------
drivers/net/pcap/pcap_osdep.h | 18 +++
drivers/net/pcap/pcap_osdep_freebsd.c | 59 +++++++++
drivers/net/pcap/pcap_osdep_linux.c | 42 +++++++
drivers/net/pcap/pcap_osdep_windows.c | 118 ++++++++++++++++++
lib/eal/freebsd/include/rte_os_shim.h | 17 +++
lib/eal/windows/include/rte_os_shim.h | 32 +++++
10 files changed, 323 insertions(+), 101 deletions(-)
rename drivers/net/pcap/{rte_eth_pcap.c => pcap_ethdev.c} (95%)
create mode 100644 drivers/net/pcap/pcap_osdep.h
create mode 100644 drivers/net/pcap/pcap_osdep_freebsd.c
create mode 100644 drivers/net/pcap/pcap_osdep_linux.c
create mode 100644 drivers/net/pcap/pcap_osdep_windows.cSignature · 1 line
2.29.3