[dpdk-dev] [PATCH v3 5/7] examples/l3fwd: add neon support for l3fwd

Jianbo Liu jianbo.liu at linaro.org
Thu May 11 12:01:24 CEST 2017


On 11 May 2017 at 17:49, Sekhar, Ashwin <Ashwin.Sekhar at cavium.com> wrote:
> Hi Jianbo,
>
> Thanks for v3. Small compilation error. See inline comment. Otherwise
> it looks fine.
>
> On Thu, 2017-05-11 at 17:25 +0800, Jianbo Liu wrote:
>> Use ARM NEON intrinsics to accelerate l3 fowarding.
>>
>> Signed-off-by: Jianbo Liu <jianbo.liu at linaro.org>
>> ---
> [...]
>
>> +/**
>> + * Process one packet:
>> + * Update source and destination MAC addresses in the ethernet
>> header.
>> + * Perform RFC1812 checks and updates for IPV4 packets.
>> + */
>> +static inline void
>> +process_packet(struct rte_mbuf *pkt, uint16_t *dst_port)
>> +{
>> +     struct ether_hdr *eth_hdr;
>> +     uint32x4_t te, ve;
>> +
>> +     eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
>> +
>> +     te = vld1q_u32((uint32_t *)eth_hdr);
>> +     ve = vreinterpretq_u32_s32(val_eth[dst_port[0]]);
>> +
>> +
>> +     rfc1812_process((struct ipv4_hdr *)(eth_hdr + 1), dst_port,
>> +                     pkt->packet_type);
>> +
>> +     ve = vcopyq_lane_u32(ve, 3, te, 3);
> Compilation error here. This should be vcopyq_laneq_u32 (Extra q after
> lane)

No vcopyq_laneq_u32 in arm_neon.h of my environment. I thought it's a
typo so I changed.

my gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC).
What about yours?

>> +     vst1q_u32((uint32_t *)eth_hdr, ve);
>> +}
>> +
> [...]


More information about the dev mailing list