2018-01-20 21:11:36 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2018-03-20 19:20:35 +00:00
|
|
|
* Copyright 2017 Mellanox Technologies, Ltd
|
2018-01-20 21:11:36 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _TAP_RSS_H_
|
|
|
|
#define _TAP_RSS_H_
|
|
|
|
|
|
|
|
#ifndef TAP_MAX_QUEUES
|
|
|
|
#define TAP_MAX_QUEUES 16
|
|
|
|
#endif
|
|
|
|
|
2018-05-08 17:07:35 +00:00
|
|
|
/* Fixed RSS hash key size in bytes. */
|
|
|
|
#define TAP_RSS_HASH_KEY_SIZE 40
|
|
|
|
|
2018-05-10 17:30:25 +00:00
|
|
|
/* Supported RSS */
|
|
|
|
#define TAP_RSS_HF_MASK (~(ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP))
|
|
|
|
|
2018-01-20 21:11:36 +00:00
|
|
|
/* hashed fields for RSS */
|
|
|
|
enum hash_field {
|
|
|
|
HASH_FIELD_IPV4_L3, /* IPv4 src/dst addr */
|
|
|
|
HASH_FIELD_IPV4_L3_L4, /* IPv4 src/dst addr + L4 src/dst ports */
|
|
|
|
HASH_FIELD_IPV6_L3, /* IPv6 src/dst addr */
|
|
|
|
HASH_FIELD_IPV6_L3_L4, /* IPv6 src/dst addr + L4 src/dst ports */
|
|
|
|
HASH_FIELD_L2_SRC, /* Ethernet src addr */
|
|
|
|
HASH_FIELD_L2_DST, /* Ethernet dst addr */
|
|
|
|
HASH_FIELD_L3_SRC, /* L3 src addr */
|
|
|
|
HASH_FIELD_L3_DST, /* L3 dst addr */
|
|
|
|
HASH_FIELD_L4_SRC, /* TCP/UDP src ports */
|
|
|
|
HASH_FIELD_L4_DST, /* TCP/UDP dst ports */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rss_key {
|
|
|
|
__u8 key[128];
|
|
|
|
__u32 hash_fields;
|
|
|
|
__u32 key_size;
|
|
|
|
__u32 queues[TAP_MAX_QUEUES];
|
|
|
|
__u32 nb_queues;
|
2020-02-09 17:29:23 +00:00
|
|
|
} __rte_packed;
|
2018-01-20 21:11:36 +00:00
|
|
|
|
|
|
|
#endif /* _TAP_RSS_H_ */
|