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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章