linux/Documentation/netlink/specs
Mina Almasry 170aafe35c netdev: support binding dma-buf to netdevice
Add a netdev_dmabuf_binding struct which represents the
dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
rx queues on the netdevice. On the binding, the dma_buf_attach
& dma_buf_map_attachment will occur. The entries in the sg_table from
mapping will be inserted into a genpool to make it ready
for allocation.

The chunks in the genpool are owned by a dmabuf_chunk_owner struct which
holds the dma-buf offset of the base of the chunk and the dma_addr of
the chunk. Both are needed to use allocations that come from this chunk.

We create a new type that represents an allocation from the genpool:
net_iov. We setup the net_iov allocation size in the
genpool to PAGE_SIZE for simplicity: to match the PAGE_SIZE normally
allocated by the page pool and given to the drivers.

The user can unbind the dmabuf from the netdevice by closing the netlink
socket that established the binding. We do this so that the binding is
automatically unbound even if the userspace process crashes.

The binding and unbinding leaves an indicator in struct netdev_rx_queue
that the given queue is bound, and the binding is actuated by resetting
the rx queue using the queue API.

The netdev_dmabuf_binding struct is refcounted, and releases its
resources only when all the refs are released.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Kaiyuan Zhang <kaiyuanz@google.com>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # excluding netlink
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20240910171458.219195-4-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-11 20:44:31 -07:00
..
devlink.yaml devlink: Fix length of eswitch inline-mode 2024-03-11 13:13:53 -07:00
dpll.yaml dpll: add Embedded SYNC feature for a pin 2024-08-26 19:21:14 -07:00
ethtool.yaml ethtool: Extend cable testing interface with result source information 2024-08-26 09:33:58 -07:00
fou.yaml netlink: specs: fix indent in fou 2023-08-24 19:04:20 -07:00
handshake.yaml handshake: Fix sign of key_serial_t fields 2023-10-02 12:34:21 -07:00
mptcp_pm.yaml mptcp: add token for get-addr in yaml 2024-03-04 13:07:45 +00:00
netdev.yaml netdev: support binding dma-buf to netdevice 2024-09-11 20:44:31 -07:00
nfsd.yaml nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
nftables.yaml netlink: specs: nftables: allow decode of tailscale ruleset 2024-09-05 18:43:56 -07:00
nlctrl.yaml ynl: rename array-nest to indexed-array 2024-04-05 22:32:49 -07:00
ovs_datapath.yaml netlink: specs: ovs: correct enum names in specs 2023-12-15 12:17:16 +00:00
ovs_flow.yaml net: openvswitch: add psample action 2024-07-05 17:45:47 -07:00
ovs_vport.yaml netlink: specs: ovs: remove fixed header fields from attrs 2023-12-15 12:17:16 +00:00
rt_addr.yaml doc/netlink: Add spec for rt addr messages 2023-08-27 17:17:10 -07:00
rt_link.yaml doc/netlink/specs: add netkit support to rt_link.yaml 2024-08-07 20:20:25 -07:00
rt_route.yaml doc/netlink: Add spec for rt route messages 2023-08-27 17:17:11 -07:00
tc.yaml doc: netlink: specs: tc: flower: add enc-flags 2024-07-15 09:14:39 -07:00
tcp_metrics.yaml tcp_metrics: add netlink protocol spec in YAML 2024-07-01 09:44:27 +01:00
team.yaml Documentation: netlink: add a YAML spec for team 2024-04-02 18:24:32 -07:00