mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
![]() To read from a region, user space must currently request a new snapshot of the region and then read from that snapshot. This can sometimes be overkill if user space only reads a tiny portion. They first create the snapshot, then request a read, then destroy the snapshot. For regions which have a single underlying "contents", it makes sense to allow supporting direct reading of the region data. Extend the DEVLINK_CMD_REGION_READ to allow direct reading from a region if requested via the new DEVLINK_ATTR_REGION_DIRECT. If this attribute is set, then perform a direct read instead of using a snapshot. Direct read is mutually exclusive with DEVLINK_ATTR_REGION_SNAPSHOT_ID, and care is taken to ensure that we reject commands which provide incorrect attributes. Regions must enable support for direct read by implementing the .read() callback function. If a region does not support such direct reads, a suitable extended error message is reported. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> |
||
---|---|---|
.. | ||
am65-nuss-cpsw-switch.rst | ||
bnxt.rst | ||
devlink-dpipe.rst | ||
devlink-flash.rst | ||
devlink-health.rst | ||
devlink-info.rst | ||
devlink-linecard.rst | ||
devlink-params.rst | ||
devlink-port.rst | ||
devlink-region.rst | ||
devlink-reload.rst | ||
devlink-resource.rst | ||
devlink-selftests.rst | ||
devlink-trap.rst | ||
hns3.rst | ||
ice.rst | ||
index.rst | ||
ionic.rst | ||
iosm.rst | ||
mlx4.rst | ||
mlx5.rst | ||
mlxsw.rst | ||
mv88e6xxx.rst | ||
netdevsim.rst | ||
nfp.rst | ||
octeontx2.rst | ||
prestera.rst | ||
qed.rst | ||
ti-cpsw-switch.rst |