From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0A85FA0562;
	Tue, 23 Mar 2021 11:27:29 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 72A944014D;
	Tue, 23 Mar 2021 11:27:28 +0100 (CET)
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by mails.dpdk.org (Postfix) with ESMTP id B5EAC40143
 for <dev@dpdk.org>; Tue, 23 Mar 2021 11:27:26 +0100 (CET)
IronPort-SDR: ISzW9XiT5KLe4nvPNITilaOhW4W1VZ82OZ4yDJl3aneYk66yP7clf72b3SysYbBCVwFjgo6sPb
 RikMQKhsfAZw==
X-IronPort-AV: E=McAfee;i="6000,8403,9931"; a="251803431"
X-IronPort-AV: E=Sophos;i="5.81,271,1610438400"; d="scan'208";a="251803431"
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 23 Mar 2021 03:27:24 -0700
IronPort-SDR: mg429qRMSXj9aYn1kdZI90S2HtQRMcVFQ5jaAmH4Lpm17uq6odb8ogTkQhjU/PewUTQt+nDsJP
 EZGI5J0KcflQ==
X-IronPort-AV: E=Sophos;i="5.81,271,1610438400"; d="scan'208";a="604256929"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.14.45])
 ([10.252.14.45])
 by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 23 Mar 2021 03:27:23 -0700
To: Fengchengwen <fengchengwen@huawei.com>,
 "orika@nvidia.com" <orika@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "humin (Q)" <humin29@huawei.com>,
 Thomas Monjalon <thomas@monjalon.net>,
 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
References: <3f5ffb32474b4fe78b006a78bee11c1c@huawei.com>
From: Ferruh Yigit <ferruh.yigit@intel.com>
X-User: ferruhy
Message-ID: <8a6224ba-301e-d5a2-d515-265b3bf1b97d@intel.com>
Date: Tue, 23 Mar 2021 10:27:20 +0000
MIME-Version: 1.0
In-Reply-To: <3f5ffb32474b4fe78b006a78bee11c1c@huawei.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] How about add rte flow get capablity APIs
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On 3/23/2021 12:52 AM, Fengchengwen wrote:
> Hi, Ori and Ferruh
> 
>    Currently, the rte flow APIs lack of get capability APIs, upper-application
> 
> could not get the device capability unless look doc or code or even test it.
> 
>    Maybe it's a good idea to add the get capability like traffic manager
> 
> framework, what do you think?
> 

Not providing capability was a design decision, because it may not be possible 
to provide capability information correctly.

The preferred method is 'rte_flow_validate()'.
Application should call 'rte_flow_validate()' to decide if a rule can be created 
or not, and take an action accordingly.