On Tue, Jul 7, 2015 at 4:29 AM, Gordon Sim <g...@redhat.com> wrote:

> On 07/07/2015 07:22 AM, Rafael Schloming wrote:
>
>> IIRC, the definition of the outgoing-window was largely motivated by the
>> need to express to receivers certain conditions under which they may be
>> required to settle deliveries in order to receive more. For example if an
>> implementation uses a fixed sized array to store deliveries, and this
>> array
>> is keyed by the offset of the delivery-id from the smallest unsettled
>> delivery, then although the sender may have sufficient credit to send more
>> transfers, it may not actually be capable of doing this because the next
>> delivery-id would land outside the range of deliveries that are currently
>> represented within its fixed size array.
>>
>
> The outgoing-window is measured in transfers, right? So in this case each
> slot in the array would be a *transfer* with a single delivery possibly
> spanning multiple slots.
>

Yes, good point.


> This could happen for example if
>> the receiver issues N credits (where N is the size of the sender's fixed
>> array) and settles deliveries 2 through N. The sender is then stuck with
>> an
>> unsettled delivery in the first slot of its fixed sized array and cannot
>> send another delivery until that first delivery is settled.
>>
>> Given this, it's certainly true an outgoing-window of 0 is kind of strange
>> and useless.
>>
>
> Isn't that exactly the mechanism by which a sender, such as the one in
> your description above, would indicate its inability to send further
> transfers?


Gah, sorry, jet lag... you are right. I was thinking of the window measured
from the oldest unsettled transfers, however it is actually measured from
the next-outgoing-id, and so as you say a value of zero is actually what
signals that the receiver needs to take some action here, and arguably an
initial value of zero is correct since it is signaling that the receiver
needs to take action (in this case issue credit).

--Rafael

Reply via email to