From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by dpdk.org (Postfix) with ESMTP id D8EA758D4 for ; Mon, 10 Oct 2016 11:52:38 +0200 (CEST) Received: by mail-qk0-f170.google.com with SMTP id f128so80557732qkb.1 for ; Mon, 10 Oct 2016 02:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=93uAgY57uL2+o3lazE3MpXcWwT9TV3U/QbOiZcVCrio=; b=iV8AvdMlIsig2AbJVRm4uDE82Oft0frzgAh4PkE8yOpxpYYruhapGHqS3HK+ovGM3J rnEFScvpjVNQR+ZT3rgbVFWZ62RBu/YpDRMULhA23ni4It+OIQUc4I8xMhlE0WS1J4jb ML1DL7Mk4NQNpFV6CwrPgSBPauHNnY0xkRML99nOHcLbxQdrGtki/eievhV1mMBBTttH muANNjq/Z11zF8HGSj97N2+zbNhaDTkFfiC7mz7ifYtBvVTSs0QLff0QivVc/T43c6dc aD3/2nONn25S76sN0T1UMblEcRPs/vfobENc5odAwR6HO72J6WteMyepeqTwNKvbuPms MyBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=93uAgY57uL2+o3lazE3MpXcWwT9TV3U/QbOiZcVCrio=; b=CAr6k0RXW6jVTW9bO18clEmhtSolputLXPjFGYF2nhVvgw7hM427ouVLjk00PJjBiC 4iaNN7G30Wslz/Zw4B6tiy+Ukjp08Gl/KZ+YqmHga204w9xFTBRkH+n5NKv+HNyViFIq iFudpC0HNUGvTYr/o0ln5OHqMTsh5OJKgBbiT5guYtRFIfglRkQADpO1O6qYIWCAmi6S k59NMFdPSD56G+DPGBzkDO9+jODoO7fSFCxvF0zSmfR2RIDp3Oa1fIPO8eSFyRI3VQFp ZJzxSRY3I4mebk3ew9PBBogGiOtFxRjTHqVuLBSNexi1Nmxwiqh2e1N1Qi4gauUwNAvk wnNg== X-Gm-Message-State: AA6/9RmGNN/Qcx3p2w4IL5hbqtsELVppwQULEXziEmyl1FnVTlN/dKvE6Ag2SOJ0XcRDA/wS X-Received: by 10.194.123.228 with SMTP id md4mr32485545wjb.78.1476093158039; Mon, 10 Oct 2016 02:52:38 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id a1sm38876595wju.41.2016.10.10.02.52.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2016 02:52:37 -0700 (PDT) From: Thomas Monjalon To: David Marchand Cc: dev@dpdk.org, danielx.t.mrzyglod@intel.com, shreyansh.jain@nxp.com Date: Mon, 10 Oct 2016 11:52:36 +0200 Message-ID: <7074047.vLQ6C6IQvl@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1475845276-25527-1-git-send-email-david.marchand@6wind.com> References: <1475845276-25527-1-git-send-email-david.marchand@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: fix hotplug attach X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 09:52:39 -0000 2016-10-07 15:01, David Marchand: > If a pci probe operation creates a port but, for any reason, fails to > finish this operation and decides to delete the newly created port, then > the last created port id can not be trusted anymore and any subsequent > attach operations will fail. > > This problem was noticed while working on a vm that had a virtio-net > management interface bound to the virtio-net kernel driver and no port > whitelisted in the commandline: [...] > Two solutions: > - either update the last created port index to something invalid > (when freeing a ethdev port), > - or rely on the port count, before and after the eal attach. > > The latter solution seems (well not really more robust but at least) > less fragile than the former. > We still have some issues with drivers that create multiple ethdev > ports with a single probe operation, but this was already the case. > > Fixes: b0fb26685570 ("ethdev: convert to EAL hotplug") > > Reported-by: Daniel Mrzyglod > Signed-off-by: David Marchand Series applied, thanks