> diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
> index 3205afaa63..5b71f94a71 100644
> --- a/app/test/test_bpf.c
> +++ b/app/test/test_bpf.c
> @@ -5,16 +5,28 @@
>  #include <stdio.h>
>  #include <string.h>
>  #include <stdint.h>
> +#include <stdlib.h>
> +#include <stdbool.h>
> +#include <stddef.h>
> +#include <stdalign.h>
>  #include <inttypes.h>
> +#include <errno.h>
> +#include <limits.h>
>  #include <unistd.h>
> 
> -#include <rte_memory.h>
> +#include <rte_bitops.h>
>  #include <rte_debug.h>
>  #include <rte_hexdump.h>
>  #include <rte_malloc.h>
> +#include <rte_memcpy.h>
> +#include <rte_mbuf.h>
>  #include <rte_random.h>
>  #include <rte_byteorder.h>
>  #include <rte_errno.h>
> +#include <rte_ether.h>
> +#include <rte_ip.h>
> +#include <rte_udp.h>
> +#include <rte_tcp.h>
> 
>  #include "test.h"
> 
> @@ -30,8 +42,6 @@ test_bpf(void)
>  #else
> 
>  #include <rte_bpf.h>
> -#include <rte_ether.h>
> -#include <rte_ip.h>
> 
> 
>  /* Tests of most simple BPF programs (no instructions, one instruction etc.) 
> */
> @@ -1331,7 +1341,7 @@ test_jump2_check(uint64_t rc, const void *arg)
>       uint16_t eth_type;
>       uint64_t v = -1;
> 
> -     if (eth_hdr->ether_type == htons(0x8100)) {
> +     if (eth_hdr->ether_type == rte_cpu_to_be_16(0x8100)) {
>               const struct rte_vlan_hdr *vlan_hdr =
>                       (const void *)(eth_hdr + 1);
>               eth_type = vlan_hdr->eth_proto;
> @@ -1341,7 +1351,7 @@ test_jump2_check(uint64_t rc, const void *arg)
>               next = eth_hdr + 1;
>       }
> 
> -     if (eth_type == htons(0x0800)) {
> +     if (eth_type == rte_cpu_to_be_16(0x0800)) {
>               ipv4_hdr = next;
>               if ((ipv4_hdr->dst_addr & rte_cpu_to_be_32(TEST_NETMASK)) ==
>                   rte_cpu_to_be_32(TEST_SUBNET)) {

For the `test_bpf.c` part:

Acked-by: Marat Khalili <[email protected]>

Reply via email to