X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Ftap%2Ftap_bpf_program.c;h=20c310e5e7ba4c8bb0e604ec36e706572a70c14f;hb=be797cbf4582f3c474f208aeb3d1baa4001a6156;hp=8abb3b76c21a0a59a446b3ba7493ee50b559df3f;hpb=54aad2f231b5c0a038e6bc2754556af1ed5d133f;p=dpdk.git diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c index 8abb3b76c2..20c310e5e7 100644 --- a/drivers/net/tap/tap_bpf_program.c +++ b/drivers/net/tap/tap_bpf_program.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 - * Copyright 2017 Mellanox Technologies, Ltd. + * Copyright 2017 Mellanox Technologies, Ltd */ #include @@ -75,16 +75,16 @@ struct ipv4_l3_l4_tuple { __u32 dst_addr; __u16 dport; __u16 sport; -} __attribute__((packed)); +} __rte_packed; struct ipv6_l3_l4_tuple { __u8 src_addr[16]; __u8 dst_addr[16]; __u16 dport; __u16 sport; -} __attribute__((packed)); +} __rte_packed; -static const __u8 def_rss_key[] = { +static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = { 0xd1, 0x81, 0xc6, 0x2c, 0xf7, 0xf4, 0xdb, 0x5b, 0x19, 0x83, 0xa2, 0xfc, @@ -106,7 +106,7 @@ rte_softrss_be(const __u32 *input_tuple, const uint8_t *rss_key, for (j = 0; j < input_len; j++) { #pragma unroll for (i = 0; i < 32; i++) { - if (input_tuple[j] & (1 << (31 - i))) { + if (input_tuple[j] & (1U << (31 - i))) { hash ^= ((const __u32 *)def_rss_key)[j] << i | (__u32)((uint64_t) (((const __u32 *)def_rss_key)[j + 1])