Re: [PATCH net-next v4 02/12] doc/netlink: Add a schema for netlink-raw families

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/23/2023 2:19 PM, Donald Hunter wrote:
> Jacob Keller <jacob.e.keller@xxxxxxxxx> writes:
>> On 8/23/2023 4:41 AM, Donald Hunter wrote:
>>> +---
>>> +$id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
>>> +$schema: https://json-schema.org/draft-07/schema
>>> +
>>> +# Common defines
>>> +$defs:
>>> +  uint:
>>> +    type: integer
>>> +    minimum: 0
>>> +  len-or-define:
>>> +    type: [ string, integer ]
>>> +    pattern: ^[0-9A-Za-z_]+( - 1)?$
>>> +    minimum: 0
>>> +
>>> +# Schema for specs
>>> +title: Protocol
>>> +description: Specification of a genetlink protocol
>>
>> If this is for netlink-raw, shouldn't this not say genetlink? Same
>> elsewhere? or am I misunderstanding something?
> 
> It's a good question. The schema definitions are currently strict
> supersets of genetlink:
> 
> genetlink <= genetlink-c <= genetlink-legacy <= netlink-raw
> 
> As you noted below, there's only 2 additions needed for the netlink raw
> families, protonum and mcast-group value.
> 
> I would be happy to change the description and other references to
> genetlink in this spec, but I'd like to hear Jakub's thoughts about
> minimal modification vs a more thorough rewording. Perhaps a middle
> ground would be to extend the top-level description to say "genetlink or
> raw netlink" and qualify that all mention of genetlink also applies to
> raw netlink.
> 
> Either way, I just noticed that the schema $id does need to be updated.
> 

Ok, ya lets wait for Jakub's opinion. I think the clarification would be
good since at least conceptually genetlink is distinct to me from
netlink raw, so it feels a bit weird.

Either way, they share far more in common than I had originally
realized, so its not a huge deal.

Thanks for the clarification!

>>> +type: object
>>> +required: [ name, doc, attribute-sets, operations ]
>>> +additionalProperties: False
>>> +properties:
>>> +  name:
>>> +    description: Name of the genetlink family.
>>> +    type: string
>>> +  doc:
>>> +    type: string
>>> +  version:
>>> +    description: Generic Netlink family version. Default is 1.
>>> +    type: integer
>>> +    minimum: 1
>>> +  protocol:
>>> +    description: Schema compatibility level. Default is "genetlink".
>>> +    enum: [ genetlink, genetlink-c, genetlink-legacy, netlink-raw ] # Trim
>>> +  # Start netlink-raw
>>
>> I guess the netlink raw part is only below this? Or does netlink raw
>> share more of the generic netlink code than I thought?
> 
> Raw netlink is, so far, the same as genetlink-legacy with the addition
> of hard-coded protocol ids.
> 

Right that makes sense why this shares so much.

Thanks,
Jake



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux