[dpdk-dev] [pktgen PATCH 1/6] remove unused functions
Thomas Monjalon
thomas at monjalon.net
Wed Jul 26 00:21:02 CEST 2017
clang compilations stops on unused static functions.
Some are removed, other one is commented out, according to the context.
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
app/lpktgenlib.c | 12 ++----------
lib/common/l2p.c | 34 ----------------------------------
2 files changed, 2 insertions(+), 44 deletions(-)
diff --git a/app/lpktgenlib.c b/app/lpktgenlib.c
index dccf3cd..bd1dff3 100644
--- a/app/lpktgenlib.c
+++ b/app/lpktgenlib.c
@@ -82,6 +82,7 @@ setf_integer(lua_State *L, const char *name, lua_Integer value)
lua_setfield(L, -2, name);
}
+#if 0 /* not used */
/**************************************************************************//**
*
* setf_integer - Helper routine to set Lua variables.
@@ -100,6 +101,7 @@ setf_function(lua_State *L, const char *name, lua_CFunction fn)
lua_pushcclosure(L, fn, 0);
lua_setfield(L, -2, name);
}
+#endif
/**************************************************************************//**
*
@@ -207,16 +209,6 @@ getf_string(lua_State *L, const char *field)
return value;
}
-static inline void
-parse_portlist(const char *buf, void *pl)
-{
-#if (RTE_VERSION >= RTE_VERSION_NUM(2, 0, 0, 0))
- rte_parse_portlist((char *)(uintptr_t)buf, pl);
-#else
- cmdline_parse_portlist(NULL, buf, pl, PORTLIST_TOKEN_SIZE);
-#endif
-}
-
/**************************************************************************//**
*
* pktgen_set - Set a number of Pktgen values.
diff --git a/lib/common/l2p.c b/lib/common/l2p.c
index 45ac363..3783236 100644
--- a/lib/common/l2p.c
+++ b/lib/common/l2p.c
@@ -79,14 +79,6 @@ typedef struct lcore_port_s {
static lp_t lp_data, *lp = &lp_data;
-static inline uint8_t
-_bget(uint8_t *p, uint16_t idx)
-{
- int32_t c = (idx / 8);
-
- return p[c] & (1 << (idx - (c * 8)));
-}
-
static inline int
_btst(uint8_t *p, uint16_t idx)
{
@@ -279,32 +271,6 @@ pg_parse_port_list(char *list, ps_t *ps)
return 0;
}
-static inline void
-pg_dump_lcore_map(const char *t, uint8_t *m)
-{
- int i;
-
- fprintf(stderr, "%s( ", t);
-
- for (i = 0; i < RTE_MAX_LCORE; i++)
- if (_btst(m, i) )
- fprintf(stderr, "%d ", i);
- fprintf(stderr, ")");
-}
-
-static inline void
-pg_dump_port_map(const char *t, uint8_t *m)
-{
- int i;
-
- fprintf(stderr, "%s( ", t);
-
- for (i = 0; i < RTE_MAX_ETHPORTS; i++)
- if (_btst(m, i) )
- fprintf(stderr, "%d ", i);
- fprintf(stderr, ")");
-}
-
/**************************************************************************//**
*
* pg_parse_matrix - Parse the command line argument for port configuration
--
2.13.2
More information about the dev
mailing list