Re: [edk2] [PATCH v2 0/2] Add wnd scale check before shrinking window

2017-04-20 Thread ate...@kraftway.ru
I'm adding recipients from previous thread. Regards, Andrey On 20.04.2017 12:30, Тёпин Андрей Сергеевич wrote: > This is an updated patch. Previous patch can be found in thread named > "Fix unconditional window shrinking" here: > https://lists.01.org/pipermail/edk2-devel/2017-March/009129.html >

[edk2] [PATCH v2 0/2] Add wnd scale check before shrinking window

2017-04-20 Thread ate...@kraftway.ru
This is an updated patch. Previous patch can be found in thread named "Fix unconditional window shrinking" here: https://lists.01.org/pipermail/edk2-devel/2017-March/009129.html Andrey Tepin (2): NetworkPkg/TcpDxe: Add wnd scale check before shrinking window MdeModulePkg/Tcp4Dxe: Add wnd scale

[edk2] [PATCH v2 2/2] MdeModulePkg/Tcp4Dxe: Add wnd scale check before shrinking window

2017-04-20 Thread ate...@kraftway.ru
Moving Right window edge to the left on sender side without additional check can lead to the TCP deadlock, when receiver ACKs proper segment, while sender discards it for future ACK. To prevent this add check if usable window (or shrink amount in this case) is bigger then receiver's window scale fa

[edk2] [PATCH v2 1/2] NetworkPkg/TcpDxe: Add wnd scale check before shrinking window

2017-04-20 Thread ate...@kraftway.ru
Moving Right window edge to the left on sender side without additional check can lead to the TCP deadlock, when receiver ACKs proper segment, while sender discards it for future ACK. To prevent this add check if usable window (or shrink amount in this case) is bigger then receiver's window scale fa

Re: [edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-04-18 Thread ate...@kraftway.ru
ive useable window\n")); +INT32 Usable = Tcb->SndNxt - Right; +if ((Usable >> Tcb->SndWndScale) > 0) { + DEBUG ((EFI_D_WARN,"TcpInput: SndNxt is out of window by more than window scale\n")); + Tcb->SndNxt = Right; + } Be

Re: [edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-04-18 Thread ate...@kraftway.ru
. Thanks again for helping to address the problem. Best Regards, Siyuan From: ate...@kraftway.ru<mailto:ate...@kraftway.ru> [mailto:ate...@kraftway.ru] Sent: 2017年4月17日 22:41 To: Fu, Siyuan <mailto:siyuan...@intel.com>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org&

Re: [edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-04-17 Thread ate...@kraftway.ru
ive useable window” this time, not because your patch fixed the problem. Best Regards, Siyuan From: ate...@kraftway.ru<mailto:ate...@kraftway.ru> [mailto:ate...@kraftway.ru] Sent: 2017年4月14日 21:32 To: Fu, Siyuan <mailto:siyuan...@intel.com>; edk2-devel@lists.01.org<mailto:edk2

Re: [edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-04-14 Thread ate...@kraftway.ru
o adjust the SndNxt, so this frame will always be ignored and become a deadlock. So, if the problem is solved by the patch, something must be wrong in my above understanding. Do you also have a sample file to show how the patch could solve the dead lock, especially for the packets after server re

Re: [edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-04-13 Thread ate...@kraftway.ru
Tcb->SndNxt = Right; + } Best Regards, Siyuan -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of ate...@kraftway.ru<mailto:ate...@kraftway.ru> Sent: 2017年4月6日 23:34 To: Fu, Siyuan <mailto:siyuan...@intel.com>; ed

Re: [edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-04-06 Thread ate...@kraftway.ru
a deadlock. So please provide more details if you did observe a deadlock, maybe an example would help to understand the problem. Thanks, Siyuan -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of ate...@kraftway.ru<mailto:ate...@kraftway.ru&

[edk2] [PATCH 1/2] MdeModulePkg/Tcp4Dxe: Fix unconditional window shrinking

2017-03-28 Thread ate...@kraftway.ru
Moving Right window edge to the left on sender side without additional checks leads to the situation when sender assumes the receiver shrunk its rcv buffer, when, in fact, it only reduced window size. This is a TCP deadlock situation. Receiver ACKs proper segment, while sender discards it for futur

[edk2] [PATCH 2/2] NetworkPkg/TcpDxe: Fix unconditional window shrinking

2017-03-28 Thread ate...@kraftway.ru
Moving Right window edge to the left on sender side without additional checks leads to the situation when sender assumes the receiver shrunk its rcv buffer, when, in fact, it only reduced window size. This is a TCP deadlock situation. Receiver ACKs proper segment, while sender discards it for futur