]> git.baikalelectronics.ru Git - kernel.git/commit
ionic: change the descriptor ring length without full reset
authorShannon Nelson <snelson@pensando.io>
Thu, 27 Aug 2020 23:00:28 +0000 (16:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Aug 2020 15:01:30 +0000 (08:01 -0700)
commit5a3917131efc312f3ea15bfb28015d050b6989b3
tree791eff1b9f42b1645ed3ddabed931aed76a4daa8
parent88b1474e577e33ba5e383b13f14538996eff4516
ionic: change the descriptor ring length without full reset

The original way of changing ring length was to completely
tear down the lif's queue structure and then rebuild it, while
running the risk of allocations that might fail in the middle
and leave us with a broken driver.

Instead, we can set up all the new queue and descriptor
allocations first, then swap them out and delete the old
allocations.  If the new allocations fail, we report the error,
stay with the old setup and continue running.  This gives us
a safer path, and a smaller window of time where we're not
processing traffic.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_lif.h