TSG-13837 支持decrypted traffic steering/mirroring,并重构packet_io
This commit is contained in:
@@ -126,15 +126,14 @@ void sids_copy(struct sids *dst, struct sids *src)
|
||||
* route_ctx
|
||||
******************************************************************************/
|
||||
|
||||
int route_ctx_is_empty(struct route_ctx *ctx)
|
||||
void route_ctx_write_once(struct route_ctx *dst, struct route_ctx *src)
|
||||
{
|
||||
if (ctx->len == 0)
|
||||
if (dst && src)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
if (dst->len == 0)
|
||||
{
|
||||
route_ctx_copy(dst, src);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,8 +149,8 @@ void route_ctx_copy(struct route_ctx *dst, struct route_ctx *src)
|
||||
|
||||
void throughput_metrics_inc(struct throughput_metrics *iterm, uint64_t n_pkts, uint64_t n_bytes)
|
||||
{
|
||||
__atomic_fetch_add(&iterm->n_bytes, n_bytes, __ATOMIC_RELAXED);
|
||||
__atomic_fetch_add(&iterm->n_pkts, n_pkts, __ATOMIC_RELAXED);
|
||||
ATOMIC_ADD(&iterm->n_bytes, n_bytes);
|
||||
ATOMIC_ADD(&iterm->n_pkts, n_pkts);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user