diff mbox series

RDMA/ipoib: implement ethtool .get_link() callback

Message ID 20190529135545.25371-1-kamalheib1@gmail.com (mailing list archive)
State Mainlined
Commit 633fbb06cbb34cb37117a298c4316ad9d54a7a63
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/ipoib: implement ethtool .get_link() callback | expand

Commit Message

Kamal Heib May 29, 2019, 1:55 p.m. UTC
Add support for reporting link state for ipoib net devices.

$ ip l set dev mlx4_ib0 up
$ ethtool mlx4_ib0 | grep Link
	Link detected: yes
$ ip l set dev mlx4_ib0 down
$ ethtool mlx4_ib0 | grep Link
	Link detected: no

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Leon Romanovsky June 7, 2019, 12:13 p.m. UTC | #1
On Wed, May 29, 2019 at 04:55:45PM +0300, Kamal Heib wrote:
> Add support for reporting link state for ipoib net devices.
>
> $ ip l set dev mlx4_ib0 up
> $ ethtool mlx4_ib0 | grep Link
> 	Link detected: yes
> $ ip l set dev mlx4_ib0 down
> $ ethtool mlx4_ib0 | grep Link
> 	Link detected: no
>
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 1 +
>  1 file changed, 1 insertion(+)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Jason Gunthorpe June 7, 2019, 4:53 p.m. UTC | #2
On Wed, May 29, 2019 at 04:55:45PM +0300, Kamal Heib wrote:
> Add support for reporting link state for ipoib net devices.
> 
> $ ip l set dev mlx4_ib0 up
> $ ethtool mlx4_ib0 | grep Link
> 	Link detected: yes
> $ ip l set dev mlx4_ib0 down
> $ ethtool mlx4_ib0 | grep Link
> 	Link detected: no
> 
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index 83429925dfc6..58016532bf86 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -222,6 +222,7 @@  static const struct ethtool_ops ipoib_ethtool_ops = {
 	.get_strings		= ipoib_get_strings,
 	.get_ethtool_stats	= ipoib_get_ethtool_stats,
 	.get_sset_count		= ipoib_get_sset_count,
+	.get_link		= ethtool_op_get_link,
 };
 
 void ipoib_set_ethtool_ops(struct net_device *dev)