summaryrefslogtreecommitdiffstats
path: root/net/switchdev
diff options
context:
space:
mode:
authorScott Feldman2015-05-10 18:47:50 +0200
committerDavid S. Miller2015-05-13 00:43:53 +0200
commitc4f20321d9680760a291991d77bc5b6d0eb2ed78 (patch)
treec17f8e6954937ce520d343ad4a24adb5ea5f8e3f /net/switchdev
parentswitchdev: convert parent_id_get to switchdev attr get (diff)
downloadkernel-qcow2-linux-c4f20321d9680760a291991d77bc5b6d0eb2ed78.tar.gz
kernel-qcow2-linux-c4f20321d9680760a291991d77bc5b6d0eb2ed78.tar.xz
kernel-qcow2-linux-c4f20321d9680760a291991d77bc5b6d0eb2ed78.zip
rocker: support prepare-commit transaction model
For rocker, support prepare-commit transaction model for setting attributes (and for adding objects). This requires rocker to preallocate memory needed for the commit up front in the prepare phase. Since rtnl_lock is held between prepare-commit, store the allocated memory on a queue hanging off of the rocker_port. Also, in prepare phase, do everything right up to calling into HW. The same code paths are tranversed in the driver for both prepare and commit phases. In some cases, any state modified in the prepare phase must be reverted before returning so the commit phase makes the same decisions. As a consequence of holding rtnl_lock in process context for all attr sets (and obj adds), all memory is GFP_KERNEL allocated and we don't need to busy spin waiting for the device to complete the command. So the bulk of this patch is simplifying the memory allocations to only use GFP_KERNEL and to remove the nowait flag and busy spin loop. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev')
0 files changed, 0 insertions, 0 deletions