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 78F1BA04BE; Sun, 6 Sep 2020 20:33:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6752F2BAB; Sun, 6 Sep 2020 20:33:21 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 62C1B29AC for ; Sun, 6 Sep 2020 20:33:19 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id y6so987643plt.9 for ; Sun, 06 Sep 2020 11:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D9aFmOD9iaPiz5iPHQhNcyq/xhM7VC4TX2pNoXnUHJ8=; b=ArbNh1AdpTU4SjqhOBX02f6i1PYjyzuXdxMHUQLx/Z/TJChEU9SZZWgqh6fjjX5hoz 0men5ze8t7qxyYNy45Hfy/QFO3JuN8ZBJoN5Iq0vLXWis+dsAQMhw7o2Dq7r3nXYeqvu 9No6HjWb/J45oAFRHS7jNrNnXYoebTiZTQcnnZykhW9llVoNjzxkb8GNIN5dhpm8jhIa 7NhdoogxTORlvX8VA4C1D9AeT0ZbKubHjkJuacVIgDJkOEYCUVJbTr+Ev0QP302BY5IA RkpnmB20ZyeWftCp8cc+LgOG3sRSDtAdbiC+q/5kRIzZNDOlsPV1pSbbobGJWdIfrTGF okCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D9aFmOD9iaPiz5iPHQhNcyq/xhM7VC4TX2pNoXnUHJ8=; b=dkiIV5fuj+zqx0sls3cINKjM/VfD9f6jrmNjStf1sv0FUUO1ugrKm1Cp2f2GqTkQlI EETbvWDC6xavZxt3rvVVqc+bMIkqN40xCtdJq2M4wO+tzOKK9eOwONidgJzeuf6XkwbJ 0E/rHx/Ki0UOC5rAvIp53zUtoD3sFl2VxYUofmyP9jNq0dciYcG9AhNcx2pPQaol5jJE w8mUt0Bn2edIpbWla6FIBNC+t/cL4K1EEJqzPSSx4pFEWO7wNBPY/MM28C9nSqXod46S pDNTfLmPmemCeGsgSL3TGC3aDbOo97E907ZEyGWz0nfbMp5z7MAY90iwaTQgqxFIlaHh lKFw== X-Gm-Message-State: AOAM533/48FrHUYGL00mBUXBpXMzRbUv06B+6cHsTTTCTNmlUJ2nN7nG acUvMuz26n8k+z5s+lcUnQbFgg== X-Google-Smtp-Source: ABdhPJxulZt6fuuf3d9WkdUGdrZG/udMS7QuLtc/cr0PhzaO+lD5zJg8q/VQiiX64QFDS0VlbTm/uQ== X-Received: by 2002:a17:90a:4488:: with SMTP id t8mr17905755pjg.191.1599417198366; Sun, 06 Sep 2020 11:33:18 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j18sm10523409pgm.30.2020.09.06.11.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 11:33:18 -0700 (PDT) Date: Sun, 6 Sep 2020 11:33:09 -0700 From: Stephen Hemminger To: Matan Azrad Cc: "matan@mellanox.com" , "grive@u246.net" , "dev@dpdk.org" Message-ID: <20200906113309.4a320400@hermes.lan> In-Reply-To: References: <20200819175333.19601-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/vdev_netvsc: handle removal of associated pci device 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" On Sun, 6 Sep 2020 12:38:18 +0000 Matan Azrad wrote: > Hi Stephen > > From: Stephen Hemminger: > > The vdev_netvsc was not detecting when the associated PCI device > > (SRIOV) was removed. Because of that it would keep feeding the same > > (removed) device to failsafe PMD which would then unsuccessfully try and > > probe for it. > > > > Change to use a mark/sweep method to detect that PCI device was > > removed, and also only tell failsafe about new PCI devices. > > Vdev_netvsc does not have to keep stuffing the pipe with the same already > > existing PCI device. > > As I know, the vdev_netvsc driver doesn't call to failsafe if the PCI device is not detected by the readlink command(considered as removed)... > Am I missing something? The original code is broken because ctx_yield is not cleared, it keeps sending the same value. It looks like device removal and add was never tested. If you test removal you will see that vdev_netvsc: 1. Sends same PCI device repeatedly to failsafe (every alarm call) This is harmless, but useless. 2. When device is removed, keeps doing #1