11/03/2021 00:54, Dmitry Kozlyuk: > Windows socket headers define `s_addr`, `min`, and `max` macros which > break structure definitions containing fields with one of these names. > Undefining those macros would break some consumers as well. > > Example 1: > > #include <winsock2.h> > #include <rte_ether.h> > struct in_addr addr; > /* addr.s_addr = 0; ERROR: s_addr undefined by DPDK */ > > Example 2: > > #include <rte_ether.h> > #include <winsock2.h> > struct rte_ether_hdr eh; > /* eh.s_addr.addr_bytes[0] = 0; ERROR: `addr_s` is a macro */ > > It is proposed to rename the conflicting fields on DPDK side, > because Win32 API has wider use and is slower and harder to change. > > New names are left unspecified, open suggestions: > > * `struct rte_ether_hdr` (by Stephen Hemminger): > > * `s_addr` -> `ether_shost` > * `d_addr` -> `ether_dhost` (for consistency)
I prefer "addr" over "host". > * `struct rte_param_log2_range`, `struct rte_crypto_param_range`: > > * `min` -> `minimum` > * `max` -> `maximum` > > For `s_addr`, a workaround is possible to use it until 21.11. > For `min` and `max`, no workaround seems available. If cryptodev or > compressdev is going to be enabled on Windows before 21.11, the only > option seems to use a new name on Windows (using #ifdef). I think we have enough work on ethdev until 21.11.