refactor stellar stat

This commit is contained in:
luwenpeng
2024-06-25 14:08:33 +08:00
parent 076b3c7b0b
commit 276bdd1b99
11 changed files with 331 additions and 520 deletions

View File

@@ -19,7 +19,7 @@ struct marsio_io
struct mr_vdev *mr_dev;
struct mr_sendpath *mr_path;
struct io_stat stat[MAX_THREAD_NUM];
struct packet_io_stat stat[MAX_THREAD_NUM];
};
/******************************************************************************
@@ -263,7 +263,7 @@ int marsio_io_ingress(struct marsio_io *handle, uint16_t thr_idx, struct packet
struct packet *pkt;
marsio_buff_t *mbuff;
marsio_buff_t *rx_buffs[RX_BURST_MAX];
struct io_stat *stat = &handle->stat[thr_idx];
struct packet_io_stat *stat = &handle->stat[thr_idx];
int nr_recv;
int nr_parsed = 0;
int len;
@@ -321,7 +321,7 @@ void marsio_io_egress(struct marsio_io *handle, uint16_t thr_idx, struct packet
{
struct packet *pkt;
marsio_buff_t *mbuff;
struct io_stat *stat = &handle->stat[thr_idx];
struct packet_io_stat *stat = &handle->stat[thr_idx];
int len;
for (int i = 0; i < nr_pkts; i++)
@@ -356,7 +356,7 @@ void marsio_io_drop(struct marsio_io *handle, uint16_t thr_idx, struct packet *p
{
struct packet *pkt;
marsio_buff_t *mbuff;
struct io_stat *stat = &handle->stat[thr_idx];
struct packet_io_stat *stat = &handle->stat[thr_idx];
for (int i = 0; i < nr_pkts; i++)
{
@@ -379,7 +379,7 @@ int marsio_io_inject(struct marsio_io *handle, uint16_t thr_idx, struct packet *
char *ptr;
struct packet *pkt;
marsio_buff_t *mbuff;
struct io_stat *stat = &handle->stat[thr_idx];
struct packet_io_stat *stat = &handle->stat[thr_idx];
for (int i = 0; i < nr_pkts; i++)
{
@@ -423,7 +423,7 @@ void marsio_io_yield(struct marsio_io *handle, uint16_t thr_idx, uint64_t timeou
marsio_poll_wait(handle->mr_ins, vdevs, 1, thr_idx, timeout_ms);
}
struct io_stat *marsio_io_stat(struct marsio_io *handle, uint16_t thr_idx)
struct packet_io_stat *marsio_io_stat(struct marsio_io *handle, uint16_t thr_idx)
{
return &handle->stat[thr_idx];
}