bool is_udp; /* ipv4|ipv6 udp flow */
enum i40e_flxpld_layer_idx layer_idx;
struct i40e_fdir_flex_pit flex_pit[I40E_MAX_FLXPLD_LAYER * I40E_MAX_FLXPLD_FIED];
+ bool is_flex_flow;
};
/* A structure used to define the input for a flow director filter entry */
bool flex_mask_flag[I40E_FILTER_PCTYPE_MAX];
bool inset_flag[I40E_FILTER_PCTYPE_MAX]; /* Mark if input set is set */
+
+ uint32_t flex_flow_count[I40E_MAX_FLXPLD_LAYER];
};
/* Ethertype filter number HW supports */
I40E_PRTQF_FLX_PIT(index + 1), 0x0000FC29);/*non-used*/
I40E_WRITE_REG(hw,
I40E_PRTQF_FLX_PIT(index + 2), 0x0000FC2A);/*non-used*/
+ pf->fdir.flex_pit_flag[i] = 0;
}
/* initialize the masks */
I40E_WRITE_REG(hw, I40E_PRTQF_FLX_PIT(field_idx), flx_pit);
min_next_off++;
}
-
- pf->fdir.flex_pit_flag[layer_idx] = 1;
}
static int
i40e_fdir_filter_convert(filter, &check_filter);
if (add) {
- if (!filter->input.flow_ext.customized_pctype) {
+ if (filter->input.flow_ext.is_flex_flow) {
for (i = 0; i < filter->input.flow_ext.raw_id; i++) {
layer_idx = filter->input.flow_ext.layer_idx;
field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
fdir_info->fdir_guarantee_free_space > 0)
wait_status = false;
} else {
+ if (filter->input.flow_ext.is_flex_flow)
+ layer_idx = filter->input.flow_ext.layer_idx;
+
node = i40e_sw_fdir_filter_lookup(fdir_info,
&check_filter.fdir.input);
if (!node) {
goto error_op;
}
+ if (filter->input.flow_ext.is_flex_flow) {
+ if (add) {
+ fdir_info->flex_flow_count[layer_idx]++;
+ pf->fdir.flex_pit_flag[layer_idx] = 1;
+ } else {
+ fdir_info->flex_flow_count[layer_idx]--;
+ if (!fdir_info->flex_flow_count[layer_idx])
+ pf->fdir.flex_pit_flag[layer_idx] = 0;
+ }
+ }
+
if (add) {
fdir_info->fdir_actual_cnt++;
if (fdir_info->fdir_invalprio == 1 &&
&flex_pit, sizeof(struct i40e_fdir_flex_pit));
filter->input.flow_ext.layer_idx = layer_idx;
filter->input.flow_ext.raw_id = raw_id;
+ filter->input.flow_ext.is_flex_flow = true;
break;
case RTE_FLOW_ITEM_TYPE_VF:
vf_spec = item->spec;
pf->fdir.flex_mask_flag[pctype] = 0;
}
+ for (i = 0; i < I40E_MAX_FLXPLD_LAYER; i++)
+ pf->fdir.flex_pit_flag[i] = 0;
+
/* Disable FDIR processing as all FDIR rules are now flushed */
i40e_fdir_rx_proc_enable(dev, 0);
}