[PATCH rdma-next] IB/ipoib: Fix wqe initialized param on ipoib set mode to connected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shalom Lagziel <shaloml@xxxxxxxxxxxx>

In IPoIB connected mode the WQE opcode can be IB_WR_SEND only (stateless
offloads are supported only in datagram mode), but it wasn't initialized.
It leads to unpredictable CQE errors which were triggered by
ipoib_cm_send() flow.

In order to fix it, we initialize the wqe opcode in the set mode function
to be IB_WR_SEND.

Reviewed-by: Erez Shitrit <erezsh@xxxxxxxxxxxx>
Signed-off-by: Shalom Lagziel <shaloml@xxxxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 161ba8c76285..8f4ac2765012 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -539,6 +539,7 @@ int ipoib_set_mode(struct net_device *dev, const char *buf)
 		dev_set_mtu(dev, ipoib_cm_max_mtu(dev));
 		rtnl_unlock();
 		priv->tx_wr.wr.send_flags &= ~IB_SEND_IP_CSUM;
+		priv->tx_wr.wr.opcode = IB_WR_SEND;
 
 		ipoib_flush_paths(dev);
 		return (!rtnl_trylock()) ? -EBUSY : 0;
-- 
2.16.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux