From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: , X-List-Received-Date: Thu, 31 May 2018 12:44:56 -0000 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 --- 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, -- 2.14.3