#Diagram demonstrating reading and returning an item in a No-Split/Allow-Split ring buffer
#Buffer of 128 bytes, with 4 items of 16, 20, 8 and 24 bytes. First 3 items are read and returned

packetdiag ring_buffer_send_acquire_complete {
    node_width = 6
    node_height = 24
    default_fontsize = 12
    colwidth = 128

    #Initial
    0-7: 8 [color = lightblue];
    8-23: 16 Available [color = lightyellow];
    24-127: Free

    #Acquire item 1, 2, 3
    128-135: 8 [color = lightblue];
    136-151: 16 Available [color = lightyellow];
    152-179: 20 Acquired [color = lightgrey];
    180-195: 8 Acquired [color = lightgrey];
    196-227: 24 Acquired [color = lightgrey];
    228-255: 28 Free

    #Complete item 2
    256-263: 8 [color = lightblue];
    264-279: 16 Available [color = lightyellow];
    280-307: 20 Acquired [color = lightgrey];
    308-315: 8 [color = pink];
    316-323: 8 Completed [color = pink];
    324-355: 24 Acquired [color = lightgrey];
    356-383: 28 Free

    #Complete item 3
    384-391: 8 [color = lightblue];
    392-407: 16 Available [color = lightyellow];
    408-435: 20 Acquired [color = lightgrey];
    436-443: 8 [color = pink];
    444-451: 8 Completed [color = pink];
    452-459: 8 [color = pink];
    460-483: 24 Completed [color = pink];
    484-511: 28 Free

    #Complete item 1
    512-519: 8 [color = lightblue];
    520-535: 16 Available [color = lightyellow];
    536-543: 8 [color = pink];
    544-563: 20 Completed [color = pink];
    564-571: 8 [color = pink];
    572-579: 8 Completed [color = pink];
    580-587: 8 [color = pink];
    588-611: 24 Completed [color = pink];
    612-639: 28 Free

    #Return item 3
    640-647: 8 [color = lightblue];
    648-663: 16 Available [color = lightyellow];
    664-671: 8 [color = lightblue];
    672-691: 20 Available [color = lightyellow];
    692-699: 8 [color = lightblue];
    700-707: 8 Available [color = lightyellow];
    708-715: 8 [color = lightblue];
    716-739: 24 Available [color = lightyellow];
    740-767: 28 Free
}