X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_rxtx.c;h=1d7a7697686d2094af660b99c565470ba1eaee12;hb=4d8cce267840556cec8483c61f8cfbf25873496d;hp=7ac3a4831c3d648387bc9196f99562103e6b4bec;hpb=d7ec2c076579f13d0a71807c367ded2c549c8281;p=dpdk.git diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 7ac3a4831c..1d7a769768 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2654,6 +2654,9 @@ hns3_recv_scattered_pkts(void *rx_queue, continue; } + if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B))) + hns3_rx_ptp_timestamp_handle(rxq, first_seg, rxdp); + /* * The last buffer of the received packet. packet len from * buffer description may contains CRC len, packet len should @@ -2704,6 +2707,9 @@ hns3_recv_scattered_pkts(void *rx_queue, first_seg->packet_type = hns3_rx_calc_ptype(rxq, l234_info, ol_info); + if (first_seg->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC) + rxm->ol_flags |= PKT_RX_IEEE1588_PTP; + hns3_rxd_to_vlan_tci(rxq, first_seg, l234_info, &rxd); /* Increment bytes counter */ @@ -4207,6 +4213,7 @@ static bool hns3_get_tx_prep_needed(struct rte_eth_dev *dev) { #ifdef RTE_LIBRTE_ETHDEV_DEBUG + RTE_SET_USED(dev); /* always perform tx_prepare when debug */ return true; #else