OVS实现mirror功能时,限制了out端口的通信能力。
1、限制mirror out端口通信总结
xlate_normal_flood函数
static void
xlate_normal_flood(struct xlate_ctx *ctx, struct xbundle *in_xbundle,
uint16_t vlan)
{
struct xbundle *xbundle;
LIST_FOR_EACH (xbundle, list_node, &ctx->xbridge->xbundles) {
if (xbundle != in_xbundle
&& xbundle_includes_vlan(xbundle, vlan)
&& xbundle->floodable
&& !xbundle_mirror_out(ctx->xbridge, xbundle)) { //作为mirror out端口不允许以normal flood方式发包报文到该端口
output_normal(ctx, xbundle, vlan);
}
}
ctx->nf_output_iface = NF_OUT_FLOOD;
}
xlate_normal函数
/* Drop frames on bundles reserved for mirroring. */
if (xbundle_mirror_out(ctx->xbridge, in_xbundle)) { //如果报文入端口,也同时是mirror的out端口,则丢弃该报文
if (ctx->xin->packet != NULL) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
VLOG_WARN_RL(&rl, "bridge %s: dropping packet received on port "
"%s, which is reserved exclusively for mirroring",
ctx->xbridge->name, in_xbundle->name);
}
xlate_r

本文深入探讨OVS2.5.0中mirror功能的实现,重点关注如何限制mirror out端口的通信能力。通过分析xlate_normal_flood函数,揭示了出端口通信的限制逻辑,并介绍了mirror out的加速实现策略。
最低0.47元/天 解锁文章
2195

被折叠的 条评论
为什么被折叠?



