X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fsample_app_ug%2Flink_status_intr.rst;h=cfb1bcd58b96aef6e8d062fb5725bb8cbbf68376;hb=5158260917a0588052500af4e011b6cd77143c1c;hp=8fa6d76cedf68cb25716487803d73db3e4eef901;hpb=5630257fcc30397e7217139ec55da4f301f59fb7;p=dpdk.git diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst index 8fa6d76ced..cfb1bcd58b 100644 --- a/doc/guides/sample_app_ug/link_status_intr.rst +++ b/doc/guides/sample_app_ug/link_status_intr.rst @@ -49,7 +49,7 @@ where, * -T PERIOD: statistics will be refreshed each PERIOD seconds (0 to disable, 10 default) -To run the application in a linuxapp environment with 4 lcores, 4 memory channels, 16 ports and 8 RX queues per lcore, +To run the application in a linux environment with 4 lcores, 4 memory channels, 16 ports and 8 RX queues per lcore, issue the command: .. code-block:: console @@ -91,15 +91,11 @@ To fully understand this code, it is recommended to study the chapters that rela if (rte_pci_probe() < 0) rte_exit(EXIT_FAILURE, "Cannot probe PCI\n"); - nb_ports = rte_eth_dev_count(); - if (nb_ports == 0) - rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); - /* * Each logical core is assigned a dedicated TX queue on each port. */ - for (portid = 0; portid < nb_ports; portid++) { + RTE_ETH_FOREACH_DEV(portid) { /* skip ports that are not enabled */ if ((lsi_enabled_port_mask & (1 << portid)) == 0) @@ -141,10 +137,6 @@ The global configuration is stored in a static structure: static const struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .header_split = 0, /**< Header Split disabled */ - .hw_ip_checksum = 0, /**< IP checksum offload disabled */ - .hw_vlan_filter = 0, /**< VLAN filtering disabled */ - .hw_strip_crc= 0, /**< CRC stripped by hardware */ }, .txmode = {}, .intr_conf = { @@ -319,11 +311,11 @@ The processing is very simple: processes the TX port from the RX port and then r static void lsi_simple_forward(struct rte_mbuf *m, unsigned portid) { - struct ether_hdr *eth; + struct rte_ether_hdr *eth; void *tmp; unsigned dst_port = lsi_dst_ports[portid]; - eth = rte_pktmbuf_mtod(m, struct ether_hdr *); + eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); /* 02:00:00:00:00:xx */ @@ -332,7 +324,7 @@ The processing is very simple: processes the TX port from the RX port and then r *((uint64_t *)tmp) = 0x000000000002 + (dst_port << 40); /* src addr */ - ether_addr_copy(&lsi_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&lsi_ports_eth_addr[dst_port], ð->s_addr); lsi_send_packet(m, dst_port); }