Fix linker errors with recent GNU ld 59/73659/2
authorPatrice Buriez <patrice.buriez@chenapan.org>
Wed, 30 Nov 2022 13:05:50 +0000 (13:05 +0000)
committerPatrice Buriez <patrice.buriez@chenapan.org>
Thu, 1 Dec 2022 08:17:33 +0000 (08:17 +0000)
observed with:
- GNU ld 2.35 (gcc 11.3.1) on CentOS Stream release 9
- GNU ld 2.38 (gcc 11.3.0) on Ubuntu 22.04.1 LTS
- GNU ld 2.39 (gcc 12.2.0) on Ubuntu 22.10

Signed-off-by: Patrice Buriez <patrice.buriez@chenapan.org>
Change-Id: Ie7d7a4f6c4c5f82e68d2ca4e32f96972933d190f

VNFs/DPPD-PROX/handle_irq.c
VNFs/DPPD-PROX/handle_master.c
VNFs/DPPD-PROX/handle_master.h
VNFs/DPPD-PROX/stats_irq.h
VNFs/DPPD-PROX/stats_task.h

index 00c192f..36aa54e 100644 (file)
 #include "input.h"
 
 #define MAX_INTERRUPT_LENGTH   500000  /* Maximum length of an interrupt is (1 / MAX_INTERRUPT_LENGTH) seconds */
+
+uint64_t irq_bucket_maxtime_cycles[IRQ_BUCKETS_COUNT];
 uint64_t irq_bucket_maxtime_micro[] = {1,5,10,50,100,500,1000,5000,10000,50000,100000,500000,UINT64_MAX};
+
 /*
  *     This module is not handling any packets.
  *     It loops on rdtsc() and checks whether it has been interrupted
index 169c7ca..b72fd2c 100644 (file)
@@ -73,6 +73,8 @@ const char *actions_string[] = {
 
 };
 
+int (*handle_ctrl_plane)(struct task_base *tbase, struct rte_mbuf **mbuf, uint16_t n_pkts) = NULL;
+
 static struct my_arp_t arp_reply = {
        .htype = 0x100,
        .ptype = 8,
index 518906e..dcd0a5f 100644 (file)
@@ -99,11 +99,11 @@ struct task_master {
        struct pollfd route_fds;
 };
 
-const char *actions_string[MAX_ACTIONS];
+extern const char *actions_string[MAX_ACTIONS];
 
 void init_ctrl_plane(struct task_base *tbase);
 
-int (*handle_ctrl_plane)(struct task_base *tbase, struct rte_mbuf **mbuf, uint16_t n_pkts);
+extern int (*handle_ctrl_plane)(struct task_base *tbase, struct rte_mbuf **mbuf, uint16_t n_pkts);
 
 static inline void tx_drop(struct rte_mbuf *mbuf)
 {
index 71ff80f..9a3f6c2 100644 (file)
@@ -51,7 +51,7 @@ struct irq_task_stats {
        struct irq_rt_stats *stats;
 };
 
-uint64_t irq_bucket_maxtime_cycles[IRQ_BUCKETS_COUNT];
+extern uint64_t irq_bucket_maxtime_cycles[IRQ_BUCKETS_COUNT];
 extern uint64_t irq_bucket_maxtime_micro[];
 
 void stats_irq_reset(void);
index 7dc54ea..9043fd6 100644 (file)
@@ -18,6 +18,7 @@
 #define _STATS_TASK_H_
 
 #include <inttypes.h>
+#include <rte_common.h>
 
 #include "clock.h"