WO2017076089A1 - 一种网口状态检测和同步的方法及装置 - Google Patents

一种网口状态检测和同步的方法及装置 Download PDF

Info

Publication number
WO2017076089A1
WO2017076089A1 PCT/CN2016/093255 CN2016093255W WO2017076089A1 WO 2017076089 A1 WO2017076089 A1 WO 2017076089A1 CN 2016093255 W CN2016093255 W CN 2016093255W WO 2017076089 A1 WO2017076089 A1 WO 2017076089A1
Authority
WO
WIPO (PCT)
Prior art keywords
network port
current
primary
query
active
Prior art date
Application number
PCT/CN2016/093255
Other languages
English (en)
French (fr)
Inventor
魏文焕
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017076089A1 publication Critical patent/WO2017076089A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events

Definitions

  • This document relates to, but is not limited to, a virtualized cloud operating system, and in particular, to a method and apparatus for network port state detection and synchronization.
  • FIG. 2 is a schematic diagram of the association structure of the SR-IOV network port enabled by the cloud host in the related art. As shown in FIG. 2, when the host is created, two VF network ports of a pair of SR-IOV network ports are simultaneously bound. The VF network port can provide physical link redundancy for the cloud host because it is physically assigned to different network ports.
  • the cloud operating system is responsible for controlling the active/standby status of the physical network ports and notifying the PF driver for real-time updates.
  • the network host on the physical host has the active/standby status. Therefore, the cloud host running on the physical host needs to be aware of the active/standby status of the physical network interface. After synchronization, the timeliness and accuracy of message processing can be guaranteed.
  • FIG. 3 is related to the technology.
  • a schematic diagram of the mailbox communication mechanism implements this communication channel for each VF by using a series of hardware mailboxes and doorbell registers.
  • the communication message between the VF and PF network ports based on the mailbox notification mode implemented by the hardware manufacturer in the driver is limited to VF reset, configuration VF media access control (MAC) address, setting multicast address, and setting virtual local area network (VLAN).
  • Basic parameters such as filters, setting the maximum packet length, etc.
  • the switching module is configured to:
  • the apparatus further includes a communication module, configured to perform external communication by using the primary network port that completes the switching or maintaining operation.
  • the method and the device for detecting and synchronizing the network port status provided by the embodiment of the present invention include: querying whether the physical function PF network port corresponding to the current virtual function VF network port is the main network port; and then performing the VF network port according to the query result. Switching or holding operations of the active and standby states.
  • the embodiment of the invention achieves the consistency of the synchronization state of the PF network port and the VF network port, thereby ensuring the timeliness and accuracy of packet processing.
  • FIG. 1 is a schematic diagram of a network structure in which two cloud hosts share one SR-IOV network port in the related art
  • FIG. 2 is a schematic structural diagram of a cloud host enabling an SR-IOV network port bond in the related art
  • FIG. 3 is a schematic diagram of a mailbox communication mechanism in the related art
  • FIG. 4 is a schematic flowchart of a method for detecting and synchronizing network port status according to an embodiment of the present invention
  • the PF network port corresponding to the current VF network port is used as the primary network port; and then the VF network port is performed according to whether the PF network port corresponding to the VF network port is the primary network port. Switching or maintaining operation of the standby state.
  • the PF network port corresponding to the current VF network port is used as the primary network port.
  • the driver of the current VF network port sends a VF network port synchronization query message to the PF network port corresponding to the current VF network port. Whether the PF network port corresponding to the current VF network port is the primary network port.
  • the current VF network port driver of the cloud host is required to send the VW network port synchronization query message.
  • the HW information of the PF network port corresponding to the current VF network port is the same as the VF network port synchronization query message.
  • the PF network port driver can query the active/standby status corresponding to the PF network port according to the HW information, and carry the query result in the response message.
  • the result of the query can be in a variety of ways. For example, if the query result is 0, the PF network port corresponding to the current VF network port is the primary network port. If the query result is non-zero, the PF network port corresponding to the current VF network port is a non-active network port. (backup network port).
  • the current VF network port is used as the main network port, and the present invention is not limited thereto.
  • the current VF network port can also be a backup network port.
  • the network port state detection and synchronization method can be replaced according to the embodiment of the present invention.
  • the query module 61 is required to send the HW information of the PF network port corresponding to the current active VF network port, that is, the VF network port synchronization query message.
  • the PF network port driver queries the primary and backup states corresponding to the PF network port according to the HW information, and carries the query result in the response message.
  • the query result can be in multiple ways. For example, if the query result is 0, the PF network port corresponding to the current VF network port is the primary network port. If the query result is non-zero, the PF network port corresponding to the current VF network port is the standby network port.
  • the disclosed method and apparatus may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the communication connections between each of the components shown or discussed may be indirect coupling or communication connections through some network ports, devices or modules, and may be electrical, mechanical or otherwise.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

一种网口状态检测和同步的方法及装置,包括:查询当前虚拟功能(VF)(网口对应的物理功能(PF)网口是否为主用网口;根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。本发明实施例实现了网口状态的同步。

Description

一种网口状态检测和同步的方法及装置 技术领域
本文涉及但不限于虚拟化云操作系统,尤其涉及一种网口状态检测和同步的方法及装置。
背景技术
单根输入/输出虚拟化(SR-IOV)标准允许在I/O来宾域之间高效共享快速外设组件互连(PCIe,Peripheral Component Interconnect Express)设备。SR-IOV设备可以具有数十个与某个物理功能(PF)关联的虚拟功能(VF)。比较典型的应用就是多个云主机共享同一个支持SR-IOV标准的PCIe网口,图1为相关技术中两个云主机共享一个SR-IOV网口的网络结构示意图,如图1所示,每个云主机可以使用一个或多个VF网口,云主机之间共用一个物理网口完成与外部网络的交互。
在对可靠性要求很高的场景中,多个云主机共享单物理网口的方式并不能满足物理链路级冗余的应用需求。针对这一场景,通常的解决方法是将SR-IOV网口的一对网口组成关联(bond)主备模式(active-standby),共同服务所有云主机。图2为相关技术中云主机启用SR-IOV网口关联结构示意图,如图2所示,主机在创建时,会同时绑定一对SR-IOV网口的两个VF网口,这两个VF网口由于物理上归属于不同的网口,所以可以为云主机提供物理链路冗余的功能。
相关技术中的大多数云操作系统都支持SR-IOV网口bond的功能,在实际使用过程中,云操作系统负责管控这对物理网口的主备状态,并通知PF驱动实时更新。由于物理主机的网口有主备之分,因此,物理主机上面运行的云主机就需要关注物理网口的主备状态,并且需要感知网口主备切换的过程,当VF和PF网口状态保持同步后,就能保证报文处理的及时性及准确性。
要实现云主机感知物理网口的主备状态,就需要一套VF驱动与PF驱动通信机制,但是SR-IOV标准并没有定义这条通信线路的实现机制。目前主流的硬件厂商会采用邮箱通知的方式来支持该通信机制,图3为相关技术中 邮箱通信机制示意图,如图3所示,通过使用一系列硬件信箱和门铃寄存器来为每个VF实现这个通信信道。但是,硬件厂商在驱动中实现的基于邮箱通知方式的VF和PF网口之间的通信消息仅限于VF复位、配置VF媒体访问控制(MAC)地址、设置多播地址、设置虚拟局域网(VLAN)过滤器、设置最大包长等基本参数设置等,这些参数在云主机上电时VF网口初始化时使用。目前,还可以基于软件的信道来实现VF驱动与PF驱动通信机制,但是需要由Hypervisor(一种运行在基础物理服务器和操作系统之间的中间软件层,可允许多个操作系统和应用共享硬件。也可叫做VMM(virtual machine monitor),即虚拟机监视器)子系统提供支持。每一个生产商的信道的实现方法并不相同,因此,需要客户自己启动这些支持。而且,并不是所用Hypervisor生产商都提供基于软件的消息机制。
可见,针对云主机运行过程中的VF和PF网口状态的同步需求,相关技术还无法实现。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种网口状态检测和同步的方法及装置,能够保持PF网口和VF网口状态的同步。
本发明实施例提供了一种网口状态检测和同步的方法,所述方法包括:
查询当前虚拟功能VF网口对应的物理功能PF网口是否为主用网口;
根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
可选的,上述方案中,所述查询当前VF网口对应的PF网口是否为主用网口包括:
通过所述当前VF网口的驱动发送VF网口同步查询消息到所述当前VF网口对应的PF网口的驱动,查询当前VF网口对应的PF网口是否为主用网口。
可选的,上述方案中,所述查询当前VF网口对应的PF网口是否为主用 网口包括:周期性、和/或实时查询当前VF网口对应的PF网口是否为主用网口。
可选的,上述方案中,所述根据查询结果,进行VF网口主备状态的切换或保持操作包括:
查询到所述当前VF网口对应的PF网口为主用网口时,进行VF网口主备状态保持操作;查询到所述当前VF网口对应的PF网口为非主用用网口时,进行VF网口主备状态切换操作。
可选的,上述方案中,所述方法还包括:
使用完成切换或保持操作的所述主用网口进行外部通信。
本发明实施例还提供了一种网口状态检测和同步装置,所述装置包括:查询模块、切换模块,其中,
所述查询模块,设置为查询当前虚拟功能VF网口对应的物理功能PF网口是否为主用网口;
所述切换模块,设置为根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
可选的,上述方案中,所述查询模块是设置为:
通过所述当前VF网口的驱动发送VF网口同步查询消息到所述当前VF网口对应的PF网口的驱动,查询当前VF网口对应的PF网口是否为主用网口。
可选的,上述方案中,所述查询模块是设置为:周期性、和/或实时查询当前VF网口对应的PF网口是否为主用网口。
可选的,上述方案中,所述切换模块是设置为:
查询到所述当前VF网口对应的PF网口为主用网口时,进行VF网口主备状态保持操作;查询到所述当前VF网口对应的PF网口为非主用用网口时,进行VF网口主备状态切换操作。
可选的,上述方案中,所述装置还包括通信模块,设置为使用完成切换或保持操作的所述主用网口进行外部通信。
本发明实施例所提供的网口状态检测和同步的方法及装置,包括:查询当前虚拟功能VF网口对应的物理功能PF网口是否为主用网口;然后根据查询结果,进行VF网口主备状态的切换或保持操作。本发明实施例实现了PF网口和VF网口同步状态的一致,从而保证报文处理的及时性及准确性。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为相关技术中两个云主机共享一个SR-IOV网口的网络结构示意图;
图2为相关技术中云主机启用SR-IOV网口bond结构示意图;
图3为相关技术中邮箱通信机制示意图;
图4为本发明实施例一网口状态检测和同步的方法流程示意图;
图5为本发明实施例二网口状态检测和同步的方法流程示意图;
图6为本发明实施例网口状态检测和同步的装置的结构示意图。
本发明的实施方式
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
本发明实施例中,先查询当前VF网口对应的PF网口是否为主用网口;然后根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
下面结合附图及实施例,对本发明实施例技术方案的实施作说明。图4为本发明实施例一网口状态检测和同步的方法流程示意图,如图4所示,本实施例网口状态检测和同步的方法包括:
步骤401:查询当前虚拟功能(VF)网口对应的物理功能(PF)网口是否为主用网口;
可选的,查询当前VF网口对应的PF网口是否为主用网口包括:通过当前VF网口的驱动发送VF网口同步查询消息到当前VF网口对应的PF网口的驱动,查询当前VF网口对应的PF网口是否为主用网口。
可选的,以邮箱通知模式为基础,通过主用VF网口同步查询消息,用来实现VF与PF网口状态的检测和同步,使得能够当PF网口主备关系发生变化时,VF接口能同步实现倒换;其中,VF网口同步查询消息可以采用如下消息形式:XXX_VF_GET_MASTER;其中,XXX表示驱动类型,如:IXGBE(IXGBE是Intel公司的10Ge网卡驱动类型(Intel 10 Gigabit Ethernet);XXX_VF_GET_MASTER消息由:VF驱动模块通过内部通信通道(例如邮箱通知模式)发送给PF驱动模块的。这条消息的意思是VF想知道对应PF的主用状态(vf get pf’s master state),收到这条消息后PF可以在响应中返回主用状态的参数,例如、主用状态的值。
所述VF网口同步查询消息的发送端是VF网口的驱动程序,接收端是PF的网口驱动程序。发送端将VF网口同步查询消息投递到接受端的邮箱,接收端在处理完成后再将响应消息投递回发送端的邮箱,以使得发送端能够根据结果值做相应VF端口的倒换/保持操作。
为了防止混淆,要求云主机当前VF网口驱动发送VF网口同步查询消息时,一次只能带一个当前VF网口对应的PF网口的HW信息,即VF网口同步查询消息。PF网口驱动可以根据该HW信息查询PF网口对应的主备状态,在响应消息中携带查询结果。查询结果可以采用多种方式,例如:查询结果为0表示当前VF网口对应的PF网口为主用网口,查询结果非0表示当前VF网口对应的PF网口为非主用网口(备用网口)。
本发明实施例中,可以选择周期性、和/或实时查询当前VF网口对应的PF网口是否为主用网口。
本发明实施例中,网口状态检测和切换可以应用于一下场景:
场景一:云主机上电时,需要查询哪个VF网口是主用网口对应的VF网口,这样后续才能进行正确的收发操作。
场景二:云主机在运行过程中,需要实时感知VF网口对应的底层的PF网口的主备状态,当PF网口发生主备切换以后,VF接口也要相应的发生切换。
场景三:云主机在运行过程中,如果需要进行备VF接口的倒换,则需 要判定新的主用网口对应的PF网口是否可用。
对于场景二,本发明实施例中,可以采用周期性查询当前VF网口对应的PF网口是否为主用网口,包括:
云主机上电后,当前VF网口的驱动定时发送VF网口同步查询消息(例如、XXX_VF_GET_MASTER)到当前VF网口对应的PF网口驱动,查询当前的VF网口对应的PF网口的主备状态。当响应消息中告知当前VF网口对应的PF网口不是主用网口时,执行步骤402中的VF网口倒换操作;当响应消息提示当前VF网口对应的PF网口为主用网口时,执行步骤402中的VF网口倒换保持操作。本发明实施例中,查询周期可以根据实际的VF收发队列缓冲情况而定,也可以根据其他因素设定。通常,新的主用网口对应的报文缓冲区能够缓存几秒左右的报文,因此,可以将查询周期定为几秒,如果在这段时间内VF网口完成主备切换,那么不会造成太大的丢包影响。
对于场景一和场景三,本发明实施例中,可以采用实时查询当前VF网口对应的PF网口是否为主用网口,当云主机不确定当前哪一个VF网口主用却又立刻要做关键操作时,可以直接发起实时查询消息。根据响应结果判断是否可以做VF网口主备倒换操作。
本发明实施例中,可以同时采用周期性和实时查询当前VF网口对应的PF网口是否为主用网口。即当云主机上电或云主机在运行过程中需要进行主备VF接口的倒换的情况下,实时查询当前VF网口对应的PF网口是否为主用网口;当云主机正常运行过程中,周期性查询当前VF网口对应的PF网口是否为主用网口。
步骤402:根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
可选的,根据查询结果,进行VF网口主备状态的切换或保持操作包括:
查询到当前VF网口对应的PF网口为主用网口时,进行VF网口主备状态保持操作;查询到当前VF网口对应的PF网口为非主用用网口时,进行VF网口主备状态切换操作。
本发明实施例中,仅仅是以当前VF网口为主用网口为例,并不限定此 范围,在实际应用中,当前VF网口还可以是备用网口,当所述VF网口为备用网口时,只需按照本发明实施例网口状态检测和同步方法进行替换即可实现。
可选的,本发明实施例中,本发明实施例方法还包括:使用完成切换或保持操作的主用网口进行外部通信。
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述网口状态检测和同步的方法。
图5为本发明实施例二网口状态检测和同步的方法流程示意图,如图5所示,云操作系统支持SR-IOV网口bond的功能后,需要管控这对物理网口的主备状态,并通知PF驱动实时更新。VF驱动需要实时查询PF网口的主备状态,根据结果及时切换VF网口。本发明实施例所述网口状态检测和同步方法包括以下步骤:
步骤501:云平台开启一个后台定时任务,实时监控物理网口的主备状态;
步骤502:云平台通知PF网口驱动保存当前的物理网口主备状态;
步骤503:VF网口驱动主动发送VF网口同步查询消息,查询当前的VF对应的PF网口是否为主用PF网口;VF网口同步查询消息可以是XXX_VF_GET_MASTER消息。
步骤504:VF网口驱动根据VF网口同步查询消息响应结果,进行VF网口的切换或保持操作;
步骤505:使用完成切换或保持操作的主用网口进行外部通信。
本发明实施例网口状态检测和同步的方法可以实现VF与PF网口链路主备同步功能,在云主机上电时,可以及时保证消息的正确收发;在底层物理网口切换时可以保证上层业务的及时感知,增强云主机业务的可靠性。
本发明实施例还提供了一种网口状态检测和同步放入装置,图6为本发 明实施例网口状态检测和同步放入装置结构示意图,如图6所示,所述装置包括:查询模块61、切换模块62,其中,
查询模块61,设置为查询当前虚拟功能(VF)网口对应的物理功能(PF)网口是否为主用网口;
本发明实施例中所述查询模块61是设置为:通过当前VF网口的驱动发送VF网口同步查询消息到当前VF网口对应的PF网口的驱动,查询当前VF网口对应的PF网口是否为主用网口。
可选的,查询模块61以邮箱通知模式为基础,通过VF网口同步查询消息,用来实现VF与PF网口的状态的检测和同步,使得能够当PF网口主备关系发生变化时,VF接口能同步实现倒换;其中,VF网口同步查询消息可以采用如下消息形式:XXX_VF_GET_MASTER;其中,XXX表示驱动类型,如:IXGBE;
VF网口同步查询消息的发送端可以是当前VF网口的驱动,接收端是当前VF网口对应的PF的网口的驱动。发送端将VF网口同步查询消息投递到接受端的邮箱,接收端在处理完成后再将响应消息投递回发送端的邮箱,以使得发送端能够根据结果值做相应VF端口的倒换或保持操作。
为了防止混淆,要求查询模块61发送请求消息时,一次只能带一个当前主用VF网口对应的PF网口的HW信息,即VF网口同步查询消息。PF网口驱动根据该HW信息查询PF网口对应的主备状态,在响应消息中携带查询结果。查询结果可以采用多种方式,例如:查询结果为0表示当前VF网口对应的PF网口为主用网口,查询结果非0表示当前VF网口对应的PF网口为备用网口。
本发明实施例中,查询模块61可以周期性、和/或实时查询当前VF网口对应的PF网口是否为主用网口。
本发明实施例中,网口状态检测和切换主要应用于一下场景:
场景一:云主机上电时,需要查询哪个VF网口是主用网口对应的VF网口,这样后续才能进行正确的收发操作。
场景二:云主机在运行过程中,需要实时感知VF网口对应的底层的PF 网口的主备状态,当PF网口发生主备切换以后,VF接口也要相应的发生切换。
场景三:云主机在运行过程中,如果需要进行备VF接口的倒换,则需要判定新的主用网口对应的PF网口是否可用。
对于场景二,本发明实施例中,可以采用周期性查询当前VF网口对应的PF网口是否为主用网口,包括:
云主机上电后,查询模块61控制VF网口驱动定时发送VF网口同步查询消息(例如、XXX_VF_GET_MASTER)到当前VF网口对应的PF网口驱动,查询当前的VF网口对应的PF网口的主备状态。当响应消息中告知当前VF网口对应的PF网口不是主用网口时,执行步骤402中的VF网口倒换操作;当响应消息提示当前VF网口对应的PF网口为主用网口时,执行步骤402中的VF网口倒换保持操作。本发明实施例中,查询周期可以根据实际的VF收发队列缓冲情况而定,也可以根据其他因素设定。通常,新的主用网口对应的报文缓冲区能够缓存几秒左右的报文,因此,可以将查询周期定为几秒,如果在这段时间内VF网口完成主备切换,那么不会造成太大的丢包影响。
对于场景一和场景三,本发明实施例中,查询模块61可以采用实时查询当前VF网口对应的PF网口是否为主用网口,当云主机不确定当前哪一个VF网口主用却又立刻要做关键操作时,查询模块61可以控制VF网口驱动程序直接发起实时查询消息。根据响应结果判断是否可以做VF网口主备倒换操作。
本发明实施例中,查询模块61可以同时采用周期性和实时查询当前VF网口对应的PF网口是否为主用网口。即当云主机上电或云主机在运行过程中需要进行主备VF接口的倒换的情况下,实时查询当前VF网口对应的PF网口是否为主用网口;当云主机正常运行过程中,周期性查询当前VF网口对应的PF网口是否为主用网口。
切换模块62,设置为根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
可选的,本发明实施例中,切换模块62是设置为:查询到当前VF网口 对应的PF网口为主用网口时,进行VF网口主备状态保持操作;查询到当前VF网口对应的PF网口为非主用用网口时,进行VF网口主备状态切换操作。
本发明实施例中,仅仅是以当前VF网口为主用网口为例,并不限定此范围,在实际应用中,当前VF网口还可以是备用网口,当所述VF网口为备用网口时,只需按照本发明实施例网口状态检测和同步方法进行替换即可实现。
可选的本发明实施例中,所述装置还包括通信模块63,设置为使用完成切换或保持操作的主用网口进行外部通信。
图6和中所示的网口状态检测和同步的装置中的每一处理模块的实现功能,可参照前述网口状态检测和同步方法的相关描述而理解。本领域技术人员应当理解,图6所示的网口状态检测和同步装置中每一处理模块的功能可通过运行于处理器上的程序而实现,也可通过逻辑电路而实现,比如:可由中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)、或现场可编程门阵列(FPGA)实现。
在本发明所提供的几个实施例中,应该理解到,所揭露的方法及装置,可以通过其他的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个模块或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的每一组成部分相互之间的通信连接可以是通过一些网口,设备或模块的间接耦合或通信连接,可以是电性的、机械的或其他形式的。
上述作为分离部件说明的模块可以是、或也可以不是物理上分开的,作为模块显示的部件可以是、或也可以不是物理模块,即可以位于一个地方,也可以分布到多个网络模块上;可以根据实际的需要选择其中的部分或全部模块来实现本实施例方案的目的。
另外,在本发明每一实施例中的功能模块可以全部集成在一个处理模块中,也可以是每一个模块分别单独作为一个模块,也可以两个或两个以上模块集成在一个模块中;上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本发明实施例上述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
本发明实施例中记载的网口状态检测和同步方法、装置只以上述实施例为例,但不仅限于此,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
以上所述仅为本发明的可选实施例而已,并非用于限定本发明的保护范围。
工业实用性
上述技术方案实现了网口状态的同步。

Claims (10)

  1. 一种网口状态检测和同步的方法,所述方法包括:
    查询当前虚拟功能VF网口对应的物理功能PF网口是否为主用网口;
    根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
  2. 根据权利要求1所述方法,其中,所述查询当前VF网口对应的PF网口是否为主用网口包括:
    通过所述当前VF网口的驱动发送VF网口同步查询消息到所述当前VF网口对应的PF网口的驱动,查询当前VF网口对应的PF网口是否为主用网口。
  3. 根据权利要求1所述方法,其中,所述查询当前VF网口对应的PF网口是否为主用网口包括:周期性、和/或实时查询当前VF网口对应的PF网口是否为主用网口。
  4. 根据权利要求1所述方法,其中,所述根据查询结果,进行VF网口主备状态的切换或保持操作包括:
    查询到所述当前VF网口对应的PF网口为主用网口时,进行VF网口主备状态保持操作;查询到所述当前VF网口对应的PF网口为非主用用网口时,进行VF网口主备状态切换操作。
  5. 根据权利要求1至4任一项所述方法,所述方法还包括:
    使用完成切换或保持操作的所述主用网口进行外部通信。
  6. 一种网口状态检测和同步的装置,所述装置包括:查询模块、切换模块,其中,
    所述查询模块,设置为查询当前虚拟功能VF网口对应的物理功能PF网口是否为主用网口;
    所述切换模块,设置为根据查询的VF网口对应的PF网口是否为主用网口的结果,进行VF网口主备状态的切换或保持操作。
  7. 根据权利要求6所述装置,其中,所述查询模块是设置为:
    通过所述当前VF网口的驱动发送VF网口同步查询消息到所述当前VF网口对应的PF网口的驱动,查询当前VF网口对应的PF网口是否为主用网口。
  8. 根据权利要求6所述装置,其中,所述查询模块是设置为:周期性、和/或实时查询当前VF网口对应的PF网口是否为主用网口。
  9. 根据权利要求6所述装置,其中,所述切换模块是设置为:
    查询到所述当前VF网口对应的PF网口为主用网口时,进行VF网口主备状态保持操作;查询到所述当前VF网口对应的PF网口为非主用用网口时,进行VF网口主备状态切换操作。
  10. 根据权利要求6至9任一项所述装置,所述装置还包括通信模块,设置为使用完成切换或保持操作的所述主用网口进行外部通信。
PCT/CN2016/093255 2015-11-04 2016-08-04 一种网口状态检测和同步的方法及装置 WO2017076089A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510740584.0A CN106656539A (zh) 2015-11-04 2015-11-04 一种网口状态检测和同步方法及装置
CN201510740584.0 2015-11-04

Publications (1)

Publication Number Publication Date
WO2017076089A1 true WO2017076089A1 (zh) 2017-05-11

Family

ID=58661690

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/093255 WO2017076089A1 (zh) 2015-11-04 2016-08-04 一种网口状态检测和同步的方法及装置

Country Status (2)

Country Link
CN (1) CN106656539A (zh)
WO (1) WO2017076089A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131026A (zh) * 2019-12-26 2020-05-08 深信服科技股份有限公司 一种通信方法、装置、设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120002535A1 (en) * 2010-06-30 2012-01-05 Oracle America, Inc. Method and system for distributing network traffic among multiple direct hardware access datapaths
US20120254862A1 (en) * 2011-03-29 2012-10-04 Yaozu Dong Efficent migration of virtual functions to enable high availability and resource rebalance
CN103281308A (zh) * 2013-05-08 2013-09-04 大唐移动通信设备有限公司 一种数据传输方法和设备
CN103609077A (zh) * 2013-06-18 2014-02-26 华为技术有限公司 用于数据传输的方法、装置和系统以及物理网卡
US20140149985A1 (en) * 2012-11-26 2014-05-29 Hitachi, Ltd. Control method for i/o device and virtual computer system
CN104170307A (zh) * 2014-03-21 2014-11-26 华为技术有限公司 失效切换方法、装置和系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8503468B2 (en) * 2008-11-05 2013-08-06 Fusion-Io, Inc. PCI express load sharing network interface controller cluster
CN104272288B (zh) * 2012-06-08 2018-01-30 英特尔公司 用于实现虚拟机vm平台通信回送的方法和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120002535A1 (en) * 2010-06-30 2012-01-05 Oracle America, Inc. Method and system for distributing network traffic among multiple direct hardware access datapaths
US20120254862A1 (en) * 2011-03-29 2012-10-04 Yaozu Dong Efficent migration of virtual functions to enable high availability and resource rebalance
US20140149985A1 (en) * 2012-11-26 2014-05-29 Hitachi, Ltd. Control method for i/o device and virtual computer system
CN103281308A (zh) * 2013-05-08 2013-09-04 大唐移动通信设备有限公司 一种数据传输方法和设备
CN103609077A (zh) * 2013-06-18 2014-02-26 华为技术有限公司 用于数据传输的方法、装置和系统以及物理网卡
CN104170307A (zh) * 2014-03-21 2014-11-26 华为技术有限公司 失效切换方法、装置和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131026A (zh) * 2019-12-26 2020-05-08 深信服科技股份有限公司 一种通信方法、装置、设备和存储介质

Also Published As

Publication number Publication date
CN106656539A (zh) 2017-05-10

Similar Documents

Publication Publication Date Title
US9716616B2 (en) Active IP forwarding in an event driven virtual link aggregation (vLAG) system
US11200079B2 (en) System and method for virtual machine live migration
US8693343B2 (en) Relay apparatus, virtual machine system, and relay method
US10411948B2 (en) Cooperative active-standby failover between network systems
TWI454088B (zh) 用於偵測一交換器故障及管理一乙太網路光纖通道網路中之交換器故障後移轉之方法、系統及電腦可讀媒體
US9143444B2 (en) Virtual link aggregation extension (VLAG+) enabled in a TRILL-based fabric network
US9838462B2 (en) Method, apparatus, and system for data transmission
US10530636B2 (en) Link management method, device and system in virtual machine environment
WO2017000832A1 (zh) Mac地址的同步方法、装置及系统
US20150113112A1 (en) Managing Network Connection of a Network Node
US20180077007A1 (en) Redundant storage solution
US9806996B2 (en) Information processing system and control method for information processing system
WO2017008641A1 (zh) 冗余端口的切换方法及装置
US10158705B2 (en) Migration of hosts
US9654421B2 (en) Providing real-time interrupts over ethernet
US9967134B2 (en) Reduction of network churn based on differences in input state
US20140192636A1 (en) Start-up delay for event-driven virtual link aggregation
JP5558422B2 (ja) ネットワークシステム、冗長化方法、障害検知装置及び障害検知プログラム
US20190034299A1 (en) Switching servers without interrupting a client command-response queue
CN104170307B (zh) 失效切换方法、装置和系统
US9036634B2 (en) Multicast route entry synchronization
KR101266041B1 (ko) 로직 게이트 기반의 스위칭 칩을 이용한 고속 자동 고장복구 이더넷 다중화 네트워크 장치
WO2017076089A1 (zh) 一种网口状态检测和同步的方法及装置
JP6118464B2 (ja) ポートステータス同期化方法、関連のデバイス、及びシステム
US20200336368A1 (en) Notification and transfer of lag control pending a primary node reboot

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16861358

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16861358

Country of ref document: EP

Kind code of ref document: A1