examples/l3fwd: fix build with exact-match enabled
L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
instead it should be "simple_ipv6_fwd_8pkts", and "simple_ipv8_fwd_4pkts"
instead of "simple_ipv4_fwd_8pkts".
clang reports some unused functions, used only for LPM lookup:
examples/l3fwd/main.c:545:1: error: unused function 'send_packetsx4'
examples/l3fwd/main.c:1165:1: error: unused function 'rfc1812_process'
Fixes: 80fcb4d4
("examples/l3fwd: increase lookup burst size to 8")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
[Thomas: more #if to fix clang warnings]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
10cbac6ae9
commit
6f1c1e28d9
@ -541,6 +541,7 @@ send_single_packet(struct rte_mbuf *m, uint8_t port)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)
|
||||||
static inline __attribute__((always_inline)) void
|
static inline __attribute__((always_inline)) void
|
||||||
send_packetsx4(struct lcore_conf *qconf, uint8_t port,
|
send_packetsx4(struct lcore_conf *qconf, uint8_t port,
|
||||||
struct rte_mbuf *m[], uint32_t num)
|
struct rte_mbuf *m[], uint32_t num)
|
||||||
@ -618,6 +619,7 @@ send_packetsx4(struct lcore_conf *qconf, uint8_t port,
|
|||||||
|
|
||||||
qconf->tx_mbufs[port].len = len;
|
qconf->tx_mbufs[port].len = len;
|
||||||
}
|
}
|
||||||
|
#endif /* APP_LOOKUP_LPM */
|
||||||
|
|
||||||
#ifdef DO_RFC_1812_CHECKS
|
#ifdef DO_RFC_1812_CHECKS
|
||||||
static inline int
|
static inline int
|
||||||
@ -1138,6 +1140,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \
|
||||||
|
(ENABLE_MULTI_BUFFER_OPTIMIZE == 1))
|
||||||
#ifdef DO_RFC_1812_CHECKS
|
#ifdef DO_RFC_1812_CHECKS
|
||||||
|
|
||||||
#define IPV4_MIN_VER_IHL 0x45
|
#define IPV4_MIN_VER_IHL 0x45
|
||||||
@ -1188,6 +1192,7 @@ rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t flags)
|
|||||||
#else
|
#else
|
||||||
#define rfc1812_process(mb, dp) do { } while (0)
|
#define rfc1812_process(mb, dp) do { } while (0)
|
||||||
#endif /* DO_RFC_1812_CHECKS */
|
#endif /* DO_RFC_1812_CHECKS */
|
||||||
|
#endif /* APP_LOOKUP_LPM && ENABLE_MULTI_BUFFER_OPTIMIZE */
|
||||||
|
|
||||||
|
|
||||||
#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \
|
#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \
|
||||||
@ -1710,11 +1715,11 @@ main_loop(__attribute__((unused)) void *dummy)
|
|||||||
& pkts_burst[j+6]->ol_flags
|
& pkts_burst[j+6]->ol_flags
|
||||||
& pkts_burst[j+7]->ol_flags;
|
& pkts_burst[j+7]->ol_flags;
|
||||||
if (ol_flag & PKT_RX_IPV4_HDR ) {
|
if (ol_flag & PKT_RX_IPV4_HDR ) {
|
||||||
simple_ipv8_fwd_4pkts(&pkts_burst[j],
|
simple_ipv4_fwd_8pkts(&pkts_burst[j],
|
||||||
portid, qconf);
|
portid, qconf);
|
||||||
} else if (ol_flag & PKT_RX_IPV6_HDR) {
|
} else if (ol_flag & PKT_RX_IPV6_HDR) {
|
||||||
#endif /* RTE_NEXT_ABI */
|
#endif /* RTE_NEXT_ABI */
|
||||||
simple_ipv6_fwd_4pkts(&pkts_burst[j],
|
simple_ipv6_fwd_8pkts(&pkts_burst[j],
|
||||||
portid, qconf);
|
portid, qconf);
|
||||||
} else {
|
} else {
|
||||||
l3fwd_simple_forward(pkts_burst[j],
|
l3fwd_simple_forward(pkts_burst[j],
|
||||||
|
Loading…
Reference in New Issue
Block a user