packet IO support inject packet and add inject packet stat
This commit is contained in:
@@ -106,6 +106,18 @@ void packet_io_drop(struct packet_io *packet_io, uint16_t thr_idx, struct packet
|
||||
}
|
||||
}
|
||||
|
||||
int packet_io_inject(struct packet_io *packet_io, uint16_t thr_idx, struct packet *pkts, int nr_pkts)
|
||||
{
|
||||
if (likely(packet_io->mode == PACKET_IO_MARSIO))
|
||||
{
|
||||
return marsio_io_inject(packet_io->marsio, thr_idx, pkts, nr_pkts);
|
||||
}
|
||||
else
|
||||
{
|
||||
return dumpfile_io_inject(packet_io->dumpfile, thr_idx, pkts, nr_pkts);
|
||||
}
|
||||
}
|
||||
|
||||
void packet_io_yield(struct packet_io *packet_io, uint16_t thr_idx, uint64_t timeout_ms)
|
||||
{
|
||||
if (likely(packet_io->mode == PACKET_IO_MARSIO))
|
||||
|
||||
Reference in New Issue
Block a user