* Patch "net/mlx4_core: Fix wrong index in propagating port change event to VFs" has been added to the 3.14-stable tree
@ 2015-09-26 19:21 gregkh
2015-09-28 13:13 ` Luis Henriques
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2015-09-26 19:21 UTC (permalink / raw)
To: jackm, davem, gregkh, matanb, ogerlitz; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
net/mlx4_core: Fix wrong index in propagating port change event to VFs
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Sat Sep 26 11:19:08 PDT 2015
From: Jack Morgenstein <jackm@dev.mellanox.co.il>
Date: Wed, 22 Jul 2015 16:53:47 +0300
Subject: net/mlx4_core: Fix wrong index in propagating port change event to VFs
From: Jack Morgenstein <jackm@dev.mellanox.co.il>
[ Upstream commit 1c1bf34951e8d17941bf708d1901c47e81b15d55 ]
The port-change event processing in procedure mlx4_eq_int() uses "slave"
as the vf_oper array index. Since the value of "slave" is the PF function
index, the result is that the PF link state is used for deciding to
propagate the event for all the VFs. The VF link state should be used,
so the VF function index should be used here.
Fixes: 948e306d7d64 ('net/mlx4: Add VF link state support')
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -557,7 +557,7 @@ static int mlx4_eq_int(struct mlx4_dev *
mlx4_dbg(dev, "%s: Sending MLX4_PORT_CHANGE_SUBTYPE_DOWN"
" to slave: %d, port:%d\n",
__func__, i, port);
- s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
+ s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state)
mlx4_slave_event(dev, i, eqe);
} else { /* IB port */
@@ -583,7 +583,7 @@ static int mlx4_eq_int(struct mlx4_dev *
for (i = 0; i < dev->num_slaves; i++) {
if (i == mlx4_master_func_num(dev))
continue;
- s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
+ s_info = &priv->mfunc.master.vf_oper[slave].vport[i].state;
if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state)
mlx4_slave_event(dev, i, eqe);
}
Patches currently in stable-queue which might be from jackm@dev.mellanox.co.il are
queue-3.14/net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch
queue-3.14/ib-mlx4-forbid-using-sysfs-to-change-roce-pkeys.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch "net/mlx4_core: Fix wrong index in propagating port change event to VFs" has been added to the 3.14-stable tree
2015-09-26 19:21 Patch "net/mlx4_core: Fix wrong index in propagating port change event to VFs" has been added to the 3.14-stable tree gregkh
@ 2015-09-28 13:13 ` Luis Henriques
2015-09-28 14:04 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Luis Henriques @ 2015-09-28 13:13 UTC (permalink / raw)
To: gregkh; +Cc: jackm, davem, matanb, ogerlitz, stable, stable-commits
On Sat, Sep 26, 2015 at 12:21:27PM -0700, Greg Kroah-Hartman wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> net/mlx4_core: Fix wrong index in propagating port change event to VFs
>
> to the 3.14-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
> net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch
> and it can be found in the queue-3.14 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
>
>
> From foo@baz Sat Sep 26 11:19:08 PDT 2015
> From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> Date: Wed, 22 Jul 2015 16:53:47 +0300
> Subject: net/mlx4_core: Fix wrong index in propagating port change event to VFs
>
> From: Jack Morgenstein <jackm@dev.mellanox.co.il>
>
> [ Upstream commit 1c1bf34951e8d17941bf708d1901c47e81b15d55 ]
>
> The port-change event processing in procedure mlx4_eq_int() uses "slave"
> as the vf_oper array index. Since the value of "slave" is the PF function
> index, the result is that the PF link state is used for deciding to
> propagate the event for all the VFs. The VF link state should be used,
> so the VF function index should be used here.
>
> Fixes: 948e306d7d64 ('net/mlx4: Add VF link state support')
> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> Signed-off-by: Matan Barak <matanb@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- a/drivers/net/ethernet/mellanox/mlx4/eq.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
> @@ -557,7 +557,7 @@ static int mlx4_eq_int(struct mlx4_dev *
> mlx4_dbg(dev, "%s: Sending MLX4_PORT_CHANGE_SUBTYPE_DOWN"
> " to slave: %d, port:%d\n",
> __func__, i, port);
> - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
> + s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
> if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state)
> mlx4_slave_event(dev, i, eqe);
> } else { /* IB port */
> @@ -583,7 +583,7 @@ static int mlx4_eq_int(struct mlx4_dev *
> for (i = 0; i < dev->num_slaves; i++) {
> if (i == mlx4_master_func_num(dev))
> continue;
> - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
> + s_info = &priv->mfunc.master.vf_oper[slave].vport[i].state;
As I said previously, this is incorrect; it should be:
- s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
+ s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
The 'slave' index should be changed by 'i', not 'port'.
Cheers,
--
Lu�s
> if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state)
> mlx4_slave_event(dev, i, eqe);
> }
>
>
> Patches currently in stable-queue which might be from jackm@dev.mellanox.co.il are
>
> queue-3.14/net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch
> queue-3.14/ib-mlx4-forbid-using-sysfs-to-change-roce-pkeys.patch
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch "net/mlx4_core: Fix wrong index in propagating port change event to VFs" has been added to the 3.14-stable tree
2015-09-28 13:13 ` Luis Henriques
@ 2015-09-28 14:04 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-09-28 14:04 UTC (permalink / raw)
To: Luis Henriques; +Cc: jackm, davem, matanb, ogerlitz, stable, stable-commits
On Mon, Sep 28, 2015 at 02:13:50PM +0100, Luis Henriques wrote:
> On Sat, Sep 26, 2015 at 12:21:27PM -0700, Greg Kroah-Hartman wrote:
> >
> > This is a note to let you know that I've just added the patch titled
> >
> > net/mlx4_core: Fix wrong index in propagating port change event to VFs
> >
> > to the 3.14-stable tree which can be found at:
> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >
> > The filename of the patch is:
> > net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch
> > and it can be found in the queue-3.14 subdirectory.
> >
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
> >
> >
> > From foo@baz Sat Sep 26 11:19:08 PDT 2015
> > From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> > Date: Wed, 22 Jul 2015 16:53:47 +0300
> > Subject: net/mlx4_core: Fix wrong index in propagating port change event to VFs
> >
> > From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> >
> > [ Upstream commit 1c1bf34951e8d17941bf708d1901c47e81b15d55 ]
> >
> > The port-change event processing in procedure mlx4_eq_int() uses "slave"
> > as the vf_oper array index. Since the value of "slave" is the PF function
> > index, the result is that the PF link state is used for deciding to
> > propagate the event for all the VFs. The VF link state should be used,
> > so the VF function index should be used here.
> >
> > Fixes: 948e306d7d64 ('net/mlx4: Add VF link state support')
> > Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> > Signed-off-by: Matan Barak <matanb@mellanox.com>
> > Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> > Signed-off-by: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> > drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > --- a/drivers/net/ethernet/mellanox/mlx4/eq.c
> > +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
> > @@ -557,7 +557,7 @@ static int mlx4_eq_int(struct mlx4_dev *
> > mlx4_dbg(dev, "%s: Sending MLX4_PORT_CHANGE_SUBTYPE_DOWN"
> > " to slave: %d, port:%d\n",
> > __func__, i, port);
> > - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
> > + s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
> > if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state)
> > mlx4_slave_event(dev, i, eqe);
> > } else { /* IB port */
> > @@ -583,7 +583,7 @@ static int mlx4_eq_int(struct mlx4_dev *
> > for (i = 0; i < dev->num_slaves; i++) {
> > if (i == mlx4_master_func_num(dev))
> > continue;
> > - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
> > + s_info = &priv->mfunc.master.vf_oper[slave].vport[i].state;
>
> As I said previously, this is incorrect; it should be:
>
> - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
> + s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
>
> The 'slave' index should be changed by 'i', not 'port'.
Thanks, that fix was still in my todo pile, now done.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-28 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-26 19:21 Patch "net/mlx4_core: Fix wrong index in propagating port change event to VFs" has been added to the 3.14-stable tree gregkh
2015-09-28 13:13 ` Luis Henriques
2015-09-28 14:04 ` Greg KH
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).