From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02AFAA0577; Mon, 13 Apr 2020 16:47:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35D1EF72; Mon, 13 Apr 2020 16:47:40 +0200 (CEST) Received: from integrity.niometrics.com (integrity.niometrics.com [42.61.70.122]) by dpdk.org (Postfix) with ESMTP id E165EF12; Mon, 13 Apr 2020 16:47:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by integrity.niometrics.com (Postfix) with ESMTP id 9AE3D409CBA9; Mon, 13 Apr 2020 22:47:35 +0800 (+08) DKIM-Filter: OpenDKIM Filter v2.11.0 integrity.niometrics.com 9AE3D409CBA9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niometrics.com; s=default; t=1586789256; bh=UHXswmuunuOSpx4T7kQ6/XfaQj3PUpiRw/eOuVGmE2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EuGpMhtHDUpqSWz5QO53s1y+Shx91wvRlL4zvbFBEkkhPv3CVucu24KJrsQxuFZ+k +1mVQkxfqP5X8iHV6w9Up5a0dGcQ1ECFw1ZG074o6wZf+u1LgwiEmWS7eTNvHuXgsd E7Oe2A3NYHucb75tI5vykRV7Ze8mtp3Aw0RT6A8Q= X-Virus-Scanned: amavisd-new at niometrics.com Received: from integrity.niometrics.com ([127.0.0.1]) by localhost (integrity.niometrics.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iONGcJ4axQer; Mon, 13 Apr 2020 22:47:35 +0800 (+08) Received: from monkey-island.localdomain (unknown [10.15.0.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by integrity.niometrics.com (Postfix) with ESMTPSA id 752DD409CBA8; Mon, 13 Apr 2020 22:47:34 +0800 (+08) DMARC-Filter: OpenDMARC Filter v1.3.2 integrity.niometrics.com 752DD409CBA8 DKIM-Filter: OpenDKIM Filter v2.11.0 integrity.niometrics.com 752DD409CBA8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niometrics.com; s=default; t=1586789255; bh=UHXswmuunuOSpx4T7kQ6/XfaQj3PUpiRw/eOuVGmE2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r2zydRqC41SqIhfocYC98nW7FpdgipmjZBM0PAd2ZOj14uSBhnkuc2ZiYXabQNPKM FAKTMBTeWj8sz8pq0JKes7c5KvUSEj/Euqns/jDgN7Zw2AMH2pKtFcbrkQpQV1hECh 82Rvpu+OJS3Fw6pi8tKh4aKSzXN10JhMD2Vmb2sU= From: Mohsin Shaikh To: dev@dpdk.org Cc: stable@dpdk.org, akozyrev@mellanox.com, Mohsin Shaikh Date: Mon, 13 Apr 2020 22:47:22 +0800 Message-Id: <1586789242-9984-1-git-send-email-mohsinshaikh@niometrics.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1586783744-8962-1-git-send-email-mohsinshaikh@niometrics.com> References: <1586783744-8962-1-git-send-email-mohsinshaikh@niometrics.com> X-Spam-Status: No, score=-1.1 required=3.5 tests=ALL_TRUSTED, AWL, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on integrity.niometrics.com Subject: [dpdk-dev] [PATCH v2] net/mlx5: Allow configuring mlx5 port for TX only 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" Configuring mlx5 port with 0 rx rings and 1 or more tx rings causes following error in dev_start: net_mlx5: port 1 cannot allocate RSS queue list (0) net_mlx5: port 1 reta config failed: Cannot allocate memory Skip mlx5_dev_configure_rss_reta() when there are no rx rings. Cc: stable@dpdk.org Signed-off-by: Mohsin Shaikh --- v2: Fix coding style issue COMMIT_LOG_LONG_LINE --- drivers/net/mlx5/mlx5_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index d7d3bc7..1d443c1 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -463,7 +463,7 @@ struct ethtool_link_settings { unsigned int *rss_queue_arr = NULL; unsigned int rss_queue_n = 0; - if (priv->skip_default_rss_reta) + if (priv->skip_default_rss_reta || !rxqs_n) return ret; rss_queue_arr = rte_malloc("", rxqs_n * sizeof(unsigned int), 0); if (!rss_queue_arr) { -- 1.8.3.1