X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_distributor%2Frte_distributor.c;h=0a3213bbfca5b8362db66cc7d80af544cfa60ace;hb=f7095d41bba6ae30d9756dfbe677256851ff879d;hp=d50598377c25d962c8440bf5c953f809f3e939f6;hpb=5bc53b786b4f83792a25b37dc6d45614e0afba03;p=dpdk.git diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index d50598377c..0a3213bbfc 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "rte_distributor_private.h" #include "rte_distributor.h" @@ -625,7 +626,7 @@ rte_distributor_create_v1705(const char *name, } d = mz->addr; - snprintf(d->name, sizeof(d->name), "%s", name); + strlcpy(d->name, name, sizeof(d->name)); d->num_workers = num_workers; d->alg_type = alg_type; @@ -645,9 +646,9 @@ rte_distributor_create_v1705(const char *name, rte_dist_burst_list); - rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_lock(); TAILQ_INSERT_TAIL(dist_burst_list, d, next); - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_unlock(); return d; }