]> 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)
commite80ea28a7b8a6137d401c5a0d6e9e153023032aa
tree791eff1b9f42b1645ed3ddabed931aed76a4daa8
parenteb786eb05a0e0b82580bcc09c365798c4589565c
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