• Home
  • Raw
  • Download

Lines Matching refs:hop

16 static void tb_dump_hop(const struct tb_path_hop *hop, const struct tb_regs_hop *regs)  in tb_dump_hop()  argument
18 const struct tb_port *port = hop->in_port; in tb_dump_hop()
21 hop->in_hop_index, regs->out_port, regs->next_hop); in tb_dump_hop()
38 struct tb_regs_hop hop; in tb_path_find_dst_port() local
48 ret = tb_port_read(port, &hop, TB_CFG_HOPS, 2 * hopid, 2); in tb_path_find_dst_port()
54 if (!hop.enable) in tb_path_find_dst_port()
57 out_port = &sw->ports[hop.out_port]; in tb_path_find_dst_port()
58 hopid = hop.next_hop; in tb_path_find_dst_port()
107 struct tb_regs_hop hop; in tb_path_discover() local
134 ret = tb_port_read(p, &hop, TB_CFG_HOPS, 2 * h, 2); in tb_path_discover()
141 if (!hop.enable) in tb_path_discover()
144 out_port = &sw->ports[hop.out_port]; in tb_path_discover()
148 h = hop.next_hop; in tb_path_discover()
180 ret = tb_port_read(p, &hop, TB_CFG_HOPS, 2 * h, 2); in tb_path_discover()
189 out_port = &sw->ports[hop.out_port]; in tb_path_discover()
190 next_hop = hop.next_hop; in tb_path_discover()
204 tb_dump_hop(&path->hops[i], &hop); in tb_path_discover()
364 const struct tb_path_hop *hop = &path->hops[i]; in tb_path_free() local
366 if (hop->in_port) in tb_path_free()
367 tb_port_release_in_hopid(hop->in_port, in tb_path_free()
368 hop->in_hop_index); in tb_path_free()
369 if (hop->out_port) in tb_path_free()
370 tb_port_release_out_hopid(hop->out_port, in tb_path_free()
371 hop->next_hop_index); in tb_path_free()
395 struct tb_regs_hop hop; in __tb_path_deactivate_hop() local
400 ret = tb_port_read(port, &hop, TB_CFG_HOPS, 2 * hop_index, 2); in __tb_path_deactivate_hop()
405 if (!hop.enable) in __tb_path_deactivate_hop()
408 hop.enable = 0; in __tb_path_deactivate_hop()
410 ret = tb_port_write(port, &hop, TB_CFG_HOPS, 2 * hop_index, 2); in __tb_path_deactivate_hop()
417 ret = tb_port_read(port, &hop, TB_CFG_HOPS, 2 * hop_index, 2); in __tb_path_deactivate_hop()
421 if (!hop.pending) { in __tb_path_deactivate_hop()
430 hop.ingress_fc = 0; in __tb_path_deactivate_hop()
431 hop.ingress_shared_buffer = 0; in __tb_path_deactivate_hop()
433 hop.egress_fc = 0; in __tb_path_deactivate_hop()
434 hop.egress_shared_buffer = 0; in __tb_path_deactivate_hop()
436 return tb_port_write(port, &hop, TB_CFG_HOPS, in __tb_path_deactivate_hop()
528 struct tb_regs_hop hop = { 0 }; in tb_path_activate() local
535 hop.next_hop = path->hops[i].next_hop_index; in tb_path_activate()
536 hop.out_port = path->hops[i].out_port->port; in tb_path_activate()
537 hop.initial_credits = path->hops[i].initial_credits; in tb_path_activate()
538 hop.unknown1 = 0; in tb_path_activate()
539 hop.enable = 1; in tb_path_activate()
545 hop.weight = path->weight; in tb_path_activate()
546 hop.unknown2 = 0; in tb_path_activate()
547 hop.priority = path->priority; in tb_path_activate()
548 hop.drop_packages = path->drop_packages; in tb_path_activate()
549 hop.counter = path->hops[i].in_counter_index; in tb_path_activate()
550 hop.counter_enable = path->hops[i].in_counter_index != -1; in tb_path_activate()
551 hop.ingress_fc = path->ingress_fc_enable & in_mask; in tb_path_activate()
552 hop.egress_fc = path->egress_fc_enable & out_mask; in tb_path_activate()
553 hop.ingress_shared_buffer = path->ingress_shared_buffer in tb_path_activate()
555 hop.egress_shared_buffer = path->egress_shared_buffer in tb_path_activate()
557 hop.unknown3 = 0; in tb_path_activate()
560 tb_dump_hop(&path->hops[i], &hop); in tb_path_activate()
561 res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS, in tb_path_activate()