Message ID | 20180904141000.60994-1-ubraun@linux.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Leon Romanovsky |
Headers | show |
Series | [1/1] mlx4: trigger IB events needed by SMC | expand |
On Tue, Sep 04, 2018 at 04:10:00PM +0200, Ursula Braun wrote: > The mlx4 driver does not trigger an IB_EVENT_PORT_ACTIVE when the > RoCE network interface is activated. When SMC determines the RoCE > device port to be used, it checks the port states. > This patch triggers IB events for NETDEV_UP and NETDEV_DOWN. > > Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> > --- > drivers/infiniband/hw/mlx4/main.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > Ursula, I don't see any difference between previous RFC version and my comment is not addressed either. https://www.spinics.net/lists/linux-rdma/msg67992.html Thanks
On 09/05/2018 07:35 AM, Leon Romanovsky wrote: > On Tue, Sep 04, 2018 at 04:10:00PM +0200, Ursula Braun wrote: >> The mlx4 driver does not trigger an IB_EVENT_PORT_ACTIVE when the >> RoCE network interface is activated. When SMC determines the RoCE >> device port to be used, it checks the port states. >> This patch triggers IB events for NETDEV_UP and NETDEV_DOWN. >> >> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> >> --- >> drivers/infiniband/hw/mlx4/main.c | 20 ++++++++++++++++++++ >> 1 file changed, 20 insertions(+) >> > > Ursula, > > I don't see any difference between previous RFC version and my comment > is not addressed either. > > https://www.spinics.net/lists/linux-rdma/msg67992.html There is no difference. And sorry, I forgot to answer your previous comment. I will do now. > > Thanks >
On Wed, Sep 5, 2018 at 8:51 AM Ursula Braun <ubraun@linux.ibm.com> wrote: > > > > On 09/05/2018 07:35 AM, Leon Romanovsky wrote: > > On Tue, Sep 04, 2018 at 04:10:00PM +0200, Ursula Braun wrote: > >> The mlx4 driver does not trigger an IB_EVENT_PORT_ACTIVE when the > >> RoCE network interface is activated. When SMC determines the RoCE > >> device port to be used, it checks the port states. > >> This patch triggers IB events for NETDEV_UP and NETDEV_DOWN. > >> > >> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> > >> --- > >> drivers/infiniband/hw/mlx4/main.c | 20 ++++++++++++++++++++ > >> 1 file changed, 20 insertions(+) > >> > > > > Ursula, > > > > I don't see any difference between previous RFC version and my comment > > is not addressed either. > > > > https://www.spinics.net/lists/linux-rdma/msg67992.html > > There is no difference. And sorry, I forgot to answer your previous comment. > I will do now. Should I drop this patch? Jason
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index ca0f1ee26091..8391abc5dc7a 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -2440,6 +2440,26 @@ static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev, event == NETDEV_UP || event == NETDEV_CHANGE)) update_qps_port = port; + if (dev == iboe->netdevs[port - 1] && + event == NETDEV_UP) { + struct ib_event ibev = { }; + + ibev.device = &ibdev->ib_dev; + ibev.element.port_num = port; + ibev.event = IB_EVENT_PORT_ACTIVE; + ib_dispatch_event(&ibev); + } + + if (dev == iboe->netdevs[port - 1] && + event == NETDEV_DOWN) { + struct ib_event ibev = { }; + + ibev.device = &ibdev->ib_dev; + ibev.element.port_num = port; + ibev.event = IB_EVENT_PORT_ERR; + ib_dispatch_event(&ibev); + } + } spin_unlock_bh(&iboe->lock);
The mlx4 driver does not trigger an IB_EVENT_PORT_ACTIVE when the RoCE network interface is activated. When SMC determines the RoCE device port to be used, it checks the port states. This patch triggers IB events for NETDEV_UP and NETDEV_DOWN. Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> --- drivers/infiniband/hw/mlx4/main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)