Re: [PATCH net-next v2] net: mana: Improve mana_set_channels() in low mem conditions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.09.24 05:45, Shradha Gupta wrote:
The mana_set_channels() function requires detaching the mana
driver and reattaching it with changed channel values.
During this operation if the system is low on memory, the reattach
might fail, causing the network device being down.
To avoid this we pre-allocate buffers at the beginning of set operation,
to prevent complete network loss

Signed-off-by: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx>
---
  Changes in v2
  * Pass num_queues as argument in mana_pre_alloc_rxbufs()
---
  drivers/net/ethernet/microsoft/mana/mana_en.c |  6 ++--
  .../ethernet/microsoft/mana/mana_ethtool.c    | 28 ++++++++++---------
  include/net/mana/mana.h                       |  2 +-
  3 files changed, 19 insertions(+), 17 deletions(-)

Looks better now with the argument for the queue number.

Reviewed-by: Gerhard Engleder <gerhard@xxxxxxxxxxxxxxxxxxxxx>




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux