Lines Matching defs:portid

31 1. Pcap-dpdk provides libpcap the ability to use DPDK with the device name as dpdk:{portid}, such as dpdk:0.
71 4. Link your own program with libpcap, and use DPDK with the device name as dpdk:{portid}, such as dpdk:0.
179 uint16_t portid; // portid of DPDK
293 nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt);
298 nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt);
443 rte_eth_promiscuous_disable(pd->portid);
445 rte_eth_dev_stop(pd->portid);
446 rte_eth_dev_close(pd->portid);
452 uint16_t portid = pd->portid;
454 rte_eth_stats_get(portid, &stats);
455 RTE_LOG(INFO,USER1, "portid:%d, RX-packets: %-10"PRIu64" RX-errors: %-10"PRIu64
456 " RX-bytes: %-10"PRIu64" RX-Imissed: %-10"PRIu64"\n", portid, stats.ipackets, stats.ierrors,
458 RTE_LOG(INFO,USER1, "portid:%d, RX-PPS: %-10"PRIu64" RX-Mbps: %.2lf\n", portid, pd->pps, pd->bps/1e6f );
465 rte_eth_stats_get(pd->portid,&(pd->curr_stats));
496 static int check_link_status(uint16_t portid, struct rte_eth_link *plink)
499 rte_eth_link_get(portid, plink);
526 // return portid by device name, otherwise return -1
548 // too large for portid
758 uint16_t portid= DPDK_PORTID_MAX;
807 portid = portid_by_device(p->opt.device);
808 if (portid == DPDK_PORTID_MAX){
810 "dpdk error: portid is invalid. device %s",
816 pd->portid = portid;
835 rte_eth_dev_info_get(portid, &dev_info);
841 ret = rte_eth_dev_configure(portid, 1, 1, &local_port_conf);
847 portid);
852 ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd, &nb_txd);
858 portid);
863 rte_eth_macaddr_get(portid, &(pd->eth_addr));
869 ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd,
870 rte_eth_dev_socket_id(portid),
878 portid);
886 ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
887 rte_eth_dev_socket_id(portid),
894 portid);
901 rte_eth_dev_socket_id(portid));
905 "dpdk error: Cannot allocate buffer for tx on port %u", portid);
911 ret = rte_eth_dev_start(portid);
917 portid);
924 rte_eth_promiscuous_enable(portid);
927 is_port_up = check_link_status(portid, &link);
930 "dpdk error: link is down, port=%u",portid);
935 rte_eth_stats_reset(pd->portid);
937 rte_eth_stats_get(pd->portid,&(pd->prev_stats));
939 pd->portid = portid;
940 p->fd = pd->portid;
969 rte_eth_dev_get_name_by_port(portid,pd->pci_addr);
970 RTE_LOG(INFO, USER1,"Port %d device: %s, MAC:%s, PCI:%s\n", portid, p->opt.device, pd->mac_addr, pd->pci_addr);
972 portid, link.link_speed,