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 333C1A0541; Fri, 7 Feb 2020 01:10:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 94B0C1C0B1; Fri, 7 Feb 2020 01:10:45 +0100 (CET) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id ACD181C07B for ; Fri, 7 Feb 2020 01:10:43 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id k29so285750pfp.13 for ; Thu, 06 Feb 2020 16:10:43 -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=UYtmNDFtQFp627KeBTfexLvpT8XQ9WlLBkGf2w283Ss=; b=l4SMH9Zddp8BYIcyRdoKtwjLiA6EuzpwSC0JzupHZtnJE4SZWx/ndBETAAEc5UYQij sduc0s9ChIRDi0v6PL9f4TXpCvCrHzcL7AA9zdRnNCnVL01QX5kkF9wKoGeRDuP9MU2J XyHr3b/iIdx1i+zNyewZrfteb9CpXFl6OxIsZ1b4Fosxsxz3Sep93KCd9OiQ5bV3zCjx KMExo1iTPg1ilCGjlHWnFb0ExgryjOg5PA8mr7kTwC6k9lA1nLrXK0Ksu1xI0kmuOnmg ZWIrnMt74zL+TxHgaoxDToqTMj/rIkHVxZ+5shMSDQZBERT6Jei2dlcAHiM8ZuAFHJYu e3Lg== 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=UYtmNDFtQFp627KeBTfexLvpT8XQ9WlLBkGf2w283Ss=; b=T1WtODpZet2smqsv+wJ1jTw/me9FVrvmsu2YyKWGn2Aqy82DD8KipfAMhVrUTw5RGk +PxLsMnJAsqmZN4yk+BdmnMdwt3t/HfriSFGLKm2jlKSq9idWLaFmMxNIjEkzubhjTH6 3+hPJh3xeN3QWf0kPFl3mrm2o5O7EskAtdjhQnq4GECLimuXJ2/oVzvbZsocBc3PqXjq XvnpEZJe2xUqLO0bYn+Hdro1++hd545AjpQMx5+qPr9BKqIcmnraUXDYmgU7bHasEFdK dVTp9ojXJX1f277tJPAjFI+14n6hNXg11wUW5tAd3d9xbx8385B3r4oAymqPI2JFP0Z5 hWOw== X-Gm-Message-State: APjAAAUz33apJs3V2zQ+MrtARuwK1KmpeORR/uK13L/DKC6/DB+fnqEE vWP8Hzh4wF1K9VG8AX6gKZffTbWRO/P4L8yS X-Google-Smtp-Source: APXvYqwHYAJIIP+HCoWToeChZ/h03a9bV9Ld0hjKKfIBynGv8429lobcahkEmYMdA3eo02Uz+lANbg== X-Received: by 2002:a63:c747:: with SMTP id v7mr6246043pgg.291.1581034242160; Thu, 06 Feb 2020 16:10:42 -0800 (PST) Received: from shemminger-XPS-13-9360.wifi.yvr.com ([204.239.251.21]) by smtp.gmail.com with ESMTPSA id c10sm498174pgj.49.2020.02.06.16.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 16:10:41 -0800 (PST) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Mohammed Gamal , Stephen Hemminger Date: Thu, 6 Feb 2020 16:10:38 -0800 Message-Id: <20200207001038.7254-1-sthemmin@microsoft.com> 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] [RFT] 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. Reported-by: Mohammed Gamal Signed-off-by: Stephen Hemminger --- This version marked RFT because am in airport without access to a machine to test it. 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