Lines Matching refs:portid
114 uint16_t portid; in print_stats() local
129 for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++) { in print_stats()
131 if ((lsi_enabled_port_mask & (1 << portid)) == 0) in print_stats()
135 link_get_err = rte_eth_link_get_nowait(portid, &link); in print_stats()
143 portid, in print_stats()
151 port_statistics[portid].tx, in print_stats()
152 port_statistics[portid].rx, in print_stats()
153 port_statistics[portid].dropped); in print_stats()
155 total_packets_dropped += port_statistics[portid].dropped; in print_stats()
156 total_packets_tx += port_statistics[portid].tx; in print_stats()
157 total_packets_rx += port_statistics[portid].rx; in print_stats()
173 lsi_simple_forward(struct rte_mbuf *m, unsigned portid) in lsi_simple_forward() argument
177 unsigned dst_port = lsi_dst_ports[portid]; in lsi_simple_forward()
206 unsigned i, j, portid, nb_rx; in lsi_main_loop() local
227 portid = qconf->rx_port_list[i]; in lsi_main_loop()
229 portid); in lsi_main_loop()
245 portid = lsi_dst_ports[qconf->rx_port_list[i]]; in lsi_main_loop()
246 buffer = tx_buffer[portid]; in lsi_main_loop()
248 sent = rte_eth_tx_buffer_flush(portid, 0, buffer); in lsi_main_loop()
250 port_statistics[portid].tx += sent; in lsi_main_loop()
279 portid = qconf->rx_port_list[i]; in lsi_main_loop()
280 nb_rx = rte_eth_rx_burst((uint8_t) portid, 0, in lsi_main_loop()
283 port_statistics[portid].rx += nb_rx; in lsi_main_loop()
288 lsi_simple_forward(m, portid); in lsi_main_loop()
479 uint16_t portid; in check_all_ports_link_status() local
488 for (portid = 0; portid < port_num; portid++) { in check_all_ports_link_status()
489 if ((port_mask & (1 << portid)) == 0) in check_all_ports_link_status()
492 ret = rte_eth_link_get_nowait(portid, &link); in check_all_ports_link_status()
497 portid, rte_strerror(-ret)); in check_all_ports_link_status()
504 printf("Port %d %s", portid, in check_all_ports_link_status()
538 uint16_t portid, portid_last = 0; in main() local
566 for (portid = 0; portid < nb_ports; portid++) { in main()
568 if ((lsi_enabled_port_mask & (1 << portid)) == 0) in main()
573 lsi_dst_ports[portid] = portid_last; in main()
574 lsi_dst_ports[portid_last] = portid; in main()
577 portid_last = portid; in main()
591 for (portid = 0; portid < nb_ports; portid++) { in main()
593 if ((lsi_enabled_port_mask & (1 << portid)) == 0) in main()
609 qconf->rx_port_list[qconf->n_rx_port] = portid; in main()
611 printf("Lcore %u: RX port %u\n",rx_lcore_id, (unsigned) portid); in main()
615 for (portid = 0; portid < nb_ports; portid++) { in main()
622 if ((lsi_enabled_port_mask & (1 << portid)) == 0) { in main()
623 printf("Skipping disabled port %u\n", (unsigned) portid); in main()
627 printf("Initializing port %u... ", (unsigned) portid); in main()
630 ret = rte_eth_dev_info_get(portid, &dev_info); in main()
634 portid, strerror(-ret)); in main()
640 ret = rte_eth_dev_configure(portid, 1, 1, &local_port_conf); in main()
643 ret, (unsigned) portid); in main()
646 ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd, in main()
651 ret, (unsigned) portid); in main()
660 rte_eth_dev_callback_register(portid, in main()
664 ret = rte_eth_macaddr_get(portid, in main()
665 &lsi_ports_eth_addr[portid]); in main()
669 ret, (unsigned int)portid); in main()
676 ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd, in main()
677 rte_eth_dev_socket_id(portid), in main()
682 ret, (unsigned) portid); in main()
689 ret = rte_eth_tx_queue_setup(portid, 0, nb_txd, in main()
690 rte_eth_dev_socket_id(portid), in main()
694 ret, (unsigned) portid); in main()
698 tx_buffer[portid] = rte_zmalloc_socket("tx_buffer", in main()
700 rte_eth_dev_socket_id(portid)); in main()
701 if (tx_buffer[portid] == NULL) in main()
703 (unsigned) portid); in main()
705 rte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST); in main()
707 ret = rte_eth_tx_buffer_set_err_callback(tx_buffer[portid], in main()
709 &port_statistics[portid].dropped); in main()
712 "tx buffer on port %u\n", (unsigned) portid); in main()
715 ret = rte_eth_dev_start(portid); in main()
718 ret, (unsigned) portid); in main()
721 ret = rte_eth_promiscuous_enable(portid); in main()
725 rte_strerror(-ret), portid); in main()
728 (unsigned) portid, in main()
729 RTE_ETHER_ADDR_BYTES(&lsi_ports_eth_addr[portid])); in main()