Support packets in flight
[samplevnf.git] / VNFs / DPPD-PROX / commands.h
1 /*
2 // Copyright (c) 2010-2017 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 #ifndef _COMMANDS_H_
18 #define _COMMANDS_H_
19
20 #include <inttypes.h>
21 #include <rte_ether.h>
22 #include "prox_compat.h"
23
24 struct input;
25
26 /* command functions */
27 void start_core_all(int task_id);
28 void stop_core_all(int task_id);
29 void start_cores(uint32_t *cores, int count, int task_id);
30 void stop_cores(uint32_t *cores, int count, int task_id);
31
32 void cmd_trace(uint8_t lcore_id, uint8_t task_id, uint32_t nb_packets);
33 void cmd_dump(uint8_t lcore_id, uint8_t task_id, uint32_t nb_packets, struct input *input, int rx, int tx);
34 void cmd_mem_stats(void);
35 void cmd_mem_layout(void);
36 void cmd_hashdump(uint8_t lcore_id, uint8_t task_id, uint32_t table_id);
37 void cmd_rx_distr_start(uint32_t lcore_id);
38 void cmd_rx_distr_stop(uint32_t lcore_id);
39 void cmd_rx_distr_rst(uint32_t lcore_id);
40 void cmd_rx_distr_show(uint32_t lcore_id);
41 void cmd_tx_distr_start(uint32_t lcore_id);
42 void cmd_tx_distr_stop(uint32_t lcore_id);
43 void cmd_tx_distr_rst(uint32_t lcore_id);
44 void cmd_tx_distr_show(uint32_t lcore_id);
45 void cmd_rx_bw_start(uint32_t lcore_id);
46 void cmd_tx_bw_start(uint32_t lcore_id);
47 void cmd_rx_bw_stop(uint32_t lcore_id);
48 void cmd_tx_bw_stop(uint32_t lcore_id);
49
50 void cmd_portinfo(int port_id, char *dst, size_t max_len);
51 void cmd_port_up(uint8_t port_id);
52 void cmd_port_down(uint8_t port_id);
53 void cmd_xstats(uint8_t port_id);
54 void cmd_thread_info(uint8_t lcore_id, uint8_t task_id);
55 void cmd_ringinfo(uint8_t lcore_id, uint8_t task_id);
56 void cmd_ringinfo_all(void);
57 void cmd_rx_tx_info(void);
58 void cmd_read_reg(uint8_t port_id, uint32_t id);
59 void cmd_write_reg(uint8_t port_id, unsigned int id, unsigned int val);
60 void cmd_set_vlan_filter(uint8_t port_id, unsigned int id, unsigned int val);
61 void cmd_set_vlan_offload(uint8_t port_id, unsigned int val);
62 void cmd_get_cache_class(uint32_t lcore_id, uint32_t *set);
63 void cmd_get_cache_class_mask(uint32_t lcore_id, uint32_t set, uint32_t *val);
64 void cmd_set_cache_class_mask(uint32_t lcore_id, uint32_t set, uint32_t val);
65 void cmd_set_cache_class(uint32_t lcore_id, uint32_t set);
66 void cmd_cache_reset(void);
67
68 void cmd_reset_port(uint8_t port_id);
69 void cmd_multicast(uint8_t port_id, unsigned int val, prox_rte_ether_addr *mac);
70 int reconnect_task(uint32_t lcore_id, uint32_t task_id);
71 int bypass_task(uint32_t lcore_id, uint32_t task_id);
72
73 #endif /* _COMMANDS_H_ */