Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4270314pxu; Wed, 9 Dec 2020 12:38:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+Apsg/D7PsrBpVNjxHrfrtODL4IesAUxvgbQz20+DQUv25KKgWoM9Ps+fJ7a61RMf6+qP X-Received: by 2002:a17:906:b56:: with SMTP id v22mr3577978ejg.145.1607546305456; Wed, 09 Dec 2020 12:38:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607546305; cv=none; d=google.com; s=arc-20160816; b=zQ6GWvU5axq9wxbdohyqlkT+cledb96ZNyAtg8LCLICxVdxJbYG7RxJqbxSKxI4Sbt i0Nn3l77key1SeQzDOjn15t3WXCVxBY1pxmVi4PmStAHzuaRhTTrlJNC8ZBSrfywUwxt KeRlDk9AnCPtrFVpToFvWpHE4ZG+t0m6cASDKOJaxP1yNc22s41/0iOjer0fQpdz7+me gdt6f8meOkoRuWQ8yzHbHwD0qZuLlHe9jFN3Uv5TFS1Hn1G/i6/I1HlOPuGRImn3b9XI CJEI8odIuRbnwKAFWMmCCP+XdnITaYGso+69f3B/RT/KIhI70VMVku59XblslDns3ht3 +EAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:dkim-signature :date; bh=9pUr57/n75QpuFXwJfy77lUCg0fQgzcasQ89mzWk6m4=; b=oqrD40F0Gf5rZUehT1iYJzNpcIeaAXaW4TTqk+3IDBHOrUIXmo6fmf0AzqibdUXQ7H OYx8lnC0ATcYjkRQxSgLIJTTnmCd+5YlEKKoYB8NTiD5dtQAvc0jfO4FprPr7IwnENQd yxSdfQKoEmvPkpqV02X9/2QUVF3Cq5nRJClcvsPYhyYLc5wcNm9HsXRDYeJ719YUvlU2 v5B64ykefnLa+h3CDq96fr9chyQP0UKoJ7EjurpTU1lPWcEy0RgqSrkpO1YxVEeyhgZI qewKk7S4VHkW2j4zSgfJkAhEgzuzwn6cSQjKFSuLsSvUWIuMt6DfMbaiVQoOI2KmX0qW AbIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CSRlYJtP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si1299654ejb.243.2020.12.09.12.38.03; Wed, 09 Dec 2020 12:38:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CSRlYJtP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388003AbgLITtl (ORCPT + 99 others); Wed, 9 Dec 2020 14:49:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:45866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732246AbgLITt1 (ORCPT ); Wed, 9 Dec 2020 14:49:27 -0500 Date: Wed, 9 Dec 2020 11:48:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607543327; bh=s6dPnE7S0yfkrHXxthmBtF0PbUYsXpjhSYfYbPAvBn8=; h=From:To:Cc:Subject:In-Reply-To:References:From; b=CSRlYJtPboMHtEadKY3CRQHpZWmmzxX1d/r8ewfUwWvSkZZIkzpQ9dT2JGltDLk2g HjnSo4GpMQEdzsT6N6ZFiP5jPihW4N6gKf85GkKxsfyPQDCJhpPAlnhq3lMJzCQHS8 2mgJLugQWlayYFZ5bbcrztFjWtBb3/vT9dueI+MqjFLqUrOIH+s0OUw7hjMezJD2lc GfpgQjRLHXSpGX3REnzO5j30nWsx6Sh1dLXv3WHpAeEYLkHeWU/Si8LvXGGhXVp00L 6YxU0Gc3Yig9vDeLkrSD9BMGHuc2dZQhi2ZV2xk19CxUhtHGfEqTyPs8Rn3RwvZR6J NUjUN8FQSwBjw== From: Jakub Kicinski To: Saeed Mahameed Cc: Geetha sowjanya , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sgoutham@marvell.com, davem@davemloft.net, sbhatta@marvell.com Subject: Re: [PATCHv3 net-next] octeontx2-pf: Add RSS multi group support Message-ID: <20201209114845.61839f46@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: References: <20201209170937.19548-1-gakula@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 09 Dec 2020 11:08:24 -0800 Saeed Mahameed wrote: > > -/* Configure RSS table and hash key */ > > -static int otx2_set_rxfh(struct net_device *dev, const u32 *indir, > > - const u8 *hkey, const u8 hfunc) > > +static int otx2_get_rxfh_context(struct net_device *dev, u32 *indir, > > + u8 *hkey, u8 *hfunc, u32 rss_context) > > { > > struct otx2_nic *pfvf = netdev_priv(dev); > > + struct otx2_rss_ctx *rss_ctx; > > struct otx2_rss_info *rss; > > int idx; > > > > - if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != > > ETH_RSS_HASH_TOP) > > - return -EOPNOTSUPP; > > - > > rss = &pfvf->hw.rss_info; > > > > if (!rss->enable) { > > - netdev_err(dev, "RSS is disabled, cannot change > > settings\n"); > > + netdev_err(dev, "RSS is disabled\n"); > > return -EIO; > > } > > I see that you init/enable rss on open, is this is your way to block > getting rss info if device is not open ? why do you need to report an > error anyway, why not just report whatever default config you will be > setting up on next open ? > > to me reporting errors to ethtool queries when device is down is a bad > user experience. > > > + if (rss_context >= MAX_RSS_GROUPS) > > + return -EINVAL; > > + > > -ENOENT > > + rss_ctx = rss->rss_ctx[rss_context]; > > + if (!rss_ctx) > > + return -EINVAL; > > > > -ENOENT Plus looks like this version introduces a W=1 C=1 warning: drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c:768:28: warning: Using plain integer as NULL pointer