[dpdk-dev] [PATCH v2 20/28] node: ipv4 lookup for x86
Jerin Jacob
jerinjacobk at gmail.com
Fri Mar 27 09:40:02 CET 2020
On Thu, Mar 26, 2020 at 10:30 PM <jerinj at marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>
> Add IPv4 lookup process function for ip4_lookup
> rte_node. This node performs LPM lookup using x86_64
> vector supported RTE_LPM API on every packet received
> and forwards it to a next node that is identified by
> lookup result.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
> Signed-off-by: Kiran Kumar K <kirankumark at marvell.com>
> }
>
> +#elif defined(RTE_ARCH_X86)
# Could you move the below code to ipv4_looup_sse.h and arm64 code to
ipv4_looup_neon.h
# In order to make this node work for PPC and ARMv7, please add a
scalar version of ip4_lookup_node_process() too
> +
> +/* X86 SSE */
> +static uint16_t
> +ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node,
> + void **objs, uint16_t nb_objs)
> +{
> + struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3, **pkts;
> + rte_edge_t next0, next1, next2, next3, next_index;
> + struct rte_ipv4_hdr *ipv4_hdr;
> + uint32_t ip0, ip1, ip2, ip3;
> + void **to_next, **from;
> + uint16_t last_spec = 0;
> + uint16_t n_left_from;
> + struct rte_lpm *lpm;
> + uint16_t held = 0;
> + uint32_t drop_nh;
> + rte_xmm_t dst;
> + __m128i dip; /* SSE register */
> + int rc, i;
More information about the dev
mailing list