Thread (20 messages) 20 messages, 4 authors, 2023-03-23

Re: [PATCH net-next v2 2/6] tools: ynl: Add struct parsing to nlspec

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2023-03-22 11:55:39

Jakub Kicinski [off-list ref] writes:
On Sun, 19 Mar 2023 19:37:59 +0000 Donald Hunter wrote:
quoted
+class SpecStructMember(SpecElement):
+    """Struct member attribute
+
+    Represents a single struct member attribute.
+
+    Attributes:
+        type    string, kernel type of the member attribute
We can have structs inside structs in theory, or "binary blobs" so this
is really a subset of what attr can be rather than necessarily a kernel
type?
Okay, so the schema currently defines the member types as u*, s* and
string. Does it make sense to add 'binary' and 'struct'?

To be clear, do you want me to drop the word 'kernel' from the
docstring, or something more?
quoted
+    """
+    def __init__(self, family, yaml):
+        super().__init__(family, yaml)
+        self.type = yaml['type']
+
nit: double new line
Ack.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help