summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qedr/main.c
diff options
context:
space:
mode:
authorMichal Kalderon <michal.kalderon@marvell.com>2020-09-02 19:57:39 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-09-11 10:24:55 -0300
commitcc293f5420e5726bdf2bb0fcb165c73e007e426e (patch)
tree81f9253ba6c5522427fe6e044d99fcd3aed50b13 /drivers/infiniband/hw/qedr/main.c
parent97fb3e33474897c35b7cfe6ff0e16a3e172d9249 (diff)
downloadlinux-cc293f5420e5726bdf2bb0fcb165c73e007e426e.tar.bz2
RDMA/qedr: Fix iWARP active mtu display
Currently iWARP does not support mtu-change. Notify user when MTU changes that reload of qedr is required for mtu to change. Display the correct active mtu. Fixes: f5b1b1775be6 ("RDMA/qedr: Add iWARP support in existing verbs") Link: https://lore.kernel.org/r/20200902165741.8355-7-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr/main.c')
-rw-r--r--drivers/infiniband/hw/qedr/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index 8e1365951fb6..1f32e8b8cc11 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -1026,6 +1026,13 @@ static void qedr_notify(struct qedr_dev *dev, enum qede_rdma_event event)
case QEDE_CHANGE_ADDR:
qedr_mac_address_change(dev);
break;
+ case QEDE_CHANGE_MTU:
+ if (rdma_protocol_iwarp(&dev->ibdev, 1))
+ if (dev->ndev->mtu != dev->iwarp_max_mtu)
+ DP_NOTICE(dev,
+ "Mtu was changed from %d to %d. This will not take affect for iWARP until qedr is reloaded\n",
+ dev->iwarp_max_mtu, dev->ndev->mtu);
+ break;
default:
pr_err("Event not supported\n");
}