@ -79,7 +79,7 @@ static int run_batcher = 1;
* on the traffic
* on the traffic
* \ todo make this user configurable , as well allow dynamic update of this
* \ todo make this user configurable , as well allow dynamic update of this
* variable based on the traffic seen */
* variable based on the traffic seen */
static uint32_t buffer_packet_threshhold = 128 0;
static uint32_t buffer_packet_threshhold = 240 0;
/* flag used by the SIG_ALRM handler to indicate that the batcher TM should queue
/* flag used by the SIG_ALRM handler to indicate that the batcher TM should queue
* the buffer to be processed by the Cuda Mpm B2g Batcher Thread for further
* the buffer to be processed by the Cuda Mpm B2g Batcher Thread for further
@ -546,6 +546,19 @@ TmEcode SCCudaPBBatchPackets(ThreadVars *tv, Packet *p, void *data, PacketQueue
/* the sgh to which the incoming packet belongs */
/* the sgh to which the incoming packet belongs */
SigGroupHead * sgh = NULL ;
SigGroupHead * sgh = NULL ;
if ( p - > flow ! = NULL ) {
/* Get the stored sgh from the flow (if any). Make sure we're not using
* the sgh for icmp error packets part of the same stream . */
if ( p - > proto = = p - > flow - > proto ) { /* filter out icmp */
if ( p - > flowflags & FLOW_PKT_TOSERVER & & p - > flow - > flags & FLOW_SGH_TOSERVER ) {
sgh = p - > flow - > sgh_toserver ;
} else if ( p - > flowflags & FLOW_PKT_TOCLIENT & & p - > flow - > flags & FLOW_SGH_TOCLIENT ) {
sgh = p - > flow - > sgh_toclient ;
}
}
}
if ( sgh = = NULL ) {
/* get the signature group head to which this packet belongs. If it belongs
/* get the signature group head to which this packet belongs. If it belongs
* to no sgh , we don ' t need to buffer this packet .
* to no sgh , we don ' t need to buffer this packet .
* \ todo Get rid of this , once we get the sgh from the flow */
* \ todo Get rid of this , once we get the sgh from the flow */
@ -554,6 +567,7 @@ TmEcode SCCudaPBBatchPackets(ThreadVars *tv, Packet *p, void *data, PacketQueue
SCLogDebug ( " No SigGroupHead match for this packet " ) ;
SCLogDebug ( " No SigGroupHead match for this packet " ) ;
return TM_ECODE_OK ;
return TM_ECODE_OK ;
}
}
}
/* if the payload is less than the maximum content length in this sgh we
/* if the payload is less than the maximum content length in this sgh we
* don ' t need to run the PM on this packet . Chuck the packet out */
* don ' t need to run the PM on this packet . Chuck the packet out */
@ -747,7 +761,7 @@ void SCCudaPBSetUpQueuesAndBuffers(void)
/* \todo This needs to be changed ASAP. This can't exceed max_pending_packets.
/* \todo This needs to be changed ASAP. This can't exceed max_pending_packets.
* Also we need to make this user configurable and allow dynamic updaes
* Also we need to make this user configurable and allow dynamic updaes
* based on live traffic */
* based on live traffic */
buffer_packet_threshhold = 128 0;
buffer_packet_threshhold = 240 0;
return ;
return ;
}
}