perf: action_sf_chaining调用的小函数定义为inline
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
******************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user