From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH net-next 08/12] amd-xgbe: Add ethtool show/set channels support Date: Mon, 21 May 2018 22:35:42 -0700 Message-ID: <20180521223542.3306664f@cakuba> References: <20180521215818.8135.83100.stgit@tlendack-t1.amdoffice.net> <20180521215937.8135.63942.stgit@tlendack-t1.amdoffice.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, David Miller To: Tom Lendacky Return-path: Received: from mx4.wp.pl ([212.77.101.12]:45130 "EHLO mx4.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbeEVFfv (ORCPT ); Tue, 22 May 2018 01:35:51 -0400 In-Reply-To: <20180521215937.8135.63942.stgit@tlendack-t1.amdoffice.net> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 21 May 2018 16:59:37 -0500, Tom Lendacky wrote: > + rx = combined + channels->rx_count; > + tx = combined + channels->tx_count; > + netdev_notice(netdev, "final channel count assignment: combined=%u, rx-only=%u, tx-only=%u\n", > + min(rx, tx), rx - min(rx, tx), tx - min(rx, tx)); If user requests combined 0 rx 8 tx 8 they will end up with combined 8 rx 0 tx 0. Is that expected? The man page clearly sayeth: -L --set-channels Changes the numbers of channels of the specified network device. rx N Changes the number of channels with only receive queues. tx N Changes the number of channels with only transmit queues. other N Changes the number of channels used only for other purposes e.g. link interrupts or SR-IOV co-ordination. combined N Changes the number of multi-purpose channels. Note the use of word *only*. There are drivers in tree which adhere to this interpretation and dutifully allocate separate IRQs if RX and TX channels are requested separately. Which is not to claim that majority of existing drivers adhere to this wording :)