diff mbox

[dpdk-dev] In DPDK 1.7.1, the link status of the interface using virtio driver is always down.

Message ID 2680B515A539A446ACBEC0EBBDEC3DF80E9388D2@SGSIMBX001.nsn-intra.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Fu, Weiyi (NSN - CN/Hangzhou) Dec. 15, 2014, 2:55 a.m. UTC
Hi,
With follow changes, the link is UP and interface can receive and send traffic. Thanks a lot:)


Brs,
Fu Weiyi

-----Original Message-----
From: Fu, Weiyi (NSN - CN/Hangzhou) 
Sent: Friday, December 12, 2014 9:57 AM
To: 'ext Ouyang, Changchun'; dev@dpdk.org
Cc: 'mmvijay@gmail.com'
Subject: RE: [dpdk-dev] In DPDK 1.7.1, the link status of the interface using virtio driver is always down.

Hi,
I have ingnored the link status. Rx and tx can't work.
I will try the methods Vijay suggested to have a try. Thanks! 

Brs,
Fu Weiyi

-----Original Message-----
From: ext Ouyang, Changchun [mailto:changchun.ouyang@intel.com] 
Sent: Friday, December 12, 2014 9:00 AM
To: Fu, Weiyi (NSN - CN/Hangzhou); dev@dpdk.org
Cc: Ouyang, Changchun
Subject: RE: [dpdk-dev] In DPDK 1.7.1, the link status of the interface using virtio driver is always down.

Hi 

> -----Original Message-----
> From: Fu, Weiyi (NSN - CN/Hangzhou) [mailto:weiyi.fu@nsn.com]
> Sent: Thursday, December 11, 2014 7:42 PM
> To: Fu, Weiyi (NSN - CN/Hangzhou); Ouyang, Changchun; dev@dpdk.org
> Subject: RE: [dpdk-dev] In DPDK 1.7.1, the link status of the interface using
> virtio driver is always down.
> 
> Hi Changchun,
> I found you had done follow change to allow the virtio interface startup
> when the link is down.  Is there any scenario causing link down for virtio
> interface?
> 
Not really in my environment, those codes are RFC codes from Brocade,
Not merged into mainline yet. 

You can apply this patch and ignore the link state to see if rx and tx still works.

Thanks
Changchun

Comments

Ouyang Changchun Dec. 15, 2014, 3:25 a.m. UTC | #1
Hi Weiyi,
Thanks for updating.

> -----Original Message-----
> From: Fu, Weiyi (NSN - CN/Hangzhou) [mailto:weiyi.fu@nsn.com]
> Sent: Monday, December 15, 2014 10:56 AM
> To: Fu, Weiyi (NSN - CN/Hangzhou); Ouyang, Changchun; dev@dpdk.org
> Cc: mmvijay@gmail.com
> Subject: RE: [dpdk-dev] In DPDK 1.7.1, the link status of the interface using
> virtio driver is always down.
> 
> Hi,
> With follow changes, the link is UP and interface can receive and send traffic.
> Thanks a lot:)
> 
> diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c
> b/lib/librte_pmd_virtio/virtio_ethdev.c
> index 3344ffb..43d1c19 100644
> --- a/lib/librte_pmd_virtio/virtio_ethdev.c
> +++ b/lib/librte_pmd_virtio/virtio_ethdev.c
> @@ -784,6 +784,7 @@ eth_virtio_dev_init(__rte_unused struct eth_driver
> *eth_drv,
>         }
>  #endif
>         hw->use_msix = virtio_has_msix(&pci_dev->addr);
> +       hw->use_msix  = 1;

Use constant is not a good fix, maybe you can have a solid fix for this,
Check how it can find the msix information on your environment, and then
You may change some codes inside function virtio_has_msix to let it also
Work in your environment even without " hw->use_msix  = 1".

Thanks
Changchun
Fu, Weiyi (NSN - CN/Hangzhou) Dec. 15, 2014, 7 a.m. UTC | #2
Hi Changchun,
Yes, we are trying add some startup parameter when we create VM. But unfortunately our Guest OS kernel version is too low, it can't work.

# uname -r
2.6.34.13-WR4.3.fp_x86_64_standard-00027-g76285ab
 

Brs,
Fu Weiyi

-----Original Message-----
From: ext Ouyang, Changchun [mailto:changchun.ouyang@intel.com] 
Sent: Monday, December 15, 2014 11:25 AM
To: Fu, Weiyi (NSN - CN/Hangzhou); dev@dpdk.org
Cc: mmvijay@gmail.com; Ouyang, Changchun
Subject: RE: [dpdk-dev] In DPDK 1.7.1, the link status of the interface using virtio driver is always down.

Hi Weiyi,
Thanks for updating.

> -----Original Message-----
> From: Fu, Weiyi (NSN - CN/Hangzhou) [mailto:weiyi.fu@nsn.com]
> Sent: Monday, December 15, 2014 10:56 AM
> To: Fu, Weiyi (NSN - CN/Hangzhou); Ouyang, Changchun; dev@dpdk.org
> Cc: mmvijay@gmail.com
> Subject: RE: [dpdk-dev] In DPDK 1.7.1, the link status of the interface using
> virtio driver is always down.
> 
> Hi,
> With follow changes, the link is UP and interface can receive and send traffic.
> Thanks a lot:)
> 
> diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c
> b/lib/librte_pmd_virtio/virtio_ethdev.c
> index 3344ffb..43d1c19 100644
> --- a/lib/librte_pmd_virtio/virtio_ethdev.c
> +++ b/lib/librte_pmd_virtio/virtio_ethdev.c
> @@ -784,6 +784,7 @@ eth_virtio_dev_init(__rte_unused struct eth_driver
> *eth_drv,
>         }
>  #endif
>         hw->use_msix = virtio_has_msix(&pci_dev->addr);
> +       hw->use_msix  = 1;

Use constant is not a good fix, maybe you can have a solid fix for this,
Check how it can find the msix information on your environment, and then
You may change some codes inside function virtio_has_msix to let it also
Work in your environment even without " hw->use_msix  = 1".

Thanks
Changchun
diff mbox

Patch

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 3344ffb..43d1c19 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -784,6 +784,7 @@  eth_virtio_dev_init(__rte_unused struct eth_driver *eth_drv,
        }
 #endif
        hw->use_msix = virtio_has_msix(&pci_dev->addr);
+       hw->use_msix  = 1;
        hw->io_base = (uint32_t)(uintptr_t)pci_dev->mem_resource[0].addr;

        /* Reset the device although not necessary at startup */