英特尔
直播中

段宜敏

7年用户 236经验值
私信 关注
[问答]

KVM中的SRIOV和ubuntu绑定

00:04.0以太网控制器:英特尔公司82599以太网控制器虚拟功能(rev 01)
00:05.0以太网控制器:英特尔公司82599以太网控制器虚拟功能(rev 01)
我有一个带有Intel SRIOV卡的KVM。
5:enp4s0f0:mtu 1500 qdisc mq state UP模式DEFAULT group default qlen 1000 link / ether 00:0c:bd:05:d9:82 brd ff:ff:ff:ff:ff:ff vf 0 MAC 00:0c:bd
:05:d9:11,欺骗检查,链路状态自动vf 1 MAC 00:0c:bd:05:d9:ab,欺骗检查关闭,链路状态自动vf 2 MAC 00:0c:bd:05:d9
:a2,欺骗检查,链接状态自动vf 3 MAC 00:0c:bd:05:d9:ac,欺骗检查,链接状态自动vf 4 MAC 00:0c:bd:05:d9:ad,恶搞
检查关闭,链接状态自动vf 5 MAC 00:0c:bd:05:d9:ae,欺骗检查关闭,链路状态自动vf 6 MAC 00:0c:bd:05:d9:af,欺骗检查,链接
-state auto vf 7 MAC 00:0c:bd:05:d9:a1,欺骗检查关闭,链接状态自动8:enp4s0f1:mtu 1500 qdisc mq状态UP模式DEFAULT组默认qlen 1000链接/ ether 00:0c:bd
:05:d9:83 brd ff:ff:ff:ff:ff:ff vf 0 MAC 00:0c:bd:05:d9:12,欺骗检查,链接状态自动vf 1 MAC 00:0c:bd:
05:d9:bb,欺骗检查,链路状态自动vf 2 MAC 00:0c:bd:05:d9:bc,欺骗检查关闭,链路状态自动vf 3 MAC 00:0c:bd:05:d9:
bd,恶搞checki
ng off,link-state auto vf 4 MAC 00:0c:bd:05:d9:be,欺骗检查,链路状态自动vf 5 MAC 00:0c:bd:05:d9:bf,欺骗检查,链接
-state auto vf 6 MAC 00:0c:bd:05:d9:b1,欺骗检查,链路状态自动vf 7 MAC 00:0c:bd:05:d9:b2,欺骗检查,链路状态自动
我在GUEST Ubuntu机器上使用了每张卡的vf0
物理函数enp4s0f0具有以下虚函数:PCI BDF接口======= ========= 0000:04:10.0 0000:04:10.2 0000:04:10.4 0000:04:10.6 0000:
04:11.0 0000:04:11.2 0000:04:11.4 0000:04:11.6
物理功能enp4s0f1具有以下虚函数:PCI BDF接口======= ========= 0000:04:10.1 0000:04:10.3 0000:04:10.5 0000:04:10.7 0000:
04:11.1 0000:04:11.3 0000:04:11.5
dumpxml的片段
我的绑定配置:uto eth1 iface eth1 inet manual bond-master bond0
auto eth2 iface eth2 inet manual bond-master bond0
auto bond0 iface bond0 inet static address 192.168.23.101 netmask 255.255.255.0 bond-slaves none bond-mode 2 bond-miimon 100 bond-downdelay 0 bond-updelay 0
cat / proc / net / bonding / bond0以太网通道绑定驱动程序:v3.7.1(2011年4月27日)
绑定模式:负载均衡(xor)传输哈希策略:layer2(0)MII状态:up MII轮询间隔(ms):100 Up Delay(ms):0 Down Delay(ms):0
从机接口:eth1 MII状态:上行速度:1000 Mbps双工:完整链路故障计数:0永久硬件地址:00:0c:bd:05:d9:11从机队列ID:0
从机接口:eth2 MII状态:上行速度:1000 Mbps双工:完整链路故障计数:0永久硬件地址:00:0c:bd:05:d9:12从机队列ID:0
bond0链接封装:以太网HWaddr 00:0c:bd:05:d9:11 inet地址:192.168.23.101 Bcast:192.168.23.255掩码:255.255.255.0 inet6地址:fe80 :: 20c:bdff:fe05:d911 / 64范围:
Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500公制:1 RX包:122错误:0丢弃:0超限:0帧:0 TX包:295错误:0丢弃:0超限:0载波:0冲突:0 txqueuelen:0
RX字节:33881(33.8 KB)TX字节:34294(34.2 KB)
eth1链接封装:以太网HWaddr 00:0c:bd:05:d9:11 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500公制:1 RX包:122错误:0丢弃:0超限:0帧:0 TX包:183错误:
0丢弃:0溢出:0载波:0冲突:0 txqueuelen:1000 RX字节:33881(33.8 KB)TX字节:28212(28.2 KB)
eth2链接封装:以太网HWaddr 00:0c:bd:05:d9:11 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500公制:1 RX包:0错误:0丢弃:0超限:0帧:0 TX包:112错误:
0丢弃:0溢出:0载波:0冲突:0 txqueuelen:1000 RX字节:0(0.0 B)TX字节:6082(6.0 KB)
这里bond0 MAC与eth1 MAC相同,因为eth1首先出现。
问题是当我在PF中接收到与eth2相对应的数据包时,数据包在GUEST(eth2)中收到,eth2 RX为0 ...
可能是什么问题..有时候eth2在重新启动后首先出现,而bond0有eth2 MAC,此时eth1 RX为零。

以上来自于谷歌翻译


以下为原文





00:04.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01)
00:05.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01)


I have a KVM with Intel SRIOV card. 5: enp4s0f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:0c:bd:05:d9:82 brd ff:ff:ff:ff:ff:ff vf 0 MAC 00:0c:bd:05:d9:11, spoof checking off, link-state auto vf 1 MAC 00:0c:bd:05:d9:ab, spoof checking off, link-state auto vf 2 MAC 00:0c:bd:05:d9:a2, spoof checking off, link-state auto vf 3 MAC 00:0c:bd:05:d9:ac, spoof checking off, link-state auto vf 4 MAC 00:0c:bd:05:d9:ad, spoof checking off, link-state auto vf 5 MAC 00:0c:bd:05:d9:ae, spoof checking off, link-state auto vf 6 MAC 00:0c:bd:05:d9:af, spoof checking off, link-state auto vf 7 MAC 00:0c:bd:05:d9:a1, spoof checking off, link-state auto 8: enp4s0f1: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:0c:bd:05:d9:83 brd ff:ff:ff:ff:ff:ff vf 0 MAC 00:0c:bd:05:d9:12, spoof checking off, link-state auto vf 1 MAC 00:0c:bd:05:d9:bb, spoof checking off, link-state auto vf 2 MAC 00:0c:bd:05:d9:bc, spoof checking off, link-state auto vf 3 MAC 00:0c:bd:05:d9:bd, spoof checking off, link-state auto vf 4 MAC 00:0c:bd:05:d9:be, spoof checking off, link-state auto vf 5 MAC 00:0c:bd:05:d9:bf, spoof checking off, link-state auto vf 6 MAC 00:0c:bd:05:d9:b1, spoof checking off, link-state auto vf 7 MAC 00:0c:bd:05:d9:b2, spoof checking off, link-state auto
I have used vf0 from each card in a GUEST Ubuntu machine
Physical Function enp4s0f0 has the following virtual functions: PCI BDF Interface ======= ========= 0000:04:10.0 0000:04:10.2 0000:04:10.4 0000:04:10.6 0000:04:11.0 0000:04:11.2 0000:04:11.4 0000:04:11.6
Physical Function enp4s0f1 has the following virtual functions: PCI BDF Interface ======= ========= 0000:04:10.1 0000:04:10.3 0000:04:10.5 0000:04:10.7 0000:04:11.1 0000:04:11.3 0000:04:11.5
Snippet of dumpxml
My bonding configuration:

uto eth1 iface eth1 inet manual bond-master bond0
auto eth2 iface eth2 inet manual bond-master bond0
auto bond0 iface bond0 inet static address 192.168.23.101 netmask 255.255.255.0 bond-slaves none bond-mode 2 bond-miimon 100 bond-downdelay 0 bond-updelay 0
cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (xor) Transmit Hash Policy: layer2 (0) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0
Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:bd:05:d9:11 Slave queue ID: 0
Slave Interface: eth2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:bd:05:d9:12 Slave queue ID: 0
bond0 Link encap:Ethernet HWaddr 00:0c:bd:05:d9:11 inet addr:192.168.23.101 Bcast:192.168.23.255 Mask:255.255.255.0 inet6 addr: fe80::20c:bdff:fe05:d911/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:122 errors:0 dropped:0 overruns:0 frame:0 TX packets:295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:33881 (33.8 KB) TX bytes:34294 (34.2 KB)
eth1 Link encap:Ethernet HWaddr 00:0c:bd:05:d9:11 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:122 errors:0 dropped:0 overruns:0 frame:0 TX packets:183 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:33881 (33.8 KB) TX bytes:28212 (28.2 KB)
eth2 Link encap:Ethernet HWaddr 00:0c:bd:05:d9:11 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:112 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:6082 (6.0 KB)
Here bond0 MAC is same as eth1 MAC as eth1 came up first. Issues is when I receive packets in PF corresponding to eth2 , packets are recieved in GUEST(eth2) , eth2 RX is 0 ...
What could be the issue..sometimes eth2 comes up first after reboot and bond0 has eth2 MAC and at that point eth1 RX is zero..

回帖(9)

汤宇

2018-11-7 11:32:04
您好Premnathsundarababu,感谢您发布在英特尔有线以太网社区。
请确定主机系统的Ubuntu版本。
端口连接的设备是什么?
如果这是一个交换机它是否支持802.3ad,并且在端口上启用了中继或etherchannel?
请删除其中一根电缆,以测试容错是否正常。如果启用了生成树协议,这也可能会导致问题。如果您有任何疑问,请随时提出。
最好的问候,丹尼尔D.

以上来自于谷歌翻译


以下为原文

Hello Premnathsundarababu,

Thank you for posting in Intel Wired Ethernet Communities.

  • Please identify the Ubuntu version of the host system.
  • What device are the ports connecting to?
  • If this is a switch does it support 802.3ad, and is trunking or etherchannel enabled on the ports?
  • Please remove one of the cables to test if fault tolerance is working.
  • If spanning tree protocol is enabled this may also cause issues.
If you have any questions please do not hesitate to ask.
 
Best regards,
Daniel D
举报

李玉鑫

2018-11-7 11:41:18
引用: jerry1978 发表于 2018-11-7 16:04
您好Premnathsundarababu,感谢您发布在英特尔有线以太网社区。
请确定主机系统的Ubuntu版本。
端口连接的设备是什么?

嗨丹尼尔,
感谢您的答复 :
请确定主机系统的Ubuntu版本。
我正在使用ubuntu“14.04”
端口连接的设备是什么?
它是一个cisco开关 
如果这是一个交换机它是否支持802.3ad,并且在端口上启用了中继或etherchannel?
我正在使用静态端口通道
接口GigabitEthernet1 / 0/1 
switchport access vlan 1010 
switchport模式访问 
通道组1模式打开 
生成树portfast

接口GigabitEthernet1 / 0/2 
switchport access vlan 1010 
switchport模式访问 
通道组1模式打开 
生成树portfast

接口Port-channel1 
switchport access vlan 1010 
switchport模式访问
和ubuntu中的xor绑定(类型2)
如果容错功能正常,请移除其中一根电缆进行测试。
不,即使我关闭了交换机中的工作端口,我也不会在ubuntu界面看到任何数据包。
如果启用了生成树协议,则可能还会导致问题。
我相信STP是交换机方面不是问题。 
生成树启用协议ieee 
根ID优先级33778 
地址e804.6271.8180 
这座桥是根 
你好时间2秒最大年龄20秒前进延迟15秒 
网桥ID优先级33778(优先级32768 sys-id-ext 1010) 
地址e804.6271.8180 
你好时间2秒最大年龄20秒前进延迟15秒 
老化时间300秒
接口角色Sts Cost Prio.Nbr类型
------------------- ---- --- --------- -------- -------
-------------------------
Gi1 / 0/9 Desg FWD 4 128.9 P2p
Gi1 / 0/10 Desg FWD 4 128.10 P2p
Po1 Desg FWD 3 128.488 P2p
Po46 Desg FWD 3 128.848 P2p

以上来自于谷歌翻译


以下为原文

Hi Daniel,
 
Thanks for your response :
 
 

  • Please identify the Ubuntu version of the host system.
                I am using ubuntu "14.04"

  • What device are the ports connecting to?
Its a cisco switch
       If this is a switch does it support 802.3ad, and is trunking or etherchannel enabled on the ports?
 
I am using static port-channel
interface GigabitEthernet1/0/1
switchport access vlan 1010
switchport mode access
channel-group 1 mode on
spanning-tree portfast
!
interface GigabitEthernet1/0/2
switchport access vlan 1010
switchport mode access
channel-group 1 mode on
spanning-tree portfast
!
interface Port-channel1
switchport access vlan 1010
switchport mode access
 
and xor bonding(type 2) in ubuntu
 
 
 

  • Please remove one of the cables to test if fault tolerance is working.
      No.Even if i shut the working port in switch..I dont see any packets in ubuntu interface.
 

  • If spanning tree protocol is enabled this may also cause issues.
 
I am sure STP is switch side is not an issue here.
 

  Spanning tree enabled protocol ieee

  Root ID    Priority    33778

             Address     e804.6271.8180

             This bridge is the root

             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

 

 

  Bridge ID  Priority    33778  (priority 32768 sys-id-ext 1010)

             Address     e804.6271.8180

             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

             Aging Time  300 sec

 

 

Interface           Role Sts Cost      Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Gi1/0/9             Desg FWD 4         128.9    P2p

Gi1/0/10            Desg FWD 4         128.10   P2p

Po1                 Desg FWD 3         128.488  P2p

Po46                Desg FWD 3         128.848  P2p
举报

汤宇

2018-11-7 11:58:57
引用: cd340823 发表于 2018-11-7 16:13
嗨丹尼尔,
感谢您的答复 :
请确定主机系统的Ubuntu版本。

你好Premnathsundarababu,谢谢你的回复。
请为主机以太网接口提供ethtool -i输出。
我们会调查此问题并尽快为您更新。
如果您有任何问题,请告诉我们。最好的问候,丹尼尔D.

以上来自于谷歌翻译


以下为原文

Hello Premnathsundarababu,

Thank you for the reply.  Please provide an ethtool -i output for the host  Ethernet interface.  We will investigate the issue and update you as soon as possible.  Please let us know if you have any questions.

Best regards,
Daniel D
举报

段宜敏

2018-11-7 12:18:21
引用: jerry1978 发表于 2018-11-7 16:31
你好Premnathsundarababu,谢谢你的回复。
请为主机以太网接口提供ethtool -i输出。
我们会调查此问题并尽快为您更新。

HelloPremnathsundarababu,如果控制器集成在主板上,请注明该适配器或主板的供应商。
接口的ethtool -i输出也有助于查看正在使用的驱动程序和固件。
如果您有任何问题,请告诉我们。最好的问候,丹尼尔D.

以上来自于谷歌翻译


以下为原文

Hello Premnathsundarababu,

Please indicate the vendor of this adapter or the board if the controller is integrated into a motherboard.  ethtool -i output for the interface would also be helpful to see the driver and firmware being used.  Please let us know if you have any questions.  

Best regards,
Daniel D
举报

更多回帖

发帖
×
20
完善资料,
赚取积分