Skip to content

Latest commit

 

History

History
68 lines (40 loc) · 1.89 KB

NeutronOvsAgent之br_phys.md

File metadata and controls

68 lines (40 loc) · 1.89 KB

Neutron Ovs Agent 之 br_phys

class OVSPhysicalBridge(ovs_bridge.OVSAgentBridge, br_dvr_process.OVSDVRProcessMixin)

neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_phys.py

    dvr_process_table_id = constants.DVR_PROCESS_VLAN
    dvr_process_next_table_id = constants.LOCAL_VLAN_TRANSLATION

def setup_default_table(self)

    def setup_default_table(self):
        self.install_normal()

写入这么一个 flow entity。

cookie=0xbcaaac3d0239a6e4, duration=554.311s, table=0, n_packets=57, n_bytes=7516, idle_age=8292, priority=0 actions=NORMAL

def add_dvr_mac_vlan(self, mac, port)

在 table 3 中增加此 dvr mac 的记录

cookie=0xa48e621bd30e85e9, duration=327470.414s, table=3, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=2,dl_src=fa:16:3f:4d:40:29 actions=output:1

def remove_dvr_mac_vlan(self, mac)

删除 table 3 中关于此 dvr mac 的记录

cookie=0xa48e621bd30e85e9, duration=319478.446s, table=3, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=2,dl_src=fa:16:3f:4d:40:29 actions=output:1

def add_dvr_mac_vlan(self, mac, port)

为该 dvr mac 增加一个 flow entity

 cookie=0xa02e63c944a0b07b, duration=194272.621s, table=3, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=2,dl_src=fa:16:3f:24:77:e3 actions=output:1

def reclaim_local_vlan(self, port, lvid)

在 br-ex 删除该 lvid 的流表记录

 cookie=0xa02e63c944a0b07b, duration=342944.841s, table=0, n_packets=21, n_bytes=882, idle_age=65534, hard_age=65534, priority=4,in_port=1,dl_vlan=3 actions=strip_vlan,NORMAL

def provision_local_vlan(self, port, lvid, segmentation_id, distributed)

创建一个流表处理处理从外部进来的流量

class OVSDVRProcessMixin(object)

neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_dvr_process.py