From: Patrice Buriez Date: Wed, 30 Nov 2022 13:05:50 +0000 (+0000) Subject: Fix linker errors with recent GNU ld X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F73659%2F2;p=samplevnf.git Fix linker errors with recent GNU ld 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 Change-Id: Ie7d7a4f6c4c5f82e68d2ca4e32f96972933d190f --- diff --git a/VNFs/DPPD-PROX/handle_irq.c b/VNFs/DPPD-PROX/handle_irq.c index 00c192f6..36aa54e8 100644 --- a/VNFs/DPPD-PROX/handle_irq.c +++ b/VNFs/DPPD-PROX/handle_irq.c @@ -26,7 +26,10 @@ #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 diff --git a/VNFs/DPPD-PROX/handle_master.c b/VNFs/DPPD-PROX/handle_master.c index 169c7ca0..b72fd2c5 100644 --- a/VNFs/DPPD-PROX/handle_master.c +++ b/VNFs/DPPD-PROX/handle_master.c @@ -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, diff --git a/VNFs/DPPD-PROX/handle_master.h b/VNFs/DPPD-PROX/handle_master.h index 518906ed..dcd0a5f2 100644 --- a/VNFs/DPPD-PROX/handle_master.h +++ b/VNFs/DPPD-PROX/handle_master.h @@ -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) { diff --git a/VNFs/DPPD-PROX/stats_irq.h b/VNFs/DPPD-PROX/stats_irq.h index 71ff80f7..9a3f6c2f 100644 --- a/VNFs/DPPD-PROX/stats_irq.h +++ b/VNFs/DPPD-PROX/stats_irq.h @@ -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); diff --git a/VNFs/DPPD-PROX/stats_task.h b/VNFs/DPPD-PROX/stats_task.h index 7dc54eab..9043fd6a 100644 --- a/VNFs/DPPD-PROX/stats_task.h +++ b/VNFs/DPPD-PROX/stats_task.h @@ -18,6 +18,7 @@ #define _STATS_TASK_H_ #include +#include #include "clock.h"