Skip to content

Commit ac0cbfb

Browse files
Jack Morgensteingregkh
authored andcommitted
net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
commit 7c3945bc2073554bb2ecf983e073dee686679c53 upstream. Save the qp context flags byte containing the flag disabling vlan stripping in the RESET to INIT qp transition, rather than in the INIT to RTR transition. Per the firmware spec, the flags in this byte are active in the RESET to INIT transition. As a result of saving the flags in the incorrect qp transition, when switching dynamically from VGT to VST and back to VGT, the vlan remained stripped (as is required for VST) and did not return to not-stripped (as is required for VGT). Fixes: f0f829b ("net/mlx4_core: Add immediate activate for VGT->VST->VGT") Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 710f793 commit ac0cbfb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,6 +2955,9 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,
29552955
put_res(dev, slave, srqn, RES_SRQ);
29562956
qp->srq = srq;
29572957
}
2958+
2959+
/* Save param3 for dynamic changes from VST back to VGT */
2960+
qp->param3 = qpc->param3;
29582961
put_res(dev, slave, rcqn, RES_CQ);
29592962
put_res(dev, slave, mtt_base, RES_MTT);
29602963
res_end_move(dev, slave, RES_QP, qpn);
@@ -3747,7 +3750,6 @@ int mlx4_INIT2RTR_QP_wrapper(struct mlx4_dev *dev, int slave,
37473750
int qpn = vhcr->in_modifier & 0x7fffff;
37483751
struct res_qp *qp;
37493752
u8 orig_sched_queue;
3750-
__be32 orig_param3 = qpc->param3;
37513753
u8 orig_vlan_control = qpc->pri_path.vlan_control;
37523754
u8 orig_fvl_rx = qpc->pri_path.fvl_rx;
37533755
u8 orig_pri_path_fl = qpc->pri_path.fl;
@@ -3789,7 +3791,6 @@ int mlx4_INIT2RTR_QP_wrapper(struct mlx4_dev *dev, int slave,
37893791
*/
37903792
if (!err) {
37913793
qp->sched_queue = orig_sched_queue;
3792-
qp->param3 = orig_param3;
37933794
qp->vlan_control = orig_vlan_control;
37943795
qp->fvl_rx = orig_fvl_rx;
37953796
qp->pri_path_fl = orig_pri_path_fl;

0 commit comments

Comments
 (0)