MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nfp_flow_priv_init

Function nfp_flow_priv_init

dpdk/drivers/net/nfp/nfp_flow.c:4339–4540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4337}
4338
4339int
4340nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
4341{
4342 int ret = 0;
4343 size_t stats_size;
4344 uint64_t ctx_count;
4345 uint64_t ctx_split;
4346 struct nfp_flow_priv *priv;
4347 char mask_name[RTE_HASH_NAMESIZE];
4348 char flow_name[RTE_HASH_NAMESIZE];
4349 char pretun_name[RTE_HASH_NAMESIZE];
4350 struct nfp_app_fw_flower *app_fw_flower;
4351 const char *pci_name = strchr(pf_dev->pci_dev->name, ':') + 1;
4352
4353 snprintf(mask_name, sizeof(mask_name), "%s_mask", pci_name);
4354 snprintf(flow_name, sizeof(flow_name), "%s_flow", pci_name);
4355 snprintf(pretun_name, sizeof(pretun_name), "%s_pretun", pci_name);
4356
4357 struct rte_hash_parameters mask_hash_params = {
4358 .name = mask_name,
4359 .entries = NFP_MASK_TABLE_ENTRIES,
4360 .hash_func = rte_jhash,
4361 .socket_id = rte_socket_id(),
4362 .key_len = sizeof(uint32_t),
4363 .extra_flag = RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY,
4364 };
4365
4366 struct rte_hash_parameters flow_hash_params = {
4367 .name = flow_name,
4368 .hash_func = rte_jhash,
4369 .socket_id = rte_socket_id(),
4370 .key_len = sizeof(uint32_t),
4371 .extra_flag = RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY,
4372 };
4373
4374 struct rte_hash_parameters pre_tun_hash_params = {
4375 .name = pretun_name,
4376 .entries = 32,
4377 .hash_func = rte_jhash,
4378 .socket_id = rte_socket_id(),
4379 .key_len = sizeof(uint32_t),
4380 .extra_flag = RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY,
4381 };
4382
4383 struct rte_hash_parameters ct_zone_hash_params = {
4384 .name = "ct_zone_table",
4385 .entries = 65536,
4386 .hash_func = rte_jhash,
4387 .socket_id = rte_socket_id(),
4388 .key_len = sizeof(uint32_t),
4389 .extra_flag = RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY,
4390 };
4391
4392 struct rte_hash_parameters ct_map_hash_params = {
4393 .name = "ct_map_table",
4394 .hash_func = rte_jhash,
4395 .socket_id = rte_socket_id(),
4396 .key_len = sizeof(uint32_t),

Callers 1

nfp_init_app_fw_flowerFunction · 0.85

Calls 10

strchrFunction · 0.85
snprintfFunction · 0.85
rte_socket_idFunction · 0.85
nfp_rtsym_read_leFunction · 0.85
rte_zmallocFunction · 0.85
rte_randFunction · 0.85
rte_spinlock_initFunction · 0.85
rte_hash_createFunction · 0.85
rte_hash_freeFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected