diff mbox

[ovs-dev] netdev-dpdk: Fix using uninitialized link_status.

Message ID 1466774912-14733-1-git-send-email-i.maximets@samsung.com
State Accepted
Headers show

Commit Message

Ilya Maximets June 24, 2016, 1:28 p.m. UTC
'rte_eth_link_get_nowait()' works only with physical ports.
In case of vhost-user port, 'link' will stay uninitialized and there
will be random messages in log about link status.

Ex.:
|dpdk(dpdk_watchdog2)|DBG|Port -1 Link Up - speed 10000 Mbps - full-duplex

Fix that by calling 'check_link_status()' only for physical ports.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/netdev-dpdk.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Aaron Conole June 24, 2016, 1:54 p.m. UTC | #1
Ilya Maximets <i.maximets@samsung.com> writes:

> 'rte_eth_link_get_nowait()' works only with physical ports.
> In case of vhost-user port, 'link' will stay uninitialized and there
> will be random messages in log about link status.
>
> Ex.:
> |dpdk(dpdk_watchdog2)|DBG|Port -1 Link Up - speed 10000 Mbps - full-duplex
>
> Fix that by calling 'check_link_status()' only for physical ports.
>
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---

LGTM

Acked-by: Aaron Conole <aconole@redhat.com>
Daniele Di Proietto June 24, 2016, 9:45 p.m. UTC | #2
On 24/06/2016 06:54, "Aaron Conole" <aconole@redhat.com> wrote:

>Ilya Maximets <i.maximets@samsung.com> writes:

>

>> 'rte_eth_link_get_nowait()' works only with physical ports.

>> In case of vhost-user port, 'link' will stay uninitialized and there

>> will be random messages in log about link status.

>>

>> Ex.:

>> |dpdk(dpdk_watchdog2)|DBG|Port -1 Link Up - speed 10000 Mbps - full-duplex

>>

>> Fix that by calling 'check_link_status()' only for physical ports.

>>

>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>

>> ---

>

>LGTM

>

>Acked-by: Aaron Conole <aconole@redhat.com>


Thanks, I applied this to master, branch-2.5 and branch-2.4
diff mbox

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index fc0c8d3..12733ad 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -567,7 +567,9 @@  dpdk_watchdog(void *dummy OVS_UNUSED)
         ovs_mutex_lock(&dpdk_mutex);
         LIST_FOR_EACH (dev, list_node, &dpdk_list) {
             ovs_mutex_lock(&dev->mutex);
-            check_link_status(dev);
+            if (dev->type == DPDK_DEV_ETH) {
+                check_link_status(dev);
+            }
             ovs_mutex_unlock(&dev->mutex);
         }
         ovs_mutex_unlock(&dpdk_mutex);