pinggit / dpdk-contrail-book

contrail dpdk day one book
9 stars 3 forks source link

`dpdkinfo -b` slave driver #26

Closed pinggit closed 3 years ago

pinggit commented 3 years ago
(contrail-tools)[root@a7s3 /]$ dpdkinfo --bond 
No. of bond slaves: 2
Bonding Mode: 802.3AD Dynamic Link Aggregation
Transmit Hash Policy: Layer 3+4 (IP Addresses + UDP Ports) transmit load balancing
MII status: UP
MII Link Speed: 20000 Mbps
MII Polling Interval (ms): 10
Up Delay (ms): 0
Down Delay (ms): 0
Driver: net_bonding
802.3ad info :
LACP Rate: slow
Aggregator selection policy (ad_select): Stable
System priority: 65535
System MAC address:90:e2:ba:c3:af:20
Active Aggregator Info: 
        Aggregator ID: 0
        Number of ports: 2 
        Actor Key: 33
        Partner Key: 4
        Partner Mac Address: 08:81:f4:4c:b3:c4
Slave Interface(0): 0000:02:00.0 
Slave Interface Driver: net_ixgbe
MII status: UP
MII Link Speed: 10000 Mbps
Permanent HW addr:90:e2:ba:c3:af:20
Aggregator ID: 0
Duplex: full
Bond MAC addr:90:e2:ba:c3:af:20
Details actor lacp pdu: 
        system priority: 65535
        system mac address:90:e2:ba:c3:af:20
        port key: 33
        port priority: 255
        port number: 1
        port state: 61 (ACT AGG SYNC COL DIST ) 
Details partner lacp pdu: 
        system priority: 127
        system mac address:08:81:f4:4c:b3:c4
        port key: 4
        port priority: 127
        port number: 8
        port state: 63 (ACT TIMEOUT AGG SYNC COL DIST ) 
Slave Interface(1): 0000:02:00.1 
Slave Interface Driver: net_ixgbe
MII status: UP
MII Link Speed: 10000 Mbps
Permanent HW addr:90:e2:ba:c3:af:21
Aggregator ID: 0
Duplex: full
Bond MAC addr:90:e2:ba:c3:af:21
Details actor lacp pdu: 
        system priority: 65535
        system mac address:90:e2:ba:c3:af:21
        port key: 33
        port priority: 255
        port number: 2
        port state: 61 (ACT AGG SYNC COL DIST ) 
Details partner lacp pdu: 
        system priority: 127
        system mac address:08:81:f4:4c:b3:c4
        port key: 4
        port priority: 127
        port number: 7
        port state: 63 (ACT TIMEOUT AGG SYNC COL DIST ) 

here the slave driver displays net_ixgbe, which looks wrong because it is actually with uio_pci_generic.

[root@a7s3 ~]# find /sys/ | grep drivers.*02:00.0
/sys/bus/pci/drivers/uio_pci_generic/0000:02:00.0
kirankn80 commented 3 years ago

slave driver is the NIC driver which is ixgbe (82599). uio_pci_generic is the UIO driver which is different from the NIC driver

pinggit commented 3 years ago
[root@a7s3 ~]# contrail-tools dpdkinfo --bond |grep -i driver
Driver: net_bonding
Slave Interface Driver: net_ixgbe
Slave Interface Driver: net_ixgbe

[root@a7s3 ~]# find /sys/ | grep drivers.*02:00.
/sys/bus/pci/drivers/uio_pci_generic/0000:02:00.0
/sys/bus/pci/drivers/uio_pci_generic/0000:02:00.1

[root@a7s3 ~]# docker exec -it vrouter_vrouter-agent-dpdk_1 /opt/contrail/bin/dpdk_nic_bind.py --status

Network devices using DPDK-compatible driver
============================================
0000:02:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' drv=uio_pci_generic unused=ixgbe
0000:02:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection' drv=uio_pci_generic unused=ixgbe

Network devices using kernel driver
===================================
0000:04:00.0 'I350 Gigabit Network Connection' if=eno1 drv=igb unused=uio_pci_generic *Active*
0000:04:00.1 'I350 Gigabit Network Connection' if=eno2 drv=igb unused=uio_pci_generic

Other network devices
=====================
<none>

uio_pci_generic is an kernel driver, or "NIC user space enabler" to expose NIC features into userspace. After that, still need a user space driver to drive the NIC, in this case it is net_ixgbe user space driver - a poll mode driver, `PMD.