ethdev: add Tx offload outer UDP checksum definition
[dpdk.git] / lib / librte_mbuf / rte_mbuf_pool_ops.c
index 9aa1541..5722976 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <string.h>
+#include <rte_compat.h>
 #include <rte_eal.h>
 #include <rte_mbuf.h>
 #include <rte_errno.h>
@@ -22,7 +23,7 @@ rte_mbuf_set_platform_mempool_ops(const char *ops_name)
                        RTE_MEMPOOL_OPS_NAMESIZE, SOCKET_ID_ANY, 0);
                if (mz == NULL)
                        return -rte_errno;
-               strncpy(mz->addr, ops_name, strlen(ops_name));
+               strcpy(mz->addr, ops_name);
                return 0;
        } else if (strcmp(mz->addr, ops_name) == 0) {
                return 0;
@@ -61,7 +62,7 @@ rte_mbuf_set_user_mempool_ops(const char *ops_name)
                        return -rte_errno;
        }
 
-       strncpy(mz->addr, ops_name, strlen(ops_name));
+       strcpy(mz->addr, ops_name);
        return 0;
 
 }
@@ -73,7 +74,7 @@ rte_mbuf_user_mempool_ops(void)
 
        mz = rte_memzone_lookup("mbuf_user_pool_ops");
        if (mz == NULL)
-               return rte_eal_mbuf_default_mempool_ops();
+               return rte_eal_mbuf_user_pool_ops();
        return mz->addr;
 }