X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fptpclient%2Fptpclient.c;h=d94eca0353d76cc1b0b3ff191d93e0861260b6c5;hb=c4045f34557a5ce3de2b14e997fe41b122595e29;hp=4f32ade7fbf783e42ef691051cd0ae14f9d90ca0;hpb=9a212dc06c7aaf09b146d9c3dcfd584d741634c1;p=dpdk.git diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index 4f32ade7fb..d94eca0353 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -217,8 +217,13 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) /* Allocate and set up 1 RX queue per Ethernet port. */ for (q = 0; q < rx_rings; q++) { + struct rte_eth_rxconf *rxconf; + + rxconf = &dev_info.default_rxconf; + rxconf->offloads = port_conf.rxmode.offloads; + retval = rte_eth_rx_queue_setup(port, q, nb_rxd, - rte_eth_dev_socket_id(port), NULL, mbuf_pool); + rte_eth_dev_socket_id(port), rxconf, mbuf_pool); if (retval < 0) return retval; @@ -426,10 +431,10 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data) created_pkt->data_len = pkt_size; created_pkt->pkt_len = pkt_size; eth_hdr = rte_pktmbuf_mtod(created_pkt, struct rte_ether_hdr *); - rte_ether_addr_copy(ð_addr, ð_hdr->s_addr); + rte_ether_addr_copy(ð_addr, ð_hdr->src_addr); /* Set multicast address 01-1B-19-00-00-00. */ - rte_ether_addr_copy(ð_multicast, ð_hdr->d_addr); + rte_ether_addr_copy(ð_multicast, ð_hdr->dst_addr); eth_hdr->ether_type = htons(PTP_PROTOCOL); ptp_msg = (struct ptp_message *) @@ -449,14 +454,14 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data) client_clkid = &ptp_msg->delay_req.hdr.source_port_id.clock_id; - client_clkid->id[0] = eth_hdr->s_addr.addr_bytes[0]; - client_clkid->id[1] = eth_hdr->s_addr.addr_bytes[1]; - client_clkid->id[2] = eth_hdr->s_addr.addr_bytes[2]; + client_clkid->id[0] = eth_hdr->src_addr.addr_bytes[0]; + client_clkid->id[1] = eth_hdr->src_addr.addr_bytes[1]; + client_clkid->id[2] = eth_hdr->src_addr.addr_bytes[2]; client_clkid->id[3] = 0xFF; client_clkid->id[4] = 0xFE; - client_clkid->id[5] = eth_hdr->s_addr.addr_bytes[3]; - client_clkid->id[6] = eth_hdr->s_addr.addr_bytes[4]; - client_clkid->id[7] = eth_hdr->s_addr.addr_bytes[5]; + client_clkid->id[5] = eth_hdr->src_addr.addr_bytes[3]; + client_clkid->id[6] = eth_hdr->src_addr.addr_bytes[4]; + client_clkid->id[7] = eth_hdr->src_addr.addr_bytes[5]; rte_memcpy(&ptp_data->client_clock_id, client_clkid,