Skip to content

Commit

Permalink
examples/qos_sched: add stats
Browse files Browse the repository at this point in the history
Signed-off-by: Intel
  • Loading branch information
Intel authored and Thomas Monjalon committed Oct 9, 2013
1 parent fc8a10d commit cfd5c97
Show file tree
Hide file tree
Showing 8 changed files with 1,091 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/qos_sched/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endif
APP = qos_sched

# all source are stored in SRCS-y
SRCS-y := main.c args.c init.c app_thread.c cfg_file.c
SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c

CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
Expand Down
9 changes: 7 additions & 2 deletions examples/qos_sched/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static const char usage[] =
" multiple pfc can be configured in command line \n"
" \n"
"Application optional parameters: \n"
" --i : run in interactive mode (default value is %u) \n"
" --mst I : master core index (default value is %u) \n"
" --rsz \"A, B, C\" : Ring sizes \n"
" A = Size (in number of buffer descriptors) of each of the NIC RX \n"
Expand Down Expand Up @@ -100,7 +101,7 @@ static const char usage[] =
static void
app_usage(const char *prgname)
{
printf(usage, prgname, app_master_core,
printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_master_core,
APP_RX_DESC_DEFAULT, APP_RING_SIZE, APP_TX_DESC_DEFAULT,
MAX_PKT_RX_BURST, PKT_ENQUEUE, PKT_DEQUEUE,
MAX_PKT_TX_BURST, NB_MBUF,
Expand Down Expand Up @@ -355,10 +356,14 @@ app_parse_args(int argc, char **argv)
/* set en_US locale to print big numbers with ',' */
setlocale(LC_NUMERIC, "en_US.utf-8");

while ((opt = getopt_long(argc, argv, "",
while ((opt = getopt_long(argc, argv, "i",
lgopts, &option_index)) != EOF) {

switch (opt) {
case 'i':
printf("Interactive-mode selected\n");
interactive = 1;
break;
/* long options */
case 0:
optname = lgopts[option_index].name;
Expand Down
Loading

0 comments on commit cfd5c97

Please sign in to comment.