[dpdk-dev] [PATCH v2 4/6] net/pcap: add libpcap wrappers
Nick Connolly
nick.connolly at mayadata.io
Mon Mar 1 22:43:57 CET 2021
> Complete removal of non-standard dependencies in headers is within a grasp.
> Then we can remove shims and include whatever needed.
> Thoughts?
Sounds good. A couple of 'gotchas' that I've come across (but may not be
an issue for DPDK):
* Memory allocation / free that spans a dll boundary (see earlier email).
* posix_memalign is unfortunately specified as using free(), so we'll
either have to modify the calls to rte_posix_memalign /
rte_free_memalign (which means code analysis to find which free
calls need changing), or wrapper free() to distinguish the two types
of memory somehow. I 'solved' this for SPDK by using posix_memalign
for everything and I have a vague recollection that the mingw libc
does something similar.
* Sockets are unfortunately specified as using close(). This is
probably easy to address by rte_ wrapping all socket calls.
Regards,
Nick
More information about the dev
mailing list