Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp937453ybh; Thu, 12 Mar 2020 13:55:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvAP+sOxyvJOjeMBLRm95u8USGxADo8gFy2j/w44+KDJU2KAeldwbmWt4785x/IyPOW8lz7 X-Received: by 2002:aca:47c8:: with SMTP id u191mr4322535oia.17.1584046514298; Thu, 12 Mar 2020 13:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584046514; cv=none; d=google.com; s=arc-20160816; b=gacFcxGTeRgbV0guw0teJ03w7WYAJ65WQSR7tvzrYdJgJfqenIT4Y64ItzJmjzcUs1 yf9oNhzEfvYosAMBimQFy+hHmzzaF1xvf3DpgYUqNUNyTlGJB2E1IlRkmpeUbnOke7Pp I6MhXUD9swUe6XBpfvieg2P0ckPbPYAEGcuQaNUfj+h0sAIynLmqySQKaPlCgm07x5YC wdKlpAJbRNBQpG9d1xYpQ91Np3duOGG4uaA+vlihL5DJholntRUZo/TKO1EXb6OOHCtU b++3SJNqU1pxfrW3YfrYSy/6ENmE9FKLIFJxvWZ8tJtlYfxBDqZlWynMEI52Vle/B4e/ 0glA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=cIA+UQHYwI7GnUf2Pm5+r1yEZZCmgP1nvPTbIzvhMOY=; b=SL2YgLaNPFQwspjAHrUSD+1x1A9h4cU68yKZ9z9V7KSfAXKmeVKx1/rOzX7OLQ/Ee/ ZwwLOLF3krAC6fGnqbLvTryYNVZLhUA278Ya1Xux862/uf7bbBmG6jFbdaHKC5aFro9w cXEaElmpWGbQI9YZi3IoQ+G1ZnIrv8aCl76bWwn7dD34zLgxAdgeQkaIWvXhHr6I4aak 4jV0WOFDmr3bZ0YFEmClPoSCkAbKGzGxbaJ0QgIC9/HeWiMCM+MwI9oN6DccE7yqtW+M dmfO5UkBBnkoLNwLIbEjeXpwcfQQKVFU8ZC8IHyJ7HppWgVcpfnDn1kMYkOHSmSm+ujq Qczw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sl4tyNuT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h5si3527067otr.68.2020.03.12.13.55.01; Thu, 12 Mar 2020 13:55:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sl4tyNuT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727046AbgCLUyb (ORCPT + 99 others); Thu, 12 Mar 2020 16:54:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:41980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgCLUyb (ORCPT ); Thu, 12 Mar 2020 16:54:31 -0400 Received: from kicinski-fedora-PC1C0HJN (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F3D6206B7; Thu, 12 Mar 2020 20:54:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584046470; bh=PvbdNsOe0VwVAwRa3+27OnFLtZqNrOjd7DWi6egcw0E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Sl4tyNuT2NJgT0ATGSvNl73f72I8Nc9OrXTs5996fl7lA5RNGsM8hrhfl01FYdaL/ pVtnJt4mXZw4vgVPXsut1VoUtIkKcFtTFEU+lQkjlGAreZ/7rK/mIX7Ol+faHPejOF aiKMFG3bCHRavOre0S1y9U7X+OspXHxNa0qul7qk= Date: Thu, 12 Mar 2020 13:54:29 -0700 From: Jakub Kicinski To: Michal Kubecek Cc: David Miller , netdev@vger.kernel.org, Jiri Pirko , Andrew Lunn , Florian Fainelli , John Linville , Johannes Berg , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 14/15] ethtool: set device channel counts with CHANNELS_SET request Message-ID: <20200312135429.1a507199@kicinski-fedora-PC1C0HJN> In-Reply-To: <58eaff0d7ec1cd4a85142c07e4a1c97772b784e3.1584043144.git.mkubecek@suse.cz> References: <58eaff0d7ec1cd4a85142c07e4a1c97772b784e3.1584043144.git.mkubecek@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Mar 2020 21:08:43 +0100 (CET) Michal Kubecek wrote: > Implement CHANNELS_SET netlink request to set channel counts of a network > device. These are traditionally set with ETHTOOL_SCHANNELS ioctl request. > > Like the ioctl implementation, the generic ethtool code checks if supplied > values do not exceed driver defined limits; if they do, first offending > attribute is reported using extack. Checks preventing removing channels > used for RX indirection table or zerocopy AF_XDP socket are also > implemented. > > Move ethtool_get_max_rxfh_channel() helper into common.c so that it can be > used by both ioctl and netlink code. > > v2: > - fix netdev reference leak in error path (found by Jakub Kicinsky) > > Signed-off-by: Michal Kubecek Reviewed-by: Jakub Kicinski Thanks!