[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHS8izNu6biiVg==pri8PeDVP9unZthGrwSj4fGr84o61sLFgg@mail.gmail.com>
Date: Fri, 21 Mar 2025 15:15:57 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, kvm@...r.kernel.org,
virtualization@...ts.linux.dev, linux-kselftest@...r.kernel.org,
Donald Hunter <donald.hunter@...il.com>, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>, Andrew Lunn <andrew+netdev@...n.ch>,
Jeroen de Borst <jeroendb@...gle.com>, Harshitha Ramamurthy <hramamurthy@...gle.com>,
Kuniyuki Iwashima <kuniyu@...zon.com>, Willem de Bruijn <willemb@...gle.com>, David Ahern <dsahern@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>, Stefan Hajnoczi <stefanha@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Eugenio Pérez <eperezma@...hat.com>,
Shuah Khan <shuah@...nel.org>, sdf@...ichev.me, asml.silence@...il.com, dw@...idwei.uk,
Jamal Hadi Salim <jhs@...atatu.com>, Victor Nogueira <victor@...atatu.com>,
Pedro Tammela <pctammela@...atatu.com>, Samiullah Khawaja <skhawaja@...gle.com>
Subject: Re: [PATCH net-next v7 3/9] net: devmem: TCP tx netlink api
On Tue, Mar 18, 2025 at 1:39 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 3/8/25 10:40 PM, Mina Almasry wrote:
> > From: Stanislav Fomichev <sdf@...ichev.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@...ichev.me>
> > Signed-off-by: Mina Almasry <almasrymina@...gle.com>
> >
> > ---
> >
> > v3:
> > - Fix ynl-regen.sh error (Simon).
> >
> > ---
> > Documentation/netlink/specs/netdev.yaml | 12 ++++++++++++
> > include/uapi/linux/netdev.h | 1 +
> > net/core/netdev-genl-gen.c | 13 +++++++++++++
> > net/core/netdev-genl-gen.h | 1 +
> > net/core/netdev-genl.c | 6 ++++++
> > tools/include/uapi/linux/netdev.h | 1 +
> > 6 files changed, 34 insertions(+)
> >
> > diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
> > index 36f1152bfac3..e560b05eb528 100644
> > --- a/Documentation/netlink/specs/netdev.yaml
> > +++ b/Documentation/netlink/specs/netdev.yaml
> > @@ -743,6 +743,18 @@ operations:
> > - defer-hard-irqs
> > - gro-flush-timeout
> > - irq-suspend-timeout
> > + -
> > + name: bind-tx
> > + doc: Bind dmabuf to netdev for TX
> > + attribute-set: dmabuf
> > + do:
> > + request:
> > + attributes:
> > + - ifindex
> > + - fd
> > + reply:
> > + attributes:
> > + - id
> >
> > kernel-family:
> > headers: [ "linux/list.h"]
> > diff --git a/include/uapi/linux/netdev.h b/include/uapi/linux/netdev.h
> > index 7600bf62dbdf..7eb9571786b8 100644
> > --- a/include/uapi/linux/netdev.h
> > +++ b/include/uapi/linux/netdev.h
> > @@ -219,6 +219,7 @@ enum {
> > NETDEV_CMD_QSTATS_GET,
> > NETDEV_CMD_BIND_RX,
> > NETDEV_CMD_NAPI_SET,
> > + NETDEV_CMD_BIND_TX,
> >
> > __NETDEV_CMD_MAX,
> > NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1)
> > diff --git a/net/core/netdev-genl-gen.c b/net/core/netdev-genl-gen.c
> > index 996ac6a449eb..f27608d6301c 100644
> > --- a/net/core/netdev-genl-gen.c
> > +++ b/net/core/netdev-genl-gen.c
> > @@ -99,6 +99,12 @@ static const struct nla_policy netdev_napi_set_nl_policy[NETDEV_A_NAPI_IRQ_SUSPE
> > [NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT] = { .type = NLA_UINT, },
> > };
> >
> > +/* NETDEV_CMD_BIND_TX - do */
> > +static const struct nla_policy netdev_bind_tx_nl_policy[NETDEV_A_DMABUF_FD + 1] = {
> > + [NETDEV_A_DMABUF_IFINDEX] = NLA_POLICY_MIN(NLA_U32, 1),
> > + [NETDEV_A_DMABUF_FD] = { .type = NLA_U32, },
> > +};
> > +
> > /* Ops table for netdev */
> > static const struct genl_split_ops netdev_nl_ops[] = {
> > {
> > @@ -190,6 +196,13 @@ static const struct genl_split_ops netdev_nl_ops[] = {
> > .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_CMD_CAP_DO,
> > + },
> > };
> >
> > static const struct genl_multicast_group netdev_nl_mcgrps[] = {
> > diff --git a/net/core/netdev-genl-gen.h b/net/core/netdev-genl-gen.h
> > index e09dd7539ff2..c1fed66e92b9 100644
> > --- a/net/core/netdev-genl-gen.h
> > +++ b/net/core/netdev-genl-gen.h
> > @@ -34,6 +34,7 @@ int netdev_nl_qstats_get_dumpit(struct sk_buff *skb,
> > struct netlink_callback *cb);
> > int netdev_nl_bind_rx_doit(struct sk_buff *skb, struct genl_info *info);
> > int netdev_nl_napi_set_doit(struct sk_buff *skb, struct genl_info *info);
> > +int netdev_nl_bind_tx_doit(struct sk_buff *skb, struct genl_info *info);
> >
> > enum {
> > NETDEV_NLGRP_MGMT,
> > diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c
> > index 2b774183d31c..6e5f2de4d947 100644
> > --- a/net/core/netdev-genl.c
> > +++ b/net/core/netdev-genl.c
> > @@ -931,6 +931,12 @@ int netdev_nl_bind_rx_doit(struct sk_buff *skb, struct genl_info *info)
> > return err;
> > }
> >
> > +/* stub */
> > +int netdev_nl_bind_tx_doit(struct sk_buff *skb, struct genl_info *info)
> > +{
> > + return 0;
> > +}
> > +
> > void netdev_nl_sock_priv_init(struct list_head *priv)
> > {
> > INIT_LIST_HEAD(priv);
>
> I'm sorry, but this chunck does not apply cleanly anymore.
>
> Please rebase.
>
> Disclaimer: unfortunately I must note that due to the long backlog
> pending and the upcoming merge window, I'm unsure I'll be able to
> process the next revision before the net-next closing.
>
Thanks Paolo. I have also been under the weather the last couple of
days so I haven't even been able to repost. I guess I'll repost after
the merge window if netdev closes today.
--
Thanks,
Mina
Powered by blists - more mailing lists