data_al_so_far is used in app-layer.c.  The idea is if we haven't figured the protocol for one direction, but we know the proto for the other direction, we send the stream from the unknown direction for the other direction proto.  But while we do this we can't set the PROTO_DETECTION_COMPLETED flag for the stream, which means stream reassembly continues sending the reassembled segments from the start of the stream.  Hence we need to know how much of data we have already send to the app layer so far.