Lines Matching +full:x +full:- +full:mask +full:-

10  * the COPYING file in the top-level directory.
12 * Contributions after 2012-01-13 are licensed under the terms of the
20 #include "qapi/qapi-commands-rocker.h"
34 monitor_printf(mon, "name: %s\n", rocker->name); in hmp_rocker()
35 monitor_printf(mon, "id: 0x%" PRIx64 "\n", rocker->id); in hmp_rocker()
36 monitor_printf(mon, "ports: %d\n", rocker->ports); in hmp_rocker()
55 for (port = list; port; port = port->next) { in hmp_rocker_ports()
56 monitor_printf(mon, "%10s %-4s %-3s %2s %s\n", in hmp_rocker_ports()
57 port->value->name, in hmp_rocker_ports()
58 port->value->enabled ? port->value->link_up ? in hmp_rocker_ports()
60 port->value->speed == 10000 ? "10G" : "??", in hmp_rocker_ports()
61 port->value->duplex ? "FD" : "HD", in hmp_rocker_ports()
62 port->value->autoneg ? "Yes" : "No"); in hmp_rocker_ports()
72 uint32_t tbl_id = qdict_get_try_int(qdict, "tbl_id", -1); in hmp_rocker_of_dpa_flows()
75 list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &err); in hmp_rocker_of_dpa_flows()
80 monitor_printf(mon, "prio tbl hits key(mask) --> actions\n"); in hmp_rocker_of_dpa_flows()
82 for (info = list; info; info = info->next) { in hmp_rocker_of_dpa_flows()
83 RockerOfDpaFlow *flow = info->value; in hmp_rocker_of_dpa_flows()
84 RockerOfDpaFlowKey *key = flow->key; in hmp_rocker_of_dpa_flows()
85 RockerOfDpaFlowMask *mask = flow->mask; in hmp_rocker_of_dpa_flows() local
86 RockerOfDpaFlowAction *action = flow->action; in hmp_rocker_of_dpa_flows()
88 if (flow->hits) { in hmp_rocker_of_dpa_flows()
89 monitor_printf(mon, "%-4d %-3d %-4" PRIu64, in hmp_rocker_of_dpa_flows()
90 key->priority, key->tbl_id, flow->hits); in hmp_rocker_of_dpa_flows()
92 monitor_printf(mon, "%-4d %-3d ", in hmp_rocker_of_dpa_flows()
93 key->priority, key->tbl_id); in hmp_rocker_of_dpa_flows()
96 if (key->has_in_pport) { in hmp_rocker_of_dpa_flows()
97 monitor_printf(mon, " pport %d", key->in_pport); in hmp_rocker_of_dpa_flows()
98 if (mask->has_in_pport) { in hmp_rocker_of_dpa_flows()
99 monitor_printf(mon, "(0x%x)", mask->in_pport); in hmp_rocker_of_dpa_flows()
103 if (key->has_vlan_id) { in hmp_rocker_of_dpa_flows()
105 key->vlan_id & VLAN_VID_MASK); in hmp_rocker_of_dpa_flows()
106 if (mask->has_vlan_id) { in hmp_rocker_of_dpa_flows()
107 monitor_printf(mon, "(0x%x)", mask->vlan_id); in hmp_rocker_of_dpa_flows()
111 if (key->has_tunnel_id) { in hmp_rocker_of_dpa_flows()
112 monitor_printf(mon, " tunnel %d", key->tunnel_id); in hmp_rocker_of_dpa_flows()
113 if (mask->has_tunnel_id) { in hmp_rocker_of_dpa_flows()
114 monitor_printf(mon, "(0x%x)", mask->tunnel_id); in hmp_rocker_of_dpa_flows()
118 if (key->has_eth_type) { in hmp_rocker_of_dpa_flows()
119 switch (key->eth_type) { in hmp_rocker_of_dpa_flows()
136 monitor_printf(mon, " eth type 0x%04x", key->eth_type); in hmp_rocker_of_dpa_flows()
141 if (key->eth_src) { in hmp_rocker_of_dpa_flows()
142 if ((strcmp(key->eth_src, "01:00:00:00:00:00") == 0) && in hmp_rocker_of_dpa_flows()
143 mask->eth_src && in hmp_rocker_of_dpa_flows()
144 (strcmp(mask->eth_src, "01:00:00:00:00:00") == 0)) { in hmp_rocker_of_dpa_flows()
146 } else if ((strcmp(key->eth_src, "00:00:00:00:00:00") == 0) && in hmp_rocker_of_dpa_flows()
147 mask->eth_src && in hmp_rocker_of_dpa_flows()
148 (strcmp(mask->eth_src, "01:00:00:00:00:00") == 0)) { in hmp_rocker_of_dpa_flows()
151 monitor_printf(mon, " src %s", key->eth_src); in hmp_rocker_of_dpa_flows()
152 if (mask->eth_src) { in hmp_rocker_of_dpa_flows()
153 monitor_printf(mon, "(%s)", mask->eth_src); in hmp_rocker_of_dpa_flows()
158 if (key->eth_dst) { in hmp_rocker_of_dpa_flows()
159 if ((strcmp(key->eth_dst, "01:00:00:00:00:00") == 0) && in hmp_rocker_of_dpa_flows()
160 mask->eth_dst && in hmp_rocker_of_dpa_flows()
161 (strcmp(mask->eth_dst, "01:00:00:00:00:00") == 0)) { in hmp_rocker_of_dpa_flows()
163 } else if ((strcmp(key->eth_dst, "00:00:00:00:00:00") == 0) && in hmp_rocker_of_dpa_flows()
164 mask->eth_dst && in hmp_rocker_of_dpa_flows()
165 (strcmp(mask->eth_dst, "01:00:00:00:00:00") == 0)) { in hmp_rocker_of_dpa_flows()
168 monitor_printf(mon, " dst %s", key->eth_dst); in hmp_rocker_of_dpa_flows()
169 if (mask->eth_dst) { in hmp_rocker_of_dpa_flows()
170 monitor_printf(mon, "(%s)", mask->eth_dst); in hmp_rocker_of_dpa_flows()
175 if (key->has_ip_proto) { in hmp_rocker_of_dpa_flows()
176 monitor_printf(mon, " proto %d", key->ip_proto); in hmp_rocker_of_dpa_flows()
177 if (mask->has_ip_proto) { in hmp_rocker_of_dpa_flows()
178 monitor_printf(mon, "(0x%x)", mask->ip_proto); in hmp_rocker_of_dpa_flows()
182 if (key->has_ip_tos) { in hmp_rocker_of_dpa_flows()
183 monitor_printf(mon, " TOS %d", key->ip_tos); in hmp_rocker_of_dpa_flows()
184 if (mask->has_ip_tos) { in hmp_rocker_of_dpa_flows()
185 monitor_printf(mon, "(0x%x)", mask->ip_tos); in hmp_rocker_of_dpa_flows()
189 if (key->ip_dst) { in hmp_rocker_of_dpa_flows()
190 monitor_printf(mon, " dst %s", key->ip_dst); in hmp_rocker_of_dpa_flows()
193 if (action->has_goto_tbl || action->has_group_id || in hmp_rocker_of_dpa_flows()
194 action->has_new_vlan_id) { in hmp_rocker_of_dpa_flows()
195 monitor_printf(mon, " -->"); in hmp_rocker_of_dpa_flows()
198 if (action->has_new_vlan_id) { in hmp_rocker_of_dpa_flows()
200 ntohs(action->new_vlan_id)); in hmp_rocker_of_dpa_flows()
203 if (action->has_group_id) { in hmp_rocker_of_dpa_flows()
204 monitor_printf(mon, " write group 0x%08x", action->group_id); in hmp_rocker_of_dpa_flows()
207 if (action->has_goto_tbl) { in hmp_rocker_of_dpa_flows()
208 monitor_printf(mon, " goto tbl %d", action->goto_tbl); in hmp_rocker_of_dpa_flows()
229 monitor_printf(mon, "id (decode) --> buckets\n"); in hmp_rocker_of_dpa_groups()
231 for (g = list; g; g = g->next) { in hmp_rocker_of_dpa_groups()
232 RockerOfDpaGroup *group = g->value; in hmp_rocker_of_dpa_groups()
235 monitor_printf(mon, "0x%08x", group->id); in hmp_rocker_of_dpa_groups()
237 monitor_printf(mon, " (type %s", group->type == 0 ? "L2 interface" : in hmp_rocker_of_dpa_groups()
238 group->type == 1 ? "L2 rewrite" : in hmp_rocker_of_dpa_groups()
239 group->type == 2 ? "L3 unicast" : in hmp_rocker_of_dpa_groups()
240 group->type == 3 ? "L2 multicast" : in hmp_rocker_of_dpa_groups()
241 group->type == 4 ? "L2 flood" : in hmp_rocker_of_dpa_groups()
242 group->type == 5 ? "L3 interface" : in hmp_rocker_of_dpa_groups()
243 group->type == 6 ? "L3 multicast" : in hmp_rocker_of_dpa_groups()
244 group->type == 7 ? "L3 ECMP" : in hmp_rocker_of_dpa_groups()
245 group->type == 8 ? "L2 overlay" : in hmp_rocker_of_dpa_groups()
248 if (group->has_vlan_id) { in hmp_rocker_of_dpa_groups()
249 monitor_printf(mon, " vlan %d", group->vlan_id); in hmp_rocker_of_dpa_groups()
252 if (group->has_pport) { in hmp_rocker_of_dpa_groups()
253 monitor_printf(mon, " pport %d", group->pport); in hmp_rocker_of_dpa_groups()
256 if (group->has_index) { in hmp_rocker_of_dpa_groups()
257 monitor_printf(mon, " index %d", group->index); in hmp_rocker_of_dpa_groups()
260 monitor_printf(mon, ") -->"); in hmp_rocker_of_dpa_groups()
262 if (group->has_set_vlan_id && group->set_vlan_id) { in hmp_rocker_of_dpa_groups()
265 group->set_vlan_id & VLAN_VID_MASK); in hmp_rocker_of_dpa_groups()
268 if (group->set_eth_src) { in hmp_rocker_of_dpa_groups()
273 monitor_printf(mon, " src %s", group->set_eth_src); in hmp_rocker_of_dpa_groups()
276 if (group->set_eth_dst) { in hmp_rocker_of_dpa_groups()
280 monitor_printf(mon, " dst %s", group->set_eth_dst); in hmp_rocker_of_dpa_groups()
283 if (group->has_ttl_check && group->ttl_check) { in hmp_rocker_of_dpa_groups()
287 if (group->has_group_id && group->group_id) { in hmp_rocker_of_dpa_groups()
288 monitor_printf(mon, " group id 0x%08x", group->group_id); in hmp_rocker_of_dpa_groups()
291 if (group->has_pop_vlan && group->pop_vlan) { in hmp_rocker_of_dpa_groups()
295 if (group->has_out_pport) { in hmp_rocker_of_dpa_groups()
296 monitor_printf(mon, " out pport %d", group->out_pport); in hmp_rocker_of_dpa_groups()
299 if (group->has_group_ids) { in hmp_rocker_of_dpa_groups()
303 for (id = group->group_ids; id; id = id->next) { in hmp_rocker_of_dpa_groups()
304 monitor_printf(mon, "0x%08x", id->value); in hmp_rocker_of_dpa_groups()
305 if (id->next) { in hmp_rocker_of_dpa_groups()