Skip to content

Commit

Permalink
net/enic: fix filter type used for flow API
Browse files Browse the repository at this point in the history
[ upstream commit d700f0d ]

The filter type (struct filter_v2.type) should always be set to
FILTER_DPDK_1, when advanced filtering is enabled in firmware.
Otherwise, for some old firmware versions, the driver sets
it to FILTER_USNIC_IP, and attempts to install filters fail. This
behavior matches that of the now-removed flow director implementation
(enic_clsf.c).

Fixes: 26faa12 ("net/enic: flow API for NICs with advanced filters disabled")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
  • Loading branch information
Hyong Youb Kim authored and bluca committed Feb 8, 2021
1 parent c926d56 commit 6c8be34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/enic/enic_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,8 @@ enic_flow_parse(struct rte_eth_dev *dev,
return -rte_errno;
}
enic_filter->type = enic->flow_filter_mode;
if (enic->adv_filters)
enic_filter->type = FILTER_DPDK_1;
ret = enic_copy_filter(pattern, enic_filter_cap, enic,
enic_filter, error);
return ret;
Expand Down

0 comments on commit 6c8be34

Please sign in to comment.