From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id A0F9F5930 for ; Thu, 24 Jul 2014 09:55:15 +0200 (CEST) Received: by mail-wi0-f180.google.com with SMTP id n3so3491225wiv.7 for ; Thu, 24 Jul 2014 00:56:42 -0700 (PDT) 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=8bBRI3EBxsUZ7F4aKFh5LUyMpNx7JnnFXR87ivafXNI=; b=OOxETZSQHaQNakORPfR9QG7PSZK4ru/qxx7z16CbZaMfyZB3lvKGvyXyeadgryDJjm aKDUoBv/baX9Xfcozf2GPSkUQIsyCDNWXg8SprtkWu5K2Qv/MMq1GJO+3cEHuhC3hFYA uITPSDvcwEdMrUwb/A+eoi54UVqvDsBtQlITuPVa/tJvHnA8xWu8glUTm5YyJRbURjAi govRdFTGKJNG+fVr795aG3X2xGBdngNG1e0TjVeHu99qVqwOX0+9YCrcYN5T/kScHMGz /Hz/Cq+uZjGWRznYFf3YFyT2BzFlQSdWfJ14TWJaATanNmoq2RBZ5ZdHBSiU4nonLNoj SfmA== X-Gm-Message-State: ALoCoQkZ8lgUt2/WIgVncSqnGLUH9uhYwsNlSqF8NVdfXJkUnaPxBk/QEmEAGC3mwVvTVZ7GqwGd X-Received: by 10.180.183.167 with SMTP id en7mr33124276wic.6.1406188602530; Thu, 24 Jul 2014 00:56:42 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id ex4sm19862501wic.2.2014.07.24.00.56.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jul 2014 00:56:41 -0700 (PDT) From: Thomas Monjalon To: Helin Zhang Date: Thu, 24 Jul 2014 09:56:32 +0200 Message-ID: <1794712.d8vW817aRs@xps13> Organization: 6WIND User-Agent: KMail/4.13.2 (Linux/3.15.5-2-ARCH; KDE/4.13.2; x86_64; ; ) In-Reply-To: <1406184149-11531-3-git-send-email-helin.zhang@intel.com> References: <1406184149-11531-1-git-send-email-helin.zhang@intel.com> <1406184149-11531-3-git-send-email-helin.zhang@intel.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 2/5] ethdev: add new ops of 'check_command_supported' and 'rx_classification_filter_ctl' 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: Thu, 24 Jul 2014 07:55:15 -0000 2014-07-24 14:42, Helin Zhang: > Two ops of 'check_command_supported' and 'rx_classification_filter_ctl' > are added. > * 'check_command_supported' is for capability discovery. In anothoer > word, it is to check if specific feature/command is supported by > the specific port. This generic service is really needed to add NIC-specific functions. I'd suggest to name it "is_supported". > * 'rx_classification_filter_ctl' is for receive classifcation filter > configuring. e.g. hash function configuration, flow director > configuration. It is a common API where a lot of commands can > be implemented for different sub features. Not sure about this one. You are hiding specific API in an opaque structure. By the way, it should be in another patch. > +/** > + * Check if the command is supported by an Ethernet device. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param cmd > + * The command. > + * > + * @return > + * - (> 0) The command is supported. > + * - (0) The command is not supported. > + * - (-ENOTSUP) if hardware doesn't support. > + * - (-ENODEV) if is invalid. > + */ > +int rte_eth_dev_check_command_supported(uint8_t port_id, uint32_t cmd); What are the possible commands? You should define enum/constants here. -- Thomas