From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Lin Ma <linma@zju.edu.cn>, Jakub Kicinski <kuba@kernel.org>
Cc: matt@codeconstruct.com.au, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v1] net: mctp: use deprecated parser in mctp_set_link_af
Date: Thu, 04 Jan 2024 14:43:38 +0800 [thread overview]
Message-ID: <e5e0640094a4e594eda8c3f8a54eca6728e58510.camel@codeconstruct.com.au> (raw)
In-Reply-To: <7cbc3044.688a7.18cd32c5f14.Coremail.linma@zju.edu.cn>
Hi Lin,
> (1) will get AF_MCTP with nla_type(...) call, and (2) will then
> passing `af` to `mctp_set_link_af`, which will expect the
> `NLA_F_NESTED` flag.
You could set that flag? It's not exclusive with the attribute type.
From netlink.h:
/*
* nla_type (16 bits)
* +---+---+-------------------------------+
* | N | O | Attribute Type |
* +---+---+-------------------------------+
* N := Carries nested attributes
* O := Payload stored in network byte order
*
* Note: The N and O flag are mutually exclusive.
*/
Which is what we do with existing userspace:
https://github.com/CodeConstruct/mctp/blob/6aa4b052d/src/mctp.c#L569C1-L569C1
Cheers,
Jeremy
next prev parent reply other threads:[~2024-01-04 6:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 7:02 [PATCH net-next v1] net: mctp: use deprecated parser in mctp_set_link_af Lin Ma
2024-01-04 1:47 ` Jakub Kicinski
2024-01-04 6:32 ` Lin Ma
2024-01-04 6:43 ` Jeremy Kerr [this message]
2024-01-04 7:04 ` Lin Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5e0640094a4e594eda8c3f8a54eca6728e58510.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).