From 2498d7bbc7b0cdc9484157531257ba48e9175757 Mon Sep 17 00:00:00 2001 From: Pradeep Gopanapalli Date: Tue, 23 Aug 2016 20:34:55 +0000 Subject: [PATCH] xsigo: Send Heart Beat Lost Operational state Orabug: 23032392 In Case of Heart Beat loss due to saturn or Multicast issues uVNIC driver needs to send XVE_NOTIFY_HBEAT_LOST as a part of Operational Request to OFOS . This will enable OFOS to perform appropriate actions Reported-by: Suyi Shao Signed-off-by: Pradeep Gopanapalli Reviewed-by: sajid zia --- drivers/infiniband/ulp/xsigo/xscore/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xsvhba/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xsvnic/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xve/Makefile | 2 +- drivers/infiniband/ulp/xsigo/xve/xve_main.c | 9 ++++++++- drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h | 1 + 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/ulp/xsigo/xscore/Makefile b/drivers/infiniband/ulp/xsigo/xscore/Makefile index 8f1555fbc2ed3..c263dd50cab7e 100644 --- a/drivers/infiniband/ulp/xsigo/xscore/Makefile +++ b/drivers/infiniband/ulp/xsigo/xscore/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XSCORE) := xscore.o xscore-y := xscore_impl.o xs_ud.o xscore_api.o xsmp.o \ xscore_stats.o xscore_uadm.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8020\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8022\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xsvhba/Makefile b/drivers/infiniband/ulp/xsigo/xsvhba/Makefile index d6f358fb99edd..33d74f7958c24 100644 --- a/drivers/infiniband/ulp/xsigo/xsvhba/Makefile +++ b/drivers/infiniband/ulp/xsigo/xsvhba/Makefile @@ -3,7 +3,7 @@ xsvhba-y := vhba_main.o vhba_xsmp.o vhba_create.o vhba_init.o vhba_delete.o \ vhba_attr.o vhba_wq.o vhba_proc.o vhba_stats.o vhba_ib.o \ vhba_scsi_intf.o vhba_align.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8020\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8022\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xsvnic/Makefile b/drivers/infiniband/ulp/xsigo/xsvnic/Makefile index abfb935168cb9..963d9f84c526b 100644 --- a/drivers/infiniband/ulp/xsigo/xsvnic/Makefile +++ b/drivers/infiniband/ulp/xsigo/xsvnic/Makefile @@ -1,7 +1,7 @@ obj-$(CONFIG_INFINIBAND_XSVNIC) := xsvnic.o xsvnic-y := xsvnic_main.o xsvnic_stats.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8020\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8022\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xve/Makefile b/drivers/infiniband/ulp/xsigo/xve/Makefile index ead4db3c496b8..764cf0db49f20 100644 --- a/drivers/infiniband/ulp/xsigo/xve/Makefile +++ b/drivers/infiniband/ulp/xsigo/xve/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XVE) := xve.o xve-y := xve_main.o xve_verbs.o xve_multicast.o xve_ib.o xve_tables.o \ xve_ethtool.o xve_cm.o xve_stats.o -ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8020\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8022\" ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT diff --git a/drivers/infiniband/ulp/xsigo/xve/xve_main.c b/drivers/infiniband/ulp/xsigo/xve/xve_main.c index 5f69a20987709..9e934503af9c4 100644 --- a/drivers/infiniband/ulp/xsigo/xve/xve_main.c +++ b/drivers/infiniband/ulp/xsigo/xve/xve_main.c @@ -54,7 +54,7 @@ int xve_recvq_size __read_mostly = XVE_RX_RING_SIZE; module_param_named(send_queue_size, xve_sendq_size, int, 0444); MODULE_PARM_DESC(send_queue_size, "Number of descriptors in send queue"); module_param_named(recv_queue_size, xve_recvq_size, int, 0444); -MODULE_PARM_DESC(recv_queue_size, "Number of descriptors in receive queue"); +MODULE_PARM_DESC(recv_queue_size, "Number of recv queue descriptors"); int xve_max_send_cqe __read_mostly = MAX_SEND_CQE; module_param_named(max_send_cqe, xve_max_send_cqe, int, 0444); @@ -1542,6 +1542,10 @@ static int xve_xsmp_send_notification(struct xve_dev_priv *priv, u64 vid, __func__, priv->xve_name, priv->admin_mtu); xsmp_msg->vn_mtu = cpu_to_be16(priv->admin_mtu); xsmp_msg->net_id = cpu_to_be32(priv->net_id); + if (test_bit(XVE_HBEAT_LOST, &priv->state)) + xsmp_msg->install_flag = XVE_NOTIFY_HBEAT_LOST; + else + xsmp_msg->install_flag = 0; } header->type = XSMP_MESSAGE_TYPE_XVE; @@ -1601,6 +1605,9 @@ static int xve_state_machine(struct xve_dev_priv *priv) /* Disjoin from multicast Group */ set_bit(XVE_HBEAT_LOST, &priv->state); spin_unlock_irqrestore(&priv->lock, flags); + /* Send updated state */ + (void)xve_xsmp_handle_oper_req(priv->xsmp_hndl, + priv->resource_id); xve_queue_work(priv, XVE_WQ_START_FLUSHNORMAL); } priv->counters[XVE_STATE_MACHINE_UP]++; diff --git a/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h b/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h index 65a1128ff92bf..3b70ddc2c17ee 100644 --- a/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h +++ b/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h @@ -302,6 +302,7 @@ struct xve_iscsi_msg { #define XVE_INSTALL_TSO (1 << 3) #define XVE_INSTALL_RX_BAT (1 << 4) #define XVE_8K_IBMTU (1 << 5) +#define XVE_NOTIFY_HBEAT_LOST (1 << 7) #define XVE_INSTALL_LINK2QP (1 << 8) #define XSIGO_IP_FRAGMENT_BIT (1 << 8) -- 2.50.1