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 CE89CA04FA; Wed, 8 Jan 2020 09:56:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D2B91D703; Wed, 8 Jan 2020 09:56:59 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 3A5C61D702 for ; Wed, 8 Jan 2020 09:56:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578473816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bvcM3egKqrxQsUaZVvdf7XnFSfjKm4PyrqbJhe1pmGg=; b=NQAwzxMVEjG2j2AtXQ4+bUFupm1YD9yTDA4FFcf8wVmZ/6wYeqkXxNL2t5BwIuR4o4R870 5MLPTggswfQKk9V1kDG3ylQPsR8OAoHglnTceopXq6RWiI1GLVebPqTHQ2YNpGK7qmDO9r YHPa6ROMSRcI3EVGxb+s0sNASLzZIFc= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-241-FpPxjvxFOM-xuhghoTABzw-1; Wed, 08 Jan 2020 03:56:55 -0500 Received: by mail-vs1-f70.google.com with SMTP id d12so317124vsh.7 for ; Wed, 08 Jan 2020 00:56:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bvcM3egKqrxQsUaZVvdf7XnFSfjKm4PyrqbJhe1pmGg=; b=lLJzx6atVqArvYz/+OJl483Hoitci7vhuO1H71TeKLbWUl24EeCBR23x8iFqYZi6JA nasrJ9N3VxsCZWFrxeYG68wQ0yqodEqyTg4a4T23kg8I1wc8WnNFYgnOyuYl01Rgt4DY OpkE9/AfG9vNai5myoWDU+P1DVpZeNrNXJ+drRgrLKVUP/qNatCxJ+RRuEUDj6l9dcKk 4EHar82CEg6abTbUkdPnJsbv91AaISy5ZI1eeE+ZbXehi8fFxUuxQ8I4Gkp1UKq9VMYj SRwljQXmcrLxUZaZ4ngEbJjHvrn7tCtbPNift3DS/WpM/vQJh0J2gCSEwDd77zeyDp1S CM7A== X-Gm-Message-State: APjAAAWrPF1f10EBMKTa/IzVC9JH+xqJPfvgnCTLFWC1rOWSAD8JcGyL Zwu3fIR2Hd1d2InMwn1RZdvKT7TLMhhCSFJXZOKpShdZZPKdTm5xU63vJ39P1v0n9kiAmPUa7UC AetWXx7fl5B68lCMPyzs= X-Received: by 2002:a05:6102:20ca:: with SMTP id i10mr2042260vsr.105.1578473815025; Wed, 08 Jan 2020 00:56:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxpyezUygmrG3gtMAXSh4sT22ViDT2YvJSWuuiPCbggvk8iWHItnkcqx/pRVvHSCFUfm2nzRbtdawN+A74eUlA= X-Received: by 2002:a05:6102:20ca:: with SMTP id i10mr2042251vsr.105.1578473814814; Wed, 08 Jan 2020 00:56:54 -0800 (PST) MIME-Version: 1.0 References: <20200107145637.8922-1-laurent.hardy@6wind.com> In-Reply-To: <20200107145637.8922-1-laurent.hardy@6wind.com> From: David Marchand Date: Wed, 8 Jan 2020 09:56:43 +0100 Message-ID: To: Laurent Hardy Cc: dev , Olivier Matz , Thomas Monjalon , Andrew Rybchenko , "Yigit, Ferruh" X-MC-Unique: FpPxjvxFOM-xuhghoTABzw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] librte_ethdev: extend dpdk api led control to query capability 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" Hello Laurent, Bonne ann=C3=A9e. Cc: maintainers. On Tue, Jan 7, 2020 at 3:57 PM Laurent Hardy wrot= e: > > In current led control API we have no way to know if a device is able > to handle on/off requests coming from the application. > Knowing if the device is led control capable could be useful to avoid > exchanges between application and kernel. > Using the on/off requests to flag if the device is led control capable > (based on the ENOSUP returned error) is not convenient as such request > can change the led state on device. > > This patch adds a new function rte_eth_led_ctrl_capable() that will look > for led_off/on dev ops availability on the related pmd, to know if the > device is able to handle such led control requests (on/off). This patch breaks the ABI, which is BAD :-). This new api only needs to look at the existing ops, so you can remove the (unused in your patch) dev_led_ctrl_capable ops. OTOH, would it make sense to expose this capability in dev_flags? --=20 David Marchand