Hi Conor,

Please see comment below

On 19/02/2021 15:09, Walsh, Conor wrote:
This patch implements the Forwarding Information Base (FIB) library
in l3fwd using the function calls and infrastructure introduced in
the previous patch.

Signed-off-by: Conor Walsh <conor.wa...@intel.com>
---
  examples/l3fwd/l3fwd_fib.c | 475 ++++++++++++++++++++++++++++++++++++-
  1 file changed, 469 insertions(+), 6 deletions(-)

diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index 0a2d02db2f..d5b9a4eae4 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -2,59 +2,522 @@
   * Copyright(c) 2021 Intel Corporation
   */

+
+/*
+ * If the machine does not have SSE, NEON or PPC 64 then the packets
+ * are sent one at a time using send_single_packet()
+ */
+#if !defined FIB_SEND_MULTI
+static inline void
+fib_send_single(int nb_tx, struct lcore_conf *qconf,
+struct rte_mbuf **pkts_burst, uint16_t hops[nb_tx])
+{
+int32_t j;
+for (j = 0; j < nb_tx; j++)
+send_single_packet(qconf, pkts_burst[j], hops[j]);
+}

I think in fib_send_single() you need to implement the same functionality as in send_packets_multi, such as mac swap and rfc1812_process()


+#endif
+
+/* Bulk parse, fib lookup and send. */
+static inline void
+fib_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,
+uint16_t portid, struct lcore_conf *qconf)
+{
+
+#if defined FIB_SEND_MULTI
+send_packets_multi(qconf, pkts_burst, hops, nb_rx);
+#else
+fib_send_single(nb_rx, qconf, pkts_burst, hops);
+#endif
+}
+
--
2.25.1


--
Regards,
Vladimir

Reply via email to