CN114625475B - 基于龙芯平台的多网口扩展方法和系统 - Google Patents

基于龙芯平台的多网口扩展方法和系统 Download PDF

Info

Publication number
CN114625475B
CN114625475B CN202110693120.4A CN202110693120A CN114625475B CN 114625475 B CN114625475 B CN 114625475B CN 202110693120 A CN202110693120 A CN 202110693120A CN 114625475 B CN114625475 B CN 114625475B
Authority
CN
China
Prior art keywords
network
chip
controller
network controller
bridge piece
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110693120.4A
Other languages
English (en)
Other versions
CN114625475A (zh
Inventor
黄亮亮
陈立东
王遥
陆春燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Lemote Information Technology Co ltd
Original Assignee
Jiangsu Lemote Information Technology Co ltd
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 Jiangsu Lemote Information Technology Co ltd filed Critical Jiangsu Lemote Information Technology Co ltd
Priority to CN202110693120.4A priority Critical patent/CN114625475B/zh
Publication of CN114625475A publication Critical patent/CN114625475A/zh
Application granted granted Critical
Publication of CN114625475B publication Critical patent/CN114625475B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明公开了基于龙芯平台的多网口扩展方法和系统,包括:桥片、集成在桥片上的网络控制器和连接到桥片的网络芯片构成的多网口扩展系统,以及,多网口扩展方法:S1、初始化桥片的I2C控制器;S2、将网络芯片注册为所述I2C控制器的从设备;S3、通过I2C总线对所述网络芯片进行配置;S4、网卡驱动新建虚拟phy设备;S5、将所述虚拟phy设备注册到网卡驱动。本发明用虚拟phy设备替代实际的phy设备进行网口的扩展,并将桥片和网络芯片集成在主板上,既节约了成本又节约了主板空间;通过桥片对网络芯片进行初始化和控制,也更加方便进行网络端口流量控制、网络端口管理和网口状态监控。

Description

基于龙芯平台的多网口扩展方法和系统
技术领域
本发明涉及计算机技术领域,特别是涉及基于龙芯平台的多网口扩展方法。
背景技术
网络控制器又称网卡或NIC(网络接口控制器),是一块被设计用来允许计算机在计算机网络上进行通讯的计算机硬件。由于其拥有MAC地址,因此属于OSI模型的第2层。它使得用户可以透过电缆或无线相互连接。
目前网卡主要是通过PCIE通道扩展网口,用于解决设备之间网络通信时网口缺乏的问题,常用的方案是网口直接和交换机连接,交换机再连接其他的通讯设备。但是对MAC与PHY分开的网络设备而言,需要增加单独的phy设备来实现网口的扩展,这既增加了成本,又增加了主板面积。
龙芯平台中龙芯7A桥片上集成有GMAC网络控制器,该桥片的PCIE通道有限,若通过PCIE通道扩展GMAC网络控制器的网口,则无法同时满足项目的功能多样性(PCIE通道用来扩展其他PCIE功能卡)和多网口的需求,若通过连接交换机的方式进行扩展则需要增加多个phy设备,因而,需要对现有方案进行改进。
发明内容
本发明主要解决的技术问题是提供基于龙芯平台的多网口扩展方法,以达到上述目的。
为解决上述技术问题,本发明采用的一个技术方案是:
提供基于龙芯平台的多网口扩展系统,包括:桥片、集成在桥片上的网络控制器和连接到桥片的网络芯片,所述桥片和网络芯片通过I2C总线连接和通讯,所述桥片和网络芯片集成在同一块主板上。
进一步的,所述桥片为龙芯7A桥片,所述网络控制器为龙芯7A桥片自带的GMAC网络控制器,所述网络芯片为SWITCH网络芯片,所述SWITCH网络芯片具有若干个RJ-45接口。
提供基于龙芯平台的多网口扩展方法:
S1、初始化桥片的I2C控制器;
S2、将网络芯片注册为所述I2C控制器的从设备;
S3、通过I2C总线对所述网络芯片进行配置;
S4、网卡驱动新建虚拟phy设备;
S5、将所述虚拟phy设备注册到网卡驱动。
进一步的,所述桥片上集成有网络控制器,所述网络控制器具有RGMII通讯接口。
进一步的,步骤S3还包括对所述RGMII通讯接口的port端口进行配置,所述配置包括根据网络控制器的特性设置TX和RX的延时和状态指示灯。
进一步的,步骤S4所述新建虚拟phy设备的具体步骤是:
S1、设置所述网络控制器的Link状态为连接状态;
S2、设置所述网络控制器的通讯速率为千兆速率;
S3、设置所述网络控制器通过RGMII通讯接口和网络芯片通讯,设置所述网络控制器的通讯模式为全双工。
进一步的,所述桥片为龙芯7A桥片,所述网络控制器为GMAC网络控制器,所述网卡驱动为内核GMAC网卡驱动,所述网络芯片为SWITCH网络芯片。
进一步的,步骤S5所述将虚拟phy设备注册到网卡驱动的具体步骤是:
S1、当所述RGMII通讯接口扫描网络phy的时候,将所述虚拟phy设备注册到网卡驱动;
S2、在所述网络phy初始化的过程中,找到注册的所述虚拟phy设备,并将所述虚拟phy设备绑定到网络控制器上。
本发明的有益效果是:
1、用虚拟phy设备替代实际的phy设备进行网口的扩展,并将桥片和网络芯片集成在主板上,既节约了成本又节约了主板空间;
2、通过桥片对网络芯片进行初始化和控制,也更加方便进行网络端口流量控制、网络端口管理和网口状态监控。
附图说明
图1是本发明GMAC网络控制器扩展多网口的架构图。
具体实施方式
下面结合附图对本发明的较佳实施例进行详细阐述,以使本发明的优点和特征能更易于被本领域技术人员理解,从而对本发明的保护范围做出更为清楚明确的界定。
本发明提供基于龙芯平台的多网口扩展的方法和系统,适用于MAC与PHY分开的网络设备,特别是适用于使用中龙芯7A桥片的龙芯平台,该平台中龙芯7A桥片自带GMAC网络控制器,通过连接GMAC网络控制器的mac和网络芯片的mac,去构建虚拟phy设备。
请参阅图1,本发明实施例中,基于龙芯平台的多网口扩展系统包括:龙芯7A桥片、集成在龙芯7A桥片上的GMAC网络控制器和连接到龙芯7A桥片的SWITCH网络芯片,龙芯7A桥片和SWITCH网络芯片通过I2C总线连接和通讯,龙芯7A桥片和SWITCH网络芯片集成在龙芯主板上,SWITCH网络芯片具有若干个RJ-45接口。
具体的, GMAC网络控制器的mac和SWITCH网络芯片的mac连接。
本发明实施例中,基于龙芯平台的多网口扩展方法是:
S1、初始化龙芯7A桥片的I2C控制器;
S2、将SWITCH网络芯片注册为I2C控制器的从设备;
S3、通过I2C总线对SWITCH网络芯片进行配置;
S4、内核GMAC网卡驱动新建虚拟phy设备;
S5、将虚拟phy设备注册到内核GMAC网卡驱动。
具体的,龙芯7A桥片通过I2C控制器与SWITCH网络芯片通讯,步骤S3中的配置指对SWITCH网络芯片的工作模式和mac进行配置,对龙芯7A桥片的GMAC网络控制器和SWITCH网络芯片的mac之间的通讯延迟进行配置。
龙芯7A桥片上集成有GMAC网络控制器,GMAC网络控制器具有RGMII通讯接口,步骤S3还包括对RGMII通讯接口的port端口进行配置,实现对port端口的管控。
具体的,配置包括根据GMAC网络控制器的特性设置TX和RX的延时和状态指示灯。
步骤S4中新建虚拟phy设备的具体步骤为:
S1、设置GMAC网络控制器的Link状态为连接状态;
S2、设置GMAC网络控制器的通讯速率为千兆速率;
S3、设置GMAC网络控制器通过RGMII通讯接口和SWITCH网络芯片通讯,设置GMAC网络控制器的通讯模式为全双工。
步骤S5中将虚拟phy设备注册到网卡驱动的具体步骤是:
S1、当RGMII通讯接口扫描网络phy的时候,将虚拟phy设备注册到内核GMAC网卡驱动;
S2、在网络phy初始化的过程中,找到注册的虚拟phy设备,并将虚拟phy设备绑定到GMAC网络控制器上。
具体的,内核GMAC网卡驱动进行初始化到一定阶段时,会通过RGMII通讯接口扫描网络phy,若未新建虚拟phy设备则初始化失败,若已新建虚拟phy设备则进行注册。
具体的,扩展的网口数量由SWITCH网络芯片的网口数量决定,能够在不同的应用场景满足多网口的功能。
本发明的有益效果是:
1、用虚拟phy设备替代实际的phy设备进行网口的扩展,并将桥片和网络芯片集成在主板上,既节约了成本又节约了主板空间;
2、通过桥片对网络芯片进行初始化和控制,也更加方便进行网络端口流量控制、网络端口管理和网口状态监控。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (4)

1.基于龙芯平台的多网口扩展方法,其特征在于,包括:
S1、初始化桥片的I2C控制器;
S2、将SWITCH网络芯片注册为所述I2C控制器的从设备;
S3、通过I2C总线对所述SWITCH网络芯片的工作模式和mac进行配置并对网络控制器和SWITCH网络芯片的mac之间的通讯延迟进行配置;
S4、网卡驱动新建虚拟phy设备;
S5、当所述网络控制器的RGMII通讯接口扫描网络phy的时候,将所述虚拟phy设备注册到网卡驱动;
S6、在所述网络phy初始化的过程中,找到注册的所述虚拟phy设备,并将所述虚拟phy设备绑定到网络控制器上。
2.根据权利要求1所述的基于龙芯平台的多网口扩展方法,其特征在于,步骤S3还包括对所述RGMII通讯接口的port端口进行配置,所述配置包括根据网络控制器的特性设置TX和RX的延时和状态指示灯。
3.根据权利要求1所述的基于龙芯平台的多网口扩展方法,其特征在于,步骤S4所述新建虚拟phy设备的具体步骤是:
S1、设置所述网络控制器的Link状态为连接状态;
S2、设置所述网络控制器的通讯速率为千兆速率;
S3、设置所述网络控制器通过RGMII通讯接口和网络芯片通讯,设置所述网络控制器的通讯模式为全双工。
4.根据权利要求1所述的基于龙芯平台的多网口扩展方法,其特征在于,所述桥片为龙芯7A桥片,所述网络控制器为GMAC网络控制器,所述网卡驱动为内核GMAC网卡驱动。
CN202110693120.4A 2021-06-22 2021-06-22 基于龙芯平台的多网口扩展方法和系统 Active CN114625475B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110693120.4A CN114625475B (zh) 2021-06-22 2021-06-22 基于龙芯平台的多网口扩展方法和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110693120.4A CN114625475B (zh) 2021-06-22 2021-06-22 基于龙芯平台的多网口扩展方法和系统

Publications (2)

Publication Number Publication Date
CN114625475A CN114625475A (zh) 2022-06-14
CN114625475B true CN114625475B (zh) 2023-10-24

Family

ID=81896629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110693120.4A Active CN114625475B (zh) 2021-06-22 2021-06-22 基于龙芯平台的多网口扩展方法和系统

Country Status (1)

Country Link
CN (1) CN114625475B (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684964A (zh) * 2012-05-10 2012-09-19 南京英飞诺网络科技有限公司 一种万兆以太网接口卡及以太网组网方法
CN105721476A (zh) * 2016-02-25 2016-06-29 深圳市亿威尔信息技术股份有限公司 一种网络安全管理系统及方法
CN107094150A (zh) * 2017-05-23 2017-08-25 郑州云海信息技术有限公司 一种ncsi协议实现结构及方法
CN209928413U (zh) * 2019-06-03 2020-01-10 龙芯中科技术有限公司 一种COMe模块和计算机
CN111880727A (zh) * 2020-06-29 2020-11-03 苏州浪潮智能科技有限公司 一种用于硬盘端口号灵活分配的硬件架构及其实现方法
CN112822149A (zh) * 2020-08-17 2021-05-18 北京辰信领创信息技术有限公司 一种基于智能路由器物理口和mac及ip的终端准入管控设计

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120284435A1 (en) * 2011-05-03 2012-11-08 Myrah Michael G Zone group manager virtual phy
US9542349B2 (en) * 2013-12-04 2017-01-10 Avago Technologies General Ip (Singapore) Pte. Ltd. Wide port emulation at serial attached SCSI expanders using virtual physical links

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684964A (zh) * 2012-05-10 2012-09-19 南京英飞诺网络科技有限公司 一种万兆以太网接口卡及以太网组网方法
CN105721476A (zh) * 2016-02-25 2016-06-29 深圳市亿威尔信息技术股份有限公司 一种网络安全管理系统及方法
CN107094150A (zh) * 2017-05-23 2017-08-25 郑州云海信息技术有限公司 一种ncsi协议实现结构及方法
CN209928413U (zh) * 2019-06-03 2020-01-10 龙芯中科技术有限公司 一种COMe模块和计算机
CN111880727A (zh) * 2020-06-29 2020-11-03 苏州浪潮智能科技有限公司 一种用于硬盘端口号灵活分配的硬件架构及其实现方法
CN112822149A (zh) * 2020-08-17 2021-05-18 北京辰信领创信息技术有限公司 一种基于智能路由器物理口和mac及ip的终端准入管控设计

Also Published As

Publication number Publication date
CN114625475A (zh) 2022-06-14

Similar Documents

Publication Publication Date Title
US8407367B2 (en) Unified connector architecture
US8296469B2 (en) Scalable method and apparatus for link with reconfigurable ports
CN104579772B (zh) 计算机设备与计算机设备的配置管理方法
US6973133B2 (en) Integrated radio frequency interface
CN101436170A (zh) Spi设备通信电路
CN108600017A (zh) 多协议串口扩展方法
CN109933376A (zh) 一种BIOS setup中PCIE丝印信息更新方法、装置、受控终端及存储介质
CN201839452U (zh) 一种无线传感器网络智能网关
CN109240960B (zh) 一种基于vpx架构的交换板电路及其实现方法
CN114625475B (zh) 基于龙芯平台的多网口扩展方法和系统
US20070155422A1 (en) Method for controlling mobile data connection through USB Ethernet management of mobile station
US8954623B2 (en) Universal Serial Bus devices supporting super speed and non-super speed connections for communication with a host device and methods using the same
CN110750475A (zh) 多cpu共用一物理串口方法及装置、嵌入式设备、介质
CN110162287A (zh) 用于实现PCIE Box的VGA显示的方法及装置
WO2014137054A1 (ko) 개방형 스마트 앱세서리 및 상기 앱세서리의 플랫폼을 이용하여 스마트 장치의 기능을 확장하는 방법
CN207249662U (zh) 自适应usb同步器
CN107645638B (zh) 视频处理器和背板通信方法
CN218162486U (zh) 一种车载路由网关、车辆及通信系统
CN206370049U (zh) 用于单片机的多级通信电路
CN101694645B (zh) 用于通讯系统的子卡及其操作方法
CN216310776U (zh) 接口板卡、用户设备及cpu的测试系统
CN212411050U (zh) 一种智能卡管理装置和智能卡系统
CN220290210U (zh) 一种usb带宽扩展装置、系统及设备
CN104601423B (zh) Spi总线节点设备及其通信方法以及spi总线系统
CN117492525B (zh) Usb扩展设备、带宽管理方法和可读存储介质

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant