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