From fa86b5e9e6df164ef2249287e68b9963384c5a03 Mon Sep 17 00:00:00 2001 From: "U-AMR\\MSHEFTY" Date: Wed, 6 Jan 2010 16:46:53 -0800 Subject: [PATCH] refresh --- meta | 7 +-- patches/cm_poll | 128 +++++++++++++++++++++++++++---------------- patches/refresh-temp | 113 -------------------------------------- 3 files changed, 83 insertions(+), 165 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index f7e54a08..a6ecf4f0 100644 --- a/meta +++ b/meta @@ -1,11 +1,10 @@ Version: 1 -Previous: 34253ed66c5fbc3f08ee717f13522a9266e382a8 -Head: 775225917c881c49ee484493c0b27579bf69ce87 +Previous: 481b47b6dad6bde04b5a08d83a8ec78963b43cc8 +Head: 90a6aedbf678173e0a74d6567a87da7ca4af6ba5 Applied: rm-build: d6d2302f2d258fa2c07e55a2e124a9bdd75367a0 cm_listen_handler: 56372fe5e423b7238a4db99258c1493748c0a582 - cm_poll: ef232f09cbd9ac35a211764532bcfe8f841df683 - refresh-temp: 775225917c881c49ee484493c0b27579bf69ce87 + cm_poll: 90a6aedbf678173e0a74d6567a87da7ca4af6ba5 Unapplied: old-bld-32: bd1bd1d366e3927b7646da33e243213a5d59c235 old-apphang: 7a6f7ff02c6035e54fc262414eb9484ea98018b9 diff --git a/patches/cm_poll b/patches/cm_poll index 0000c965..dabb5afa 100644 --- a/patches/cm_poll +++ b/patches/cm_poll @@ -1,5 +1,5 @@ Bottom: fa748f1c52b43305bedd9af43719f0863bbecab5 -Top: 387b7f5f1602203485c10762ab1e083ed5ad08f6 +Top: 320329bcea61ab9c1c6da4cb408e769a18685487 Author: U-AMR\MSHEFTY Date: 2010-01-06 10:08:50 -0800 @@ -101,10 +101,10 @@ index 177bb9e..d22901f 100644 p_ifc->send_rep = cm_send_rep; p_ifc->send_rtu = cm_send_rtu; diff --git a/trunk/core/winverbs/kernel/wv_ep.c b/trunk/core/winverbs/kernel/wv_ep.c -index 3d5c6ce..874f3d1 100644 +index 3d5c6ce..3a9e02f 100644 --- a/trunk/core/winverbs/kernel/wv_ep.c +++ b/trunk/core/winverbs/kernel/wv_ep.c -@@ -1110,28 +1110,34 @@ complete: +@@ -1110,60 +1110,124 @@ complete: WdfRequestComplete(Request, status); } @@ -121,39 +121,82 @@ index 3d5c6ce..874f3d1 100644 - listen = ((iba_cm_id *) pId->context)->context; + WdfObjectAcquireLock(pListen->Queue); -+ status = WdfIoQueueRetrieveNextRequest(pListen->Queue, &request); -+ if (!NT_SUCCESS(status)) { -+ goto release; -+ } ++ while (1) { ++ status = WdfIoQueueRetrieveNextRequest(pListen->Queue, &request); ++ if (!NT_SUCCESS(status)) { ++ break; ++ } - WdfObjectAcquireLock(listen->Queue); - status = WdfIoQueueRetrieveNextRequest(listen->Queue, &request); -+ status = IbCmInterface.CM.get_request(pListen->pIbCmId, &id, &event); - if (!NT_SUCCESS(status)) { -+ WdfRequestRequeue(request); - goto release; - } +- if (!NT_SUCCESS(status)) { +- goto release; +- } ++ status = IbCmInterface.CM.get_request(pListen->pIbCmId, &id, &event); ++ if (!NT_SUCCESS(status)) { ++ WdfRequestRequeue(request); ++ break; ++ } ++ ++ ASSERT(!IsListEmpty(&pListen->Entry)); ++ ep = CONTAINING_RECORD(RemoveHeadList(&pListen->Entry), WV_ENDPOINT, Entry); ++ ep->pIbCmId = id; ++ id->callback = WvEpIbCmHandler; ++ id->context = ep; ++ ++ hdr = event.data.req.req.p_pdata; ++ if ((hdr->IpVersion >> 4) == 4) { ++ ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET; ++ ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address; ++ ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET; ++ ep->Attributes.PeerAddress.SockAddr.In.SinAddr = hdr->SrcAddress.Ip4.Address; ++ } else { ++ ep->Attributes.LocalAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; ++ RtlCopyMemory(ep->Attributes.LocalAddress.SockAddr.In6.Sin6Addr, ++ hdr->DstAddress.Ip6Address, 16); ++ ep->Attributes.PeerAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; ++ RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr, ++ hdr->SrcAddress.Ip6Address, 16); ++ } ++ ep->Attributes.Device.DeviceGuid = event.data.req.local_ca_guid; ++ ep->Attributes.Device.Pkey = event.data.req.req.p_primary_path->pkey; ++ ep->Attributes.Device.PortNumber = event.data.req.port_num; ++ ep->Attributes.Param.Connect.ResponderResources = event.data.req.req.resp_res; ++ ep->Attributes.Param.Connect.InitiatorDepth = event.data.req.req.init_depth; ++ ep->Attributes.Param.Connect.RetryCount = event.data.req.req.retry_cnt; ++ ep->Attributes.Param.Connect.RnrRetryCount = event.data.req.req.rnr_retry_cnt; ++ ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data); ++ RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1, ++ sizeof(ep->Attributes.Param.Connect.Data)); ++ ep->Route = *event.data.req.req.p_primary_path; ++ ++ ep->State = WvEpPassiveConnect; ++ WvEpPut(ep); - ASSERT(!IsListEmpty(&listen->Entry)); - ep = CONTAINING_RECORD(RemoveHeadList(&listen->Entry), WV_ENDPOINT, Entry); - ep->pIbCmId = pId; - pId->callback = WvEpIbCmHandler; - pId->context = ep; -+ ASSERT(!IsListEmpty(&pListen->Entry)); -+ ep = CONTAINING_RECORD(RemoveHeadList(&pListen->Entry), WV_ENDPOINT, Entry); -+ ep->pIbCmId = id; -+ id->callback = WvEpIbCmHandler; -+ id->context = ep; ++ WdfRequestComplete(request, STATUS_SUCCESS); ++ } ++ WdfObjectReleaseLock(pListen->Queue); ++} - hdr = pEvent->data.req.req.p_pdata; -+ hdr = event.data.req.req.p_pdata; - if ((hdr->IpVersion >> 4) == 4) { - ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET; - ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address; -@@ -1145,25 +1151,82 @@ static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent) - RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr, - hdr->SrcAddress.Ip6Address, 16); - } +- if ((hdr->IpVersion >> 4) == 4) { +- ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET; +- ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address; +- ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET; +- ep->Attributes.PeerAddress.SockAddr.In.SinAddr = hdr->SrcAddress.Ip4.Address; +- } else { +- ep->Attributes.LocalAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; +- RtlCopyMemory(ep->Attributes.LocalAddress.SockAddr.In6.Sin6Addr, +- hdr->DstAddress.Ip6Address, 16); +- ep->Attributes.PeerAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; +- RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr, +- hdr->SrcAddress.Ip6Address, 16); +- } - ep->Attributes.Device.DeviceGuid = pEvent->data.req.local_ca_guid; - ep->Attributes.Device.Pkey = pEvent->data.req.req.p_primary_path->pkey; - ep->Attributes.Device.PortNumber = pEvent->data.req.port_num; @@ -161,29 +204,18 @@ index 3d5c6ce..874f3d1 100644 - ep->Attributes.Param.Connect.InitiatorDepth = pEvent->data.req.req.init_depth; - ep->Attributes.Param.Connect.RetryCount = pEvent->data.req.req.retry_cnt; - ep->Attributes.Param.Connect.RnrRetryCount = pEvent->data.req.req.rnr_retry_cnt; -+ ep->Attributes.Device.DeviceGuid = event.data.req.local_ca_guid; -+ ep->Attributes.Device.Pkey = event.data.req.req.p_primary_path->pkey; -+ ep->Attributes.Device.PortNumber = event.data.req.port_num; -+ ep->Attributes.Param.Connect.ResponderResources = event.data.req.req.resp_res; -+ ep->Attributes.Param.Connect.InitiatorDepth = event.data.req.req.init_depth; -+ ep->Attributes.Param.Connect.RetryCount = event.data.req.req.retry_cnt; -+ ep->Attributes.Param.Connect.RnrRetryCount = event.data.req.req.rnr_retry_cnt; - ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data); - RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1, - sizeof(ep->Attributes.Param.Connect.Data)); +- ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data); +- RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1, +- sizeof(ep->Attributes.Param.Connect.Data)); - ep->Route = *pEvent->data.req.req.p_primary_path; -+ ep->Route = *event.data.req.req.p_primary_path; - - ep->State = WvEpPassiveConnect; - WvEpPut(ep); - - WdfRequestComplete(request, STATUS_SUCCESS); - release: +- +- ep->State = WvEpPassiveConnect; +- WvEpPut(ep); +- +- WdfRequestComplete(request, STATUS_SUCCESS); +-release: - WdfObjectReleaseLock(listen->Queue); - return status; -+ WdfObjectReleaseLock(pListen->Queue); -+} -+ +static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent) +{ + WV_ENDPOINT *listen; @@ -243,7 +275,7 @@ index 3d5c6ce..874f3d1 100644 } void WvEpListen(WV_PROVIDER *pProvider, WDFREQUEST Request) -@@ -1235,24 +1298,24 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request) +@@ -1235,24 +1299,24 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request) status = WdfRequestRetrieveInputBuffer(Request, sizeof(WV_IO_EP_GET_REQUEST), &req, NULL); if (!NT_SUCCESS(status)) { @@ -272,7 +304,7 @@ index 3d5c6ce..874f3d1 100644 } WdfObjectAcquireLock(ep->Queue); -@@ -1262,9 +1325,8 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request) +@@ -1262,9 +1326,8 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request) status = STATUS_CONNECTION_IN_USE; } WdfObjectReleaseLock(ep->Queue); @@ -283,7 +315,7 @@ index 3d5c6ce..874f3d1 100644 } WdfObjectAcquireLock(listen->Queue); -@@ -1274,15 +1336,21 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request) +@@ -1274,15 +1337,21 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request) WvEpGet(ep); } WdfObjectReleaseLock(listen->Queue); diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index cd6a417d..00000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,113 +0,0 @@ -Bottom: 387b7f5f1602203485c10762ab1e083ed5ad08f6 -Top: 320329bcea61ab9c1c6da4cb408e769a18685487 -Author: U-AMR\MSHEFTY -Date: 2010-01-06 16:46:46 -0800 - -Refresh of cm_poll - ---- - -diff --git a/trunk/core/winverbs/kernel/wv_ep.c b/trunk/core/winverbs/kernel/wv_ep.c -index 874f3d1..3a9e02f 100644 ---- a/trunk/core/winverbs/kernel/wv_ep.c -+++ b/trunk/core/winverbs/kernel/wv_ep.c -@@ -1120,54 +1120,55 @@ static void WvEpGetIbRequest(WV_ENDPOINT *pListen) - iba_cm_event event; - - WdfObjectAcquireLock(pListen->Queue); -- status = WdfIoQueueRetrieveNextRequest(pListen->Queue, &request); -- if (!NT_SUCCESS(status)) { -- goto release; -- } -+ while (1) { -+ status = WdfIoQueueRetrieveNextRequest(pListen->Queue, &request); -+ if (!NT_SUCCESS(status)) { -+ break; -+ } - -- status = IbCmInterface.CM.get_request(pListen->pIbCmId, &id, &event); -- if (!NT_SUCCESS(status)) { -- WdfRequestRequeue(request); -- goto release; -- } -+ status = IbCmInterface.CM.get_request(pListen->pIbCmId, &id, &event); -+ if (!NT_SUCCESS(status)) { -+ WdfRequestRequeue(request); -+ break; -+ } - -- ASSERT(!IsListEmpty(&pListen->Entry)); -- ep = CONTAINING_RECORD(RemoveHeadList(&pListen->Entry), WV_ENDPOINT, Entry); -- ep->pIbCmId = id; -- id->callback = WvEpIbCmHandler; -- id->context = ep; -+ ASSERT(!IsListEmpty(&pListen->Entry)); -+ ep = CONTAINING_RECORD(RemoveHeadList(&pListen->Entry), WV_ENDPOINT, Entry); -+ ep->pIbCmId = id; -+ id->callback = WvEpIbCmHandler; -+ id->context = ep; -+ -+ hdr = event.data.req.req.p_pdata; -+ if ((hdr->IpVersion >> 4) == 4) { -+ ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET; -+ ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address; -+ ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET; -+ ep->Attributes.PeerAddress.SockAddr.In.SinAddr = hdr->SrcAddress.Ip4.Address; -+ } else { -+ ep->Attributes.LocalAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; -+ RtlCopyMemory(ep->Attributes.LocalAddress.SockAddr.In6.Sin6Addr, -+ hdr->DstAddress.Ip6Address, 16); -+ ep->Attributes.PeerAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; -+ RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr, -+ hdr->SrcAddress.Ip6Address, 16); -+ } -+ ep->Attributes.Device.DeviceGuid = event.data.req.local_ca_guid; -+ ep->Attributes.Device.Pkey = event.data.req.req.p_primary_path->pkey; -+ ep->Attributes.Device.PortNumber = event.data.req.port_num; -+ ep->Attributes.Param.Connect.ResponderResources = event.data.req.req.resp_res; -+ ep->Attributes.Param.Connect.InitiatorDepth = event.data.req.req.init_depth; -+ ep->Attributes.Param.Connect.RetryCount = event.data.req.req.retry_cnt; -+ ep->Attributes.Param.Connect.RnrRetryCount = event.data.req.req.rnr_retry_cnt; -+ ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data); -+ RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1, -+ sizeof(ep->Attributes.Param.Connect.Data)); -+ ep->Route = *event.data.req.req.p_primary_path; -+ -+ ep->State = WvEpPassiveConnect; -+ WvEpPut(ep); - -- hdr = event.data.req.req.p_pdata; -- if ((hdr->IpVersion >> 4) == 4) { -- ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET; -- ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address; -- ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET; -- ep->Attributes.PeerAddress.SockAddr.In.SinAddr = hdr->SrcAddress.Ip4.Address; -- } else { -- ep->Attributes.LocalAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; -- RtlCopyMemory(ep->Attributes.LocalAddress.SockAddr.In6.Sin6Addr, -- hdr->DstAddress.Ip6Address, 16); -- ep->Attributes.PeerAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; -- RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr, -- hdr->SrcAddress.Ip6Address, 16); -- } -- ep->Attributes.Device.DeviceGuid = event.data.req.local_ca_guid; -- ep->Attributes.Device.Pkey = event.data.req.req.p_primary_path->pkey; -- ep->Attributes.Device.PortNumber = event.data.req.port_num; -- ep->Attributes.Param.Connect.ResponderResources = event.data.req.req.resp_res; -- ep->Attributes.Param.Connect.InitiatorDepth = event.data.req.req.init_depth; -- ep->Attributes.Param.Connect.RetryCount = event.data.req.req.retry_cnt; -- ep->Attributes.Param.Connect.RnrRetryCount = event.data.req.req.rnr_retry_cnt; -- ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data); -- RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1, -- sizeof(ep->Attributes.Param.Connect.Data)); -- ep->Route = *event.data.req.req.p_primary_path; -- -- ep->State = WvEpPassiveConnect; -- WvEpPut(ep); -- -- WdfRequestComplete(request, STATUS_SUCCESS); --release: -+ WdfRequestComplete(request, STATUS_SUCCESS); -+ } - WdfObjectReleaseLock(pListen->Queue); - } -- 2.46.0