mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lin Ma" <linma@zju.edu.cn>
To: "Jeremy Kerr" <jk@codeconstruct.com.au>
Cc: "Jakub Kicinski" <kuba@kernel.org>,
	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, 4 Jan 2024 15:04:56 +0800 (GMT+08:00)	[thread overview]
Message-ID: <1ad2eb4b.68b90.18cd34a146c.Coremail.linma@zju.edu.cn> (raw)
In-Reply-To: <e5e0640094a4e594eda8c3f8a54eca6728e58510.camel@codeconstruct.com.au>

Hello Jeremy,

> 
> 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,

Oops, my bad. Just know that the nla_type will mask with `NLA_TYPE_MASK`. 

Sorry for the bother. T^T

> 
> 
> Jeremy

Thanks
Lin

      reply	other threads:[~2024-01-04  7:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28  7:02 Lin Ma
2024-01-04  1:47 ` Jakub Kicinski
2024-01-04  6:32   ` Lin Ma
2024-01-04  6:43     ` Jeremy Kerr
2024-01-04  7:04       ` Lin Ma [this message]

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=1ad2eb4b.68b90.18cd34a146c.Coremail.linma@zju.edu.cn \
    --to=linma@zju.edu.cn \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --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

all inboxes | Powered by JetHome®