Thread (5 messages) 5 messages, 3 authors, 2024-01-04

Re: [PATCH net-next v1] net: mctp: use deprecated parser in mctp_set_link_af

From: Lin Ma <hidden>
Date: 2024-01-04 07:05:13
Also in: lkml

Hello Jeremy,
Hi Lin,
quoted
(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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help