diff mbox series

[v3,2/9] net: replace build option

Message ID 20210317111551.2215332-3-qi.z.zhang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series ether: refine debug build option | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z March 17, 2021, 11:15 a.m. UTC
Replace RTE_LIBRTE_ETHDEV_DEBUG with RTE_ETHDEV_DEBUG.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ark/ark_logs.h                   | 2 +-
 drivers/net/atlantic/atl_rxtx.c              | 2 +-
 drivers/net/e1000/em_rxtx.c                  | 2 +-
 drivers/net/e1000/igb_rxtx.c                 | 2 +-
 drivers/net/ena/ena_ethdev.c                 | 2 +-
 drivers/net/enic/enic_rxtx.c                 | 2 +-
 drivers/net/fm10k/fm10k_rxtx.c               | 2 +-
 drivers/net/hinic/hinic_pmd_tx.c             | 2 +-
 drivers/net/hns3/hns3_rxtx.c                 | 4 ++--
 drivers/net/i40e/i40e_rxtx.c                 | 2 +-
 drivers/net/iavf/iavf_rxtx.c                 | 2 +-
 drivers/net/ice/ice_rxtx.c                   | 2 +-
 drivers/net/igc/igc_txrx.c                   | 2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c               | 2 +-
 drivers/net/qede/qede_rxtx.c                 | 4 ++--
 drivers/net/softnic/rte_eth_softnic.c        | 2 +-
 drivers/net/softnic/rte_eth_softnic_thread.c | 2 +-
 drivers/net/txgbe/txgbe_rxtx.c               | 2 +-
 drivers/net/virtio/virtio_rxtx.c             | 2 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c           | 2 +-
 20 files changed, 22 insertions(+), 22 deletions(-)

Comments

Ferruh Yigit March 17, 2021, 9:47 p.m. UTC | #1
On 3/17/2021 11:15 AM, Qi Zhang wrote:
> Replace RTE_LIBRTE_ETHDEV_DEBUG with RTE_ETHDEV_DEBUG.
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>

Hi Qi, Thomas,

I see Thomas mentioned 'LIBRTE_' is redundant but not sure about renaming the 
existing compile time flag without notice.

The flag is to be used for users, it is not internal, and it may be already used 
in some scripts and automation etc, this rename can break them.

'LIBRTE_' is already used commonly, I think all library flags has it, do we 
really need to drop it from this current one? Even if we drop it, what about 
keeping it as alias for backward compatibility?
Thomas Monjalon March 17, 2021, 10 p.m. UTC | #2
17/03/2021 22:47, Ferruh Yigit:
> On 3/17/2021 11:15 AM, Qi Zhang wrote:
> > Replace RTE_LIBRTE_ETHDEV_DEBUG with RTE_ETHDEV_DEBUG.
> > 
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Hi Qi, Thomas,
> 
> I see Thomas mentioned 'LIBRTE_' is redundant but not sure about renaming the 
> existing compile time flag without notice.
> 
> The flag is to be used for users, it is not internal, and it may be already used 
> in some scripts and automation etc, this rename can break them.
> 
> 'LIBRTE_' is already used commonly, I think all library flags has it, do we 
> really need to drop it from this current one? Even if we drop it, what about 
> keeping it as alias for backward compatibility?

Yes I did not ask for removing now :)
Let's keep old name as alias and start using the new name
(if you agree with the new name without LIBRTE_).
Zhang, Qi Z March 18, 2021, 12:58 a.m. UTC | #3
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, March 18, 2021 6:01 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>; Wang,
> Xiao W <xiao.w.wang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing,
> Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>
> Subject: Re: [PATCH v3 2/9] net: replace build option
> 
> 17/03/2021 22:47, Ferruh Yigit:
> > On 3/17/2021 11:15 AM, Qi Zhang wrote:
> > > Replace RTE_LIBRTE_ETHDEV_DEBUG with RTE_ETHDEV_DEBUG.
> > >
> > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> >
> > Hi Qi, Thomas,
> >
> > I see Thomas mentioned 'LIBRTE_' is redundant but not sure about
> > renaming the existing compile time flag without notice.
> >
> > The flag is to be used for users, it is not internal, and it may be
> > already used in some scripts and automation etc, this rename can break
> them.
> >
> > 'LIBRTE_' is already used commonly, I think all library flags has it,
> > do we really need to drop it from this current one? Even if we drop
> > it, what about keeping it as alias for backward compatibility?
> 
> Yes I did not ask for removing now :)
> Let's keep old name as alias and start using the new name (if you agree with
> the new name without LIBRTE_).

OK, adding an alias makes sense to me

Thanks
Qi


>
diff mbox series

Patch

diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index ca46d86c99..1043e85b07 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -25,7 +25,7 @@  extern int ark_logtype;
 
 
 /* Debug macro to enable core debug code */
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 #define ARK_DEBUG_CORE 1
 #else
 #define ARK_DEBUG_CORE 0
diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index 7d367c9306..2d75536d6f 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -821,7 +821,7 @@  atl_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index db5d1222ce..dc8cc3a22e 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -626,7 +626,7 @@  eth_em_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1500d2ffff..4ab94dfeac 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -641,7 +641,7 @@  eth_igb_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 9aa51c9dcf..0086ff6828 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2313,7 +2313,7 @@  eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index a2a02227e3..90c147ab4c 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -443,7 +443,7 @@  uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			rte_errno = ENOTSUP;
 			return i;
 		}
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 8585c5b9e4..fbf07bc225 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -710,7 +710,7 @@  fm10k_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 669f82389c..c8ab9831cd 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -974,7 +974,7 @@  static inline int hinic_tx_offload_pkt_prepare(struct rte_mbuf *m,
 	    !(ol_flags & PKT_TX_TUNNEL_VXLAN)))
 		return -ENOTSUP;
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 	if (rte_validate_tx_offload(m) != 0)
 		return -EINVAL;
 #endif
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 00167c4bd5..be0ae045bf 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3439,7 +3439,7 @@  hns3_check_tso_pkt_valid(struct rte_mbuf *m)
 	return 0;
 }
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 static inline int
 hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m)
 {
@@ -3486,7 +3486,7 @@  hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
 {
 	int ret;
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 	ret = rte_validate_tx_offload(m);
 	if (ret != 0) {
 		rte_errno = -ret;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 61cb204be2..4c0f558195 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1525,7 +1525,7 @@  i40e_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 8fafe4579b..69d83dbbfc 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2335,7 +2335,7 @@  iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 530c206f4f..8785baa71a 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -3243,7 +3243,7 @@  ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index c0a5d5e84f..21a658861c 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -1434,7 +1434,7 @@  eth_igc_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 7d23bab290..78a66a554b 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -995,7 +995,7 @@  ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 87f52d7254..9fb8da3948 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -2154,7 +2154,7 @@  qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts,
 	uint64_t ol_flags;
 	struct rte_mbuf *m;
 	uint16_t i;
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 	int ret;
 #endif
 
@@ -2194,7 +2194,7 @@  qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts,
 			break;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 99d8468c94..6e6dad199c 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -700,7 +700,7 @@  rte_pmd_softnic_manage(uint16_t port_id)
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	struct pmd_internals *softnic;
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
 #endif
 
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index a8c26a5b23..ec5e0feca5 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -3055,7 +3055,7 @@  rte_pmd_softnic_run(uint16_t port_id)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
 #endif
 
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index a70bf0b9c6..3bac2a136d 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -1037,7 +1037,7 @@  txgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = ret;
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 40283001b0..77183e6968 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1691,7 +1691,7 @@  virtio_xmit_pkts_prepare(void *tx_queue __rte_unused, struct rte_mbuf **tx_pkts,
 	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
 		struct rte_mbuf *m = tx_pkts[nb_tx];
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		error = rte_validate_tx_offload(m);
 		if (unlikely(error)) {
 			rte_errno = -error;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 5cf53d4de8..c2af0d877c 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -373,7 +373,7 @@  vmxnet3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;