Modify the stat of session

This commit is contained in:
luwenpeng
2024-04-09 15:07:53 +08:00
parent 3b00acab81
commit a5a133bf91
13 changed files with 671 additions and 732 deletions

View File

@@ -244,10 +244,16 @@ void packet_io_marsio_drop(struct packet_io_marsio *handle, uint16_t thread_id,
{
pkt = &pkts[i];
tx_buff = (marsio_buff_t *)packet_get_user_data(pkt);
assert(tx_buff != NULL);
ATOMIC_ADD(&handle->stat.drop_pkts, 1);
ATOMIC_ADD(&handle->stat.drop_bytes, packet_get_len(pkt));
marsio_buff_free(handle->mr_ins, &tx_buff, 1, 0, thread_id);
if (tx_buff)
{
marsio_buff_free(handle->mr_ins, &tx_buff, 1, 0, thread_id);
}
else // ip reassembly
{
}
packet_free(pkt);
}
}