From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 4D0A32C5 for ; Wed, 5 Apr 2017 22:47:01 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id t20so32530365wra.1 for ; Wed, 05 Apr 2017 13:47:01 -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=ZH1tbn4oGrdE8XXtevgnGdRwSqR7n/NV3EXMpSvd7f0=; b=Z9ENhWK2q9KxzLel/9LyTajSDHzq5oLv/KNnggltJ19h6XL8zAmEnOyGMyYnJDR/LF ylSjGMZzFE/AM3UURcd8TsB0B8sQzmu1WLUyRhcM+H488A0alPikhiiIY/afwmhlFZpU ALxp0m3G8FRwvXtnrh2veL0gdNPQFcq3N8lltjphuGTwRbSlYETAhtY07VyjUd5j77pE 2hczjvvt9nD8xAv0m0V5X9d1afj9NpSvX4NZKoGYUBSDl11I6XLK16WJxahwjFqY1GhF RslGiBqBVjPFJXWG8yinv79ZgQX2IN85ggiyaIcA97CMMBSR0GI/JCFGfVjT6BqcWdir Olrw== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZH1tbn4oGrdE8XXtevgnGdRwSqR7n/NV3EXMpSvd7f0=; b=JEFSB8KsPxD1Q0Vszn0Yu1lurVzHch1JdGYFqFmbrAk/Pz+uwIlOfzLpAYaI6e4qvK +BgIIEj8NFsijgAycMLffjb+Z1lXkgTjn1YNOJRcSyr9eqmsVZWQeXEIskbq+qEewWml auDHzw+qcoGTcNXcGSTlyuCqGag6wbfYBwSAKJJA1dqJlEf9PeS/1JeG3m7Q4b9HtLcX IvHJlFXqPEWRNFMKHFLUksXfCeC6mDelCxZDDvfIYSa7e+n4NNUlD2OPZfx7rVQmL1E4 Eo+k4XVa7BzgEIX/c3ZVXXVVHLIAgtkRzcG6TabkD6JSrGfVJlb6MpglvCCSeFI496C9 NMSA== X-Gm-Message-State: AFeK/H3Ecyq8nNQHDnuTHBoyiOYxPCsN/xhHaKbfkYR/nwUCzeXRsvaNCSR0wA3dL7gMQJ8z X-Received: by 10.223.160.27 with SMTP id k27mr25892274wrk.106.1491425220972; Wed, 05 Apr 2017 13:47:00 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id y107sm27468627wrc.35.2017.04.05.13.47.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 13:47:00 -0700 (PDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, Jingjing Wu Date: Wed, 05 Apr 2017 22:46:59 +0200 Message-ID: <6571221.TDpU4kGvc7@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 0/3] clarify eth_dev state management 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: , X-List-Received-Date: Wed, 05 Apr 2017 20:47:01 -0000 2017-03-31 14:04, Gaetan Rivet: > 1. The hotplug API currently available in DPDK introduces the notion of > device states (DEV_DETACHED, DEV_ATTACHED). These states are implicit > and internal to the ethdev layer. > > 2. Device enumeration and access is done directly, without regard to the > underlying state of a device. Applications are currently expected to cycle > through the static rte_eth_devices array. Those using the hotplug API > (rte_eth_dev_attach(), rte_eth_dev_detach()), are thus expected to deal > themselves with possible discrepancies internal to the ethdev layer, > i.e. avoid detached devices if necessary, without the state of the devices > having been explicitly defined or exposed. > > 3. The hotplug API itself is not complete and cannot be used without > introducing some bugs. Detaching a device will introduce inconsistencies in > the device count, as explained in the related API. > No function is exposed in the ethdev layer to permit applications to deal > with it. > > This series addresses these issues so that: > > 1. Applications are not expected to manage the states of their devices, those > should be kept internal to the ethdev layer. > > 2. The hotplug API is cleaner, with specific operations from the ethdev layer > to be used if necessary. > > 3. Applications that are not interested in hotplug functionality are not concerned > and do not require any change. Applied, thanks