net/sfc: support API to negotiate delivery of Rx metadata
[dpdk.git] / app / test-pmd / ieee1588fwd.c
index 034f238..b85a4aa 100644 (file)
@@ -178,9 +178,9 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
        port_ieee1588_rx_timestamp_check(fs->rx_port, timesync_index);
 
        /* Swap dest and src mac addresses. */
-       rte_ether_addr_copy(&eth_hdr->d_addr, &addr);
-       rte_ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
-       rte_ether_addr_copy(&addr, &eth_hdr->s_addr);
+       rte_ether_addr_copy(&eth_hdr->dst_addr, &addr);
+       rte_ether_addr_copy(&eth_hdr->src_addr, &eth_hdr->dst_addr);
+       rte_ether_addr_copy(&addr, &eth_hdr->src_addr);
 
        /* Forward PTP packet with hardware TX timestamp */
        mb->ol_flags |= PKT_TX_IEEE1588_TMST;
@@ -198,10 +198,11 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
        port_ieee1588_tx_timestamp_check(fs->rx_port);
 }
 
-static void
+static int
 port_ieee1588_fwd_begin(portid_t pi)
 {
        rte_eth_timesync_enable(pi);
+       return 0;
 }
 
 static void