From patchwork Fri May 11 16:25:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 39868 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 05FDE1C83B; Fri, 11 May 2018 18:26:19 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 6441D1C825 for ; Fri, 11 May 2018 18:26:12 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 58278280073; Fri, 11 May 2018 16:26:11 +0000 (UTC) Received: from sfocexch01r.SolarFlarecom.com (10.20.40.34) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 11 May 2018 09:26:02 -0700 Received: from ocex03.SolarFlarecom.com (10.20.40.36) by sfocexch01r.SolarFlarecom.com (10.20.40.34) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 11 May 2018 09:26:00 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Fri, 11 May 2018 09:26:00 -0700 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w4BGPxag027518; Fri, 11 May 2018 17:25:59 +0100 Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w4BGPxWO014063; Fri, 11 May 2018 17:25:59 +0100 From: Andrew Rybchenko To: CC: Ferruh Yigit , Thomas Monjalon , Shahaf Shuler , Wei Dai Date: Fri, 11 May 2018 17:25:55 +0100 Message-ID: <1526055955-14027-4-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1526055955-14027-1-git-send-email-arybchenko@solarflare.com> References: <1526055955-14027-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 X-MDID: 1526055971-Yg3iZW4WSxVR Subject: [dpdk-dev] [PATCH 3/3] ethdev: fail if Rx queue offload is not supported 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" Return of error was removed to mitigate possible breakage of old applications which are not converted to the new offload API yet. However, old Rx offload API has no per queue controls and Rx queue offloads are derived from the device Rx mode bitfields exactly in the same way as it is done on configure. Device level Rx offloads are removed from queue offloads, so Rx queue offloads should be empty if old Rx offload API is used. Fixes: d04dd6d4ed67 ("ethdev: new Rx/Tx offloads API") Signed-off-by: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 60577efcf..938ec5638 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1580,6 +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__); + return -EINVAL; } ret = (*dev->dev_ops->rx_queue_setup)(dev, rx_queue_id, nb_rx_desc,