]> 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)
commit5f4a920bf1fc29814fcfc3199fdde03a260c5093
treedc88f6af30455d744501fb191019f6ad78dc3bab
parentc3f26166b4335ea0a7a9660cbd52cdc95c096115
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