rename: update session pool and packet pool API names for clarity
This commit is contained in:
@@ -243,7 +243,7 @@ static void origin_free_cb(struct packet *pkt, void *args)
|
||||
stat->bytes_user_freed += packet_get_raw_len(pkt);
|
||||
|
||||
marsio_buff_free(mars_io->mr_ins, &mbuff, 1, 0, origin->thr_idx);
|
||||
packet_pool_push(pool, pkt);
|
||||
packet_pool_release_packet(pool, pkt);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -408,7 +408,7 @@ int mars_io_recv(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_p
|
||||
}
|
||||
else
|
||||
{
|
||||
pkt = packet_pool_pop(pool);
|
||||
pkt = packet_pool_acquire_packet(pool);
|
||||
assert(pkt != NULL);
|
||||
struct packet_origin origin = {
|
||||
.type = ORIGIN_TYPE_MR,
|
||||
@@ -449,7 +449,7 @@ void mars_io_send(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_
|
||||
mbuff = (marsio_buff_t *)origin->ctx;
|
||||
copy_metadata_to_mbuff(pkt, mbuff);
|
||||
marsio_send_burst(mars_io->mr_path, thr_idx, &mbuff, 1);
|
||||
packet_pool_push(mars_io->pool[thr_idx], pkt);
|
||||
packet_pool_release_packet(mars_io->pool[thr_idx], pkt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -501,7 +501,7 @@ void mars_io_drop(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_
|
||||
{
|
||||
mbuff = (marsio_buff_t *)origin->ctx;
|
||||
marsio_buff_free(mars_io->mr_ins, &mbuff, 1, 0, thr_idx);
|
||||
packet_pool_push(mars_io->pool[thr_idx], pkt);
|
||||
packet_pool_release_packet(mars_io->pool[thr_idx], pkt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -344,7 +344,7 @@ static void origin_free_cb(struct packet *pkt, void *args)
|
||||
stat->bytes_user_freed += packet_get_raw_len(pkt);
|
||||
|
||||
free(pcap);
|
||||
packet_pool_push(pool, pkt);
|
||||
packet_pool_release_packet(pool, pkt);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -476,7 +476,7 @@ int pcap_io_recv(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_p
|
||||
stat->pkts_rx++;
|
||||
stat->bytes_rx += pcap->len;
|
||||
|
||||
pkt = packet_pool_pop(pool);
|
||||
pkt = packet_pool_acquire_packet(pool);
|
||||
assert(pkt != NULL);
|
||||
struct packet_origin origin = {
|
||||
.type = ORIGIN_TYPE_PCAP,
|
||||
@@ -524,7 +524,7 @@ void pcap_io_send(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_
|
||||
{
|
||||
pcap = (struct pcap_pkt *)origin->ctx;
|
||||
free(pcap);
|
||||
packet_pool_push(pcap_io->pool[thr_idx], pkt);
|
||||
packet_pool_release_packet(pcap_io->pool[thr_idx], pkt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -582,7 +582,7 @@ void pcap_io_drop(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_
|
||||
{
|
||||
pcap = (struct pcap_pkt *)origin->ctx;
|
||||
free(pcap);
|
||||
packet_pool_push(pcap_io->pool[thr_idx], pkt);
|
||||
packet_pool_release_packet(pcap_io->pool[thr_idx], pkt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user