Skip to contentSkip to conversation

drivers: remove compile-time option for IEEE 1588

PATCH In review Thomas Monjalon 4 participants 10 messages Feb 3, 2023 – Oct 3, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: remove compile-time option for IEEE 1588

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

---
 app/test-pmd/testpmd.c                    |  2 -
 app/test-pmd/testpmd.h                    |  2 -
 drivers/net/bnxt/bnxt_ethdev.c            | 96 -----------------------
 drivers/net/bnxt/bnxt_rxr.c               |  6 --
 drivers/net/cnxk/cnxk_ethdev.h            |  8 +-
 drivers/net/dpaa2/dpaa2_ethdev.c          |  9 +--
 drivers/net/dpaa2/dpaa2_ptp.c             |  2 -
 drivers/net/dpaa2/dpaa2_rxtx.c            | 21 +----
 drivers/net/e1000/igb_rxtx.c              | 16 +---
 drivers/net/fm10k/fm10k_rxtx_vec.c        | 12 ---
 drivers/net/i40e/i40e_rxtx.c              | 41 ++--------
 drivers/net/i40e/i40e_rxtx_vec_common.h   | 48 ------------
 drivers/net/ixgbe/ixgbe_rxtx.c            | 16 +---
 drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 10 ---
 drivers/net/ngbe/ngbe_rxtx.c              | 17 +---
 drivers/net/txgbe/txgbe_rxtx.c            | 17 +---
 16 files changed, 18 insertions(+), 305 deletions(-)
app/test-pmd/testpmd.c +0 -2
index e366f81a0f..c8f8f896cb 100644
@@ -198,9 +198,7 @@ struct fwd_engine * fwd_engines[] = {
 	&icmp_echo_engine,
 	&noisy_vnf_engine,
 	&five_tuple_swap_fwd_engine,
-#ifdef RTE_LIBRTE_IEEE1588
 	&ieee1588_fwd_engine,
-#endif
 	&shared_rxq_engine,
 	NULL,
 };
app/test-pmd/testpmd.h +0 -2
index 7d24d25970..b9aabf8136 100644
@@ -427,9 +427,7 @@ extern struct fwd_engine csum_fwd_engine;
 extern struct fwd_engine icmp_echo_engine;
 extern struct fwd_engine noisy_vnf_engine;
 extern struct fwd_engine five_tuple_swap_fwd_engine;
-#ifdef RTE_LIBRTE_IEEE1588
 extern struct fwd_engine ieee1588_fwd_engine;
-#endif
 extern struct fwd_engine shared_rxq_engine;
 
 extern struct fwd_engine * fwd_engines[]; /**< NULL terminated array. */
drivers/net/bnxt/bnxt_ethdev.c +0 -96

108 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxr.c +0 -6
index daaf9ffc1e..1d434c79bc 100644
@@ -680,16 +680,13 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
 		ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
 	}
 
-#ifdef RTE_LIBRTE_IEEE1588
 	if (unlikely((flags_type & RX_PKT_CMPL_FLAGS_MASK) ==
 		     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP))
 		ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP | RTE_MBUF_F_RX_IEEE1588_TMST;
-#endif
 
 	mbuf->ol_flags = ol_flags;
 }
 
-#ifdef RTE_LIBRTE_IEEE1588
 static void
 bnxt_get_rx_ts_p5(struct bnxt *bp, uint32_t rx_ts_cmpl)
 {
@@ -716,7 +713,6 @@ bnxt_get_rx_ts_p5(struct bnxt *bp, uint32_t rx_ts_cmpl)
 	}
 	ptp->rx_timestamp = pkt_time;
 }
-#endif
 
 static uint32_t
 bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1,
@@ -926,12 +922,10 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	mbuf->data_len = mbuf->pkt_len;
 	mbuf->port = rxq->port_id;
 
-#ifdef RTE_LIBRTE_IEEE1588
 	if (unlikely((rte_le_to_cpu_16(rxcmp->flags_type) &
 		      RX_PKT_CMPL_FLAGS_MASK) ==
 		     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP))
 		bnxt_get_rx_ts_p5(rxq->bp, rxcmp1->reorder);
-#endif
 
 	if (cmp_type == CMPL_BASE_TYPE_RX_L2_V2) {
 		bnxt_parse_csum_v2(mbuf, rxcmp1);
drivers/net/cnxk/cnxk_ethdev.h +1 -7
index 651ef45ea8..b517204f7f 100644
@@ -48,14 +48,8 @@
 /* LPB & SPB */
 #define CNXK_NIX_NUM_POOLS_MAX 2
 
-/* If PTP is enabled additional SEND MEM DESC is required which
- * takes 2 words, hence max 7 iova address are possible
- */
-#if defined(RTE_LIBRTE_IEEE1588)
+/* PTP requires 2 words, hence max 7 IOVA addresses are possible. */
 #define CNXK_NIX_TX_NB_SEG_MAX 7
-#else
-#define CNXK_NIX_TX_NB_SEG_MAX 9
-#endif
 
 #define CNXK_NIX_TX_MSEG_SG_DWORDS                                             \
 	((RTE_ALIGN_MUL_CEIL(CNXK_NIX_TX_NB_SEG_MAX, 3) / 3) +                 \
drivers/net/dpaa2/dpaa2_ethdev.c +1 -8
index 679f33ae1a..de9c02a962 100644
@@ -618,9 +618,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 		return ret;
 	}
 
-#if !defined(RTE_LIBRTE_IEEE1588)
-	if (rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
-#endif
 	{
 		ret = rte_mbuf_dyn_rx_timestamp_register(
 				&dpaa2_timestamp_dynfield_offset,
@@ -2461,7 +2458,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.rxq_info_get	      = dpaa2_rxq_info_get,
 	.txq_info_get	      = dpaa2_txq_info_get,
 	.tm_ops_get	      = dpaa2_tm_ops_get,
-#if defined(RTE_LIBRTE_IEEE1588)
 	.timesync_enable      = dpaa2_timesync_enable,
 	.timesync_disable     = dpaa2_timesync_disable,
 	.timesync_read_time   = dpaa2_timesync_read_time,
@@ -2469,7 +2465,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.timesync_adjust_time = dpaa2_timesync_adjust_time,
 	.timesync_read_rx_timestamp = dpaa2_timesync_read_rx_timestamp,
 	.timesync_read_tx_timestamp = dpaa2_timesync_read_tx_timestamp,
-#endif
 };
 
 /* Populate the mac address from physically available (u-boot/firmware) and/or
@@ -2681,10 +2676,8 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
 	priv->max_mac_filters = attr.mac_filter_entries;
 	priv->max_vlan_filters = attr.vlan_filter_entries;
 	priv->flags = 0;
-#if defined(RTE_LIBRTE_IEEE1588)
-	printf("DPDK IEEE1588 is enabled\n");
 	priv->flags |= DPAA2_TX_CONF_ENABLE;
-#endif
+
 	/* Used with ``fslmc:dpni.1,drv_tx_conf=1`` */
 	if (dpaa2_get_devargs(dev->devargs, DRIVER_TX_CONF)) {
 		priv->flags |= DPAA2_TX_CONF_ENABLE;
drivers/net/dpaa2/dpaa2_ptp.c +0 -2
index c08aa0f3bf..955dc863d0 100644
@@ -131,7 +131,6 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
 	return 0;
 }
 
-#if defined(RTE_LIBRTE_IEEE1588)
 static int
 dpaa2_create_dprtc_device(int vdev_fd __rte_unused,
 			   struct vfio_device_info *obj_info __rte_unused,
@@ -181,4 +180,3 @@ static struct rte_dpaa2_object rte_dpaa2_dprtc_obj = {
 };
 
 RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
-#endif
drivers/net/dpaa2/dpaa2_rxtx.c +1 -20
index f60e78e1fd..e1aed0a461 100644
@@ -139,12 +139,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 			"(4)=0x%" PRIx64 "\t",
 			annotation->word3, annotation->word4);
 
-#if defined(RTE_LIBRTE_IEEE1588)
 	if (BIT_ISSET_AT_POS(annotation->word1, DPAA2_ETH_FAS_PTP)) {
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
 	}
-#endif
 
 	if (BIT_ISSET_AT_POS(annotation->word3, L2_VLAN_1_PRESENT)) {
 		vlan_tci = rte_pktmbuf_mtod_offset(mbuf, uint16_t *,
@@ -412,10 +410,9 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
 	struct qbman_sge *sgt, *sge = NULL;
 	int i, offset = 0;
 
-#ifdef RTE_LIBRTE_IEEE1588
 	/* annotation area for timestamp in first buffer */
 	offset = 0x64;
-#endif
+
 	if (RTE_MBUF_DIRECT(mbuf) &&
 		(mbuf->data_off > (mbuf->nb_segs * sizeof(struct qbman_sge)
 		+ offset))) {
@@ -829,12 +826,10 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			bufs[num_rx] = eth_sg_fd_to_mbuf(fd, eth_data->port_id);
 		else
 			bufs[num_rx] = eth_fd_to_mbuf(fd, eth_data->port_id);
-#if defined(RTE_LIBRTE_IEEE1588)
 		if (bufs[num_rx]->ol_flags & RTE_MBUF_F_RX_IEEE1588_TMST) {
 			priv->rx_timestamp =
 				*dpaa2_timestamp_dynfield(bufs[num_rx]);
 		}
-#endif
 
 		if (eth_data->dev_conf.rxmode.offloads &
 				RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
@@ -1050,12 +1045,10 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 				bufs[num_rx] = eth_fd_to_mbuf(fd,
 							eth_data->port_id);
 
-#if defined(RTE_LIBRTE_IEEE1588)
 		if (bufs[num_rx]->ol_flags & RTE_MBUF_F_RX_IEEE1588_TMST) {
 			priv->rx_timestamp =
 				*dpaa2_timestamp_dynfield(bufs[num_rx]);
 		}
-#endif
 
 		if (eth_data->dev_conf.rxmode.offloads &
 				RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
@@ -1088,13 +1081,11 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
 	struct qbman_release_desc releasedesc;
 	uint32_t bpid;
 	uint64_t buf;
-#if defined(RTE_LIBRTE_IEEE1588)
 	struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;
 	struct dpaa2_dev_priv *priv = eth_data->dev_private;
 	struct dpaa2_annot_hdr *annotation;
 	void *v_addr;
 	struct rte_mbuf *mbuf;
-#endif
 
 	if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
 		ret = dpaa2_affine_qbman_swp();
@@ -1177,7 +1168,6 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
 			dq_storage++;
 			num_tx_conf++;
 			num_pulled++;
-#if defined(RTE_LIBRTE_IEEE1588)
 			v_addr = DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
 			mbuf = DPAA2_INLINE_MBUF_FROM_BUF(v_addr,
 				rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size);
@@ -1188,7 +1178,6 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
 					DPAA2_FD_PTA_SIZE);
 				priv->tx_timestamp = annotation->word2;
 			}
-#endif
 		} while (pending);
 
 	/* Last VDQ provided all packets and more packets are requested */
@@ -1259,7 +1248,6 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
 			eth_data, dpaa2_q->fqid);
 
-#ifdef RTE_LIBRTE_IEEE1588
 	/* IEEE1588 driver need pointer to tx confirmation queue
 	 * corresponding to last packet transmitted for reading
 	 * the timestamp
@@ -1269,7 +1257,6 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		dpaa2_dev_tx_conf(dpaa2_q->tx_conf_queue);
 		priv->tx_timestamp = 0;
 	}
-#endif
 
 	/*Prepare enqueue descriptor*/
 	qbman_eq_desc_clear(&eqdesc);
@@ -1326,9 +1313,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 						(void **)bufs, 1, 0);
 #endif
 					bufs++;
-#ifdef RTE_LIBRTE_IEEE1588
 					enable_tx_tstamp(&fd_arr[loop]);
-#endif
 					continue;
 				}
 			} else {
@@ -1354,9 +1339,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 							loop, 0);
 				}
 				bufs++;
-#ifdef RTE_LIBRTE_IEEE1588
 				enable_tx_tstamp(&fd_arr[loop]);
-#endif
 				continue;
 			}
 
@@ -1409,9 +1392,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 							loop, bpid);
 				}
 			}
-#ifdef RTE_LIBRTE_IEEE1588
 			enable_tx_tstamp(&fd_arr[loop]);
-#endif
 			bufs++;
 		}
 
drivers/net/e1000/igb_rxtx.c +2 -14
index f32dee46df..b8c4de567c 100644
@@ -43,11 +43,6 @@
 #include "base/e1000_api.h"
 #include "e1000_ethdev.h"
 
-#ifdef RTE_LIBRTE_IEEE1588
-#define IGB_TX_IEEE1588_TMST RTE_MBUF_F_TX_IEEE1588_TMST
-#else
-#define IGB_TX_IEEE1588_TMST 0
-#endif
 /* Bit Mask to indicate what bits required for building TX context */
 #define IGB_TX_OFFLOAD_MASK (RTE_MBUF_F_TX_OUTER_IPV6 |	 \
 		RTE_MBUF_F_TX_OUTER_IPV4 |	 \
@@ -57,7 +52,7 @@
 		RTE_MBUF_F_TX_IP_CKSUM |		 \
 		RTE_MBUF_F_TX_L4_MASK |		 \
 		RTE_MBUF_F_TX_TCP_SEG |		 \
-		IGB_TX_IEEE1588_TMST)
+		RTE_MBUF_F_TX_IEEE1588_TMST)
 
 #define IGB_TX_OFFLOAD_NOTSUP_MASK \
 		(RTE_MBUF_F_TX_OFFLOAD_MASK ^ IGB_TX_OFFLOAD_MASK)
@@ -530,10 +525,8 @@ eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		if (tx_ol_req & RTE_MBUF_F_TX_TCP_SEG)
 			pkt_len -= (tx_pkt->l2_len + tx_pkt->l3_len + tx_pkt->l4_len);
 		olinfo_status = (pkt_len << E1000_ADVTXD_PAYLEN_SHIFT);
-#if defined(RTE_LIBRTE_IEEE1588)
 		if (ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST)
 			cmd_type_len |= E1000_ADVTXD_MAC_TSTAMP;
-#endif
 		if (tx_ol_req) {
 			/* Setup TX Advanced context descriptor if required */
 			if (new_ctx) {
@@ -746,7 +739,6 @@ rx_desc_hlen_type_rss_to_pkt_flags(struct igb_rx_queue *rxq, uint32_t hl_tp_rs)
 {
 	uint64_t pkt_flags = ((hl_tp_rs & 0x0F) == 0) ?  0 : RTE_MBUF_F_RX_RSS_HASH;
 
-#if defined(RTE_LIBRTE_IEEE1588)
 	static uint32_t ip_pkt_etqf_map[8] = {
 		0, 0, 0, RTE_MBUF_F_RX_IEEE1588_PTP,
 		0, 0, 0, 0,
@@ -760,9 +752,6 @@ rx_desc_hlen_type_rss_to_pkt_flags(struct igb_rx_queue *rxq, uint32_t hl_tp_rs)
 		pkt_flags |= ip_pkt_etqf_map[(hl_tp_rs >> 12) & 0x07];
 	else
 		pkt_flags |= ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07];
-#else
-	RTE_SET_USED(rxq);
-#endif
 
 	return pkt_flags;
 }
@@ -776,10 +765,9 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status)
 	pkt_flags = ((rx_status & E1000_RXD_STAT_VP) ?
 		RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED : 0);
 
-#if defined(RTE_LIBRTE_IEEE1588)
 	if (rx_status & E1000_RXD_STAT_TMST)
 		pkt_flags = pkt_flags | RTE_MBUF_F_RX_IEEE1588_TMST;
-#endif
+
 	return pkt_flags;
 }
 
drivers/net/fm10k/fm10k_rxtx_vec.c +0 -12
index dfc4abe3e3..9cc3ccee85 100644
@@ -207,20 +207,8 @@ fm10k_desc_to_pktype_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 int __rte_cold
 fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
 {
-#ifndef RTE_LIBRTE_IEEE1588
-	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-
-#ifndef RTE_FM10K_RX_OLFLAGS_ENABLE
-	/* without rx ol_flags, no VP flag report */
-	if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
-		return -1;
-#endif
-
-	return 0;
-#else
 	RTE_SET_USED(dev);
 	return -1;
-#endif
 }
 
 int __rte_cold
drivers/net/i40e/i40e_rxtx.c +7 -34

106 lines not on this page · raw message

drivers/net/i40e/i40e_rxtx_vec_common.h +0 -48

56 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_rxtx.c +2 -14
index c9d6ca9efe..99d4039fba 100644
@@ -53,11 +53,6 @@
 #include "base/ixgbe_common.h"
 #include "ixgbe_rxtx.h"
 
-#ifdef RTE_LIBRTE_IEEE1588
-#define IXGBE_TX_IEEE1588_TMST RTE_MBUF_F_TX_IEEE1588_TMST
-#else
-#define IXGBE_TX_IEEE1588_TMST 0
-#endif
 /* Bit Mask to indicate what bits required for building TX context */
 #define IXGBE_TX_OFFLOAD_MASK (RTE_MBUF_F_TX_OUTER_IPV6 |		 \
 		RTE_MBUF_F_TX_OUTER_IPV4 |		 \
@@ -70,7 +65,7 @@
 		RTE_MBUF_F_TX_MACSEC |			 \
 		RTE_MBUF_F_TX_OUTER_IP_CKSUM |		 \
 		RTE_MBUF_F_TX_SEC_OFFLOAD |	 \
-		IXGBE_TX_IEEE1588_TMST)
+		RTE_MBUF_F_TX_IEEE1588_TMST)
 
 #define IXGBE_TX_OFFLOAD_NOTSUP_MASK \
 		(RTE_MBUF_F_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)
@@ -823,10 +818,8 @@ ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		cmd_type_len = IXGBE_ADVTXD_DTYP_DATA |
 			IXGBE_ADVTXD_DCMD_IFCS | IXGBE_ADVTXD_DCMD_DEXT;
 
-#ifdef RTE_LIBRTE_IEEE1588
 		if (ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST)
 			cmd_type_len |= IXGBE_ADVTXD_MAC_1588;
-#endif
 
 		olinfo_status = 0;
 		if (tx_ol_req) {
@@ -1436,7 +1429,6 @@ ixgbe_rxd_pkt_info_to_pkt_flags(uint16_t pkt_info)
 		RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0,
 		0, 0, 0,  RTE_MBUF_F_RX_FDIR,
 	};
-#ifdef RTE_LIBRTE_IEEE1588
 	static uint64_t ip_pkt_etqf_map[8] = {
 		0, 0, 0, RTE_MBUF_F_RX_IEEE1588_PTP,
 		0, 0, 0, 0,
@@ -1447,9 +1439,6 @@ ixgbe_rxd_pkt_info_to_pkt_flags(uint16_t pkt_info)
 				ip_rss_types_map[pkt_info & 0XF];
 	else
 		return ip_rss_types_map[pkt_info & 0XF];
-#else
-	return ip_rss_types_map[pkt_info & 0XF];
-#endif
 }
 
 static inline uint64_t
@@ -1464,10 +1453,9 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
 	 */
 	pkt_flags = (rx_status & IXGBE_RXD_STAT_VP) ?  vlan_flags : 0;
 
-#ifdef RTE_LIBRTE_IEEE1588
 	if (rx_status & IXGBE_RXD_STAT_TMST)
 		pkt_flags = pkt_flags | RTE_MBUF_F_RX_IEEE1588_TMST;
-#endif
+
 	return pkt_flags;
 }
 
drivers/net/ixgbe/ixgbe_rxtx_vec_common.h +0 -10
index a4d9ec9b08..2822c43aec 100644
@@ -276,17 +276,7 @@ ixgbe_txq_vec_setup_default(struct ixgbe_tx_queue *txq,
 static inline int
 ixgbe_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
 {
-#ifndef RTE_LIBRTE_IEEE1588
-	struct rte_eth_fdir_conf *fconf = IXGBE_DEV_FDIR_CONF(dev);
-
-	/* no fdir support */
-	if (fconf->mode != RTE_FDIR_MODE_NONE)
-		return -1;
-
-	return 0;
-#else
 	RTE_SET_USED(dev);
 	return -1;
-#endif
 }
 #endif
drivers/net/ngbe/ngbe_rxtx.c +2 -15
index 9fd24fa444..7b05509ccc 100644
@@ -16,12 +16,6 @@
 #include "ngbe_ethdev.h"
 #include "ngbe_rxtx.h"
 
-#ifdef RTE_LIBRTE_IEEE1588
-#define NGBE_TX_IEEE1588_TMST RTE_MBUF_F_TX_IEEE1588_TMST
-#else
-#define NGBE_TX_IEEE1588_TMST 0
-#endif
-
 /* Bit Mask to indicate what bits required for building Tx context */
 static const u64 NGBE_TX_OFFLOAD_MASK = (RTE_MBUF_F_TX_IP_CKSUM |
 		RTE_MBUF_F_TX_OUTER_IPV6 |
@@ -33,7 +27,7 @@ static const u64 NGBE_TX_OFFLOAD_MASK = (RTE_MBUF_F_TX_IP_CKSUM |
 		RTE_MBUF_F_TX_TCP_SEG |
 		RTE_MBUF_F_TX_TUNNEL_MASK |
 		RTE_MBUF_F_TX_OUTER_IP_CKSUM |
-		NGBE_TX_IEEE1588_TMST);
+		RTE_MBUF_F_TX_IEEE1588_TMST);
 
 #define NGBE_TX_OFFLOAD_NOTSUP_MASK \
 		(RTE_MBUF_F_TX_OFFLOAD_MASK ^ NGBE_TX_OFFLOAD_MASK)
@@ -739,10 +733,8 @@ ngbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		 */
 		cmd_type_len = NGBE_TXD_FCS;
 
-#ifdef RTE_LIBRTE_IEEE1588
 		if (ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST)
 			cmd_type_len |= NGBE_TXD_1588;
-#endif
 
 		olinfo_status = 0;
 		if (tx_ol_req) {
@@ -920,7 +912,6 @@ ngbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info)
 		RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0,
 		0, 0, 0,  RTE_MBUF_F_RX_FDIR,
 	};
-#ifdef RTE_LIBRTE_IEEE1588
 	static uint64_t ip_pkt_etqf_map[8] = {
 		0, 0, 0, RTE_MBUF_F_RX_IEEE1588_PTP,
 		0, 0, 0, 0,
@@ -931,9 +922,6 @@ ngbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info)
 		       ip_rss_types_map[NGBE_RXD_RSSTYPE(pkt_info)];
 	else
 		return ip_rss_types_map[NGBE_RXD_RSSTYPE(pkt_info)];
-#else
-	return ip_rss_types_map[NGBE_RXD_RSSTYPE(pkt_info)];
-#endif
 }
 
 static inline uint64_t
@@ -950,10 +938,9 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
 		     vlan_flags & RTE_MBUF_F_RX_VLAN_STRIPPED)
 		    ? vlan_flags : 0;
 
-#ifdef RTE_LIBRTE_IEEE1588
 	if (rx_status & NGBE_RXD_STAT_1588)
 		pkt_flags = pkt_flags | RTE_MBUF_F_RX_IEEE1588_TMST;
-#endif
+
 	return pkt_flags;
 }
 
drivers/net/txgbe/txgbe_rxtx.c +2 -15
index ac1bba08a3..ba127bb790 100644
@@ -42,12 +42,6 @@
 #include "txgbe_ethdev.h"
 #include "txgbe_rxtx.h"
 
-#ifdef RTE_LIBRTE_IEEE1588
-#define TXGBE_TX_IEEE1588_TMST RTE_MBUF_F_TX_IEEE1588_TMST
-#else
-#define TXGBE_TX_IEEE1588_TMST 0
-#endif
-
 /* Bit Mask to indicate what bits required for building TX context */
 static const u64 TXGBE_TX_OFFLOAD_MASK = (RTE_MBUF_F_TX_IP_CKSUM |
 		RTE_MBUF_F_TX_OUTER_IPV6 |
@@ -63,7 +57,7 @@ static const u64 TXGBE_TX_OFFLOAD_MASK = (RTE_MBUF_F_TX_IP_CKSUM |
 #ifdef RTE_LIB_SECURITY
 		RTE_MBUF_F_TX_SEC_OFFLOAD |
 #endif
-		TXGBE_TX_IEEE1588_TMST);
+		RTE_MBUF_F_TX_IEEE1588_TMST);
 
 #define TXGBE_TX_OFFLOAD_NOTSUP_MASK \
 		(RTE_MBUF_F_TX_OFFLOAD_MASK ^ TXGBE_TX_OFFLOAD_MASK)
@@ -915,10 +909,8 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		 */
 		cmd_type_len = TXGBE_TXD_FCS;
 
-#ifdef RTE_LIBRTE_IEEE1588
 		if (ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST)
 			cmd_type_len |= TXGBE_TXD_1588;
-#endif
 
 		olinfo_status = 0;
 		if (tx_ol_req) {
@@ -1102,7 +1094,6 @@ txgbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info)
 		RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0,
 		0, 0, 0,  RTE_MBUF_F_RX_FDIR,
 	};
-#ifdef RTE_LIBRTE_IEEE1588
 	static uint64_t ip_pkt_etqf_map[8] = {
 		0, 0, 0, RTE_MBUF_F_RX_IEEE1588_PTP,
 		0, 0, 0, 0,
@@ -1113,9 +1104,6 @@ txgbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info)
 		       ip_rss_types_map[TXGBE_RXD_RSSTYPE(pkt_info)];
 	else
 		return ip_rss_types_map[TXGBE_RXD_RSSTYPE(pkt_info)];
-#else
-	return ip_rss_types_map[TXGBE_RXD_RSSTYPE(pkt_info)];
-#endif
 }
 
 static inline uint64_t
@@ -1132,10 +1120,9 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
 		     vlan_flags & RTE_MBUF_F_RX_VLAN_STRIPPED)
 		    ? vlan_flags : 0;
 
-#ifdef RTE_LIBRTE_IEEE1588
 	if (rx_status & TXGBE_RXD_STAT_1588)
 		pkt_flags = pkt_flags | RTE_MBUF_F_RX_IEEE1588_TMST;
-#endif
+
 	return pkt_flags;
 }
 
Signature · 1 line
2.39.1
#1 lore raw
Quoted 6 lines · Thomas Monjalon

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

PTP (IEEE1588) processing brings additional overhead to datapath.

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

#2 lore raw

23/06/2023 16:00, Ferruh Yigit:

Quoted 15 lines · Thomas Monjalon
Quoted 6 lines

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

Quoted 8 lines

PTP (IEEE1588) processing brings additional overhead to datapath.

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

The best is to enable dynamically with different functions.

#3 lore raw
Quoted 18 lines · Thomas Monjalon

23/06/2023 16:00, Ferruh Yigit:

Quoted 17 lines · Thomas Monjalon
Quoted 6 lines

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

PTP (IEEE1588) processing brings additional overhead to datapath.

Quoted 10 lines
Quoted 6 lines

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

The best is to enable dynamically with different functions.

There was no comment from driver maintainers.

Perhaps better option is plan flag removal and execute it, like to remove the flag in 24.11 LTS, this gives enough time for drivers to update.

If this sounds good, I can send a deprecation notice to record this plan.

#4 lore raw
Quoted 31 lines · Ferruh Yigit
Quoted 18 lines · Thomas Monjalon

23/06/2023 16:00, Ferruh Yigit:

Quoted 17 lines · Thomas Monjalon
Quoted 6 lines

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

PTP (IEEE1588) processing brings additional overhead to datapath.

Quoted 10 lines
Quoted 6 lines

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

The best is to enable dynamically with different functions.

Quoted 6 lines

There was no comment from driver maintainers.

Perhaps better option is plan flag removal and execute it, like to remove the flag in 24.11 LTS, this gives enough time for drivers to update.

If this sounds good, I can send a deprecation notice to record this plan.

+1

#5 lore raw

02/11/2023 22:21, Ajit Khaparde:

Quoted 23 lines · Ferruh Yigit
Quoted 22 lines · Thomas Monjalon
Quoted 21 lines

23/06/2023 16:00, Ferruh Yigit:

Quoted 20 lines · Thomas Monjalon
Quoted 6 lines

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

PTP (IEEE1588) processing brings additional overhead to datapath.

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

The best is to enable dynamically with different functions.

There was no comment from driver maintainers.

If I made a baby when sending this patch, it would be a birth today. Isn't it enough time to warn maintainers?

Quoted 2 lines
Quoted 2 lines

Perhaps better option is plan flag removal and execute it, like to remove the flag in 24.11 LTS, this gives enough time for drivers to update.

You want to give time for one more baby?

Quoted 2 lines
Quoted 1 line

If this sounds good, I can send a deprecation notice to record this plan.

+1

Which plan? 2 babies?

#6 lore raw
Quoted 38 lines · Thomas Monjalon

02/11/2023 22:21, Ajit Khaparde:

Quoted 23 lines · Ferruh Yigit
Quoted 22 lines · Thomas Monjalon
Quoted 21 lines

23/06/2023 16:00, Ferruh Yigit:

Quoted 20 lines · Thomas Monjalon
Quoted 6 lines

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

PTP (IEEE1588) processing brings additional overhead to datapath.

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

The best is to enable dynamically with different functions.

There was no comment from driver maintainers.

If I made a baby when sending this patch, it would be a birth today. Isn't it enough time to warn maintainers?

Quoted 2 lines
Quoted 2 lines

Perhaps better option is plan flag removal and execute it, like to remove the flag in 24.11 LTS, this gives enough time for drivers to update.

Quoted 8 lines

You want to give time for one more baby?

Quoted 2 lines
Quoted 1 line

If this sounds good, I can send a deprecation notice to record this plan.

+1

Which plan? 2 babies?

:) remove compile flag in 24.11 LTS.

But we may end up in same situation in 24.11, some drivers not being ready, so we should merge this patch very early in the 24.11 to give time to drivers to fix if they were not ready at that time.

Other option is merge this patch in 24.07, so that vendors which were not ready can plan a fix for 24.11? Although enforcing an update by breaking the driver is not best planning, it may be an efficient one.

#7 lore raw
Quoted 50 lines · Ferruh Yigit
Quoted 38 lines · Thomas Monjalon

02/11/2023 22:21, Ajit Khaparde:

Quoted 23 lines · Ferruh Yigit
Quoted 22 lines · Thomas Monjalon
Quoted 21 lines

23/06/2023 16:00, Ferruh Yigit:

Quoted 20 lines · Thomas Monjalon
Quoted 6 lines

The option RTE_LIBRTE_IEEE1588 has no effect on any library unlike its name.

Also we are suppose to enable/disable features dynamically, not at compilation time.

Quoted 7 lines

And the best is that this macro is neither documented, nor in rte_config.h.

It looks to be a mistake keeping this flag, so it is removed, meaning always enabled.
PS: it is disabling vector paths of some drivers.

PTP (IEEE1588) processing brings additional overhead to datapath.

Agree that it is not good to have undocumented compile macro, but just removing it may cause performance degradation.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It may be possible to have separate burst function that supports PTP and driver configures it when application explicitly request it with a new offload flag (although it is not exactly an offload), what do you think?

The best is to enable dynamically with different functions.

There was no comment from driver maintainers.

If I made a baby when sending this patch, it would be a birth today. Isn't it enough time to warn maintainers?

Quoted 2 lines
Quoted 2 lines

Perhaps better option is plan flag removal and execute it, like to remove the flag in 24.11 LTS, this gives enough time for drivers to update.

Quoted 8 lines

You want to give time for one more baby?

Quoted 2 lines
Quoted 1 line

If this sounds good, I can send a deprecation notice to record this plan.

+1

Which plan? 2 babies?

:) remove compile flag in 24.11 LTS.

Quoted 8 lines

But we may end up in same situation in 24.11, some drivers not being ready, so we should merge this patch very early in the 24.11 to give time to drivers to fix if they were not ready at that time.

Other option is merge this patch in 24.07, so that vendors which were not ready can plan a fix for 24.11? Although enforcing an update by breaking the driver is not best planning, it may be an efficient one.

Hi Thomas and et al. ,

Is is good time to merge this patch, there is enough time to fix potential issues in this release, what do you think?

#8 lore raw
Quoted 11 lines · On Wed, 17 Apr 2024 14:24:00 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 10 lines

:) remove compile flag in 24.11 LTS.

But we may end up in same situation in 24.11, some drivers not being ready, so we should merge this patch very early in the 24.11 to give time to drivers to fix if they were not ready at that time.

Other option is merge this patch in 24.07, so that vendors which were not ready can plan a fix for 24.11? Although enforcing an update by breaking the driver is not best planning, it may be an efficient one.

Quoted 4 lines

Hi Thomas and et al. ,

Is is good time to merge this patch, there is enough time to fix potential issues in this release, what do you think?

Patch needs rebase if going into 24.11

#9 lore raw
Quoted 14 lines · Stephen Hemminger
Quoted 11 lines · On Wed, 17 Apr 2024 14:24:00 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 10 lines

:) remove compile flag in 24.11 LTS.

But we may end up in same situation in 24.11, some drivers not being ready, so we should merge this patch very early in the 24.11 to give time to drivers to fix if they were not ready at that time.

Other option is merge this patch in 24.07, so that vendors which were not ready can plan a fix for 24.11? Although enforcing an update by breaking the driver is not best planning, it may be an efficient one.

Quoted 7 lines
Quoted 4 lines

Hi Thomas and et al. ,

Is is good time to merge this patch, there is enough time to fix potential issues in this release, what do you think?

Patch needs rebase if going into 24.11

Indeed we talked about this in the release status meeting this morning, as we discussed similar issue with Huisong [1].

If we will continue with the patch it should be merged before -rc1, so that drivers can fix any impact from it.

Some options I can think of:

1. Move RTE_LIBRTE_IEEE1588 macro to config/rte_config.h, so make it a little more configurable and keep macro (easiest, but not preferable).

2. Add a new meson config option to 'config/rte_config.h' to set/unset this macro, keep macro as it is.

3. Remove the macro, replace it with device argument per driver. So make it dynamically configured instead of build time.

4. Remove the macro, introduce a new offload flag (Huisong has similar patch [2]) for user to explicitly request this feature.

5. Remove the macro, implicitly enable it in the driver when vector path is not enabled. So feature will be always on for scalar path, always off for the vector path. User can disable vector path (RTE_VECT_SIMD_DISABLED) to enable PTP.

Question is, will drivers have enough time form -rc1 to end of the release to fix drivers?

Drivers in questions are:
txgbe
ngbe
ixgbe
i40e
igb
fm10k
bnxt
dpaa2
cnxk

Can maintainers of the above drivers please comment?

[1]
https://inbox.dpdk.org/dev/[email protected]/

[2]
https://patches.dpdk.org/project/dpdk/patch/[email protected]/