]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: convert .ndo_change_mtu() to prepare/commit paradigm
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 7 Apr 2016 18:39:46 +0000 (19:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Apr 2016 19:26:06 +0000 (15:26 -0400)
commit97dea2f7d54f373cc73268d262afdb74b0c6dcb4
treedc88f6af30455d744501fb191019f6ad78dc3bab
parentb4b5342039612fa498f84d6ff6f1296706f19a71
nfp: convert .ndo_change_mtu() to prepare/commit paradigm

When changing MTU on running device first allocate new rings
and buffers and once it succeeds proceed with changing MTU.

Allocation of new rings is not really necessary for this
operation - it's done to keep the code simple and because
size of the extra ring memory is quite small compared to
the size of buffers.

Operation can still fail midway through if FW communication
times out.  In that case we retry with old MTU (rings).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c