Re: [dpdk-dev] [PATCH v3 1/7] eal: add wrappers for POSIX string functions

2021-02-23 Thread Andrew Rybchenko
On 2/24/21 12:53 AM, Nick Connolly wrote: > >> Allocating memory using rte_strdup() I'd use rte_free() >> to release it. I guess it will fail badly. >> So, I think that a different, more specific prefix is >> required for POSIX wrappers. > > Andrew: my understanding of Bruce's proposal is that th

Re: [dpdk-dev] [PATCH v3 1/7] eal: add wrappers for POSIX string functions

2021-02-23 Thread Nick Connolly
Allocating memory using rte_strdup() I'd use rte_free() to release it. I guess it will fail badly. So, I think that a different, more specific prefix is required for POSIX wrappers. Andrew: my understanding of Bruce's proposal is that the strdup() name will now be kept (in this case through

Re: [dpdk-dev] [PATCH v3 1/7] eal: add wrappers for POSIX string functions

2021-02-22 Thread Andrew Rybchenko
On 2/21/21 5:28 PM, Dmitry Kozlyuk wrote: > POSIX strncasecmp(), strdup(), and strtok_r() have different names > on Windows, respectively, strnicmp(), _strdup(), and strtok_s(). > > Add wrappers as inline functions, because they're used from librte_kvargs, > and thus cannot be in librte_eal; besid

[dpdk-dev] [PATCH v3 1/7] eal: add wrappers for POSIX string functions

2021-02-21 Thread Dmitry Kozlyuk
POSIX strncasecmp(), strdup(), and strtok_r() have different names on Windows, respectively, strnicmp(), _strdup(), and strtok_s(). Add wrappers as inline functions, because they're used from librte_kvargs, and thus cannot be in librte_eal; besides, implementation is trivial. Signed-off-by: Dmitr