Changeset 7e09388


Ignore:
Timestamp:
11/14/17 13:58:01 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
9d00fb13
Parents:
07de3c6
Message:

Fix silly bug where we weren't checking for buf index wrapping.

Also removed redundant check for (bufavail == 0) -- the following
check will catch it anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_ndag.c

    r07de3c6 r7e09388  
    709709                ssock->mmsgbufs[i].msg_hdr.msg_controllen = 0;
    710710                ssock->mmsgbufs[i].msg_hdr.msg_flags = 0;
    711                 ssock->mmsgbufs[i].msg_len = 1;
     711                ssock->mmsgbufs[i].msg_len = 0;
    712712        }
    713713
     
    781781                if (i >= RECV_BATCH_SIZE) {
    782782                        break;
     783                }
     784
     785                if (wind >= ENCAP_BUFFERS) {
     786                        wind = 0;
    783787                }
    784788
     
    875879        }
    876880
    877         if (ssock->bufavail == 0) {
    878                 /* All buffers were full, so something must be
    879                  * available. */
    880                 return 1;
    881         }
    882 
     881        /* Plenty of full buffers, just use the packets in those */
    883882        if (ssock->bufavail < RECV_BATCH_SIZE / 2) {
    884883                return 1;
Note: See TracChangeset for help on using the changeset viewer.