X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fiavf%2Fiavf_rxtx.h;h=1695e43cd5be236008c8d84526e98029b55061d2;hb=149280731bf383e369262aa156b1a3d7e6fbbe6f;hp=bf8aebbce87669c746b383d670211adb09b6055f;hpb=0ed16e01313e1f8930dc6a52b22159b20269d4e0;p=dpdk.git diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h index bf8aebbce8..1695e43cd5 100644 --- a/drivers/net/iavf/iavf_rxtx.h +++ b/drivers/net/iavf/iavf_rxtx.h @@ -72,6 +72,9 @@ #define IAVF_TX_OFFLOAD_NOTSUP_MASK \ (RTE_MBUF_F_TX_OFFLOAD_MASK ^ IAVF_TX_OFFLOAD_MASK) +extern uint64_t iavf_timestamp_dynflag; +extern int iavf_timestamp_dynfield_offset; + /** * Rx Flex Descriptors * These descriptors are used instead of the legacy version descriptors @@ -187,6 +190,7 @@ struct iavf_rx_queue { struct rte_mbuf *pkt_last_seg; /* last segment of current packet */ struct rte_mbuf fake_mbuf; /* dummy mbuf */ uint8_t rxdid; + uint8_t rel_mbufs_type; /* used for VPMD */ uint16_t rxrearm_nb; /* number of remaining to be re-armed */ @@ -219,6 +223,8 @@ struct iavf_rx_queue { /* flexible descriptor metadata extraction offload flag */ struct iavf_rx_queue_stats stats; uint64_t offloads; + uint64_t phc_time; + uint64_t hw_time_update; }; struct iavf_tx_entry { @@ -246,6 +252,7 @@ struct iavf_tx_queue { uint16_t last_desc_cleaned; /* last desc have been cleaned*/ uint16_t free_thresh; uint16_t rs_thresh; + uint8_t rel_mbufs_type; uint16_t port_id; uint16_t queue_id; @@ -389,6 +396,12 @@ struct iavf_32b_rx_flex_desc_comms_ipsec { __le32 ipsec_said; }; +enum iavf_rxtx_rel_mbufs_type { + IAVF_REL_MBUFS_DEFAULT = 0, + IAVF_REL_MBUFS_SSE_VEC = 1, + IAVF_REL_MBUFS_AVX512_VEC = 2, +}; + /* Receive Flex Descriptor profile IDs: There are a total * of 64 profiles where profile IDs 0/1 are for legacy; and * profiles 2-63 are flex profiles that can be programmed @@ -692,6 +705,9 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq); uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type); void iavf_set_default_ptype_table(struct rte_eth_dev *dev); +void iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq); +void iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq); +void iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq); static inline void iavf_dump_rx_descriptor(struct iavf_rx_queue *rxq, @@ -778,6 +794,24 @@ void iavf_fdir_rx_proc_enable(struct iavf_adapter *ad, bool on) } } +static inline +uint64_t iavf_tstamp_convert_32b_64b(uint64_t time, uint32_t in_timestamp) +{ + const uint64_t mask = 0xFFFFFFFF; + uint32_t delta; + uint64_t ns; + + delta = (in_timestamp - (uint32_t)(time & mask)); + if (delta > (mask / 2)) { + delta = ((uint32_t)(time & mask) - in_timestamp); + ns = time - delta; + } else { + ns = time + delta; + } + + return ns; +} + #ifdef RTE_LIBRTE_IAVF_DEBUG_DUMP_DESC #define IAVF_DUMP_RX_DESC(rxq, desc, rx_id) \ iavf_dump_rx_descriptor(rxq, desc, rx_id)