From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 42E818DAA for ; Tue, 3 Nov 2015 14:51:27 +0100 (CET) Received: by wicfv8 with SMTP id fv8so12034863wic.0 for ; Tue, 03 Nov 2015 05:51:27 -0800 (PST) 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:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=vb4ApA8rwM7bhjLWVMaufobUbHNGbeKSX2kQdXZbV2M=; b=wsiBFsXtVS1Rv3YpF6TonLc2dcN0Y8Tb44XqKhJhkpzagco8YZCngn+LCATg4AfoR1 J2R2XrKQAUWJJ+ox4DW4RctQ9tDrfVsBSCnNiLmPay18OMkl4sBUuBxfWCUmtRhzw0kH +JAVZT70auo3qUhATT/HoFVa8xU3yogqq+yjPDGguNlEkx1alrQAfOIkyBRbPH6k7X28 XvpLqcHu69wGyTDurWg3N6qC4hM2znZDc4abxY+irBx9Lpp1szQ1uj+voBxWFxkdZDQ9 3Qh9szVMGxQgEQ44JXVDl3+ZahvYASYFjCCnVz/9d+AJDSYekWJm6oaA4l5Zkymd6sHR VW6g== 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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=vb4ApA8rwM7bhjLWVMaufobUbHNGbeKSX2kQdXZbV2M=; b=Vxli41E/2n90j7x4rttotR7L7+wNEOi6okc2zcFNPudAEbHmVkvmoFOMnD4BRi+Ck3 GodKltoXfadIucGwwe96jV1P2TZaZzRuPGEJxDReurk3lS3fKYWW3crjldtbYK6/Qd3C 8hqoeEtM/yZghxuWAGi4PQHtb2tAjS2yF5L9Tg2XZjw5LN6Hyq4H0AKbFhHyO0pXAgtY IYD8Xfh9T7bKhPgiYkfJn6XfK9x+zIZxmC+RMCFYC3Ei56hAlIbdpExge91bMPkDhOES BaiP+xGfjRbbwZ0vk3RnwNejGfT1IcQ8IoipJ7yJNmz9q6Z7ie5ljyVNz7yCHwiSSB06 MkXg== X-Gm-Message-State: ALoCoQnVneyRUdevMfrIUxt8MhEPN+6Tfn2Xqk0e398UkqHdhWfBBdb1osQ6rCTn/RvW+rLJVrvQ X-Received: by 10.194.22.234 with SMTP id h10mr29646044wjf.72.1446558686940; Tue, 03 Nov 2015 05:51:26 -0800 (PST) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id t126sm23426469wmd.23.2015.11.03.05.51.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2015 05:51:26 -0800 (PST) From: Thomas Monjalon To: David Marchand Date: Tue, 03 Nov 2015 14:50:14 +0100 Message-ID: <4007343.9j0i5nBSyu@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1446550500-24029-3-git-send-email-david.marchand@6wind.com> References: <1446108903-14412-1-git-send-email-david.marchand@6wind.com> <1446550500-24029-1-git-send-email-david.marchand@6wind.com> <1446550500-24029-3-git-send-email-david.marchand@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 2/2] ethdev: export rte_eth_dev_is_detachable function 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: Tue, 03 Nov 2015 13:51:27 -0000 2015-11-03 12:35, David Marchand: > From: Maxime Leroy > > It can be useful for application to know if a port can be detached or not. > > Signed-off-by: Maxime Leroy > Signed-off-by: David Marchand > --- > lib/librte_ether/rte_ethdev.c | 2 +- > lib/librte_ether/rte_ethdev.h | 12 ++++++++++++ > lib/librte_ether/rte_ether_version.map | 1 + > 3 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c > index ec1b632..373d29b 100644 > --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -503,7 +503,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name) > return 0; > } > > -static int > +int > rte_eth_dev_is_detachable(uint8_t port_id) > { > uint32_t drv_flags; > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 7cf4af8..350733b 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -1640,6 +1640,18 @@ int rte_eth_dev_attach(const char *devargs, uint8_t *port_id); > */ > int rte_eth_dev_detach(uint8_t port_id, char *devname); > > +/** > + * Check if an Ethernet device specified by port identifer is detachable. > + * > + * @param port_id > + * The port identifier of the device to check if is detachable > + * > + * @return > + * 1 if device is detachable, else 0 > + */ > +int > +rte_eth_dev_is_detachable(uint8_t port_id); After more thoughts, we do not need such function to query a capability. The Bernard's patch add a bit-field to expose such capabilities. So this patchset is rejected, sorry.