4 * Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of Intel Corporation nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 #include <sys/types.h>
40 #include <sys/queue.h>
46 #include <rte_debug.h>
47 #include <rte_ether.h>
48 #include <rte_ethdev.h>
50 #include <rte_mempool.h>
51 #include <rte_cycles.h>
60 #ifdef RTE_MACHINE_CPUFLAG_SSE4_2
61 #include <rte_hash_crc.h>
62 #define DEFAULT_HASH_FUNC rte_hash_crc
64 #include <rte_jhash.h>
65 #define DEFAULT_HASH_FUNC rte_jhash
66 #endif /* RTE_MACHINE_CPUFLAG_SSE4_2 */
68 #define IPV6_ADDR_LEN 16
76 } __attribute__((__packed__));
78 union ipv4_5tuple_host {
91 #define XMM_NUM_IN_IPV6_5TUPLE 3
94 uint8_t ip_dst[IPV6_ADDR_LEN];
95 uint8_t ip_src[IPV6_ADDR_LEN];
99 } __attribute__((__packed__));
101 union ipv6_5tuple_host {
106 uint8_t ip_src[IPV6_ADDR_LEN];
107 uint8_t ip_dst[IPV6_ADDR_LEN];
112 __m128i xmm[XMM_NUM_IN_IPV6_5TUPLE];
115 struct ipv4_l3fwd_em_route {
116 struct ipv4_5tuple key;
120 struct ipv6_l3fwd_em_route {
121 struct ipv6_5tuple key;
125 static struct ipv4_l3fwd_em_route ipv4_l3fwd_em_route_array[] = {
126 {{IPv4(101, 0, 0, 0), IPv4(100, 10, 0, 1), 101, 11, IPPROTO_TCP}, 0},
127 {{IPv4(201, 0, 0, 0), IPv4(200, 20, 0, 1), 102, 12, IPPROTO_TCP}, 1},
128 {{IPv4(111, 0, 0, 0), IPv4(100, 30, 0, 1), 101, 11, IPPROTO_TCP}, 2},
129 {{IPv4(211, 0, 0, 0), IPv4(200, 40, 0, 1), 102, 12, IPPROTO_TCP}, 3},
132 static struct ipv6_l3fwd_em_route ipv6_l3fwd_em_route_array[] = {
134 {0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0x02, 0x1e, 0x67, 0xff, 0xfe, 0, 0, 0},
135 {0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0x02, 0x1b, 0x21, 0xff, 0xfe, 0x91, 0x38, 0x05},
136 101, 11, IPPROTO_TCP}, 0},
139 {0xfe, 0x90, 0, 0, 0, 0, 0, 0, 0x02, 0x1e, 0x67, 0xff, 0xfe, 0, 0, 0},
140 {0xfe, 0x90, 0, 0, 0, 0, 0, 0, 0x02, 0x1b, 0x21, 0xff, 0xfe, 0x91, 0x38, 0x05},
141 102, 12, IPPROTO_TCP}, 1},
144 {0xfe, 0xa0, 0, 0, 0, 0, 0, 0, 0x02, 0x1e, 0x67, 0xff, 0xfe, 0, 0, 0},
145 {0xfe, 0xa0, 0, 0, 0, 0, 0, 0, 0x02, 0x1b, 0x21, 0xff, 0xfe, 0x91, 0x38, 0x05},
146 101, 11, IPPROTO_TCP}, 2},
149 {0xfe, 0xb0, 0, 0, 0, 0, 0, 0, 0x02, 0x1e, 0x67, 0xff, 0xfe, 0, 0, 0},
150 {0xfe, 0xb0, 0, 0, 0, 0, 0, 0, 0x02, 0x1b, 0x21, 0xff, 0xfe, 0x91, 0x38, 0x05},
151 102, 12, IPPROTO_TCP}, 3},
154 struct rte_hash *ipv4_l3fwd_em_lookup_struct[NB_SOCKETS];
155 struct rte_hash *ipv6_l3fwd_em_lookup_struct[NB_SOCKETS];
157 static inline uint32_t
158 ipv4_hash_crc(const void *data, __rte_unused uint32_t data_len,
161 const union ipv4_5tuple_host *k;
167 p = (const uint32_t *)&k->port_src;
169 #ifdef RTE_MACHINE_CPUFLAG_SSE4_2
170 init_val = rte_hash_crc_4byte(t, init_val);
171 init_val = rte_hash_crc_4byte(k->ip_src, init_val);
172 init_val = rte_hash_crc_4byte(k->ip_dst, init_val);
173 init_val = rte_hash_crc_4byte(*p, init_val);
174 #else /* RTE_MACHINE_CPUFLAG_SSE4_2 */
175 init_val = rte_jhash_1word(t, init_val);
176 init_val = rte_jhash_1word(k->ip_src, init_val);
177 init_val = rte_jhash_1word(k->ip_dst, init_val);
178 init_val = rte_jhash_1word(*p, init_val);
179 #endif /* RTE_MACHINE_CPUFLAG_SSE4_2 */
184 static inline uint32_t
185 ipv6_hash_crc(const void *data, __rte_unused uint32_t data_len,
188 const union ipv6_5tuple_host *k;
191 #ifdef RTE_MACHINE_CPUFLAG_SSE4_2
192 const uint32_t *ip_src0, *ip_src1, *ip_src2, *ip_src3;
193 const uint32_t *ip_dst0, *ip_dst1, *ip_dst2, *ip_dst3;
194 #endif /* RTE_MACHINE_CPUFLAG_SSE4_2 */
198 p = (const uint32_t *)&k->port_src;
200 #ifdef RTE_MACHINE_CPUFLAG_SSE4_2
201 ip_src0 = (const uint32_t *) k->ip_src;
202 ip_src1 = (const uint32_t *)(k->ip_src+4);
203 ip_src2 = (const uint32_t *)(k->ip_src+8);
204 ip_src3 = (const uint32_t *)(k->ip_src+12);
205 ip_dst0 = (const uint32_t *) k->ip_dst;
206 ip_dst1 = (const uint32_t *)(k->ip_dst+4);
207 ip_dst2 = (const uint32_t *)(k->ip_dst+8);
208 ip_dst3 = (const uint32_t *)(k->ip_dst+12);
209 init_val = rte_hash_crc_4byte(t, init_val);
210 init_val = rte_hash_crc_4byte(*ip_src0, init_val);
211 init_val = rte_hash_crc_4byte(*ip_src1, init_val);
212 init_val = rte_hash_crc_4byte(*ip_src2, init_val);
213 init_val = rte_hash_crc_4byte(*ip_src3, init_val);
214 init_val = rte_hash_crc_4byte(*ip_dst0, init_val);
215 init_val = rte_hash_crc_4byte(*ip_dst1, init_val);
216 init_val = rte_hash_crc_4byte(*ip_dst2, init_val);
217 init_val = rte_hash_crc_4byte(*ip_dst3, init_val);
218 init_val = rte_hash_crc_4byte(*p, init_val);
219 #else /* RTE_MACHINE_CPUFLAG_SSE4_2 */
220 init_val = rte_jhash_1word(t, init_val);
221 init_val = rte_jhash(k->ip_src,
222 sizeof(uint8_t) * IPV6_ADDR_LEN, init_val);
223 init_val = rte_jhash(k->ip_dst,
224 sizeof(uint8_t) * IPV6_ADDR_LEN, init_val);
225 init_val = rte_jhash_1word(*p, init_val);
226 #endif /* RTE_MACHINE_CPUFLAG_SSE4_2 */
230 #define IPV4_L3FWD_EM_NUM_ROUTES \
231 (sizeof(ipv4_l3fwd_em_route_array) / sizeof(ipv4_l3fwd_em_route_array[0]))
233 #define IPV6_L3FWD_EM_NUM_ROUTES \
234 (sizeof(ipv6_l3fwd_em_route_array) / sizeof(ipv6_l3fwd_em_route_array[0]))
236 static uint8_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned;
237 static uint8_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned;
239 static __m128i mask0;
240 static __m128i mask1;
241 static __m128i mask2;
243 static inline uint8_t
244 em_get_ipv4_dst_port(void *ipv4_hdr, uint8_t portid, void *lookup_struct)
247 union ipv4_5tuple_host key;
248 struct rte_hash *ipv4_l3fwd_lookup_struct =
249 (struct rte_hash *)lookup_struct;
251 ipv4_hdr = (uint8_t *)ipv4_hdr + offsetof(struct ipv4_hdr, time_to_live);
252 __m128i data = _mm_loadu_si128((__m128i *)(ipv4_hdr));
255 * Get 5 tuple: dst port, src port, dst IP address,
256 * src IP address and protocol.
258 key.xmm = _mm_and_si128(data, mask0);
260 /* Find destination port */
261 ret = rte_hash_lookup(ipv4_l3fwd_lookup_struct, (const void *)&key);
262 return (uint8_t)((ret < 0) ? portid : ipv4_l3fwd_out_if[ret]);
265 static inline uint8_t
266 em_get_ipv6_dst_port(void *ipv6_hdr, uint8_t portid, void *lookup_struct)
269 union ipv6_5tuple_host key;
270 struct rte_hash *ipv6_l3fwd_lookup_struct =
271 (struct rte_hash *)lookup_struct;
273 ipv6_hdr = (uint8_t *)ipv6_hdr + offsetof(struct ipv6_hdr, payload_len);
275 _mm_loadu_si128((__m128i *)(ipv6_hdr));
277 _mm_loadu_si128((__m128i *)(((uint8_t *)ipv6_hdr)+
280 _mm_loadu_si128((__m128i *)(((uint8_t *)ipv6_hdr)+
281 sizeof(__m128i)+sizeof(__m128i)));
283 /* Get part of 5 tuple: src IP address lower 96 bits and protocol */
284 key.xmm[0] = _mm_and_si128(data0, mask1);
287 * Get part of 5 tuple: dst IP address lower 96 bits
288 * and src IP address higher 32 bits.
293 * Get part of 5 tuple: dst port and src port
294 * and dst IP address higher 32 bits.
296 key.xmm[2] = _mm_and_si128(data2, mask2);
298 /* Find destination port */
299 ret = rte_hash_lookup(ipv6_l3fwd_lookup_struct, (const void *)&key);
300 return (uint8_t)((ret < 0) ? portid : ipv6_l3fwd_out_if[ret]);
304 * Include header file if SSE4_1 is enabled for
305 * buffer optimization i.e. ENABLE_MULTI_BUFFER_OPTIMIZE=1.
307 #if defined(__SSE4_1__)
308 #ifndef HASH_MULTI_LOOKUP
309 #include "l3fwd_em_sse.h"
311 #include "l3fwd_em_hlm_sse.h"
314 #include "l3fwd_em.h"
318 convert_ipv4_5tuple(struct ipv4_5tuple *key1,
319 union ipv4_5tuple_host *key2)
321 key2->ip_dst = rte_cpu_to_be_32(key1->ip_dst);
322 key2->ip_src = rte_cpu_to_be_32(key1->ip_src);
323 key2->port_dst = rte_cpu_to_be_16(key1->port_dst);
324 key2->port_src = rte_cpu_to_be_16(key1->port_src);
325 key2->proto = key1->proto;
331 convert_ipv6_5tuple(struct ipv6_5tuple *key1,
332 union ipv6_5tuple_host *key2)
336 for (i = 0; i < 16; i++) {
337 key2->ip_dst[i] = key1->ip_dst[i];
338 key2->ip_src[i] = key1->ip_src[i];
340 key2->port_dst = rte_cpu_to_be_16(key1->port_dst);
341 key2->port_src = rte_cpu_to_be_16(key1->port_src);
342 key2->proto = key1->proto;
348 #define BYTE_VALUE_MAX 256
349 #define ALL_32_BITS 0xffffffff
350 #define BIT_8_TO_15 0x0000ff00
352 populate_ipv4_few_flow_into_table(const struct rte_hash *h)
357 mask0 = _mm_set_epi32(ALL_32_BITS, ALL_32_BITS,
358 ALL_32_BITS, BIT_8_TO_15);
360 for (i = 0; i < IPV4_L3FWD_EM_NUM_ROUTES; i++) {
361 struct ipv4_l3fwd_em_route entry;
362 union ipv4_5tuple_host newkey;
364 entry = ipv4_l3fwd_em_route_array[i];
365 convert_ipv4_5tuple(&entry.key, &newkey);
366 ret = rte_hash_add_key(h, (void *) &newkey);
368 rte_exit(EXIT_FAILURE, "Unable to add entry %" PRIu32
369 " to the l3fwd hash.\n", i);
371 ipv4_l3fwd_out_if[ret] = entry.if_out;
373 printf("Hash: Adding 0x%" PRIx64 " keys\n",
374 (uint64_t)IPV4_L3FWD_EM_NUM_ROUTES);
377 #define BIT_16_TO_23 0x00ff0000
379 populate_ipv6_few_flow_into_table(const struct rte_hash *h)
384 mask1 = _mm_set_epi32(ALL_32_BITS, ALL_32_BITS,
385 ALL_32_BITS, BIT_16_TO_23);
387 mask2 = _mm_set_epi32(0, 0, ALL_32_BITS, ALL_32_BITS);
389 for (i = 0; i < IPV6_L3FWD_EM_NUM_ROUTES; i++) {
390 struct ipv6_l3fwd_em_route entry;
391 union ipv6_5tuple_host newkey;
393 entry = ipv6_l3fwd_em_route_array[i];
394 convert_ipv6_5tuple(&entry.key, &newkey);
395 ret = rte_hash_add_key(h, (void *) &newkey);
397 rte_exit(EXIT_FAILURE, "Unable to add entry %" PRIu32
398 " to the l3fwd hash.\n", i);
400 ipv6_l3fwd_out_if[ret] = entry.if_out;
402 printf("Hash: Adding 0x%" PRIx64 "keys\n",
403 (uint64_t)IPV6_L3FWD_EM_NUM_ROUTES);
406 #define NUMBER_PORT_USED 4
408 populate_ipv4_many_flow_into_table(const struct rte_hash *h,
409 unsigned int nr_flow)
413 mask0 = _mm_set_epi32(ALL_32_BITS, ALL_32_BITS,
414 ALL_32_BITS, BIT_8_TO_15);
416 for (i = 0; i < nr_flow; i++) {
417 struct ipv4_l3fwd_em_route entry;
418 union ipv4_5tuple_host newkey;
420 uint8_t a = (uint8_t)
421 ((i/NUMBER_PORT_USED)%BYTE_VALUE_MAX);
422 uint8_t b = (uint8_t)
423 (((i/NUMBER_PORT_USED)/BYTE_VALUE_MAX)%BYTE_VALUE_MAX);
424 uint8_t c = (uint8_t)
425 ((i/NUMBER_PORT_USED)/(BYTE_VALUE_MAX*BYTE_VALUE_MAX));
427 /* Create the ipv4 exact match flow */
428 memset(&entry, 0, sizeof(entry));
429 switch (i & (NUMBER_PORT_USED - 1)) {
431 entry = ipv4_l3fwd_em_route_array[0];
432 entry.key.ip_dst = IPv4(101, c, b, a);
435 entry = ipv4_l3fwd_em_route_array[1];
436 entry.key.ip_dst = IPv4(201, c, b, a);
439 entry = ipv4_l3fwd_em_route_array[2];
440 entry.key.ip_dst = IPv4(111, c, b, a);
443 entry = ipv4_l3fwd_em_route_array[3];
444 entry.key.ip_dst = IPv4(211, c, b, a);
447 convert_ipv4_5tuple(&entry.key, &newkey);
448 int32_t ret = rte_hash_add_key(h, (void *) &newkey);
451 rte_exit(EXIT_FAILURE, "Unable to add entry %u\n", i);
453 ipv4_l3fwd_out_if[ret] = (uint8_t) entry.if_out;
456 printf("Hash: Adding 0x%x keys\n", nr_flow);
460 populate_ipv6_many_flow_into_table(const struct rte_hash *h,
461 unsigned int nr_flow)
465 mask1 = _mm_set_epi32(ALL_32_BITS, ALL_32_BITS,
466 ALL_32_BITS, BIT_16_TO_23);
467 mask2 = _mm_set_epi32(0, 0, ALL_32_BITS, ALL_32_BITS);
469 for (i = 0; i < nr_flow; i++) {
470 struct ipv6_l3fwd_em_route entry;
471 union ipv6_5tuple_host newkey;
473 uint8_t a = (uint8_t)
474 ((i/NUMBER_PORT_USED)%BYTE_VALUE_MAX);
475 uint8_t b = (uint8_t)
476 (((i/NUMBER_PORT_USED)/BYTE_VALUE_MAX)%BYTE_VALUE_MAX);
477 uint8_t c = (uint8_t)
478 ((i/NUMBER_PORT_USED)/(BYTE_VALUE_MAX*BYTE_VALUE_MAX));
480 /* Create the ipv6 exact match flow */
481 memset(&entry, 0, sizeof(entry));
482 switch (i & (NUMBER_PORT_USED - 1)) {
484 entry = ipv6_l3fwd_em_route_array[0];
487 entry = ipv6_l3fwd_em_route_array[1];
490 entry = ipv6_l3fwd_em_route_array[2];
493 entry = ipv6_l3fwd_em_route_array[3];
496 entry.key.ip_dst[13] = c;
497 entry.key.ip_dst[14] = b;
498 entry.key.ip_dst[15] = a;
499 convert_ipv6_5tuple(&entry.key, &newkey);
500 int32_t ret = rte_hash_add_key(h, (void *) &newkey);
503 rte_exit(EXIT_FAILURE, "Unable to add entry %u\n", i);
505 ipv6_l3fwd_out_if[ret] = (uint8_t) entry.if_out;
508 printf("Hash: Adding 0x%x keys\n", nr_flow);
511 /* main processing loop */
513 em_main_loop(__attribute__((unused)) void *dummy)
515 struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
517 uint64_t prev_tsc, diff_tsc, cur_tsc;
519 uint8_t portid, queueid;
520 struct lcore_conf *qconf;
521 const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
522 US_PER_S * BURST_TX_DRAIN_US;
526 lcore_id = rte_lcore_id();
527 qconf = &lcore_conf[lcore_id];
529 if (qconf->n_rx_queue == 0) {
530 RTE_LOG(INFO, L3FWD, "lcore %u has nothing to do\n", lcore_id);
534 RTE_LOG(INFO, L3FWD, "entering main loop on lcore %u\n", lcore_id);
536 for (i = 0; i < qconf->n_rx_queue; i++) {
538 portid = qconf->rx_queue_list[i].port_id;
539 queueid = qconf->rx_queue_list[i].queue_id;
541 " -- lcoreid=%u portid=%hhu rxqueueid=%hhu\n",
542 lcore_id, portid, queueid);
545 while (!force_quit) {
547 cur_tsc = rte_rdtsc();
550 * TX burst queue drain
552 diff_tsc = cur_tsc - prev_tsc;
553 if (unlikely(diff_tsc > drain_tsc)) {
555 for (i = 0; i < qconf->n_rx_queue; i++) {
556 portid = qconf->rx_queue_list[i].port_id;
557 if (qconf->tx_mbufs[portid].len == 0)
560 qconf->tx_mbufs[portid].len,
562 qconf->tx_mbufs[portid].len = 0;
569 * Read packet from RX queues
571 for (i = 0; i < qconf->n_rx_queue; ++i) {
572 portid = qconf->rx_queue_list[i].port_id;
573 queueid = qconf->rx_queue_list[i].queue_id;
574 nb_rx = rte_eth_rx_burst(portid, queueid, pkts_burst,
580 * For SSE4_1 use ENABLE_MULTI_BUFFER_OPTIMIZE=1
583 #if defined(__SSE4_1__)
584 l3fwd_em_send_packets(nb_rx, pkts_burst,
587 l3fwd_em_no_opt_send_packets(nb_rx, pkts_burst,
589 #endif /* __SSE_4_1__ */
597 * Initialize exact match (hash) parameters.
600 setup_hash(const int socketid)
602 struct rte_hash_parameters ipv4_l3fwd_hash_params = {
604 .entries = L3FWD_HASH_ENTRIES,
605 .key_len = sizeof(union ipv4_5tuple_host),
606 .hash_func = ipv4_hash_crc,
607 .hash_func_init_val = 0,
610 struct rte_hash_parameters ipv6_l3fwd_hash_params = {
612 .entries = L3FWD_HASH_ENTRIES,
613 .key_len = sizeof(union ipv6_5tuple_host),
614 .hash_func = ipv6_hash_crc,
615 .hash_func_init_val = 0,
620 /* create ipv4 hash */
621 snprintf(s, sizeof(s), "ipv4_l3fwd_hash_%d", socketid);
622 ipv4_l3fwd_hash_params.name = s;
623 ipv4_l3fwd_hash_params.socket_id = socketid;
624 ipv4_l3fwd_em_lookup_struct[socketid] =
625 rte_hash_create(&ipv4_l3fwd_hash_params);
626 if (ipv4_l3fwd_em_lookup_struct[socketid] == NULL)
627 rte_exit(EXIT_FAILURE,
628 "Unable to create the l3fwd hash on socket %d\n",
631 /* create ipv6 hash */
632 snprintf(s, sizeof(s), "ipv6_l3fwd_hash_%d", socketid);
633 ipv6_l3fwd_hash_params.name = s;
634 ipv6_l3fwd_hash_params.socket_id = socketid;
635 ipv6_l3fwd_em_lookup_struct[socketid] =
636 rte_hash_create(&ipv6_l3fwd_hash_params);
637 if (ipv6_l3fwd_em_lookup_struct[socketid] == NULL)
638 rte_exit(EXIT_FAILURE,
639 "Unable to create the l3fwd hash on socket %d\n",
642 if (hash_entry_number != HASH_ENTRY_NUMBER_DEFAULT) {
643 /* For testing hash matching with a large number of flows we
644 * generate millions of IP 5-tuples with an incremented dst
645 * address to initialize the hash table. */
647 /* populate the ipv4 hash */
648 populate_ipv4_many_flow_into_table(
649 ipv4_l3fwd_em_lookup_struct[socketid],
652 /* populate the ipv6 hash */
653 populate_ipv6_many_flow_into_table(
654 ipv6_l3fwd_em_lookup_struct[socketid],
659 * Use data in ipv4/ipv6 l3fwd lookup table
660 * directly to initialize the hash table.
663 /* populate the ipv4 hash */
664 populate_ipv4_few_flow_into_table(
665 ipv4_l3fwd_em_lookup_struct[socketid]);
667 /* populate the ipv6 hash */
668 populate_ipv6_few_flow_into_table(
669 ipv6_l3fwd_em_lookup_struct[socketid]);
674 /* Return ipv4/ipv6 em fwd lookup struct. */
676 em_get_ipv4_l3fwd_lookup_struct(const int socketid)
678 return ipv4_l3fwd_em_lookup_struct[socketid];
682 em_get_ipv6_l3fwd_lookup_struct(const int socketid)
684 return ipv6_l3fwd_em_lookup_struct[socketid];