git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx4: fix no Rx interrupts
[dpdk.git]
/
examples
/
l3fwd
/
l3fwd_em.c
diff --git
a/examples/l3fwd/l3fwd_em.c
b/examples/l3fwd/l3fwd_em.c
index
24c3974
..
2b7c173
100644
(file)
--- a/
examples/l3fwd/l3fwd_em.c
+++ b/
examples/l3fwd/l3fwd_em.c
@@
-274,8
+274,8
@@
em_mask_key(void *key, xmm_t mask)
#error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain
#endif
#error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain
#endif
-static inline uint
8
_t
-em_get_ipv4_dst_port(void *ipv4_hdr, uint
8
_t portid, void *lookup_struct)
+static inline uint
16
_t
+em_get_ipv4_dst_port(void *ipv4_hdr, uint
16
_t portid, void *lookup_struct)
{
int ret = 0;
union ipv4_5tuple_host key;
{
int ret = 0;
union ipv4_5tuple_host key;
@@
-292,11
+292,11
@@
em_get_ipv4_dst_port(void *ipv4_hdr, uint8_t portid, void *lookup_struct)
/* Find destination port */
ret = rte_hash_lookup(ipv4_l3fwd_lookup_struct, (const void *)&key);
/* Find destination port */
ret = rte_hash_lookup(ipv4_l3fwd_lookup_struct, (const void *)&key);
- return (
uint8_t)((ret < 0) ? portid : ipv4_l3fwd_out_if[ret])
;
+ return (
ret < 0) ? portid : ipv4_l3fwd_out_if[ret]
;
}
}
-static inline uint
8
_t
-em_get_ipv6_dst_port(void *ipv6_hdr,
uint8
_t portid, void *lookup_struct)
+static inline uint
16
_t
+em_get_ipv6_dst_port(void *ipv6_hdr,
uint16
_t portid, void *lookup_struct)
{
int ret = 0;
union ipv6_5tuple_host key;
{
int ret = 0;
union ipv6_5tuple_host key;
@@
-325,14
+325,14
@@
em_get_ipv6_dst_port(void *ipv6_hdr, uint8_t portid, void *lookup_struct)
/* Find destination port */
ret = rte_hash_lookup(ipv6_l3fwd_lookup_struct, (const void *)&key);
/* Find destination port */
ret = rte_hash_lookup(ipv6_l3fwd_lookup_struct, (const void *)&key);
- return (
uint8_t)((ret < 0) ? portid : ipv6_l3fwd_out_if[ret])
;
+ return (
ret < 0) ? portid : ipv6_l3fwd_out_if[ret]
;
}
}
-#if defined
(RTE_ARCH_X86)
+#if defined
RTE_ARCH_X86 || defined RTE_MACHINE_CPUFLAG_NEON
#if defined(NO_HASH_MULTI_LOOKUP)
#if defined(NO_HASH_MULTI_LOOKUP)
-#include "l3fwd_em_s
se
.h"
+#include "l3fwd_em_s
equential
.h"
#else
#else
-#include "l3fwd_em_hlm
_sse
.h"
+#include "l3fwd_em_hlm.h"
#endif
#else
#include "l3fwd_em.h"
#endif
#else
#include "l3fwd_em.h"
@@
-614,7
+614,7
@@
em_parse_ptype(struct rte_mbuf *m)
packet_type |= RTE_PTYPE_L4_UDP;
} else
packet_type |= RTE_PTYPE_L3_IPV4_EXT;
packet_type |= RTE_PTYPE_L4_UDP;
} else
packet_type |= RTE_PTYPE_L3_IPV4_EXT;
- } else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_IPv
4
)) {
+ } else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_IPv
6
)) {
ipv6_hdr = (struct ipv6_hdr *)l3;
if (ipv6_hdr->proto == IPPROTO_TCP)
packet_type |= RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP;
ipv6_hdr = (struct ipv6_hdr *)l3;
if (ipv6_hdr->proto == IPPROTO_TCP)
packet_type |= RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP;
@@
-628,7
+628,7
@@
em_parse_ptype(struct rte_mbuf *m)
}
uint16_t
}
uint16_t
-em_cb_parse_ptype(uint
8
_t port __rte_unused, uint16_t queue __rte_unused,
+em_cb_parse_ptype(uint
16
_t port __rte_unused, uint16_t queue __rte_unused,
struct rte_mbuf *pkts[], uint16_t nb_pkts,
uint16_t max_pkts __rte_unused,
void *user_param __rte_unused)
struct rte_mbuf *pkts[], uint16_t nb_pkts,
uint16_t max_pkts __rte_unused,
void *user_param __rte_unused)
@@
-649,7
+649,8
@@
em_main_loop(__attribute__((unused)) void *dummy)
unsigned lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
unsigned lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
- uint8_t portid, queueid;
+ uint8_t queueid;
+ uint16_t portid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
@@
-671,7
+672,7
@@
em_main_loop(__attribute__((unused)) void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%
hh
u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
lcore_id, portid, queueid);
}
lcore_id, portid, queueid);
}
@@
-709,7
+710,7
@@
em_main_loop(__attribute__((unused)) void *dummy)
if (nb_rx == 0)
continue;
if (nb_rx == 0)
continue;
-#if defined
(RTE_ARCH_X86)
+#if defined
RTE_ARCH_X86 || defined RTE_MACHINE_CPUFLAG_NEON
l3fwd_em_send_packets(nb_rx, pkts_burst,
portid, qconf);
#else
l3fwd_em_send_packets(nb_rx, pkts_burst,
portid, qconf);
#else