Re: [PATCH RFC net-next v2 4/6] net: devmem: TCP tx netlink api
From: Simon Horman <horms@kernel.org>
Date: 2025-01-31 08:30:35
Also in:
kvm, linux-doc, linux-kselftest, lkml, virtualization
On Thu, Jan 30, 2025 at 09:15:37PM +0000, Mina Almasry wrote:
From: Stanislav Fomichev <sdf@fomichev.me> Add bind-tx netlink call to attach dmabuf for TX; queue is not required, only ifindex and dmabuf fd for attachment. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Mina Almasry <redacted>
Hi Mina, I noticed minor issue relating to generated code. ...
quoted hunk ↗ jump to hunk
diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml index cbb544bd6c84..93f4333e7bc6 100644 --- a/Documentation/netlink/specs/netdev.yaml +++ b/Documentation/netlink/specs/netdev.yaml
The lines preceding the hunk below are:
name: napi-set
doc: Set configurable NAPI instance settings.
attribute-set: napi
flags: [ admin-perm ]
do:
request:
attributes:
- id
quoted hunk ↗ jump to hunk
@@ -711,6 +711,18 @@ operations: - defer-hard-irqs - gro-flush-timeout - irq-suspend-timeout + - + name: bind-tx + doc: Bind dmabuf to netdev for TX + attribute-set: dmabuf
Unlike the entry for napi-set there is no "flags: [ admin-perm ]" fpr bind-tx...
+ do: + request: + attributes: + - ifindex + - fd + reply: + attributes: + - id kernel-family: headers: [ "linux/list.h"]
...
quoted hunk ↗ jump to hunk
diff --git a/net/core/netdev-genl-gen.c b/net/core/netdev-genl-gen.c
...
quoted hunk ↗ jump to hunk
@@ -190,6 +196,13 @@ static const struct genl_split_ops netdev_nl_ops[] = {
The lines preceding this hunk are:
{
.cmd = NETDEV_CMD_NAPI_SET,
.doit = netdev_nl_napi_set_doit,
.policy = netdev_napi_set_nl_policy,
.maxattr = NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT,
.flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
},
+ {
+ .cmd = NETDEV_CMD_BIND_TX,
+ .doit = netdev_nl_bind_tx_doit,
+ .policy = netdev_bind_tx_nl_policy,
+ .maxattr = NETDEV_A_DMABUF_FD,
+ .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,... so I don't think GENL_ADMIN_PERM should be here. Flagged by running tools/net/ynl/ynl-regen.sh -f && git diff
+ },
};
static const struct genl_multicast_group netdev_nl_mcgrps[] = {...