diff options
author | Reshma Pattan <reshma.pattan@intel.com> | 2017-04-07 16:51:27 +0100 |
---|---|---|
committer | Reshma Pattan <reshma.pattan@intel.com> | 2017-04-14 10:30:57 +0100 |
commit | 9fa82a63e47e4ee274c54af366e6fce055a0cbab (patch) | |
tree | 6479ef920d62a7d772e029766da113eb1e7b3228 /examples/l4fwd/lcore.h | |
parent | 4e3cb26150547b8b4105c795e282a1564e7f6e86 (diff) |
* 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 <reshma.pattan@intel.com>
Diffstat (limited to 'examples/l4fwd/lcore.h')
-rw-r--r-- | examples/l4fwd/lcore.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 <rte_random.h> + #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; |