From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08BF2A0542; Fri, 7 Feb 2020 19:08:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6FE5C1C06A; Fri, 7 Feb 2020 19:08:27 +0100 (CET) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id 6BB151C01B for ; Fri, 7 Feb 2020 19:08:25 +0100 (CET) Received: by mail-pj1-f68.google.com with SMTP id e9so1220598pjr.4 for ; Fri, 07 Feb 2020 10:08:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e3UfITMEBkOP5rFdhmFPh9NClOk7PY3S+iT2y48JSWE=; b=afm2PYhJuUF/4+trDq8mmZH0U+HXCOu5XvW/bm9c85PMUgY19q6R8g0pLNyM8rnlTQ z/uoRea1oMw1BDmW9z2chcJSoKomWljYI6C9IrZNGjXUlZvYmrl8JtmE9VDHNtBvZVDS QU1yjkp0XouIlbKRwDEwYb5d7QY8PXDz65VSps+TFXAEMtrbd+u5/fLYUnpQT6FD98W8 7PpbC5nzFtbPNo0dE10UfNdj/1Cdr/VoJyUeT4YHTLUfZD+MCODFKeffmkW/J7NUYYU2 VY1AwFki+jtroa4p2InpdCmh7D0CfchT5OPSJ1F4J5r9krqyyhRTIwiB3rMU/DIyGvLM rZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e3UfITMEBkOP5rFdhmFPh9NClOk7PY3S+iT2y48JSWE=; b=gVfb5vvfP7k/NHa1NutkyuXx53SD2CG9EIWrFWS9v/IIw1V7XHe/lo0I2pI/+fvtKq 4IltG9RHCSPvpQvTImRcWI7t8+Q+nwG/bw5BPvOCuJ6inXrEu7WqzIBTIn7PjKR8UhXT 8CPvKM72u1UUCm8aUaF/6Xi37sjtKrdpC/lqdVmWHK0ZCrw6yq5h/Y+U4skfLeptg4yR Hg0s6iWKUmt3XwrcPkU9r7hUzhzm/0cJpg+GIB/ppdsCjAsMJeo078DuyMrBJRYzycM+ CwN+1qEKrOBPZyHMYKXj76AqPDdAo32seoge3SiH2Xk3OP4CPajIBaIyfWe2cLBLgprd slTw== X-Gm-Message-State: APjAAAVEuJXRgYH5Hq5EISPFGVu9gbxvLE4DKDMONzsgcmpCKAkMbZ3/ a/yIHdbk355LJ7T7s2ajI8tmSRdHrS9NNQ== X-Google-Smtp-Source: APXvYqxWdGIijP9Hzy57vtZQiBaSYQSOfvZW+HEF+KaiIOt1+lIu8ezdd1rMpyhBdc+48q0dQJceqQ== X-Received: by 2002:a17:90a:cc02:: with SMTP id b2mr4989782pju.137.1581098904120; Fri, 07 Feb 2020 10:08:24 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z16sm3679075pff.125.2020.02.07.10.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 10:08:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Mohammed Gamal Date: Fri, 7 Feb 2020 10:08:16 -0800 Message-Id: <20200207180816.15699-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200206105541.1186-1-mgamal@redhat.com> References: <20200206105541.1186-1-mgamal@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/netvsc: initialize link state X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If application is using link state interrupt, the correct link state needs to be filled in when device is started. This is similar to how virtio updates link information. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org Reported-by: Mohammed Gamal Tested-by: Mohammed Gamal Signed-off-by: Stephen Hemminger --- Putting on same email thread as original submission v2 - new patch that does initialization at start added tested-by and fixes tag drivers/net/netvsc/hn_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index c79f924379fe..564620748daf 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -823,6 +823,10 @@ hn_dev_start(struct rte_eth_dev *dev) if (error) hn_rndis_set_rxfilter(hv, 0); + /* Initialize Link state */ + if (error == 0) + hn_dev_link_update(dev, 0); + return error; } -- 2.20.1