From 9fa82a63e47e4ee274c54af366e6fce055a0cbab Mon Sep 17 00:00:00 2001 From: Reshma Pattan Date: Fri, 7 Apr 2017 16:51:27 +0100 Subject: * Add siphash file for calculating the sequence number. * l4fwd app changed to include new command line parameters hash and secret key for hash calculation. * Changed l4fwd library to integrate siphash support for calculating the sequence number. Change-Id: I29c60836c8b17a118d76b619fd79398fac200f67 Signed-off-by: Reshma Pattan --- examples/l4fwd/lcore.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples/l4fwd/lcore.h') diff --git a/examples/l4fwd/lcore.h b/examples/l4fwd/lcore.h index d88e434..11cc239 100644 --- a/examples/l4fwd/lcore.h +++ b/examples/l4fwd/lcore.h @@ -16,6 +16,8 @@ #ifndef LCORE_H_ #define LCORE_H_ +#include + #include "dpdk_legacy.h" /* @@ -64,6 +66,11 @@ create_context(struct netbe_lcore *lc, const struct tle_ctx_param *ctx_prm) cprm.lookup4_data = lc; cprm.lookup6 = lpm6_dst_lookup; cprm.lookup6_data = lc; + if (cprm.secret_key.u64[0] == 0 && + cprm.secret_key.u64[1] == 0) { + cprm.secret_key.u64[0] = rte_rand(); + cprm.secret_key.u64[1] = rte_rand(); + } frag_cycles = (rte_get_tsc_hz() + MS_PER_S - 1) / MS_PER_S * FRAG_TTL; -- cgit 1.2.3-korg