src/drivers/trex_i40e_fdir.c
static int
trex_i40e_sw_fdir_filter_del(struct i40e_pf *pf, struct i40e_fdir_input *input)
{
	struct i40e_fdir_info *fdir_info = &pf->fdir;
	struct i40e_fdir_filter *filter;
	int ret;

	if (input->flow_ext.pkt_template)
		ret = rte_hash_del_key_with_hash(fdir_info->hash_table,
						 input,
						 input->flow.raw_flow.length);
	else
		ret = rte_hash_del_key(fdir_info->hash_table, input);
	if (ret < 0) {
		PMD_DRV_LOG(ERR,
			    "Failed to delete fdir filter to hash table %d!",
			    ret);
		return ret;
	}
	filter = fdir_info->hash_map[ret];
	fdir_info->hash_map[ret] = NULL;

	TAILQ_REMOVE(&fdir_info->fdir_list, filter, rules);
	rte_free(filter);

	return 0;
}
/* Delete a flow director filter from the SW list */
Delete a flow director filter from the SW list
Delete a flow director filter from the SW list
static int
trex_i40e_sw_fdir_filter_del(struct i40e_pf *pf, struct i40e_fdir_input *input)
{
	struct i40e_fdir_info *fdir_info = &pf->fdir;
	struct i40e_fdir_filter *filter;
	int ret;
	if (input->flow_ext.pkt_template)
		ret = rte_hash_del_key_with_hash(fdir_info->hash_table,
						 input,
						 input->flow.raw_flow.length);
	else
		ret = rte_hash_del_key(fdir_info->hash_table, input);
	if (ret < 0) {
		PMD_DRV_LOG(ERR,
			    "Failed to delete fdir filter to hash table %d!",
			    ret);
		return ret;
	}
	filter = fdir_info->hash_map[ret];
	fdir_info->hash_map[ret] = NULL;
	TAILQ_REMOVE(&fdir_info->fdir_list, filter, rules);
	rte_free(filter);
	return 0;
}
static int trex_i40e_sw_fdir_filter_del ( struct i40e_pf * pf , struct i40e_fdir_input * input ) { struct i40e_fdir_info * fdir_info = & pf -> fdir ; struct i40e_fdir_filter * filter ; int ret ; if ( input -> flow_ext . pkt_template ) ret = rte_hash_del_key_with_hash ( fdir_info -> hash_table , input , input -> flow . raw_flow . length ) ; else ret = rte_hash_del_key ( fdir_info -> hash_table , input ) ; if ( ret < 0 ) { PMD_DRV_LOG ( ERR , " " , ret ) ; return ret ; } filter = fdir_info -> hash_map [ ret ] ; fdir_info -> hash_map [ ret ] = NULL ; TAILQ_REMOVE ( & fdir_info -> fdir_list , filter , rules ) ; rte_free ( filter ) ; return 0 ; }
Delete a flow director filter from the SW list
Delete a flow director filter from the SW list