OVS bridge&bundle&port分析(三十四)

一、按照用途划分,openvswitch中桥、端口大致可以分成如下几类:

1、配置管理

主要对象包括:bridge、port、interface。

2、openflow

主要对象包括:ofproto、ofproto_dpif、ofbundle、ofport、ofport_dpif。

3、端口镜像

主要对象包括:mbridge、mbundle。

4、upcall处理

主要对象包括:xbridge、xbundle、xport。

二、各对象之间的关系
在这里插入图片描述

三、各对象生成时间

1、ofproto创建路径(实际为ofproto_dpif对象)

bridge_run->bridge_reconfigure->ofproto_create->alloc

2、ofbundle创建路径

bridge_run->bridge_reconfigure->port_configure->ofproto_bundle_register->bundle_set

3、ofport创建路径

bridge_run->bridge_reconfigure->ofproto_create-> alloc

4、xbridge创建路径

bridge_run->bridge_run__->ofproto_type_run->type_run->xlate_ofproto_set

5、xbundle创建路径

bridge_run->bridge_run__->ofproto_type_run->type_run->xlate_bundle_set

6、xport创建路径

bridge_run->bridge_run__->ofproto_type_run->type_run->xlate_ofport_set

7、mbridge创建路径

bridge_run->bridge_reconfigure->ofproto_create->alloc  //与ofproto相同,ofproto对象创建时会同时创建mbridge对象

8、mbundle创建路径

bridge_run->bridge_reconfigure->port_configure->ofproto_bundle_register->bundle_set  //与ofbundle相同,创建ofbundle时会同时创建mbundle对象

创建类似多个对象目前看到的一个好处是模块之间耦合度低!

原文链接:https://blog.csdn.net/one_clouder/article/details/52175828

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值