net/ixgbe: remove a useless item type check
PATCH 1/2 net/ixgbe: remove a useless item type check
Remove a useless item type check for fdir flow rule.
--- drivers/net/ixgbe/ixgbe_flow.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +1 -8
@@ -2346,16 +2346,9 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,RTE_FLOW_ERROR_TYPE_ITEM , item, "Not supported by fdir filter");return -rte_errno; - }else if (item->type !=RTE_FLOW_ITEM_TYPE_END ) { -memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_ITEM , - item,"Not supported by fdir filter" ); -return -rte_errno; } +/* check if the next not void item is END */ - index++; -NEXT_ITEM_OF_PATTERN (item, pattern, index);if (item->type !=RTE_FLOW_ITEM_TYPE_END ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); rte_flow_error_set(error, EINVAL,
Signature · 1 line
2.9.3
PATCH 2/2 net/ixgbe: fix a error type check for flow type
The type check for flow_type should be IXGBE_ATR_FLOW_TYPE_IPV4 in special card not RTE_ETH_FLOW_NONFRAG_IPV4_OTHER.
--- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_fdir.c +1 -1
@@ -1241,7 +1241,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev, hw->mac.type == ixgbe_mac_X550EM_x || hw->mac.type == ixgbe_mac_X550EM_a) && (rule->ixgbe_fdir.formatted.flow_type == - RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) && + IXGBE_ATR_FLOW_TYPE_IPV4) && (info->mask.src_port_mask != 0 || info->mask.dst_port_mask != 0)) { PMD_DRV_LOG(ERR, "By this device,"
Signature · 1 line
2.9.3
Re: [PATCH 2/2] net/ixgbe: fix a error type check for flow type
Hi Wei,
Quoted 32 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 20, 2017 11:28 AM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix a error type check for flow typeThe type check for
flow_typeshould beIXGBE_ATR_FLOW_TYPE_IPV4in special card notRTE_ETH_FLOW_NONFRAG_IPV4_OTHER.Fixes dc0c16105d2 ("ixgbe: fix X550 flow director check")Signed-off-by Wei Zhao <[email protected]>--- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/ixgbe_fdir.c +1
-2@@ -1241,7 +1241,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev, hw->mac.type == ixgbe_mac_X550EM_x || hw->mac.type == ixgbe_mac_X550EM_a) && (rule->ixgbe_fdir.formatted.flow_type == - RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) && + IXGBE_ATR_FLOW_TYPE_IPV4) && (info->mask.src_port_mask != 0 || info->mask.dst_port_mask != 0)) { PMD_DRV_LOG(ERR, "By this device," --
Quoted 1 line
2.9.3
It's a good fix. But please change the comments and error log accordingly.
Re: [PATCH 2/2] net/ixgbe: fix a error type check for flow type
Hi, Wenzhuo
Quoted 34 lines
-----Original Message-----
From: Lu, Wenzhuo
Sent: Friday, April 21, 2017 10:49 AM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: Zhao1, Wei <[email protected]>
Subject: RE: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix a error type check for flow typeHi Wei,
drivers/net/ixgbe/ixgbe_fdir.c ixgbe_fdir_filter_program(struct rte_eth_dev
Quoted 23 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 20, 2017 11:28 AM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix a error type check for flow typeThe type check for
flow_typeshould beIXGBE_ATR_FLOW_TYPE_IPV4in special card notRTE_ETH_FLOW_NONFRAG_IPV4_OTHER.Fixes dc0c16105d2 ("ixgbe: fix X550 flow director check")Signed-off-by Wei Zhao <[email protected]>--- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/net/ixgbe/ixgbe_fdir.cindex 3b9d60c..6f19b91 100644drivers/net/ixgbe/ixgbe_fdir.c +0
-0@@ -1241,7 +1241,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev*dev,
Quoted 11 lines
Quoted 10 lines
drivers/net/ixgbe/ixgbe_fdir.c +1
-2hw->mac.type == ixgbe_mac_X550EM_x || hw->mac.type == ixgbe_mac_X550EM_a) && (rule->ixgbe_fdir.formatted.flow_type == - RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) && + IXGBE_ATR_FLOW_TYPE_IPV4) && (info->mask.src_port_mask != 0 || info->mask.dst_port_mask != 0)) { PMD_DRV_LOG(ERR, "By this device," --2.9.3
It’s a good fix. But please change the comments and error log accordingly.
I will commit a new v2 for this patch as your suggestion.
Hi Wei,
Quoted 22 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 20, 2017 11:28 AM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH 1/2] net/ixgbe: remove a useless item type checkRemove a useless item type check for fdir flow rule.
Fixes 11777435c72 ("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]>--- drivers/net/ixgbe/ixgbe_flow.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)drivers/net/ixgbe/ixgbe_flow.c +0
-0@@ -2346,16 +2346,9 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
drivers/net/ixgbe/ixgbe_flow.c ixgbe_parse_fdir_filter_tunnel(const struct · line 2350
Quoted 10 lines
drivers/net/ixgbe/ixgbe_flow.c +0
-6RTE_FLOW_ERROR_TYPE_ITEM , item, "Not supported by fdir filter");return -rte_errno; - }else if (item->type !=RTE_FLOW_ITEM_TYPE_END ) { -memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_ITEM , - item,"Not supported by fdir filter" ); -return -rte_errno; }
Seems the item type only can be END. Why not remove the VLAN check either?
Quoted 9 lines
drivers/net/ixgbe/ixgbe_flow.c +1
-2+/* check if the next not void item is END */ - index++; -NEXT_ITEM_OF_PATTERN (item, pattern, index);if (item->type !=RTE_FLOW_ITEM_TYPE_END ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule ));rte_flow_error_set(error, EINVAL,
--
2.9.3
Hi, wenzhuo
Quoted 37 lines
-----Original Message-----
From: Lu, Wenzhuo
Sent: Friday, April 21, 2017 10:35 AM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: Zhao1, Wei <[email protected]>
Subject: RE: [dpdk-dev] [PATCH 1/2] net/ixgbe: remove a useless item type checkHi Wei,
Quoted 27 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 20, 2017 11:28 AM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH 1/2] net/ixgbe: remove a useless item type checkRemove a useless item type check for fdir flow rule.
Fixes 11777435c72 ("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]>--- drivers/net/ixgbe/ixgbe_flow.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)(quoted diff) +0
-0
b/drivers/net/ixgbe/ixgbe_flow.cindex 7ce740e..11d8cc9 100644drivers/net/ixgbe/ixgbe_flow.c +0
-1@@ -2346,16 +2346,9 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,RTE_FLOW_ERROR_TYPE_ITEM , item, "Not supported by fdir filter");return -rte_errno; - }else if (item->type !=RTE_FLOW_ITEM_TYPE_END ) {
Quoted 8 lines
drivers/net/ixgbe/ixgbe_flow.c ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, · line 2349
Quoted 6 lines
drivers/net/ixgbe/ixgbe_flow.c +0
-5-memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_ITEM , - item,"Not supported by fdir filter" ); -return -rte_errno; }Seems the item type only can be END. Why not remove the VLAN check either?
Ok, I will commit a new v2 for this.
Quoted 10 lines
Quoted 10 lines
drivers/net/ixgbe/ixgbe_flow.c +1
-2+/* check if the next not void item is END */ - index++; -NEXT_ITEM_OF_PATTERN (item, pattern, index);if (item->type !=RTE_FLOW_ITEM_TYPE_END ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule ));rte_flow_error_set(error, EINVAL,
--
2.9.3
PATCH v2 1/2 net/ixgbe: remove a useless item type check
In reply to Wei ZhaoRemove a useless item type check for fdir flow rule.
v2:
-delete item type check of vlan
aFixes: 11777435c72 ("net/ixgbe: parse flow director filter")
--- drivers/net/ixgbe/ixgbe_flow.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +1 -18
@@ -2305,27 +2305,10 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, rule->mask.vlan_tci_mask &=rte_cpu_to_be_16 (0xEFFF );/* More than one tags are not supported. */ -/** -* Check if the next not void item is not vlan. -*/ - index++; -NEXT_ITEM_OF_PATTERN (item, pattern, index); -if (item->type ==RTE_FLOW_ITEM_TYPE_VLAN ) { -memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_ITEM , - item,"Not supported by fdir filter" ); -return -rte_errno; - }else if (item->type !=RTE_FLOW_ITEM_TYPE_END ) { -memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_ITEM , - item,"Not supported by fdir filter" ); -return -rte_errno; - }/* check if the next not void item is END */ index++;NEXT_ITEM_OF_PATTERN (item, pattern, index); +if (item->type !=RTE_FLOW_ITEM_TYPE_END ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); rte_flow_error_set(error, EINVAL,
Signature · 1 line
2.9.3
PATCH v2 2/2 net/ixgbe: fix a error type check for flow type
The type check for flow_type should be IXGBE_ATR_FLOW_TYPE_IPV4 in special card not RTE_ETH_FLOW_NONFRAG_IPV4_OTHER.
v2:
-change the comments and error log accordingly.
--- drivers/net/ixgbe/ixgbe_fdir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_fdir.c +3 -3
@@ -1232,7 +1232,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev,/* * Sanity check for x550. -* When adding a new filter with flow type set to IPv4-other, +* When adding a new filter with flow type set to IPv4, * the flow director mask should be configed before, * and the L4 protocol and ports are masked. */
@@ -1241,11 +1241,11 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev, hw->mac.type == ixgbe_mac_X550EM_x || hw->mac.type == ixgbe_mac_X550EM_a) && (rule->ixgbe_fdir.formatted.flow_type == - RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) && + IXGBE_ATR_FLOW_TYPE_IPV4) && (info->mask.src_port_mask != 0 || info->mask.dst_port_mask != 0)) {PMD_DRV_LOG (ERR ,"By this device," -" IPv4-other is not supported without" +" IPv4 is not supported without" " L4 protocol and ports masked!" );return -ENOTSUP ; }
Signature · 1 line
2.9.3
Re: [PATCH v2 2/2] net/ixgbe: fix a error type check for flow type
Hi,
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 27, 2017 2:34 PM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix a error type check for flow typeThe type check for
flow_typeshould beIXGBE_ATR_FLOW_TYPE_IPV4in special card notRTE_ETH_FLOW_NONFRAG_IPV4_OTHER.
Quoted 6 lines
v2:
-change the comments and error log accordingly.Fixes dc0c16105d2 ("ixgbe: fix X550 flow director check")Signed-off-by Wei Zhao <[email protected]>
Hi,
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 27, 2017 2:34 PM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH v2 1/2] net/ixgbe: remove a useless item type check
Quoted 8 lines
Remove a useless item type check for fdir flow rule.
v2:
-delete item type check of vlanaFixes:
11777435c72("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]>
Quoted 13 lines · Wenzhuo
Hi,
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao
Sent: Thursday, April 27, 2017 2:34 PM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH v2 1/2] net/ixgbe: remove a useless item type checkRemove a useless item type check for fdir flow rule.
Quoted 7 lines
Quoted 6 lines
v2:
-delete item type check of vlanaFixes:
11777435c72("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]>Acked-by Wenzhuo Lu <[email protected]>
Series applied to dpdk-next-net/master, thanks.