perf: action_sf_chaining调用的小函数定义为inline

This commit is contained in:
luwenpeng
2023-11-21 11:20:48 +08:00
parent b3841fcaff
commit 332fe52650
3 changed files with 16 additions and 22 deletions

View File

@@ -92,7 +92,11 @@ struct throughput_metrics
uint64_t n_bytes;
};
void throughput_metrics_inc(struct throughput_metrics *iterm, uint64_t n_pkts, uint64_t n_bytes);
static inline void throughput_metrics_inc(struct throughput_metrics *iterm, uint64_t n_pkts, uint64_t n_bytes)
{
iterm->n_bytes += n_bytes;
iterm->n_pkts += n_pkts;
}
/******************************************************************************
* device

View File

@@ -143,16 +143,6 @@ void route_ctx_copy(struct route_ctx *dst, struct route_ctx *src)
dst->len = src->len;
}
/******************************************************************************
* throughput_metrics
******************************************************************************/
void throughput_metrics_inc(struct throughput_metrics *iterm, uint64_t n_pkts, uint64_t n_bytes)
{
iterm->n_bytes += n_bytes;
iterm->n_pkts += n_pkts;
}
/******************************************************************************
* device
******************************************************************************/