From 897588dba9da5bd0e4e56d96e77f9f8ca3067084 Mon Sep 17 00:00:00 2001 From: tzachid Date: Tue, 7 Oct 2008 08:08:59 +0000 Subject: [PATCH] =?utf8?q?[ipoib]=20Limit=20the=20number=20of=20retries=20?= =?utf8?q?to=20connect=20to=20broadcast=20group.=20(mlnx:=203287)=20Part?= =?utf8?q?=5Fman.exe=20=E2=80=93=20added=20check=20for=20pkey=20with=20par?= =?utf8?q?tial=20membership.=20Such=20a=20values=20is=20not=20supported=20?= =?utf8?q?in=20current=20version.=20signed=20off=20by:=20slavas@voltaire.c?= =?utf8?q?om?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://openib.tc.cornell.edu/gen1@1634 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- .../WOF2-0/trunk/tools/part_man/user/part_man.c | 12 ++++++++++-- .../WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.h | 1 + .../WOF2-0/trunk/ulp/ipoib/kernel/ipoib_driver.c | 3 ++- branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.c | 13 +++++++++++-- branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.h | 1 + branches/WOF2-0/trunk/ulp/ipoib/kernel/netipoib.inx | 8 ++++++++ 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/branches/WOF2-0/trunk/tools/part_man/user/part_man.c b/branches/WOF2-0/trunk/tools/part_man/user/part_man.c index cf397795..5eda787f 100644 --- a/branches/WOF2-0/trunk/tools/part_man/user/part_man.c +++ b/branches/WOF2-0/trunk/tools/part_man/user/part_man.c @@ -7,6 +7,7 @@ #include #include "al_dev.h" +#define IS_FULL_MEMBER_PKEY(pkey) (0x8000 & (pkey)) typedef enum { @@ -195,7 +196,8 @@ static int reg_ibbus_pkey_add(const uint16_t *pkeys, uint16_t pkey_num,OUT pkey_ } else { - cnt = strlen(partKey) + sprintf(partKey + strlen(partKey),"%s:",tmp); + sprintf(partKey + strlen(partKey),"%s:",tmp); + cnt = strlen(partKey); } } @@ -231,7 +233,7 @@ static int reg_ibbus_pkey_add(const uint16_t *pkeys, uint16_t pkey_num,OUT pkey_ } else { - printf("No pkey to add\n"); + printf("Required pkeys already exist\n"); retval = 1; } RegCloseKey( reg_handle ); @@ -532,6 +534,12 @@ int prepare_reg_pkey_input(OUT REQUEST_IN *input,char* cmd[],int num) sscanf(cmd[i],"0x%x",&input->u.guid_pkey.pkeys[input->u.guid_pkey.pkey_num]); else sscanf(cmd[i],"%x",&input->u.guid_pkey.pkeys[input->u.guid_pkey.pkey_num]); + + if (! IS_FULL_MEMBER_PKEY(input->u.guid_pkey.pkeys[input->u.guid_pkey.pkey_num])) + { + printf("partial member pkey %s is not suported\n",cmd[i]); + return 0; + } input->u.guid_pkey.pkey_num++; } return 1; diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.h b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.h index a9c022fd..84425e94 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.h +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.h @@ -78,6 +78,7 @@ typedef struct _ipoib_params mac_addr_t conf_mac; uint32_t mc_leave_rescan; uint32_t guid_mask; + uint32_t bc_join_retry; } ipoib_params_t; /* * FIELDS diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_driver.c b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_driver.c index 0b2b40f5..40d5c379 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_driver.c +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_driver.c @@ -162,7 +162,8 @@ IPOIB_REG_ENTRY HCARegTable[] = { {NDIS_STRING_CONST("RecvRatio"), 1, IPOIB_OFFSET(recv_pool_ratio), IPOIB_SIZE(recv_pool_ratio), 1, 1, 10}, {NDIS_STRING_CONST("PayloadMtu"), 1, IPOIB_OFFSET(payload_mtu), IPOIB_SIZE(payload_mtu), 2044, 60, 4092}, {NDIS_STRING_CONST("lso"), 0, IPOIB_OFFSET(lso), IPOIB_SIZE(lso), 0, 0, 1}, - {NDIS_STRING_CONST("MCLeaveRescan"), 1, IPOIB_OFFSET(mc_leave_rescan), IPOIB_SIZE(mc_leave_rescan), 260, 1, 3600} + {NDIS_STRING_CONST("MCLeaveRescan"), 1, IPOIB_OFFSET(mc_leave_rescan), IPOIB_SIZE(mc_leave_rescan), 260, 1, 3600}, + {NDIS_STRING_CONST("BCJoinRetry"), 1, IPOIB_OFFSET(bc_join_retry), IPOIB_SIZE(bc_join_retry), 50, 0, 1000} }; diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.c b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.c index ae5ddccd..0bc6294b 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.c +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.c @@ -5782,7 +5782,16 @@ __bcast_cb( CL_ASSERT( p_port->p_adapter->state == IB_PNP_PORT_ADD || p_port->p_adapter->state == IB_PNP_PORT_DOWN || p_port->p_adapter->state == IB_PNP_PORT_INIT ); - status = __port_get_bcast( p_port ); + if(++p_port->bc_join_retry_cnt < p_port->p_adapter->params.bc_join_retry) + { + status = __port_get_bcast( p_port ); + } + else + { + NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter, + EVENT_IPOIB_BCAST_JOIN, 1, p_mcast_rec->status ); + p_port->bc_join_retry_cnt = 0; + } } else { @@ -5802,7 +5811,7 @@ __bcast_cb( return; } cl_obj_unlock( &p_port->obj ); - + p_port->bc_join_retry_cnt = 0; status = __endpt_mgr_add_bcast( p_port, p_mcast_rec ); if( status != IB_SUCCESS ) { diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.h b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.h index cfdec051..6462469d 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.h +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.h @@ -516,6 +516,7 @@ typedef struct _ipoib_port uint16_t pkey_index; KDPC gc_dpc; KTIMER gc_timer; + uint32_t bc_join_retry_cnt; ipoib_hdr_t hdr[1]; /* Must be last! */ } ipoib_port_t; diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/netipoib.inx b/branches/WOF2-0/trunk/ulp/ipoib/kernel/netipoib.inx index 3539f7a4..f288f2a6 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/netipoib.inx +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/netipoib.inx @@ -157,6 +157,14 @@ HKR, Ndi\Params\guid_mask, Optional, 0, "0" HKR, Ndi\Params\guid_mask, Min, 0, "0" HKR, Ndi\Params\guid_mask, Max, 0, "252" +HKR, Ndi\Params\BCJoinRetry, ParamDesc, 0, "Number of retries connecting to bc" +HKR, Ndi\Params\BCJoinRetry, Type, 0, "dword" +HKR, Ndi\Params\BCJoinRetry, Default, 0, "50" +HKR, Ndi\Params\BCJoinRetry, Optional, 0, "0" +HKR, Ndi\Params\BCJoinRetry, Min, 0, "0" +HKR, Ndi\Params\BCJoinRetry, Max, 0, "1000" + + [IpoibService] DisplayName = %IpoibServiceDispName% ServiceType = 1 ;%SERVICE_KERNEL_DRIVER% -- 2.46.0