X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fqos_sched%2Fmain.h;h=77b6e3ee7ef2b4f8ec5bb96a85452c402e2a0114;hb=633e4c7d716e852a0a41267fd349c6275351c42f;hp=1f991c7b71834c586bbe06a260f0afa8bc2ee531;hpb=cfd5c971e5e70995bf2d30d74ed2f12d52c999bd;p=dpdk.git diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h old mode 100755 new mode 100644 index 1f991c7b71..77b6e3ee7e --- a/examples/qos_sched/main.h +++ b/examples/qos_sched/main.h @@ -1,13 +1,13 @@ /*- * BSD LICENSE - * - * Copyright(c) 2010-2013 Intel Corporation. All rights reserved. + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright @@ -17,7 +17,7 @@ * * Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -40,12 +40,6 @@ extern "C" { #include -#ifdef RTE_EXEC_ENV_BAREMETAL -#error "Baremetal is not supported" -#else -#define MAIN main -#endif - #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1 /* @@ -56,7 +50,6 @@ extern "C" { #define APP_RX_DESC_DEFAULT 128 #define APP_TX_DESC_DEFAULT 256 -#define MBUF_SIZE (1528 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) #define APP_RING_SIZE (8*1024) #define NB_MBUF (2*1024*1024) @@ -75,9 +68,17 @@ extern "C" { #define BURST_TX_DRAIN_US 100 -#define MAX_DATA_STREAMS (RTE_MAX_LCORE/2) +#ifndef APP_MAX_LCORE +#if (RTE_MAX_LCORE > 64) +#define APP_MAX_LCORE 64 +#else +#define APP_MAX_LCORE RTE_MAX_LCORE +#endif +#endif + +#define MAX_DATA_STREAMS (APP_MAX_LCORE/2) #define MAX_SCHED_SUBPORTS 8 -#define MAX_SCHED_PIPES 4096 +#define MAX_SCHED_PIPES 4096 #ifndef APP_COLLECT_STAT #define APP_COLLECT_STAT 1 @@ -105,8 +106,8 @@ struct thread_conf uint32_t n_mbufs; struct rte_mbuf **m_table; - uint8_t rx_port; - uint8_t tx_port; + uint16_t rx_port; + uint16_t tx_port; uint16_t rx_queue; uint16_t tx_queue; struct rte_ring *rx_ring; @@ -124,8 +125,8 @@ struct flow_conf uint32_t rx_core; uint32_t wt_core; uint32_t tx_core; - uint8_t rx_port; - uint8_t tx_port; + uint16_t rx_port; + uint16_t tx_port; uint16_t rx_queue; uint16_t tx_queue; struct rte_ring *rx_ring; @@ -177,7 +178,6 @@ extern struct ring_thresh tx_thresh; extern struct rte_sched_port_params port_params; -int MAIN(int argc, char **argv); int app_parse_args(int argc, char **argv); int app_init(void); @@ -188,13 +188,15 @@ void app_worker_thread(struct thread_conf **qconf); void app_mixed_thread(struct thread_conf **qconf); void app_stat(void); -int subport_stat(uint8_t port_id, uint32_t subport_id); -int pipe_stat(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id); -int qavg_q(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc, uint8_t q); -int qavg_tcpipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc); -int qavg_pipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id); -int qavg_tcsubport(uint8_t port_id, uint32_t subport_id, uint8_t tc); -int qavg_subport(uint8_t port_id, uint32_t subport_id); +int subport_stat(uint16_t port_id, uint32_t subport_id); +int pipe_stat(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id); +int qavg_q(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id, + uint8_t tc, uint8_t q); +int qavg_tcpipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id, + uint8_t tc); +int qavg_pipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id); +int qavg_tcsubport(uint16_t port_id, uint32_t subport_id, uint8_t tc); +int qavg_subport(uint16_t port_id, uint32_t subport_id); #ifdef __cplusplus }