src/dpdk/drivers/net/i40e/i40e_ethdev.c
static int
i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,
			     struct i40e_tunnel_filter *tunnel_filter)
{
	struct i40e_tunnel_rule *rule = &pf->tunnel;
	int ret;

	ret = rte_hash_add_key(rule->hash_table, &tunnel_filter->input);
	if (ret < 0) {
		PMD_DRV_LOG(ERR,
			    "Failed to insert tunnel filter to hash table %d!",
			    ret);
		return ret;
	}
	rule->hash_map[ret] = tunnel_filter;

	TAILQ_INSERT_TAIL(&rule->tunnel_list, tunnel_filter, rules);

	return 0;
}
/* Add a tunnel filter into the SW list */
Add a tunnel filter into the SW list
Add a tunnel filter into the SW list
static int
i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,
			     struct i40e_tunnel_filter *tunnel_filter)
{
	struct i40e_tunnel_rule *rule = &pf->tunnel;
	int ret;
	ret = rte_hash_add_key(rule->hash_table, &tunnel_filter->input);
	if (ret < 0) {
		PMD_DRV_LOG(ERR,
			    "Failed to insert tunnel filter to hash table %d!",
			    ret);
		return ret;
	}
	rule->hash_map[ret] = tunnel_filter;
	TAILQ_INSERT_TAIL(&rule->tunnel_list, tunnel_filter, rules);
	return 0;
}
static int i40e_sw_tunnel_filter_insert ( struct i40e_pf * pf , struct i40e_tunnel_filter * tunnel_filter ) { struct i40e_tunnel_rule * rule = & pf -> tunnel ; int ret ; ret = rte_hash_add_key ( rule -> hash_table , & tunnel_filter -> input ) ; if ( ret < 0 ) { PMD_DRV_LOG ( ERR , " " , ret ) ; return ret ; } rule -> hash_map [ ret ] = tunnel_filter ; TAILQ_INSERT_TAIL ( & rule -> tunnel_list , tunnel_filter , rules ) ; return 0 ; }
Add a tunnel filter into the SW list
Add a tunnel filter into the SW list