DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow
@ 2020-05-06  6:14 Shougang Wang
  2020-05-06  8:55 ` Xu, HailinX
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Shougang Wang @ 2020-05-06  6:14 UTC (permalink / raw)
  To: dev; +Cc: Beilei Xing, Qiming Yang, Shougang Wang

This patch fixes the issue that the flow which both source MAC mask
and destination MAC mask are all zeros can not be created.

Fixes: ea0c22fd8227 ("net/i40e: enable MAC address as flow director input set")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 7e64ae53a..fa6ab4fbf 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2643,7 +2643,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 					filter->input.flow.l2_flow.src =
 						eth_spec->src;
 					input_set |= (I40E_INSET_DMAC | I40E_INSET_SMAC);
-				} else {
+				} else if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+					!rte_is_zero_ether_addr(&eth_mask->dst)) {
 					rte_flow_error_set(error, EINVAL,
 						      RTE_FLOW_ERROR_TYPE_ITEM,
 						      item,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow
  2020-05-06  6:14 [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow Shougang Wang
@ 2020-05-06  8:55 ` Xu, HailinX
  2020-05-12 10:23 ` Jeff Guo
  2020-05-13  2:54 ` [dpdk-dev] [PATCH v2] " Shougang Wang
  2 siblings, 0 replies; 5+ messages in thread
From: Xu, HailinX @ 2020-05-06  8:55 UTC (permalink / raw)
  To: Wang, ShougangX, dev; +Cc: Xing, Beilei, Yang, Qiming, Wang, ShougangX

Tested-by: Xu, Hailin <hailinx.xu@intel.com>

Regards,
Xu, Hailin


-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shougang Wang
Sent: Wednesday, May 6, 2020 2:15 PM
To: dev@dpdk.org
Cc: Xing, Beilei <beilei.xing@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow

This patch fixes the issue that the flow which both source MAC mask and destination MAC mask are all zeros can not be created.

Fixes: ea0c22fd8227 ("net/i40e: enable MAC address as flow director input set")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7e64ae53a..fa6ab4fbf 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2643,7 +2643,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 					filter->input.flow.l2_flow.src =
 						eth_spec->src;
 					input_set |= (I40E_INSET_DMAC | I40E_INSET_SMAC);
-				} else {
+				} else if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+					!rte_is_zero_ether_addr(&eth_mask->dst)) {
 					rte_flow_error_set(error, EINVAL,
 						      RTE_FLOW_ERROR_TYPE_ITEM,
 						      item,
--
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow
  2020-05-06  6:14 [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow Shougang Wang
  2020-05-06  8:55 ` Xu, HailinX
@ 2020-05-12 10:23 ` Jeff Guo
  2020-05-13  2:54 ` [dpdk-dev] [PATCH v2] " Shougang Wang
  2 siblings, 0 replies; 5+ messages in thread
From: Jeff Guo @ 2020-05-12 10:23 UTC (permalink / raw)
  To: Shougang Wang, dev; +Cc: Beilei Xing, Qiming Yang

hi, shougang

On 5/6/2020 2:14 PM, Shougang Wang wrote:
> This patch fixes the issue that the flow which both source MAC mask
> and destination MAC mask are all zeros can not be created.
>
> Fixes: ea0c22fd8227 ("net/i40e: enable MAC address as flow director input set")
>
> Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
> ---
>   drivers/net/i40e/i40e_flow.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
> index 7e64ae53a..fa6ab4fbf 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -2643,7 +2643,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
>   					filter->input.flow.l2_flow.src =
>   						eth_spec->src;
>   					input_set |= (I40E_INSET_DMAC | I40E_INSET_SMAC);
> -				} else {
> +				} else if (!rte_is_zero_ether_addr(&eth_mask->src) ||
> +					!rte_is_zero_ether_addr(&eth_mask->dst)) {


Alignment should be match above parentheses? Other look good, you could 
add my Review-by next.


>   					rte_flow_error_set(error, EINVAL,
>   						      RTE_FLOW_ERROR_TYPE_ITEM,
>   						      item,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] net/i40e: fix failing to create FDIR flow
  2020-05-06  6:14 [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow Shougang Wang
  2020-05-06  8:55 ` Xu, HailinX
  2020-05-12 10:23 ` Jeff Guo
@ 2020-05-13  2:54 ` Shougang Wang
  2020-05-13  5:17   ` Ye Xiaolong
  2 siblings, 1 reply; 5+ messages in thread
From: Shougang Wang @ 2020-05-13  2:54 UTC (permalink / raw)
  To: dev; +Cc: Beilei Xing, Qiming Yang, Shougang Wang

This patch fixes the issue that the flow which both source MAC mask
and destination MAC mask are all zeros can not be created.

Fixes: ea0c22fd8227 ("net/i40e: enable MAC address as flow director input set")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
---

v2 change:
- Change code alignment format
---
 drivers/net/i40e/i40e_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 65f877866..8ce21f7b6 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2643,7 +2643,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 					filter->input.flow.l2_flow.src =
 						eth_spec->src;
 					input_set |= (I40E_INSET_DMAC | I40E_INSET_SMAC);
-				} else {
+				} else if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+					   !rte_is_zero_ether_addr(&eth_mask->dst)) {
 					rte_flow_error_set(error, EINVAL,
 						      RTE_FLOW_ERROR_TYPE_ITEM,
 						      item,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/i40e: fix failing to create FDIR flow
  2020-05-13  2:54 ` [dpdk-dev] [PATCH v2] " Shougang Wang
@ 2020-05-13  5:17   ` Ye Xiaolong
  0 siblings, 0 replies; 5+ messages in thread
From: Ye Xiaolong @ 2020-05-13  5:17 UTC (permalink / raw)
  To: Shougang Wang; +Cc: dev, Beilei Xing, Qiming Yang

On 05/13, Shougang Wang wrote:
>This patch fixes the issue that the flow which both source MAC mask
>and destination MAC mask are all zeros can not be created.
>
>Fixes: ea0c22fd8227 ("net/i40e: enable MAC address as flow director input set")
>
>Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
>Tested-by: Hailin Xu <hailinx.xu@intel.com>
>Reviewed-by: Jeff Guo <jia.guo@intel.com>
>---
>
>v2 change:
>- Change code alignment format
>---
> drivers/net/i40e/i40e_flow.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
>index 65f877866..8ce21f7b6 100644
>--- a/drivers/net/i40e/i40e_flow.c
>+++ b/drivers/net/i40e/i40e_flow.c
>@@ -2643,7 +2643,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
> 					filter->input.flow.l2_flow.src =
> 						eth_spec->src;
> 					input_set |= (I40E_INSET_DMAC | I40E_INSET_SMAC);
>-				} else {
>+				} else if (!rte_is_zero_ether_addr(&eth_mask->src) ||
>+					   !rte_is_zero_ether_addr(&eth_mask->dst)) {
> 					rte_flow_error_set(error, EINVAL,
> 						      RTE_FLOW_ERROR_TYPE_ITEM,
> 						      item,
>-- 
>2.17.1
>

Applied to dpdk-next-net-intel, Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-13  5:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06  6:14 [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow Shougang Wang
2020-05-06  8:55 ` Xu, HailinX
2020-05-12 10:23 ` Jeff Guo
2020-05-13  2:54 ` [dpdk-dev] [PATCH v2] " Shougang Wang
2020-05-13  5:17   ` Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).