On 11/11/2020 6:49 AM, Jiawen Wu wrote:
Add support to parse flow for L2 tunnel filter.
<...>
+static int +txgbe_parse_l2_tn_filter(struct rte_eth_dev *dev, + const struct rte_flow_attr *attr, + const struct rte_flow_item pattern[], + const struct rte_flow_action actions[], + struct txgbe_l2_tunnel_conf *l2_tn_filter, + struct rte_flow_error *error) +{ + int ret = 0; + + ret = cons_parse_l2_tn_filter(dev, attr, pattern, + actions, l2_tn_filter, error); + + memset(l2_tn_filter, 0, sizeof(struct txgbe_l2_tunnel_conf)); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, + NULL, "Not supported by L2 tunnel filter"); + ret = -rte_errno; + return ret; +}
If at the end of the day, error is send unconditionally, why parsed at all? Or why this filter type exists at all?