]> git.baikalelectronics.ru Git - kernel.git/commit
ibmveth: Ethtool set queue support
authorNick Child <nnac123@linux.ibm.com>
Wed, 28 Sep 2022 21:43:50 +0000 (16:43 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Sep 2022 11:40:22 +0000 (12:40 +0100)
commit63cd8be8ca65203829e39d2b28e7532759f7c9e1
tree72916a2a12bfbef50ffc6279d9cff8dba09ee54d
parent5d333412ce7c4ad0f679cb85a9bd870947a1e032
ibmveth: Ethtool set queue support

Implement channel management functions to allow dynamic addition and
removal of transmit queues. The `ethtool --show-channels` and
`ethtool --set-channels` commands can be used to get and set the
number of queues, respectively. Allow the ability to add as many
transmit queues as available processors but never allow more than the
hard maximum of 16. The number of receive queues is one and cannot be
modified.

Depending on whether the requested number of queues is larger or
smaller than the current value, either allocate or free long term
buffers. Since long term buffer construction and destruction can
occur in two different areas, from either channel set requests or
device open/close, define functions for performing this work. If
allocation of a new buffer fails, then attempt to revert back to the
previous number of queues.

Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmveth.c