Message ID | 1551184112-40686-1-git-send-email-xiangxia.m.yue@gmail.com |
---|---|
State | Awaiting Upstream |
Delegated to: | David Miller |
Headers | show |
Series | [net,v1] net/mlx5e: Correctly use the namespace type when allocating pedit action | expand |
On 26/02/2019 14:28, xiangxia.m.yue@gmail.com wrote: > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > The capacity of FDB offloading and NIC offloading table are > different, and when allocating the pedit actions, we should > use the correct namespace type. > > Fixes: c500c86b0c75d ("net/mlx5e: support for two independent packet edit actions") > Cc: Pablo Neira Ayuso <pablo@netfilter.org> > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> > --- > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > index 3a02b22..467ef9e 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > @@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, > > if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits || > hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) { > - err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL, > + err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB, > parse_attr, hdrs, extack); > if (err) > return err; > Reviewed-by: Roi Dayan <roid@mellanox.com>
On Wed, Feb 27, 2019 at 02:05:02PM +0000, Roi Dayan wrote: > > > On 26/02/2019 14:28, xiangxia.m.yue@gmail.com wrote: > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > > The capacity of FDB offloading and NIC offloading table are > > different, and when allocating the pedit actions, we should > > use the correct namespace type. > > > > Fixes: c500c86b0c75d ("net/mlx5e: support for two independent packet edit actions") > > Cc: Pablo Neira Ayuso <pablo@netfilter.org> > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > --- > > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > index 3a02b22..467ef9e 100644 > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > @@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, > > > > if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits || > > hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) { > > - err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL, > > + err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB, > > parse_attr, hdrs, extack); > > if (err) > > return err; > > > > Reviewed-by: Roi Dayan <roid@mellanox.com> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
On Wed, 2019-02-27 at 21:02 +0100, Pablo Neira Ayuso wrote: > On Wed, Feb 27, 2019 at 02:05:02PM +0000, Roi Dayan wrote: > > > > On 26/02/2019 14:28, xiangxia.m.yue@gmail.com wrote: > > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > > > > The capacity of FDB offloading and NIC offloading table are > > > different, and when allocating the pedit actions, we should > > > use the correct namespace type. > > > > > > Fixes: c500c86b0c75d ("net/mlx5e: support for two independent > > > packet edit actions") > > > Cc: Pablo Neira Ayuso <pablo@netfilter.org> > > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > --- > > > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > index 3a02b22..467ef9e 100644 > > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > @@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct > > > mlx5e_priv *priv, > > > > > > if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits || > > > hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) { > > > - err = alloc_tc_pedit_action(priv, > > > MLX5_FLOW_NAMESPACE_KERNEL, > > > + err = alloc_tc_pedit_action(priv, > > > MLX5_FLOW_NAMESPACE_FDB, > > > parse_attr, hdrs, extack); > > > if (err) > > > return err; > > > > > > > Reviewed-by: Roi Dayan <roid@mellanox.com> > > Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Dave, can you please apply this directly to net-next ? Thanks, Saeed.
On Sat, Mar 2, 2019 at 3:43 AM Saeed Mahameed <saeedm@mellanox.com> wrote: > > On Wed, 2019-02-27 at 21:02 +0100, Pablo Neira Ayuso wrote: > > On Wed, Feb 27, 2019 at 02:05:02PM +0000, Roi Dayan wrote: > > > > > > On 26/02/2019 14:28, xiangxia.m.yue@gmail.com wrote: > > > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > > > > > > The capacity of FDB offloading and NIC offloading table are > > > > different, and when allocating the pedit actions, we should > > > > use the correct namespace type. > > > > > > > > Fixes: c500c86b0c75d ("net/mlx5e: support for two independent > > > > packet edit actions") > > > > Cc: Pablo Neira Ayuso <pablo@netfilter.org> > > > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > > --- > > > > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > > b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > > index 3a02b22..467ef9e 100644 > > > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > > > > @@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct > > > > mlx5e_priv *priv, > > > > > > > > if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits || > > > > hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) { > > > > - err = alloc_tc_pedit_action(priv, > > > > MLX5_FLOW_NAMESPACE_KERNEL, > > > > + err = alloc_tc_pedit_action(priv, > > > > MLX5_FLOW_NAMESPACE_FDB, > > > > parse_attr, hdrs, extack); > > > > if (err) > > > > return err; > > > > > > > > > > Reviewed-by: Roi Dayan <roid@mellanox.com> > > > > Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> > > Acked-by: Saeed Mahameed <saeedm@mellanox.com> > > Dave, can you please apply this directly to net-next ? will be applied to net-next, or net ? this patch is a bugfix. > Thanks, > Saeed.
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 3a02b22..467ef9e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits || hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) { - err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL, + err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB, parse_attr, hdrs, extack); if (err) return err;