lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zgy-0vYLeaY-lMnR@Laptop-X1>
Date: Wed, 3 Apr 2024 10:28:34 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Donald Hunter <donald.hunter@...il.com>,
	Jiri Pirko <jiri@...nulli.us>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Stanislav Fomichev <sdf@...gle.com>
Subject: Re: [PATCHv3 net-next 2/2] ynl: support binary/u32 sub-type for
 indexed-array

On Mon, Apr 01, 2024 at 09:43:31PM -0700, Jakub Kicinski wrote:
> I think that elsewhere in the doc we use [SOMETHING] to mean
> TLV of type SOMETHING, here MEMBER1/2 are presumably just
> payloads of each ENTRY? Maybe this is better:
> 
>   [SOME-OTHER-ATTR]
>   [ARRAY-ATTR]
>     [ENTRY u32]
>     [ENTRY u32]
> 

Thanks, I will update the doc.
> ?
> 
> >  type-value
> >  ~~~~~~~~~~
> > diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
> > index e5ad415905c7..aa7077cffe74 100644
> > --- a/tools/net/ynl/lib/ynl.py
> > +++ b/tools/net/ynl/lib/ynl.py
> > @@ -640,6 +640,11 @@ class YnlFamily(SpecFamily):
> >              if attr_spec["sub-type"] == 'nest':
> >                  subattrs = self._decode(NlAttrs(item.raw), attr_spec['nested-attributes'])
> >                  decoded.append({ item.type: subattrs })
> > +            elif attr_spec["sub-type"] == 'binary' or attr_spec["sub-type"] == 'u32':
> > +                subattrs = item.as_bin()
> 
> Are you sure that as_bin() will work for all u32s?
> Or just when there's a hint...

I didn't check other subsystem. For bonding only, if we don't have the hint.
e.g.

  -
    name: arp-ip-target
    type: indexed-array
    sub-type: u32

The result will looks like:

    "arp-ip-target": [
      "c0a80101",
      "c0a80102"
    ],

Which looks good to me. Do you have other suggestion?

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ