src/dpdk/drivers/net/i40e/i40e_ethdev.c
static int
i40e_sw_ethertype_filter_insert(struct i40e_pf *pf,
				struct i40e_ethertype_filter *filter)
{
	struct i40e_ethertype_rule *rule = &pf->ethertype;
	int ret;

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

	TAILQ_INSERT_TAIL(&rule->ethertype_list, filter, rules);

	return 0;
}
/* Add ethertype filter in SW list */
Add ethertype filter in SW list
Add ethertype filter in SW list
static int
i40e_sw_ethertype_filter_insert(struct i40e_pf *pf,
				struct i40e_ethertype_filter *filter)
{
	struct i40e_ethertype_rule *rule = &pf->ethertype;
	int ret;
	ret = rte_hash_add_key(rule->hash_table, &filter->input);
	if (ret < 0) {
		PMD_DRV_LOG(ERR,
			    "Failed to insert ethertype filter"
			    " to hash table %d!",
			    ret);
		return ret;
	}
	rule->hash_map[ret] = filter;
	TAILQ_INSERT_TAIL(&rule->ethertype_list, filter, rules);
	return 0;
}
static int i40e_sw_ethertype_filter_insert ( struct i40e_pf * pf , struct i40e_ethertype_filter * filter ) { struct i40e_ethertype_rule * rule = & pf -> ethertype ; int ret ; ret = rte_hash_add_key ( rule -> hash_table , & filter -> input ) ; if ( ret < 0 ) { PMD_DRV_LOG ( ERR , " " " " , ret ) ; return ret ; } rule -> hash_map [ ret ] = filter ; TAILQ_INSERT_TAIL ( & rule -> ethertype_list , filter , rules ) ; return 0 ; }
Add ethertype filter in SW list
Add ethertype filter in SW list