DPDK
19.08.0-rc0
|
#include <stdint.h>
#include <rte_byteorder.h>
#include <rte_config.h>
#include <rte_ip.h>
#include <rte_common.h>
Go to the source code of this file.
Data Structures | |
struct | rte_ipv4_tuple |
struct | rte_ipv6_tuple |
Macros | |
#define | RTE_THASH_V4_L3_LEN |
#define | RTE_THASH_V4_L4_LEN ((sizeof(struct rte_ipv4_tuple)) / 4) |
#define | RTE_THASH_V6_L3_LEN |
#define | RTE_THASH_V6_L4_LEN ((sizeof(struct rte_ipv6_tuple)) / 4) |
Functions | |
static void | rte_convert_rss_key (const uint32_t *orig, uint32_t *targ, int len) |
static void | rte_thash_load_v6_addrs (const struct rte_ipv6_hdr *orig, union rte_thash_tuple *targ) |
static uint32_t | rte_softrss (uint32_t *input_tuple, uint32_t input_len, const uint8_t *rss_key) |
static uint32_t | rte_softrss_be (uint32_t *input_tuple, uint32_t input_len, const uint8_t *rss_key) |
toeplitz hash functions.
Definition in file rte_thash.h.
#define RTE_THASH_V4_L3_LEN |
Software implementation of the Toeplitz hash function used by RSS. Can be used either for packet distribution on single queue NIC or for simulating of RSS computation on specific NIC (for example after GRE header decapsulating)length in dwords of input tuple to calculate hash of ipv4 header only
Definition at line 47 of file rte_thash.h.
#define RTE_THASH_V4_L4_LEN ((sizeof(struct rte_ipv4_tuple)) / 4) |
length in dwords of input tuple to calculate hash of ipv4 header + transport header
Definition at line 55 of file rte_thash.h.
#define RTE_THASH_V6_L3_LEN |
length in dwords of input tuple to calculate hash of ipv6 header only
Definition at line 61 of file rte_thash.h.
#define RTE_THASH_V6_L4_LEN ((sizeof(struct rte_ipv6_tuple)) / 4) |
length in dwords of input tuple to calculate hash of ipv6 header + transport header
Definition at line 69 of file rte_thash.h.
|
inlinestatic |
Prepare special converted key to use with rte_softrss_be()
orig | pointer to original RSS key |
targ | pointer to target RSS key |
len | RSS key length |
Definition at line 125 of file rte_thash.h.
|
inlinestatic |
Prepare and load IPv6 addresses (src and dst) into target tuple
orig | Pointer to ipv6 header of the original packet |
targ | Pointer to rte_ipv6_tuple structure |
Definition at line 142 of file rte_thash.h.
|
inlinestatic |
Generic implementation. Can be used with original rss_key
input_tuple | Pointer to input tuple |
input_len | Length of input_tuple in 4-bytes chunks |
rss_key | Pointer to RSS hash key. |
Definition at line 180 of file rte_thash.h.
|
inlinestatic |
Optimized implementation. If you want the calculated hash value matches NIC RSS value you have to use special converted key with rte_convert_rss_key() fn.
input_tuple | Pointer to input tuple |
input_len | Length of input_tuple in 4-bytes chunks |
*rss_key | Pointer to RSS hash key. |
Definition at line 210 of file rte_thash.h.