X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fperformance-thread%2Fl3fwd-thread%2Fmain.c;h=8a1560b50311d3a6e6744454e956e19cbf9bcecb;hb=f2fc83b40f06;hp=de052192284c6ebc4128647a6d8a30e2c74ff532;hpb=22e5c73bd181ddae758189295146154542b63360;p=dpdk.git diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index de05219228..8a1560b503 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -331,7 +331,7 @@ struct ipv4_5tuple { uint16_t port_dst; uint16_t port_src; uint8_t proto; -} __attribute__((__packed__)); +} __rte_packed; union ipv4_5tuple_host { struct { @@ -354,7 +354,7 @@ struct ipv6_5tuple { uint16_t port_dst; uint16_t port_src; uint8_t proto; -} __attribute__((__packed__)); +} __rte_packed; union ipv6_5tuple_host { struct { @@ -869,7 +869,7 @@ get_ipv6_dst_port(void *ipv6_hdr, uint16_t portid, #endif static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid) - __attribute__((unused)); + __rte_unused; #if ((APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) && \ (ENABLE_MULTI_BUFFER_OPTIMIZE == 1)) @@ -1120,7 +1120,7 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint16_t portid) struct rte_ether_hdr *eth_hdr[8]; union ipv6_5tuple_host key[8]; - __attribute__((unused)) struct rte_ipv6_hdr *ipv6_hdr[8]; + __rte_unused struct rte_ipv6_hdr *ipv6_hdr[8]; eth_hdr[0] = rte_pktmbuf_mtod(m[0], struct rte_ether_hdr *); eth_hdr[1] = rte_pktmbuf_mtod(m[1], struct rte_ether_hdr *); @@ -1877,7 +1877,7 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx, /* * CPU-load stats collector */ -static int +static int __attribute__((noreturn)) cpu_load_collector(__rte_unused void *arg) { unsigned i, j, k; uint64_t hits; @@ -2299,7 +2299,7 @@ sched_spawner(__rte_unused void *arg) { } /* main processing loop */ -static int +static int __attribute__((noreturn)) pthread_tx(void *dummy) { struct rte_mbuf *pkts_burst[MAX_PKT_BURST]; @@ -3602,7 +3602,12 @@ main(int argc, char **argv) "rte_eth_dev_adjust_nb_rx_tx_desc: err=%d, port=%d\n", ret, portid); - rte_eth_macaddr_get(portid, &ports_eth_addr[portid]); + ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]); + if (ret < 0) + rte_exit(EXIT_FAILURE, + "rte_eth_macaddr_get: err=%d, port=%d\n", + ret, portid); + print_ethaddr(" Address:", &ports_eth_addr[portid]); printf(", "); print_ethaddr("Destination:",