X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd-keepalive%2Fmain.c;h=9831a4323785b7ed07cdc20be652b9214f46e472;hb=221e7026d521c97c58fcee867f003e414dba2eea;hp=2d8b4d1c676e19cf2c3392ae933ca1b17e692729;hpb=ab3ce1e0c19329c8a2d21480b0db55be259bc168;p=dpdk.git diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c index 2d8b4d1c67..9831a43237 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -58,7 +58,7 @@ static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; /* ethernet addresses of ports */ -static struct ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS]; +static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS]; /* mask of enabled ports */ static uint32_t l2fwd_enabled_port_mask; @@ -81,7 +81,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; static struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, @@ -166,21 +165,21 @@ print_stats(__attribute__((unused)) struct rte_timer *ptr_timer, static void l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid) { - struct ether_hdr *eth; + struct rte_ether_hdr *eth; void *tmp; int sent; unsigned dst_port; struct rte_eth_dev_tx_buffer *buffer; dst_port = l2fwd_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 */ tmp = ð->d_addr.addr_bytes[0]; *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); /* src addr */ - ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->s_addr); buffer = tx_buffer[dst_port]; sent = rte_eth_tx_buffer(dst_port, 0, buffer, m);