DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2 01/16] bus/dpaa: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 02/16] event/octeontx: " Weiguo Li
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>

---
v2:
* update to a simple guard style
---
 drivers/bus/dpaa/base/qbman/qman.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h
index 4346d86537..3928446d19 100644
--- a/drivers/bus/dpaa/base/qbman/qman.h
+++ b/drivers/bus/dpaa/base/qbman/qman.h
@@ -5,6 +5,9 @@
  *
  */
 
+#ifndef QBMAN_QMAN_H
+#define QBMAN_QMAN_H
+
 #include "qman_priv.h"
 
 /***************************/
@@ -911,3 +914,5 @@ static inline void __qm_isr_write(struct qm_portal *portal, enum qm_isr_reg n,
 	__qm_out(&portal->addr, QM_REG_ISR + (n << 2), val);
 #endif
 }
+
+#endif /* QBMAN_QMAN_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 02/16] event/octeontx: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
  2022-02-09  3:02 ` [PATCH v2 01/16] bus/dpaa: add define guards to avoid multi-inclusion Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 03/16] net/cxgbe: " Weiguo Li
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
v2:
* update to a simple guard style
---
 drivers/event/octeontx/timvf_worker.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/event/octeontx/timvf_worker.h b/drivers/event/octeontx/timvf_worker.h
index 3f1e77f1d1..ddb66c8f7c 100644
--- a/drivers/event/octeontx/timvf_worker.h
+++ b/drivers/event/octeontx/timvf_worker.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2017 Cavium, Inc
  */
 
+#ifndef TIMVF_WORKER_H
+#define TIMVF_WORKER_H
+
 #include <eventdev_pmd.h>
 
 #include <rte_common.h>
@@ -443,3 +446,5 @@ timvf_add_entry_brst(struct timvf_ring * const timr, const uint16_t rel_bkt,
 	timr_bkt_dec_lock(bkt);
 	return nb_timers;
 }
+
+#endif /* TIMVF_WORKER_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 03/16] net/cxgbe: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
  2022-02-09  3:02 ` [PATCH v2 01/16] bus/dpaa: add define guards to avoid multi-inclusion Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 02/16] event/octeontx: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 04/16] net/enetfec: " Weiguo Li
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
v2:
* update to a simple guard style
---
 drivers/net/cxgbe/base/t4_regs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/cxgbe/base/t4_regs.h b/drivers/net/cxgbe/base/t4_regs.h
index 8a14d09a15..c90ac09696 100644
--- a/drivers/net/cxgbe/base/t4_regs.h
+++ b/drivers/net/cxgbe/base/t4_regs.h
@@ -3,6 +3,9 @@
  * All rights reserved.
  */
 
+#ifndef CXGBE_T4_REGS_H
+#define CXGBE_T4_REGS_H
+
 #define MYPF_BASE 0x1b000
 #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr))
 
@@ -976,3 +979,5 @@
 
 #define LE_3_DB_HASH_MASK_GEN_IPV4_T6_A 0x19eac
 #define LE_4_DB_HASH_MASK_GEN_IPV4_T6_A 0x19eb0
+
+#endif /* CXGBE_T4_REGS_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 04/16] net/enetfec: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (2 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 03/16] net/cxgbe: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 05/16] net/i40e: " Weiguo Li
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
v2:
* update to a simple guard style
---
 drivers/net/enetfec/enet_uio.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/enetfec/enet_uio.h b/drivers/net/enetfec/enet_uio.h
index fec8ba6f95..e82e549b0b 100644
--- a/drivers/net/enetfec/enet_uio.h
+++ b/drivers/net/enetfec/enet_uio.h
@@ -2,6 +2,9 @@
  * Copyright 2021 NXP
  */
 
+#ifndef ENETFEC_UIO_H
+#define ENETFEC_UIO_H
+
 #include "enet_ethdev.h"
 
 /* Prefix path to sysfs directory where UIO device attributes are exported.
@@ -62,3 +65,5 @@ int enetfec_configure(void);
 int config_enetfec_uio(struct enetfec_private *fep);
 void enetfec_uio_init(void);
 void enetfec_cleanup(struct enetfec_private *fep);
+
+#endif /* ENETFEC_UIO_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 05/16] net/i40e: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (3 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 04/16] net/enetfec: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 06/16] net/netvsc: " Weiguo Li
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
v2:
* update to a simple guard style
---
 drivers/net/i40e/i40e_regs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/i40e/i40e_regs.h b/drivers/net/i40e/i40e_regs.h
index b19bb1d5a5..0f4db4a46e 100644
--- a/drivers/net/i40e/i40e_regs.h
+++ b/drivers/net/i40e/i40e_regs.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2016 Intel Corporation
  */
 
+#ifndef I40E_REGS_H
+#define I40E_REGS_H
+
 struct i40e_reg_info {
 	uint32_t base_addr;
 	uint32_t count1;
@@ -966,3 +969,5 @@ static const struct i40e_reg_info i40e_regs_others[] = {
 	{I40E_GLGEN_STAT_CLEAR, 0, 0, 0, 0, "GLGEN_STAT_CLEAR"},
 	{0, 0, 0, 0, 0, NULL}
 };
+
+#endif /* I40E_REGS_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 06/16] net/netvsc: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (4 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 05/16] net/i40e: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  6:28   ` Stephen Hemminger
  2022-02-09  3:02 ` [PATCH v2 07/16] net/qede: " Weiguo Li
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/net/netvsc/hn_nvs.h   | 5 +++++
 drivers/net/netvsc/hn_rndis.h | 5 +++++
 drivers/net/netvsc/hn_var.h   | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/drivers/net/netvsc/hn_nvs.h b/drivers/net/netvsc/hn_nvs.h
index 3766d2ee34..125df08a21 100644
--- a/drivers/net/netvsc/hn_nvs.h
+++ b/drivers/net/netvsc/hn_nvs.h
@@ -3,6 +3,9 @@
  * All rights reserved.
  */
 
+#ifndef NETVSC_HN_NVS_H
+#define NETVSC_HN_NVS_H
+
 /*
  * The indirection table message is the largest message
  * received from host, and that is 112 bytes.
@@ -236,3 +239,5 @@ hn_nvs_send_sglist(struct vmbus_channel *chan,
 	return rte_vmbus_chan_send_sglist(chan, sg, sglen, nvs_msg, nvs_msglen,
 					  (uint64_t)sndc, need_sig);
 }
+
+#endif /* NETVSC_HN_NVS_H */
diff --git a/drivers/net/netvsc/hn_rndis.h b/drivers/net/netvsc/hn_rndis.h
index 9a8251fc2f..fc3364f8ce 100644
--- a/drivers/net/netvsc/hn_rndis.h
+++ b/drivers/net/netvsc/hn_rndis.h
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
 
+#ifndef NETVSC_HN_RNDIS_H
+#define NETVSC_HN_RNDIS_H
+
 #include "rndis.h"
 
 struct hn_data;
@@ -32,3 +35,5 @@ void hn_rndis_dump(const void *buf);
 #else
 #define hn_rndis_dump(buf)
 #endif
+
+#endif /* NETVSC_HN_RNDIS_H */
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index fbb3995507..36b5a56d34 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -6,6 +6,9 @@
  * All rights reserved.
  */
 
+#ifndef NETVSC_HN_VAR_H
+#define NETVSC_HN_VAR_H
+
 #include <rte_eal_paging.h>
 #include <ethdev_driver.h>
 
@@ -283,3 +286,5 @@ int	hn_vf_reta_hash_update(struct rte_eth_dev *dev,
 int	hn_eth_rmv_event_callback(uint16_t port_id,
 				  enum rte_eth_event_type event __rte_unused,
 				  void *cb_arg, void *out __rte_unused);
+
+#endif /* NETVSC_HN_VAR_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 07/16] net/qede: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (5 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 06/16] net/netvsc: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 08/16] net/tap: " Weiguo Li
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/net/qede/base/reg_addr.h | 5 +++++
 drivers/net/qede/qede_sriov.h    | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/qede/base/reg_addr.h b/drivers/net/qede/base/reg_addr.h
index c84d3865f4..adbed81907 100644
--- a/drivers/net/qede/base/reg_addr.h
+++ b/drivers/net/qede/base/reg_addr.h
@@ -4,6 +4,9 @@
  * www.cavium.com
  */
 
+#ifndef QEDE_REG_ADDR_H
+#define QEDE_REG_ADDR_H
+
 #define  CDU_REG_CID_ADDR_PARAMS_CONTEXT_SIZE_SHIFT \
 	0
 
@@ -2091,3 +2094,5 @@
   #define MISC_REG_AEU_GENERAL_MASK_AEU_SYS_KILL_MASK_SHIFT 2
   #define MISC_REG_AEU_GENERAL_MASK_AEU_GLB_UNC_ERR_MASK (0x1UL << 3)
   #define MISC_REG_AEU_GENERAL_MASK_AEU_GLB_UNC_ERR_MASK_SHIFT 3
+
+#endif /* QEDE_REG_ADDR_H */
diff --git a/drivers/net/qede/qede_sriov.h b/drivers/net/qede/qede_sriov.h
index e58ecc2a51..578d111de4 100644
--- a/drivers/net/qede/qede_sriov.h
+++ b/drivers/net/qede/qede_sriov.h
@@ -4,6 +4,9 @@
  * www.marvell.com
  */
 
+#ifndef QEDE_SRIOV_H
+#define QEDE_SRIOV_H
+
 void qed_sriov_configure(struct ecore_dev *edev, int num_vfs_param);
 
 enum qed_iov_wq_flag {
@@ -20,3 +23,5 @@ enum qed_iov_wq_flag {
 void qed_inform_vf_link_state(struct ecore_hwfn *hwfn);
 int qed_schedule_iov(struct ecore_hwfn *p_hwfn, enum qed_iov_wq_flag flag);
 void qed_iov_pf_task(void *arg);
+
+#endif /* QEDE_SRIOV_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 08/16] net/tap: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (6 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 07/16] net/qede: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  6:28   ` Stephen Hemminger
  2022-02-09  3:02 ` [PATCH v2 09/16] net/virtio: " Weiguo Li
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/net/tap/tap_bpf_insns.h | 5 +++++
 drivers/net/tap/tap_log.h       | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/tap/tap_bpf_insns.h b/drivers/net/tap/tap_bpf_insns.h
index 1a91bbad13..c190793b89 100644
--- a/drivers/net/tap/tap_bpf_insns.h
+++ b/drivers/net/tap/tap_bpf_insns.h
@@ -2,6 +2,9 @@
  * Copyright 2017 Mellanox Technologies, Ltd
  */
 
+#ifndef TAP_BPF_INSNS_H
+#define TAP_BPF_INSNS_H
+
 #include <tap_bpf.h>
 
 /* bpf_insn array matching cls_q section. See tap_bpf_program.c file */
@@ -1694,3 +1697,5 @@ static struct bpf_insn l3_l4_hash_insns[] = {
 	{0xbf,    0,    7,        0, 0x00000000},
 	{0x95,    0,    0,        0, 0x00000000},
 };
+
+#endif /* TAP_BPF_INSNS_H */
diff --git a/drivers/net/tap/tap_log.h b/drivers/net/tap/tap_log.h
index fa06843a4c..5e4f0ebabb 100644
--- a/drivers/net/tap/tap_log.h
+++ b/drivers/net/tap/tap_log.h
@@ -3,8 +3,13 @@
  * Copyright 2017 Mellanox Technologies, Ltd
  */
 
+#ifndef TAP_LOG_H
+#define TAP_LOG_H
+
 extern int tap_logtype;
 
 #define TAP_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, tap_logtype, "%s(): " fmt "\n", \
 		__func__, ## args)
+
+#endif /* TAP_LOG_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 09/16] net/virtio: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (7 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 08/16] net/tap: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 10/16] raw/ifpga/base: " Weiguo Li
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/net/virtio/virtio_rxtx_packed_avx.h  | 5 +++++
 drivers/net/virtio/virtio_rxtx_packed_neon.h | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.h b/drivers/net/virtio/virtio_rxtx_packed_avx.h
index 584ac72f95..7ac21763dd 100644
--- a/drivers/net/virtio/virtio_rxtx_packed_avx.h
+++ b/drivers/net/virtio/virtio_rxtx_packed_avx.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2010-2020 Intel Corporation
  */
 
+#ifndef VIRTIO_RXTX_PACKED_AVX_H
+#define VIRTIO_RXTX_PACKED_AVX_H
+
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -237,3 +240,5 @@ virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq,
 
 	return 0;
 }
+
+#endif /* VIRTIO_RXTX_PACKED_AVX_H */
diff --git a/drivers/net/virtio/virtio_rxtx_packed_neon.h b/drivers/net/virtio/virtio_rxtx_packed_neon.h
index c222ebf00c..116945efe8 100644
--- a/drivers/net/virtio/virtio_rxtx_packed_neon.h
+++ b/drivers/net/virtio/virtio_rxtx_packed_neon.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2020 Arm Corporation
  */
 
+#ifndef VIRTIO_RXTX_PACKED_NEON_H
+#define VIRTIO_RXTX_PACKED_NEON_H
+
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -291,3 +294,5 @@ virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq,
 
 	return 0;
 }
+
+#endif /* VIRTIO_RXTX_PACKED_NEON_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 10/16] raw/ifpga/base: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (8 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 09/16] net/virtio: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 11/16] kni: " Weiguo Li
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/raw/ifpga/base/opae_at24_eeprom.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/raw/ifpga/base/opae_at24_eeprom.h b/drivers/raw/ifpga/base/opae_at24_eeprom.h
index caae9a3ec1..9d40b84304 100644
--- a/drivers/raw/ifpga/base/opae_at24_eeprom.h
+++ b/drivers/raw/ifpga/base/opae_at24_eeprom.h
@@ -3,6 +3,9 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */
 
+#ifndef OPAE_AT24_EEPROM_H
+#define OPAE_AT24_EEPROM_H
+
 #define AT24C512_PAGE_SIZE 128
 #define AT24C512_IO_LIMIT  128
 
@@ -12,3 +15,5 @@ int at24_eeprom_read(struct altera_i2c_dev *dev, unsigned int slave_addr,
 		u32 offset, u8 *buf, int count);
 int at24_eeprom_write(struct altera_i2c_dev *dev, unsigned int slave_addr,
 		u32 offset, u8 *buf, int count);
+
+#endif /* OPAE_AT24_EEPROM_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 11/16] kni: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (9 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 10/16] raw/ifpga/base: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  3:02 ` [PATCH v2 12/16] acl: " Weiguo Li
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 kernel/linux/kni/compat.h | 5 +++++
 lib/kni/rte_kni_fifo.h    | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 664785674f..f15c66df26 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -3,6 +3,9 @@
  * Minimal wrappers to allow compiling kni on older kernels.
  */
 
+#ifndef KNI_COMPAT_H
+#define KNI_COMPAT_H
+
 #include <linux/version.h>
 
 #ifndef RHEL_RELEASE_VERSION
@@ -141,3 +144,5 @@
 #if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
 #define HAVE_TSK_IN_GUP
 #endif
+
+#endif /* KNI_COMPAT_H */
diff --git a/lib/kni/rte_kni_fifo.h b/lib/kni/rte_kni_fifo.h
index d2ec82fe87..2ff71554c0 100644
--- a/lib/kni/rte_kni_fifo.h
+++ b/lib/kni/rte_kni_fifo.h
@@ -2,7 +2,8 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
-
+#ifndef RTE_KNI_FIFO_H
+#define RTE_KNI_FIFO_H
 
 /**
  * @internal when c11 memory model enabled use c11 atomic memory barrier.
@@ -115,3 +116,5 @@ kni_fifo_free_count(struct rte_kni_fifo *fifo)
 	uint32_t fifo_read = __KNI_LOAD_ACQUIRE(&fifo->read);
 	return (fifo_read - fifo_write - 1) & (fifo->len - 1);
 }
+
+#endif /* RTE_KNI_FIFO_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 12/16] acl: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (10 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 11/16] kni: " Weiguo Li
@ 2022-02-09  3:02 ` Weiguo Li
  2022-02-09  9:42   ` Ananyev, Konstantin
  2022-02-09  3:16 ` [PATCH v2 13/16] eal: " Weiguo Li
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:02 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.
It should noted that there is an exceptional case:
lib/acl/acl_run_avx512_common.h is designed to be included
several times.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 lib/acl/acl_run_altivec.h   | 5 +++++
 lib/acl/acl_run_avx2.h      | 5 +++++
 lib/acl/acl_run_avx512x16.h | 5 +++++
 lib/acl/acl_run_avx512x8.h  | 5 +++++
 lib/acl/acl_run_neon.h      | 5 +++++
 lib/acl/acl_run_sse.h       | 5 +++++
 6 files changed, 30 insertions(+)

diff --git a/lib/acl/acl_run_altivec.h b/lib/acl/acl_run_altivec.h
index 24a41eec17..01330566d2 100644
--- a/lib/acl/acl_run_altivec.h
+++ b/lib/acl/acl_run_altivec.h
@@ -3,6 +3,9 @@
  * Copyright (C) IBM Corporation 2016.
  */
 
+#ifndef ACL_RUN_ALTIVEC_H
+#define ACL_RUN_ALTIVEC_H
+
 #include "acl_run.h"
 #include "acl_vect.h"
 
@@ -300,3 +303,5 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_ALTIVEC_H */
diff --git a/lib/acl/acl_run_avx2.h b/lib/acl/acl_run_avx2.h
index 0b8967f22e..3713c46bb7 100644
--- a/lib/acl/acl_run_avx2.h
+++ b/lib/acl/acl_run_avx2.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef ACL_RUN_AVX2_H
+#define ACL_RUN_AVX2_H
+
 #include "acl_run_sse.h"
 
 static const rte_ymm_t ymm_match_mask = {
@@ -253,3 +256,5 @@ search_avx2x16(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_AVX2_H */
diff --git a/lib/acl/acl_run_avx512x16.h b/lib/acl/acl_run_avx512x16.h
index f87293eeb7..39ad7d0686 100644
--- a/lib/acl/acl_run_avx512x16.h
+++ b/lib/acl/acl_run_avx512x16.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef ACL_RUN_AVX512X16_H
+#define ACL_RUN_AVX512X16_H
+
 /*
  * Defines required by "acl_run_avx512_common.h".
  * Note that all of them has to be undefined by the end
@@ -337,3 +340,5 @@ search_avx512x16x2(const struct rte_acl_ctx *ctx, const uint8_t **data,
 #undef _SC_
 #undef _T_mask
 #undef _T_simd
+
+#endif /* ACL_RUN_AVX512X16_H */
diff --git a/lib/acl/acl_run_avx512x8.h b/lib/acl/acl_run_avx512x8.h
index 5da2bbfdeb..3b86a7ac2b 100644
--- a/lib/acl/acl_run_avx512x8.h
+++ b/lib/acl/acl_run_avx512x8.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef ACL_RUN_AVX512X8_H
+#define ACL_RUN_AVX512X8_H
+
 /*
  * Defines required by "acl_run_avx512_common.h".
  * Note that all of them has to be undefined by the end
@@ -251,3 +254,5 @@ search_avx512x8x2(const struct rte_acl_ctx *ctx, const uint8_t **data,
 #undef _SC_
 #undef _T_mask
 #undef _T_simd
+
+#endif /* ACL_RUN_AVX512X8_H */
diff --git a/lib/acl/acl_run_neon.h b/lib/acl/acl_run_neon.h
index 69d1b6d9e1..1393ff3681 100644
--- a/lib/acl/acl_run_neon.h
+++ b/lib/acl/acl_run_neon.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2015 Cavium, Inc
  */
 
+#ifndef ACL_RUN_NEON_H
+#define ACL_RUN_NEON_H
+
 #include "acl_run.h"
 #include "acl_vect.h"
 
@@ -259,3 +262,5 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_NEON_H */
diff --git a/lib/acl/acl_run_sse.h b/lib/acl/acl_run_sse.h
index 93286a2c38..f10c9a82e2 100644
--- a/lib/acl/acl_run_sse.h
+++ b/lib/acl/acl_run_sse.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef ACL_RUN_SSE_H
+#define ACL_RUN_SSE_H
+
 #include "acl_run.h"
 #include "acl_vect.h"
 
@@ -326,3 +329,5 @@ search_sse_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_SSE_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 13/16] eal: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (11 preceding siblings ...)
  2022-02-09  3:02 ` [PATCH v2 12/16] acl: " Weiguo Li
@ 2022-02-09  3:16 ` Weiguo Li
  2022-02-09  3:16 ` [PATCH v2 14/16] efd: " Weiguo Li
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:16 UTC (permalink / raw)
  To: dev; +Cc: Dmitry Kozlyuk

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/include/rte_eal_paging.h        | 5 +++++
 lib/eal/windows/include/rte_virt2phys.h | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/lib/eal/include/rte_eal_paging.h b/lib/eal/include/rte_eal_paging.h
index c60317d0f5..75c4291484 100644
--- a/lib/eal/include/rte_eal_paging.h
+++ b/lib/eal/include/rte_eal_paging.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2020 Dmitry Kozlyuk
  */
 
+#ifndef RTE_EAL_PAGING_H
+#define RTE_EAL_PAGING_H
+
 #include <stdint.h>
 
 #include <rte_compat.h>
@@ -96,3 +99,5 @@ rte_mem_page_size(void);
 __rte_internal
 int
 rte_mem_lock(const void *virt, size_t size);
+
+#endif /* RTE_EAL_PAGING_H */
diff --git a/lib/eal/windows/include/rte_virt2phys.h b/lib/eal/windows/include/rte_virt2phys.h
index 4bb2b4aafe..d0eae33141 100644
--- a/lib/eal/windows/include/rte_virt2phys.h
+++ b/lib/eal/windows/include/rte_virt2phys.h
@@ -2,6 +2,9 @@
  * Copyright (c) 2020 Dmitry Kozlyuk
  */
 
+#ifndef RTE_VIRT2PHYS_H
+#define RTE_VIRT2PHYS_H
+
 /**
  * @file virt2phys driver interface
  */
@@ -32,3 +35,5 @@ DEFINE_GUID(GUID_DEVINTERFACE_VIRT2PHYS,
  */
 #define IOCTL_VIRT2PHYS_TRANSLATE CTL_CODE( \
 	VIRT2PHYS_DEVTYPE, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#endif /* RTE_VIRT2PHYS_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 14/16] efd: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (12 preceding siblings ...)
  2022-02-09  3:16 ` [PATCH v2 13/16] eal: " Weiguo Li
@ 2022-02-09  3:16 ` Weiguo Li
  2022-02-09  3:16 ` [PATCH v2 15/16] hash: " Weiguo Li
  2022-02-09  3:16 ` [PATCH v2 16/16] pcapng: " Weiguo Li
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:16 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 lib/efd/rte_efd_x86.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/efd/rte_efd_x86.h b/lib/efd/rte_efd_x86.h
index e2f9dcca88..6e377765f9 100644
--- a/lib/efd/rte_efd_x86.h
+++ b/lib/efd/rte_efd_x86.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#ifndef RTE_EFD_X86_H
+#define RTE_EFD_X86_H
+
 /* rte_efd_x86.h
  * This file holds all x86 specific EFD functions
  */
@@ -55,3 +58,5 @@ efd_lookup_internal_avx2(const efd_hashfunc_t *group_hash_idx,
 #endif
 
 }
+
+#endif /* RTE_EFD_X86_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 15/16] hash: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (13 preceding siblings ...)
  2022-02-09  3:16 ` [PATCH v2 14/16] efd: " Weiguo Li
@ 2022-02-09  3:16 ` Weiguo Li
  2022-02-09  3:16 ` [PATCH v2 16/16] pcapng: " Weiguo Li
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:16 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 lib/hash/rte_cmp_arm64.h | 5 +++++
 lib/hash/rte_cmp_x86.h   | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h
index e9e26f9abd..ecf0ea3e6f 100644
--- a/lib/hash/rte_cmp_arm64.h
+++ b/lib/hash/rte_cmp_arm64.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2015 Cavium, Inc
  */
 
+#ifndef RTE_CMP_ARM64_H
+#define RTE_CMP_ARM64_H
+
 /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
 static int
 rte_hash_k16_cmp_eq(const void *key1, const void *key2,
@@ -83,3 +86,5 @@ rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)
 		rte_hash_k64_cmp_eq((const char *) key1 + 64,
 				(const char *) key2 + 64, key_len);
 }
+
+#endif /* RTE_CMP_ARM64_H */
diff --git a/lib/hash/rte_cmp_x86.h b/lib/hash/rte_cmp_x86.h
index 13a5836351..3b3b3860b1 100644
--- a/lib/hash/rte_cmp_x86.h
+++ b/lib/hash/rte_cmp_x86.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2015 Intel Corporation
  */
 
+#ifndef RTE_CMP_X86_H
+#define RTE_CMP_X86_H
+
 #include <rte_vect.h>
 
 /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
@@ -74,3 +77,5 @@ rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)
 		rte_hash_k64_cmp_eq((const char *) key1 + 64,
 				(const char *) key2 + 64, key_len);
 }
+
+#endif /* RTE_CMP_X86_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 16/16] pcapng: add define guards to avoid multi-inclusion
       [not found] <cover.1644374873.git.liwg06@foxmail.com>
                   ` (14 preceding siblings ...)
  2022-02-09  3:16 ` [PATCH v2 15/16] hash: " Weiguo Li
@ 2022-02-09  3:16 ` Weiguo Li
  15 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09  3:16 UTC (permalink / raw)
  To: dev

Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 lib/pcapng/pcapng_proto.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/pcapng/pcapng_proto.h b/lib/pcapng/pcapng_proto.h
index 47161d8a12..6dc100632a 100644
--- a/lib/pcapng/pcapng_proto.h
+++ b/lib/pcapng/pcapng_proto.h
@@ -6,6 +6,9 @@
  * See: https://github.com/pcapng/pcapng/ for the file format.
  */
 
+#ifndef PCAPNG_PROTO_H
+#define PCAPNG_PROTO_H
+
 enum pcapng_block_types {
 	PCAPNG_INTERFACE_BLOCK		= 1,
 	PCAPNG_PACKET_BLOCK,		/* Obsolete */
@@ -127,3 +130,5 @@ enum pcapng_isb_options {
 	PCAPNG_ISB_OSDROP,
 	PCAPNG_ISB_USRDELIV,
 };
+
+#endif /* PCAPNG_PROTO_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 06/16] net/netvsc: add define guards to avoid multi-inclusion
  2022-02-09  3:02 ` [PATCH v2 06/16] net/netvsc: " Weiguo Li
@ 2022-02-09  6:28   ` Stephen Hemminger
  2022-02-09  9:25     ` Bruce Richardson
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Hemminger @ 2022-02-09  6:28 UTC (permalink / raw)
  To: Weiguo Li; +Cc: dev

On Wed,  9 Feb 2022 11:02:14 +0800
Weiguo Li <liwg06@foxmail.com> wrote:

> Supplement define guards to prevent multiple inclusion.
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>

Why bother these are just driver specific includes, not a public API

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 08/16] net/tap: add define guards to avoid multi-inclusion
  2022-02-09  3:02 ` [PATCH v2 08/16] net/tap: " Weiguo Li
@ 2022-02-09  6:28   ` Stephen Hemminger
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Hemminger @ 2022-02-09  6:28 UTC (permalink / raw)
  To: Weiguo Li; +Cc: dev

On Wed,  9 Feb 2022 11:02:16 +0800
Weiguo Li <liwg06@foxmail.com> wrote:

> Supplement define guards to prevent multiple inclusion.
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>

This is a driver specific include, not required

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 06/16] net/netvsc: add define guards to avoid multi-inclusion
  2022-02-09  6:28   ` Stephen Hemminger
@ 2022-02-09  9:25     ` Bruce Richardson
  0 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-02-09  9:25 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Weiguo Li, dev

On Tue, Feb 08, 2022 at 10:28:01PM -0800, Stephen Hemminger wrote:
> On Wed,  9 Feb 2022 11:02:14 +0800
> Weiguo Li <liwg06@foxmail.com> wrote:
> 
> > Supplement define guards to prevent multiple inclusion.
> > 
> > Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> 
> Why bother these are just driver specific includes, not a public API

On the other hand, if this can be cleaned up globally in DPDK, why not also
fix the internal headers?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* RE: [PATCH v2 12/16] acl: add define guards to avoid multi-inclusion
  2022-02-09  3:02 ` [PATCH v2 12/16] acl: " Weiguo Li
@ 2022-02-09  9:42   ` Ananyev, Konstantin
  2022-02-09 10:12     ` Weiguo Li
  0 siblings, 1 reply; 21+ messages in thread
From: Ananyev, Konstantin @ 2022-02-09  9:42 UTC (permalink / raw)
  To: Weiguo Li, dev



> Supplement define guards to prevent multiple inclusion.
> It should noted that there is an exceptional case:
> lib/acl/acl_run_avx512_common.h is designed to be included
> several times.
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> ---
>  lib/acl/acl_run_altivec.h   | 5 +++++
>  lib/acl/acl_run_avx2.h      | 5 +++++
>  lib/acl/acl_run_avx512x16.h | 5 +++++
>  lib/acl/acl_run_avx512x8.h  | 5 +++++
>  lib/acl/acl_run_neon.h      | 5 +++++
>  lib/acl/acl_run_sse.h       | 5 +++++
>  6 files changed, 30 insertions(+)

Do we really need these changes?
All these headers are internal ones for acl_run_*.c and not
supposed to be included multiple times anyway.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* RE: [PATCH v2 12/16] acl: add define guards to avoid multi-inclusion
  2022-02-09  9:42   ` Ananyev, Konstantin
@ 2022-02-09 10:12     ` Weiguo Li
  0 siblings, 0 replies; 21+ messages in thread
From: Weiguo Li @ 2022-02-09 10:12 UTC (permalink / raw)
  To: konstantin.ananyev; +Cc: bruce.richardson, stephen, dev

On Wed, 9 Feb 2022 09:42:28 +0000, Ananyev, Konstantin wrote:
> 
> Do we really need these changes?
> All these headers are internal ones for acl_run_*.c and not
> supposed to be included multiple times anyway.
> 

Got it.

This v2 series are superseded.
I've updated it by a new verision v3[1] which focus only on "rte_xxx.h".

Sorry to bother... >_<|||

-Weiguo

[1]http://patches.dpdk.org/project/dpdk/list/?series=21554



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-02-09 10:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1644374873.git.liwg06@foxmail.com>
2022-02-09  3:02 ` [PATCH v2 01/16] bus/dpaa: add define guards to avoid multi-inclusion Weiguo Li
2022-02-09  3:02 ` [PATCH v2 02/16] event/octeontx: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 03/16] net/cxgbe: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 04/16] net/enetfec: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 05/16] net/i40e: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 06/16] net/netvsc: " Weiguo Li
2022-02-09  6:28   ` Stephen Hemminger
2022-02-09  9:25     ` Bruce Richardson
2022-02-09  3:02 ` [PATCH v2 07/16] net/qede: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 08/16] net/tap: " Weiguo Li
2022-02-09  6:28   ` Stephen Hemminger
2022-02-09  3:02 ` [PATCH v2 09/16] net/virtio: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 10/16] raw/ifpga/base: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 11/16] kni: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 12/16] acl: " Weiguo Li
2022-02-09  9:42   ` Ananyev, Konstantin
2022-02-09 10:12     ` Weiguo Li
2022-02-09  3:16 ` [PATCH v2 13/16] eal: " Weiguo Li
2022-02-09  3:16 ` [PATCH v2 14/16] efd: " Weiguo Li
2022-02-09  3:16 ` [PATCH v2 15/16] hash: " Weiguo Li
2022-02-09  3:16 ` [PATCH v2 16/16] pcapng: " Weiguo Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).