From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93E65C4332F for ; Sun, 4 Dec 2022 23:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbiLDXi4 (ORCPT ); Sun, 4 Dec 2022 18:38:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbiLDXiz (ORCPT ); Sun, 4 Dec 2022 18:38:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AAE811A07 for ; Sun, 4 Dec 2022 15:38:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 491EFB80B4E for ; Sun, 4 Dec 2022 23:38:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A48EDC433C1; Sun, 4 Dec 2022 23:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670197131; bh=ZR3pumQKwKCYNVmos0EXjZeC1AFFP8rzw3tczoMZyt0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dNpQa11SD93eEBF+1EDfD5FF2tXYxtvSHfKWI0tvdAXQTMjDs2kZr3CGyv18mYYxr ssaX1epaQAokjssk+arXNRQZicjDCGq+vGY/+y/SCuE9VcVhjr0inaGQXHNhDY5LsH aDG/91OuypZadEKihiWR9WmwcxuKI7/ZKHMMJ/8IkmnnmjHCmmivyb+xnwAYWC7wb4 NX+WPBQMKfEn7cw5e1HHEJND5ECvBoM7SpDbWnI0D4HYhYjc/HhfU3n3K2ePpVgtOY /I4OXr6Bj6kA5gpDPWytwmA5XpWBJG+AmszX1bxmpau7MbgerCyqj7Ea3S7IxWlnUT nxfHDlqMg5WYw== Date: Sun, 4 Dec 2022 15:38:50 -0800 From: Jakub Kicinski To: Leon Romanovsky Cc: Sudheer Mogilappagari , netdev@vger.kernel.org, mkubecek@suse.cz, andrew@lunn.ch, corbet@lwn.net, sridhar.samudrala@intel.com, anthony.l.nguyen@intel.com Subject: Re: [PATCH net-next v7] ethtool: add netlink based get rss support Message-ID: <20221204153850.42640ac2@kernel.org> In-Reply-To: References: <20221202002555.241580-1-sudheer.mogilappagari@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, 4 Dec 2022 14:17:05 +0200 Leon Romanovsky wrote: > On Thu, Dec 01, 2022 at 04:25:55PM -0800, Sudheer Mogilappagari wrote: > > Add netlink based support for "ethtool -x [context x]" > > command by implementing ETHTOOL_MSG_RSS_GET netlink message. > > This is equivalent to functionality provided via ETHTOOL_GRSSH > > in ioctl path. It sends RSS table, hash key and hash function > > of an interface to user space. > > > > This patch implements existing functionality available > > in ioctl path and enables addition of new RSS context > > based parameters in future. > > But why do you do this conversion now? Was this "future" already > discussed on the ML? Conversion to netlink stands on its own. > > + u8 *rss_config; > > + int ret; > > <...> > > > + data->indir_table = (u32 *)rss_config; > > Please use correct type from the beginning. There are two tables in this memory, the second one is u8. So one of them will need the cast, the code is fine AFAICT.