[v2] net/mlx4: fix default flow rule create

Message ID 1551001269-62890-1-git-send-email-dekelp@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers
Series [v2] net/mlx4: fix default flow rule create |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Dekel Peled Feb. 24, 2019, 9:41 a.m. UTC
  Original patch changed logic of function mlx4_flow_merge_eth().
The setting of flow->promisc was wrongly removed.
This patch adds the removed setting of flow->promisc, to restore
the required behavior.

Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN")
Cc: stable@dpdk.org

---
v2: Correct typo in 'stable' email address.
---

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx4/mlx4_flow.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Yongseok Koh Feb. 27, 2019, 2:56 a.m. UTC | #1
> On Feb 24, 2019, at 1:41 AM, Dekel Peled <dekelp@mellanox.com> wrote:
> 
> Original patch changed logic of function mlx4_flow_merge_eth().
> The setting of flow->promisc was wrongly removed.
> This patch adds the removed setting of flow->promisc, to restore
> the required behavior.
> 
> Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN")
> Cc: stable@dpdk.org
> 
> ---
> v2: Correct typo in 'stable' email address.
> ---
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---

Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks

> drivers/net/mlx4/mlx4_flow.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
> index 3abde30..b7af324 100644
> --- a/drivers/net/mlx4/mlx4_flow.c
> +++ b/drivers/net/mlx4/mlx4_flow.c
> @@ -250,6 +250,7 @@ struct mlx4_drop {
> 	if (!mask) {
> 		eth->val.dst_mac[0] = 0xff;
> 		flow->ibv_attr->type = IBV_FLOW_ATTR_ALL_DEFAULT;
> +		flow->promisc = 1;
> 		return 0;
> 	}
> 	memcpy(eth->val.dst_mac, spec->dst.addr_bytes, ETHER_ADDR_LEN);
> -- 
> 1.8.3.1
>
  
Shahaf Shuler March 7, 2019, 8:35 a.m. UTC | #2
Wednesday, February 27, 2019 4:57 AM, Yongseok Koh:
> Subject: Re: [PATCH v2] net/mlx4: fix default flow rule create
> 
> 
> > On Feb 24, 2019, at 1:41 AM, Dekel Peled <dekelp@mellanox.com> wrote:
> >
> > Original patch changed logic of function mlx4_flow_merge_eth().
> > The setting of flow->promisc was wrongly removed.
> > This patch adds the removed setting of flow->promisc, to restore the
> > required behavior.
> >
> > Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with
> > VLAN")
> > Cc: stable@dpdk.org
> >
> > ---
> > v2: Correct typo in 'stable' email address.
> > ---
> >
> > Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> > ---
> 
> Acked-by: Yongseok Koh <yskoh@mellanox.com>

Applied to next-net-mlx, thanks.
  

Patch

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 3abde30..b7af324 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -250,6 +250,7 @@  struct mlx4_drop {
 	if (!mask) {
 		eth->val.dst_mac[0] = 0xff;
 		flow->ibv_attr->type = IBV_FLOW_ATTR_ALL_DEFAULT;
+		flow->promisc = 1;
 		return 0;
 	}
 	memcpy(eth->val.dst_mac, spec->dst.addr_bytes, ETHER_ADDR_LEN);