2 // Copyright (c) 2017 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __INCLUDE_PIPELINE_ARPICMP_BE_H__
18 #define __INCLUDE_PIPELINE_ARPICMP_BE_H__
20 #include "pipeline_common_be.h"
21 #define PIPELINE_ARPICMP_KEY_PORT_IN_AH(f_ah, f_pkt_work, f_pkt4_work) \
24 __rte_unused struct rte_pipeline *rte_p, \
25 struct rte_mbuf **pkts, \
31 for (j = 0; j < n_pkts; j++) \
32 rte_prefetch0(pkts[j]); \
34 for (i = 0; i < (n_pkts & (~0x3LLU)); i += 4) \
35 f_pkt4_work(&pkts[i], i, arg); \
37 for ( ; i < n_pkts; i++) \
38 f_pkt_work(pkts[i], i, arg); \
44 extern struct app_params *myApp;
45 void print_pkt1(struct rte_mbuf *pkt);
46 struct ether_addr *get_link_hw_addr(uint8_t out_port);
48 uint8_t lb_outport_id[PIPELINE_MAX_PORT_IN];
49 struct pipeline *loadb_pipeline[PIPELINE_MAX_PORT_IN];
50 struct pipeline *all_pipeline[PIPELINE_MAX_PORT_IN];
51 uint8_t vnf_to_loadb_map[PIPELINE_MAX_PORT_IN];
52 uint8_t port_to_loadb_map[PIPELINE_MAX_PORT_IN];
53 uint8_t loadb_pipeline_nums[PIPELINE_MAX_PORT_IN];
55 void set_port_to_loadb_map(uint8_t pipeline_num);
56 uint8_t get_port_to_loadb_map(uint8_t phy_port_id);
57 /* acts on port_to_loadb_map */
59 void set_phy_inport_map(uint8_t pipeline_num, uint8_t *map);
60 void set_phy_outport_map(uint8_t pipeline_num, uint8_t *map);
62 void set_outport_id(uint8_t pipeline_num, struct pipeline *p, uint8_t *map);
63 /* acts on lb_outport_id */
64 uint8_t get_loadb_outport_id(uint8_t actual_phy_port);
65 /* acts on lb_outport_id */
66 uint8_t get_vnf_set_num(uint8_t pipeline_num);
68 void pipelines_port_info(void);
69 void pipelines_map_info(void);
70 void register_loadb_to_arp(uint8_t pipeline_num, struct pipeline *p,
71 __rte_unused struct app_params *app);
72 /* vnf_to_loadb_map[] and loadb_pipelines[] */
73 uint8_t SWQ_to_Port_map[128];
75 extern struct pipeline_be_ops pipeline_arpicmp_be_ops;
76 void register_pipeline_Qs(uint8_t pipeline_num, struct pipeline *p);
77 void set_link_map(uint8_t pipeline_num, struct pipeline *p, uint8_t *map);
78 void set_outport_id(uint8_t pipeline_num, struct pipeline *p, uint8_t *map);
79 void set_phy_outport_id(uint8_t pipeline_num, struct pipeline *p, uint8_t *map);
80 void set_phy_inport_id(uint8_t pipeline_num, struct pipeline *p, uint8_t *map);
85 enum pipeline_arpicmp_msg_req_type {
86 PIPELINE_ARPICMP_MSG_REQ_ENTRY_DBG,
87 PIPELINE_ARPICMP_MSG_REQS
93 struct pipeline_arpicmp_entry_dbg_msg_req {
94 enum pipeline_msg_req_type type;
95 enum pipeline_arpicmp_msg_req_type subtype;
105 struct pipeline_arpicmp_in_port_h_arg {
106 struct pipeline_arpicmp *p;
110 struct pipeline_arpicmp_entry_dbg_msg_rsp {