net/ixgbe: remove tpid check for fdir filter
PATCH 1/1 net/ixgbe: remove tpid check for fdir filter
DPDK community has several emails discussion on this topic, these mails name is "FW: Issues with ixgbe and rte_flow", items like VLAN can already have several valid "types" (0x88a8, 0x8100, 0x9100), and who knows what will come up in the future.And ixgbe_flow just ignores the types when do filter configuration. So it may be reasonable to delete the related tpid check process.
Also add some more comment log on stack explanation.
--- drivers/net/ixgbe/ixgbe_flow.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +2 -31
@@ -1401,7 +1401,6 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr, {0xAC, 0x7B, 0xA1, {0xFF, 0xFF, 0xFF, 0x2C, 0x6D, 0x36} 0xFF, 0xFF, 0xFF} * MAC VLAN tci 0x2016 0xEFFF - * tpid 0x8100 0xFFFF *END * Other members in mask and spec should set to 0x00. * Item->last should be NULL.
@@ -1599,23 +1598,8 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr, vlan_spec = (const struct rte_flow_item_vlan *)item->spec; vlan_mask = (const struct rte_flow_item_vlan *)item->mask; -if (vlan_spec->tpid !=rte_cpu_to_be_16 (ETHER_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; - } - rule->ixgbe_fdir.formatted.vlan_id = vlan_spec->tci; -if (vlan_mask->tpid != (uint16_t )~0U ) { -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; - } rule->mask.vlan_tci_mask = vlan_mask->tci; rule->mask.vlan_tci_mask &=rte_cpu_to_be_16 (0xEFFF );/* More than one tags are not supported. */
@@ -1910,6 +1894,7 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,* IPV4/IPV6 NULL NULL * UDP NULL NULL * VxLAN vni{0x00, 0x32, 0x54} {0xFF, 0xFF, 0xFF} +* MAC VLAN tci 0x2016 0xEFFF * END * NEGRV pattern example: * ITEM Spec Mask
@@ -1917,6 +1902,7 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,* IPV4/IPV6 NULL NULL * NVGRE protocol 0x6558 0xFFFF * tni{0x00, 0x32, 0x54} {0xFF, 0xFF, 0xFF} +* MAC VLAN tci 0x2016 0xEFFF * END * other members in mask and spec should set to 0x00. * item->last should be NULL.
@@ -2343,23 +2329,8 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, vlan_spec = (const struct rte_flow_item_vlan *)item->spec; vlan_mask = (const struct rte_flow_item_vlan *)item->mask; -if (vlan_spec->tpid !=rte_cpu_to_be_16 (ETHER_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; - } - rule->ixgbe_fdir.formatted.vlan_id = vlan_spec->tci; -if (vlan_mask->tpid != (uint16_t )~0U ) { -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; - } rule->mask.vlan_tci_mask = vlan_mask->tci; rule->mask.vlan_tci_mask &=rte_cpu_to_be_16 (0xEFFF );/* More than one tags are not supported. */
Signature · 1 line
2.9.3
Quoted 2 lines · Wei Zhao
DPDK community has several emails discussion on this topic, these mails name is "FW: Issues with ixgbe and
rte_flow",
Can you please add reference to discussions by mail list archive links.
Like: http://dpdk.org/ml/archives/dev/2017-April/063942.html
Quoted 10 lines
items like VLAN can already have several valid "types" (
0x88a8,0x8100,0x9100), and who knows what will come up in the future.Andixgbe_flowjust ignores the types when do filter configuration. So it may be reasonable to delete the related tpid check process.
Also add some more comment log on stack explanation.Fixes 11777435c72 ("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]>
<...>
Hi, Ferruh
Quoted 6 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Thursday, April 13, 2017 6:21 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: remove tpid check for fdir filter
Quoted 7 lines
Quoted 2 lines · Wei Zhao
DPDK community has several emails discussion on this topic, these mails name is "FW: Issues with ixgbe and
rte_flow",Can you please add reference to discussions by mail list archive links.
Like: http://dpdk.org/ml/archives/dev/2017-April/063942.html
I have got it, I will fix that in v2
Quoted 12 lines
Quoted 10 lines
items like VLAN can already have several valid "types" (
0x88a8,0x8100,0x9100), and who knows what will come up in the future.Andixgbe_flowjust ignores the types when do filter configuration. So it may be reasonable to delete the related tpid check process.
Also add some more comment log on stack explanation.Fixes 11777435c72 ("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]><...>
PATCH v2 1/1 net/ixgbe: remove tpid check for fdir filter
In reply to Wei ZhaoDPDK community has several emails discussion on this topic, these mails link is bellow:
http://dpdk.org/ml/archives/dev/2017-March/060379.html,
http://dpdk.org/ml/archives/dev/2017-March/060295.html,
items like VLAN can already have several valid "types" (0x88a8, 0x8100, 0x9100), and who knows what will come up in the future.And ixgbe_flow just ignores the types when do filter configuration. So it may be reasonable to delete the related tpid check process.
Also add some more comment log on stack explanation.
v2:
-add dpdk community mail link for this topic.
--- drivers/net/ixgbe/ixgbe_flow.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)
drivers/net/ixgbe/ixgbe_flow.c +2 -31
@@ -1401,7 +1401,6 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr, {0xAC, 0x7B, 0xA1, {0xFF, 0xFF, 0xFF, 0x2C, 0x6D, 0x36} 0xFF, 0xFF, 0xFF} * MAC VLAN tci 0x2016 0xEFFF - * tpid 0x8100 0xFFFF *END * Other members in mask and spec should set to 0x00. * Item->last should be NULL.
@@ -1599,23 +1598,8 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr, vlan_spec = (const struct rte_flow_item_vlan *)item->spec; vlan_mask = (const struct rte_flow_item_vlan *)item->mask; -if (vlan_spec->tpid !=rte_cpu_to_be_16 (ETHER_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; - } - rule->ixgbe_fdir.formatted.vlan_id = vlan_spec->tci; -if (vlan_mask->tpid != (uint16_t )~0U ) { -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; - } rule->mask.vlan_tci_mask = vlan_mask->tci; rule->mask.vlan_tci_mask &=rte_cpu_to_be_16 (0xEFFF );/* More than one tags are not supported. */
@@ -1910,6 +1894,7 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,* IPV4/IPV6 NULL NULL * UDP NULL NULL * VxLAN vni{0x00, 0x32, 0x54} {0xFF, 0xFF, 0xFF} +* MAC VLAN tci 0x2016 0xEFFF * END * NEGRV pattern example: * ITEM Spec Mask
@@ -1917,6 +1902,7 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,* IPV4/IPV6 NULL NULL * NVGRE protocol 0x6558 0xFFFF * tni{0x00, 0x32, 0x54} {0xFF, 0xFF, 0xFF} +* MAC VLAN tci 0x2016 0xEFFF * END * other members in mask and spec should set to 0x00. * item->last should be NULL.
@@ -2343,23 +2329,8 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, vlan_spec = (const struct rte_flow_item_vlan *)item->spec; vlan_mask = (const struct rte_flow_item_vlan *)item->mask; -if (vlan_spec->tpid !=rte_cpu_to_be_16 (ETHER_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; - } - rule->ixgbe_fdir.formatted.vlan_id = vlan_spec->tci; -if (vlan_mask->tpid != (uint16_t )~0U ) { -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; - } rule->mask.vlan_tci_mask = vlan_mask->tci; rule->mask.vlan_tci_mask &=rte_cpu_to_be_16 (0xEFFF );/* More than one tags are not supported. */
Signature · 1 line
2.9.3
Ferruh Yigit
AppliedQuoted 11 lines · Wei Zhao
DPDK community has several emails discussion on this topic, these mails link is bellow:
http://dpdk.org/ml/archives/dev/2017-March/060379.html,
http://dpdk.org/ml/archives/dev/2017-March/060295.html,
items like VLAN can already have several valid "types" (0x88a8,0x8100,0x9100), and who knows what will come up in the future.Andixgbe_flowjust ignores the types when do filter configuration. So it may be reasonable to delete the related tpid check process.
Also add some more comment log on stack explanation.
Quoted 6 lines
v2:
-add dpdk community mail link for this topic.Fixes 11777435c72 ("net/ixgbe: parse flow director filter")Signed-off-by Wei Zhao <[email protected]>
Applied to dpdk-next-net/master, thanks.