Skip to content

Commit

Permalink
dpif-netdev-perf: Fix linker unresolved symbols on Windows
Browse files Browse the repository at this point in the history
MSVC complains:
"libopenvswitch.lib(dpif-netdev.obj) : error LNK2019: unresolved external
symbol pmd_perf_start_iteration referenced in function pmd_thread_main
libopenvswitch.lib(dpif-netdev.obj) : error LNK2019: unresolved external
symbol pmd_perf_end_iteration referenced in function pmd_thread_main"

Remove inline keyword from the declaration of:
`pmd_perf_start_iteration` and `pmd_perf_end_iteration`

More on the subject:
https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/function-inlining-problems

Fixes: broken build on Windows

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
aserdean committed May 15, 2018
1 parent 39ca338 commit 12028f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dpif-netdev-perf.c
Expand Up @@ -440,7 +440,7 @@ pmd_perf_stats_clear(struct pmd_perf_stats *s)

/* Functions recording PMD metrics per iteration. */

inline void
void
pmd_perf_start_iteration(struct pmd_perf_stats *s)
OVS_REQUIRES(s->stats_mutex)
{
Expand All @@ -462,7 +462,7 @@ OVS_REQUIRES(s->stats_mutex)
}
}

inline void
void
pmd_perf_end_iteration(struct pmd_perf_stats *s, int rx_packets,
int tx_packets, bool full_metrics)
{
Expand Down

0 comments on commit 12028f5

Please sign in to comment.