diff options
author | Neale Ranns <nranns@cisco.com> | 2017-05-02 10:15:19 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-05-02 21:53:54 +0000 |
commit | 41da54f501338072ec9543db2e07e2c046e3964e (patch) | |
tree | 9cd90d4847792ae8eeef002e4d273a50b62553cc /src/vnet/fib/fib_table.c | |
parent | 4269098e14603e38936ea7351705373ad55c08a7 (diff) |
Use per-protocol default flow-hash config when the FIB table index is not known
Change-Id: If088e75801831befc6bddb77ea20abe9288b93c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_table.c')
-rw-r--r-- | src/vnet/fib/fib_table.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c index d50f17f1ce4..5aa02dd0042 100644 --- a/src/vnet/fib/fib_table.c +++ b/src/vnet/fib/fib_table.c @@ -951,6 +951,22 @@ fib_table_get_flow_hash_config (u32 fib_index, return (fib->ft_flow_hash_config); } +flow_hash_config_t +fib_table_get_default_flow_hash_config (fib_protocol_t proto) +{ + switch (proto) + { + case FIB_PROTOCOL_IP4: + case FIB_PROTOCOL_IP6: + return (IP_FLOW_HASH_DEFAULT); + + case FIB_PROTOCOL_MPLS: + return (MPLS_FLOW_HASH_DEFAULT); + } + + ASSERT(0); + return (IP_FLOW_HASH_DEFAULT); +} /** * @brief Table set flow hash config context. |