From patchwork Thu May 31 12:44:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 40539 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87D524F90; Thu, 31 May 2018 14:44:57 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 606EF4CC7 for ; Thu, 31 May 2018 14:44:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2018 05:44:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,463,1520924400"; d="scan'208";a="44233497" Received: from silpixa00399777.ir.intel.com (HELO silpixa00399777.ger.corp.intel.com) ([10.237.222.236]) by fmsmga008.fm.intel.com with ESMTP; 31 May 2018 05:44:52 -0700 From: Ferruh Yigit To: Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit , Shahaf Shuler , Wei Dai , Qi Zhang , Andrew Rybchenko Date: Thu, 31 May 2018 13:44:30 +0100 Message-Id: <20180531124431.13746-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [dpdk-dev] [PATCH] ethdev: force offloading API rules 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" The error path was disabled in previous release to let apps to be more flexible. But this release they are enabled, applications have to obey offload API rules otherwise they will get errors from following APIs: rte_eth_dev_configure rte_eth_rx_queue_setup rte_eth_tx_queue_setup Signed-off-by: Ferruh Yigit Acked-by: Andrew Rybchenko Acked-by: Thomas Monjalon --- Cc: Shahaf Shuler Cc: Wei Dai Cc: Qi Zhang Cc: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index cd4bfd3c6..66e311676 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1171,7 +1171,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, local_conf.rxmode.offloads, dev_info.rx_offload_capa, __func__); - /* Will return -EINVAL in the next release */ + return -EINVAL; } if ((local_conf.txmode.offloads & dev_info.tx_offload_capa) != local_conf.txmode.offloads) { @@ -1182,7 +1182,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, local_conf.txmode.offloads, dev_info.tx_offload_capa, __func__); - /* Will return -EINVAL in the next release */ + return -EINVAL; } /* Check that device supports requested rss hash functions. */ @@ -1580,7 +1580,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, local_conf.offloads, dev_info.rx_queue_offload_capa, __func__); - /* Will return -EINVAL in the next release */ + return -EINVAL; } ret = (*dev->dev_ops->rx_queue_setup)(dev, rx_queue_id, nb_rx_desc, @@ -1745,7 +1745,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, local_conf.offloads, dev_info.tx_queue_offload_capa, __func__); - /* Will return -EINVAL in the next release */ + return -EINVAL; } return eth_err(port_id, (*dev->dev_ops->tx_queue_setup)(dev,