{cxgb3, cxgb4, i40iw} Report phys_state
Subsystems (2)
cover {cxgb3, cxgb4, i40iw} Report phys_state
This series includes three patches that add the support for reporting physical state for the cxgb3, cxgb4, and i40iw drivers via sysfs.
Kamal Heib (3):
RDMA/cxgb3: Report phys_state in query_port
RDMA/cxgb4: Report phys_state in query_port
RDMA/i40iw: Report phys_state in query_port
drivers/infiniband/hw/cxgb3/iwch_provider.c | 16 +++++++++++----- drivers/infiniband/hw/cxgb4/provider.c | 16 +++++++++++----- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 3 files changed, 27 insertions(+), 12 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/3 RDMA/cxgb3: Report phys_state in query_port
Add support for reporting physical state when calling query_port() via the sysfs interface.
--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/infiniband/hw/cxgb3/iwch_provider.c +11 -5
@@ -1004,18 +1004,24 @@ static int iwch_query_port(struct ib_device *ibdev, props->max_mtu =IB_MTU_4096 ; props->active_mtu =ib_mtu_int_to_enum (netdev->mtu); -if (!netif_carrier_ok (netdev)) +if (!netif_carrier_ok (netdev)) { props->state =IB_PORT_DOWN ; -else { + props->phys_state =3 ; + }else { inetdev =in_dev_get (netdev);if (inetdev) { -if (inetdev->ifa_list) +if (inetdev->ifa_list) { props->state =IB_PORT_ACTIVE ; -else + props->phys_state =5 ; + }else { props->state =IB_PORT_INIT ; + props->phys_state =4 ; + }in_dev_put (inetdev); - }else + }else { props->state =IB_PORT_INIT ; + props->phys_state =4 ; + } } props->port_cap_flags =
Signature · 1 line
2.20.1
PATCH 2/3 RDMA/cxgb4: Report phys_state in query_port
In reply to Kamal HeibAdd support for reporting physical state when calling query_port() via the sysfs interface.
--- drivers/infiniband/hw/cxgb4/provider.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/infiniband/hw/cxgb4/provider.c +11 -5
@@ -317,18 +317,24 @@ static int c4iw_query_port(struct ib_device *ibdev, u8 port, props->max_mtu =IB_MTU_4096 ; props->active_mtu =ib_mtu_int_to_enum (netdev->mtu); -if (!netif_carrier_ok (netdev)) +if (!netif_carrier_ok (netdev)) { props->state =IB_PORT_DOWN ; -else { + props->phys_state =3 ; + }else { inetdev =in_dev_get (netdev);if (inetdev) { -if (inetdev->ifa_list) +if (inetdev->ifa_list) { props->state =IB_PORT_ACTIVE ; -else + props->phys_state =5 ; + }else { props->state =IB_PORT_INIT ; + props->phys_state =4 ; + }in_dev_put (inetdev); - }else + }else { props->state =IB_PORT_INIT ; + props->phys_state =4 ; + } } props->port_cap_flags =
Signature · 1 line
2.20.1
PATCH 3/3 RDMA/i40iw: Report phys_state in query_port
In reply to Kamal HeibAdd support for reporting physical state when calling query_port() via the sysfs interface.
--- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_verbs.c +5 -2
@@ -105,10 +105,13 @@ static int i40iw_query_port(struct ib_device *ibdev, props->active_mtu =ib_mtu_int_to_enum (netdev->mtu); props->lid =1 ; -if (netif_carrier_ok (iwdev->netdev)) +if (netif_carrier_ok (iwdev->netdev)) { props->state =IB_PORT_ACTIVE ; -else + props->phys_state =5 ; + }else { props->state =IB_PORT_DOWN ; + props->phys_state =3 ; + } props->port_cap_flags =IB_PORT_CM_SUP |IB_PORT_REINIT_SUP |IB_PORT_VENDOR_CLASS_SUP |IB_PORT_BOOT_MGMT_SUP ; props->gid_tbl_len =1 ;
Signature · 1 line
2.20.1
Quoted 8 lines · Kamal Heib
This series includes three patches that add the support for reporting physical state for the cxgb3, cxgb4, and i40iw drivers via sysfs.
Kamal Heib (3):
RDMA/cxgb3: Reportphys_stateinquery_port
RDMA/cxgb4: Reportphys_stateinquery_port
RDMA/i40iw: Reportphys_stateinquery_port
Quoted 4 lines
drivers/infiniband/hw/cxgb3/iwch_provider.c | 16 +++++++++++----- drivers/infiniband/hw/cxgb4/provider.c | 16 +++++++++++----- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 3 files changed, 27 insertions(+), 12 deletions(-)
Lets not have this generic iwapr code open coded please.
The core code already knows what the netdev is for the iWarp device.
Jason
Quoted 14 lines · Jason Gunthorpe
Quoted 8 lines · Kamal Heib
This series includes three patches that add the support for reporting physical state for the cxgb3, cxgb4, and i40iw drivers via sysfs.
Kamal Heib (3):
RDMA/cxgb3: Reportphys_stateinquery_port
RDMA/cxgb4: Reportphys_stateinquery_port
RDMA/i40iw: Reportphys_stateinquery_portQuoted 4 lines
drivers/infiniband/hw/cxgb3/iwch_provider.c | 16 +++++++++++----- drivers/infiniband/hw/cxgb4/provider.c | 16 +++++++++++----- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 3 files changed, 27 insertions(+), 12 deletions(-)
Quoted 5 lines
Lets not have this generic iwapr code open coded please.
The core code already knows what the netdev is for the iWarp device.
Jason
I'm not sure if I truly understand what you are trying to say here.
Could you please add more info?
Thanks,
Kamal
Quoted 17 lines · Kamal Heib
Quoted 16 lines · Jason Gunthorpe
Quoted 8 lines · Kamal Heib
This series includes three patches that add the support for reporting physical state for the cxgb3, cxgb4, and i40iw drivers via sysfs.
Kamal Heib (3):
RDMA/cxgb3: Reportphys_stateinquery_port
RDMA/cxgb4: Reportphys_stateinquery_port
RDMA/i40iw: Reportphys_stateinquery_portQuoted 4 lines
drivers/infiniband/hw/cxgb3/iwch_provider.c | 16 +++++++++++----- drivers/infiniband/hw/cxgb4/provider.c | 16 +++++++++++----- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 3 files changed, 27 insertions(+), 12 deletions(-)Lets not have this generic iwapr code open coded please.
Quoted 7 lines
Quoted 3 lines
The core code already knows what the netdev is for the iWarp device.
Jason
I'm not sure if I truly understand what you are trying to say here.
Could you please add more info?
Implement this in the core code if the port type is iwarp
Jason
Quoted 20 lines · Jason Gunthorpe
Quoted 19 lines · Kamal Heib
Quoted 18 lines · Jason Gunthorpe
Quoted 8 lines · Kamal Heib
This series includes three patches that add the support for reporting physical state for the cxgb3, cxgb4, and i40iw drivers via sysfs.
Kamal Heib (3):
RDMA/cxgb3: Reportphys_stateinquery_port
RDMA/cxgb4: Reportphys_stateinquery_port
RDMA/i40iw: Reportphys_stateinquery_portQuoted 4 lines
drivers/infiniband/hw/cxgb3/iwch_provider.c | 16 +++++++++++----- drivers/infiniband/hw/cxgb4/provider.c | 16 +++++++++++----- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 3 files changed, 27 insertions(+), 12 deletions(-)Lets not have this generic iwapr code open coded please.
The core code already knows what the netdev is for the iWarp device.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Jason
I'm not sure if I truly understand what you are trying to say here.
Could you please add more info?
Implement this in the core code if the port type is iwarp
OK, I'll give it a try.
Quoted 2 lines
Jason