From: Pradeep Gopanapalli Date: Tue, 1 Nov 2016 22:16:23 +0000 (+0000) Subject: xsigo: send nack codes X-Git-Tag: v4.1.12-92~45^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7445408e924adf57ed04a0d6205c180674c91a8e;p=users%2Fjedix%2Flinux-maple.git xsigo: send nack codes Orabug: 24442792 Sometime uVNIC removal on OFOS won't trigger a actual removal of Vstar interface, in that case uVNIC driver has to send NACK code so that XCM will start cleaning its database. Added additional codes as per XCM specification Reported-by: jie zhu Signed-off-by: Pradeep Gopanapalli Reviewed-by: Qingjun Wang Reviewed-by: Manish Kumar Singh Reviewed-by: UmaShankar Tumari Mahabalagiri --- diff --git a/drivers/infiniband/ulp/xsigo/xscore/Makefile b/drivers/infiniband/ulp/xsigo/xscore/Makefile index 6b2c8dcaa477a..d6f8c6557dda9 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.r8034\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8035\" 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 55b873fc2a65d..6d9c332c0bb3c 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.r8034\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8035\" 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 a3ab04a5ab7a4..d496e85166026 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.r8034\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8035\" 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 a422c13497022..48fb3f796f71f 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.r8034\" +ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8035\" 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 2eebf570c9e45..4f58c980c4d6d 100644 --- a/drivers/infiniband/ulp/xsigo/xve/xve_main.c +++ b/drivers/infiniband/ulp/xsigo/xve/xve_main.c @@ -2159,7 +2159,7 @@ static int xve_xsmp_install(xsmp_cookie_t xsmp_hndl, struct xve_xsmp_msg *xmsgp, pr_info("MTU%d %s\n", be16_to_cpu(xmsgp->vn_mtu), xmsgp->xve_name); ret = -EINVAL; - ecode = XVE_INVALID_OPERATION; + ecode = XVE_NACK_IB_MTU_MISMATCH; goto dup_error; } } @@ -2184,6 +2184,12 @@ static int xve_xsmp_install(xsmp_cookie_t xsmp_hndl, struct xve_xsmp_msg *xmsgp, (xsmp_hndl, xmsgp->xve_name, XSMP_MESSAGE_TYPE_VNIC) != 0) { pr_info("%s Duplicate name %s\n", __func__, xmsgp->xve_name); ret = -EEXIST; + /* send VID to xmsgp*/ + priv = xve_get_xve_by_name(xmsgp->xve_name); + if (priv) + xmsgp->tca_subnet_prefix = + cpu_to_be64(priv->resource_id); + ecode = XVE_NACK_DUP_NAME; goto dup_error; } @@ -2200,6 +2206,9 @@ static int xve_xsmp_install(xsmp_cookie_t xsmp_hndl, struct xve_xsmp_msg *xmsgp, __func__, xmsgp->xve_name, be64_to_cpu(xmsgp->resource_id)); ret = -EEXIST; + /* send VID to xmsgp*/ + ecode = XVE_NACK_DUP_NAME; + xmsgp->tca_subnet_prefix = cpu_to_be64(priv->resource_id); goto dup_error; } diff --git a/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h b/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h index 93a81034e4da2..cd0439faa0821 100644 --- a/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h +++ b/drivers/infiniband/ulp/xsigo/xve/xve_xsmp_msgs.h @@ -133,7 +133,7 @@ struct xve_xsmp_msg { #define XVE_NACK_LIMIT_REACHED 3 /* Max number of XVEs reached */ #define XVE_NACK_ALLOCATION_ERROR 4 /* Error during instantiation */ #define XVE_INVALID_OPERATION 6 /* Invalid Install message */ -#define XVE_NACK_CODE_MAX 7 +#define XVE_NACK_IB_MTU_MISMATCH 20 /* The common XVE XSMP header for all messages */ struct xve_xsmp_header {