X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Ftxgbe%2Ftxgbe_flow.c;h=d0093c0163d23ef006267f09a93a51584a07c953;hb=ed665c3e6aafae95361a16653f3d25ec5930bb75;hp=130e35af6b6cd8a950978c6e9e4b583c66b368da;hpb=86f66ff10d5481ec616732d2e82df2c30670e5ac;p=dpdk.git diff --git a/drivers/net/txgbe/txgbe_flow.c b/drivers/net/txgbe/txgbe_flow.c index 130e35af6b..d0093c0163 100644 --- a/drivers/net/txgbe/txgbe_flow.c +++ b/drivers/net/txgbe/txgbe_flow.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2015-2020 + * Copyright(c) 2015-2020 Beijing WangXun Technology Co., Ltd. + * Copyright(c) 2010-2017 Intel Corporation */ #include @@ -240,11 +241,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr, return -rte_errno; } /* if the first item is MAC, the content should be NULL */ - if ((item->spec || item->mask) && - (memcmp(eth_spec, ð_null, - sizeof(struct rte_flow_item_eth)) || - memcmp(eth_mask, ð_null, - sizeof(struct rte_flow_item_eth)))) { + if ((item->spec && memcmp(eth_spec, ð_null, + sizeof(struct rte_flow_item_eth))) || + (item->mask && memcmp(eth_mask, ð_null, + sizeof(struct rte_flow_item_eth)))) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, "Not supported by ntuple filter"); @@ -272,11 +272,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr, return -rte_errno; } /* the content should be NULL */ - if ((item->spec || item->mask) && - (memcmp(vlan_spec, &vlan_null, - sizeof(struct rte_flow_item_vlan)) || - memcmp(vlan_mask, &vlan_null, - sizeof(struct rte_flow_item_vlan)))) { + if ((item->spec && memcmp(vlan_spec, &vlan_null, + sizeof(struct rte_flow_item_vlan))) || + (item->mask && memcmp(vlan_mask, &vlan_null, + sizeof(struct rte_flow_item_vlan)))) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, "Not supported by ntuple filter"); @@ -512,7 +511,7 @@ action: memset(filter, 0, sizeof(struct rte_eth_ntuple_filter)); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, - item, "Not supported action."); + act, "Not supported action."); return -rte_errno; } filter->queue = @@ -1216,7 +1215,7 @@ cons_parse_l2_tn_filter(struct rte_eth_dev *dev, return -rte_errno; } - filter->l2_tunnel_type = RTE_L2_TUNNEL_TYPE_E_TAG; + filter->l2_tunnel_type = RTE_ETH_L2_TUNNEL_TYPE_E_TAG; /** * grp and e_cid_base are bit fields and only use 14 bits. * e-tag id is taken as little endian by HW. @@ -3151,4 +3150,3 @@ const struct rte_flow_ops txgbe_flow_ops = { .destroy = txgbe_flow_destroy, .flush = txgbe_flow_flush, }; -