examples/l3fwd: fix build without SSE4.1
authorThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 3 Feb 2016 18:56:38 +0000 (19:56 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 16 Feb 2016 06:33:38 +0000 (07:33 +0100)
clang reports this error:
examples/l3fwd/main.c:550:1: error: unused function 'send_packetsx4'

The function is used only when ENABLE_MULTI_BUFFER_OPTIMIZE is 1.

Fixes: 96ff445371e0 ("examples/l3fwd: reorganise and optimize LPM code path")
Fixes: 6f1c1e28d98e ("examples/l3fwd: fix build with exact-match enabled")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/l3fwd/main.c

index c35926d..410f72d 100644 (file)
@@ -545,7 +545,8 @@ send_single_packet(struct rte_mbuf *m, uint8_t port)
        return 0;
 }
 
-#if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)
+#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \
+       (ENABLE_MULTI_BUFFER_OPTIMIZE == 1))
 static inline __attribute__((always_inline)) void
 send_packetsx4(struct lcore_conf *qconf, uint8_t port,
        struct rte_mbuf *m[], uint32_t num)