Skip to content

Commit

Permalink
net/ixgbe: remove redundant MAC flag check
Browse files Browse the repository at this point in the history
[ upstream commit 5db5d3b ]

The flag of RTE_ETHTYPE_FLAGS_MAC has been checked twice, so remove the
first error message "Not supported by ethertype filter" which is not so
specific, and keep the error message "mac compare is unsupported" which
aligns to the definition of RTE_ETHTYPE_FLAGS_MAC.

Fixes: eb3539f ("net/ixgbe: parse ethertype filter")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
haiyuewa authored and bluca committed Nov 16, 2020
1 parent c76a71e commit 2eeeb52
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/net/ixgbe/ixgbe_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,15 +870,6 @@ ixgbe_parse_ethertype_filter(struct rte_eth_dev *dev,
if (ret)
return ret;

/* Ixgbe doesn't support MAC address. */
if (filter->flags & RTE_ETHTYPE_FLAGS_MAC) {
memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
NULL, "Not supported by ethertype filter");
return -rte_errno;
}

if (filter->queue >= dev->data->nb_rx_queues) {
memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
rte_flow_error_set(error, EINVAL,
Expand Down

0 comments on commit 2eeeb52

Please sign in to comment.