From patchwork Tue Dec 10 16:14:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Hunter X-Patchwork-Id: 849119 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD7EE1FD791; Tue, 10 Dec 2024 16:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733847303; cv=none; b=KaRUaX7nUUwXFSKk4qOGNOOEqughd4zdyEqEr1q3r0UZ+SkbgaTXDrG+CGaGdN1tYRvSHXdc2HVpJLnytjlada5pGtJez1IxV94td89qI8UYHmXmtCzXkBfo0SeFz+e0Z6XIFG7iIV07kcX3Nh8UZrocU/0juu764kjDJwyEHM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733847303; c=relaxed/simple; bh=Va3nsLmUl2P+rfyolzkwe9gtnla6bGra5Fmnc9s9mr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T/hnR9TNU+Rdi1dc0WbSratml8ULNGFbCXxZf9nLWQ9nMFLgI++Ff7ei2Atkrf/oIea9N3oC5aePokXglzCQ7vPPS4hWI4/T9I+Kq63CVcTMqoO9c5PjCUEMxmFEdwpbosKXK68kLzEuc+yBiZlEIHH7TNGSL+plCyyjZVrh/g0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Kzb1Xs2H; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kzb1Xs2H" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso1748305e9.0; Tue, 10 Dec 2024 08:15:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733847300; x=1734452100; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UheW5bGpPD5LwKX8nwzQTUxDQM96C2pEIHtc6nLg4Ng=; b=Kzb1Xs2HHRigemuBrhhjHt2y99giGzTTBsu/zOp/yCZ0yJBR/k1oeK/Ef+yMfYE6d5 e62cDONqDttR0r3LbS0VowCLftXCEZ5PZKm9MXP2qtgMdcj4KuuTCiz7MtIgsei/cUmy cUb/29QMKQ4mj9FxRVPjuIRAkx0LkG2ZGePqkETDkP53TzJe1G4wpssE9Fw9YqcTJra6 2avuyNHuIveaBy7QHA2UP7kaXWJlFcpzldsgtyXKNZ2XUEavwLu6zQnUAt9qAp9NcGEF hsx16mAWtvluqkrG8lht4bwfsxpgGMp6kgQxGgBeyWke/QXZUwtLDtD9Tq9GPT2bAvbw Xnbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733847300; x=1734452100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UheW5bGpPD5LwKX8nwzQTUxDQM96C2pEIHtc6nLg4Ng=; b=k+mJo8vks32vQmifMNrOjphWZGK+sW8btO9wnI0uIb5lgBbe6gSGRx2s29EHh31HcQ VbJX2/ra2W7Kbtlj2by5U23uNnGyCV8+syexRofSe5oWbTwjgorVUASyIgfcPNMpIxrT YZ8kBPrclaG0Y7Xyyg0PLrzq3yft43bIM7UDjB+4n3ePlweK1MxLO3ercBN+oS3Zulv0 emWReeY2mjU+IyV+ltzim3QxyQCnqbdxWR3WaAVAO5sEIEB1dzXuZALd3eQdCrX9Qp5E /QC7NgmBzzXuF+3IFycZsMf4+H3t1MrhS4vJijK46aZqwRHGtA267esLaXpMYzdcGlIV /Zmw== X-Forwarded-Encrypted: i=1; AJvYcCW5gO/PFDFWWP6oPEB8MtOW7N5xft73XtbWdk/JW9xUUKxsjqhmAQYdtzBXYqhVsw4PpWsft0H5hfZa8lEBNA==@vger.kernel.org X-Gm-Message-State: AOJu0YwFXgvJ9q3XtS30rjVlgF6V6FM1BWOnbJ4Czhk8KEcIThW5xqsu 2veA8axc97N4uReWwBfV/eXqW3W5ZcXtF5tMVBxb6N3oDKGrkRYK3drBMQ== X-Gm-Gg: ASbGncu/wcoGXwGCJ9IzVXqqkawJmq7NiX2bRRy0tieFy9ohAo0uXW9M1SpGeB+lqIO 2cnDDyIWrmsKN7+J8O0FW4EWyAD0g3I9WEjPu1s80SItapvDi1lpHEw/V524QUmi47Z6iPfbOjY MiRPOWCL+UeuT9PiK+GHJxby6b17qnC5X5OyfDhsN6yU16d4YerTC3eGhXwFs0HI/9isvFC65xb xr/D8uZOGi4sx6mksZeuw0Tc8oKMHRmD1WCDx7TaRXA/q4Ry8osbN/cllNNv61HQ1U8yoWS X-Google-Smtp-Source: AGHT+IFuNL26PchbijBb1B5gEkQZE6B1k3FRETLVS9dcHM2Zyy+TYFVoXST5jWZm/NO+RlaouPB+SQ== X-Received: by 2002:a05:600c:4712:b0:434:a746:9c82 with SMTP id 5b1f17b1804b1-434e29f0392mr122500705e9.5.1733847299474; Tue, 10 Dec 2024 08:14:59 -0800 (PST) Received: from imac.lan ([2a02:8010:60a0:0:75bb:8102:943a:2eb2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434f30bceadsm102383045e9.41.2024.12.10.08.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 08:14:58 -0800 (PST) From: Donald Hunter To: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Johannes Berg , linux-wireless@vger.kernel.org Cc: donald.hunter@redhat.com, Donald Hunter Subject: [PATCH net-next v2 2/7] tools/net/ynl: support decoding indexed arrays as enums Date: Tue, 10 Dec 2024 16:14:43 +0000 Message-ID: <20241210161448.76799-3-donald.hunter@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241210161448.76799-1-donald.hunter@gmail.com> References: <20241210161448.76799-1-donald.hunter@gmail.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When decoding an indexed-array with a scalar subtype, it is currently only possible to add a display-hint. Add support for decoding each value as an enum. Signed-off-by: Donald Hunter Acked-by: Jakub Kicinski --- tools/net/ynl/lib/ynl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py index dbc7a0a6ae68..0d39a83574d5 100644 --- a/tools/net/ynl/lib/ynl.py +++ b/tools/net/ynl/lib/ynl.py @@ -650,7 +650,9 @@ class YnlFamily(SpecFamily): decoded.append(subattr) elif attr_spec["sub-type"] in NlAttr.type_formats: subattr = item.as_scalar(attr_spec['sub-type'], attr_spec.byte_order) - if attr_spec.display_hint: + if 'enum' in attr_spec: + subattr = self._decode_enum(subattr, attr_spec) + elif attr_spec.display_hint: subattr = self._formatted_string(subattr, attr_spec.display_hint) decoded.append(subattr) else: From patchwork Tue Dec 10 16:14:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Hunter X-Patchwork-Id: 849118 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32B4F233D9C; Tue, 10 Dec 2024 16:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733847305; cv=none; b=H3Elg49WqOYKT/ZYbvbx7fgsS58sWs2zhomD1QUF2DLkpdWdl0HZ0hgqRt0Qt9B6nGFAIiODmU29IWQLBnbICJCuOf+bG3u37sNnzcORLeryOtGIfAau6GJFlfhGAgMfftx7Ury5ORCOhpJ5a72fdDe/ca1Nmo5RlGbBGVO8jcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733847305; c=relaxed/simple; bh=pPkDNIzYMqAPAZxjZ0L3vUGN0fX5rZxstXxWP0KZjr0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tOoteooKWNKdp5OWAe7dRQDYFRnKaOk+sDj84g1G2wjrXWgNNL3SiKejjl3ot5be/r3bPJPoJFXvsfepsr1otSL4/uAie6yldSH3d6oBv5r6cOcSru22sB0Zk7RYKoOK0ii2dlqJSJwyIjZSbevI2sNdCHElB+bvdU9UaDOJM9c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J12+VUPT; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J12+VUPT" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-435005192d1so14064175e9.3; Tue, 10 Dec 2024 08:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733847302; x=1734452102; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D7MEDGrn8ylg9WFEXDbicDG/hdkSOgHq3gb7E6Fqe/8=; b=J12+VUPT+/PWpflMBUr5p184u9rfAt/7u1f+2Y23wB/W09TBTi7RuUEMSEP0J4YHkl /9AGfa5EU5q+1eaMAFal0bKTiZzbRnmSzAHwL7R7+XLLkZU0ap5fXO1fElghSgJsphbg FbVxmjfolQDJ0bS7v1lGKxrig6HGgrfdPp17PE2J29JJ6EYeP8IQYRTc5DQNV869RBqN Fbamk+PAAUtsm2m5AXB9PxwB0BVRdfy+W97aXeJ0B4NrkVA8bpWuhuj2YJGCj0+pMKJc /FDKQk7LlOZxFgWRjMfzmCyj3FwM6lra4xhGlrzsONU33zMpKiJGcn2IPzDHHYAQorRI o0QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733847302; x=1734452102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D7MEDGrn8ylg9WFEXDbicDG/hdkSOgHq3gb7E6Fqe/8=; b=RM+pDrksumG7oKz0bC5ijkXgw1WNSu+3VOWG1oKKs/LwiTWWFjofIEJmeP+zTofYHJ Dw3dxj72xLg+NbnW04LIkf9MeAFIFNBaUMiVWPp0URdm2rJ0m0F5sLfivw5OZ2q5JqTv i8LdaV0Q/OfCgdNc3CZVjYuNH1xRHkvwoK3jnpLDajSShJ7FDQQxlJp59W3jfqyRRtAM IVZSuBPtNG3OYS1Y2GzwrpF0jzQzQ2V+HpPEQc/zCU13eo0+KNT3doZqLQFFIS33dSEf iJ8mu9+tM1maCnHR/dlfJQgDsjamkodtHgGPzFOv8GW4GSvlSbzbRA1r9epc7YxePrlj jIFA== X-Forwarded-Encrypted: i=1; AJvYcCV/kpsBQxdnpWMQITpyHaX2CjsB6otUdWWyC9PVYLwa0XecdZnYnEXBvz9QgM3wNtUCuri0D6zcfPDP252F7Q==@vger.kernel.org X-Gm-Message-State: AOJu0Yx/y7A8ewW8a3GhuctH9jK+OJRdrwYamOyT8Eu8Hu5L592ia0DM NxhNnuz+mCC7Nu6kDDBOQvufrW69/1CwoNu7ZSK9J5ukp9cvWnV9xBHwVg== X-Gm-Gg: ASbGncu5rKT2/b1+gKuRanf+kNit52q7IU5BAdNxnvniOJ/mqf1h+PYXO6r4wdRy8lH ZGZN9U0E5haoa9qycz10wtV7dhDRMb2yiOliV9McRo2A3qRoZkq2ksD2Sc6I97vGAuIUvwhRrYC XLRpHTsO4VeLTRrgzwldo7tfHncw7rNsJgax0pwwXaPTFqro6/oB0bhYU266j38SdkDvc1tGhai p5yPbHe/ATNgKyRWOXIiWF7yoPNL3B7qIe4uoodFosxRck9z8STJ9vVnNAMa0vEbLizSy5+ X-Google-Smtp-Source: AGHT+IGSRzL2HVe4MCRAeSRNWXAWzTLTtAo/iR/UUaY2zntKwm4zhxMnpV3OYWQzZvfmGnMNpx5whA== X-Received: by 2002:a05:600c:4750:b0:435:192:63fb with SMTP id 5b1f17b1804b1-435019266f3mr43359805e9.3.1733847301962; Tue, 10 Dec 2024 08:15:01 -0800 (PST) Received: from imac.lan ([2a02:8010:60a0:0:75bb:8102:943a:2eb2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434f30bceadsm102383045e9.41.2024.12.10.08.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 08:15:01 -0800 (PST) From: Donald Hunter To: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Johannes Berg , linux-wireless@vger.kernel.org Cc: donald.hunter@redhat.com, Donald Hunter Subject: [PATCH net-next v2 4/7] tools/net/ynl: accept IP string inputs Date: Tue, 10 Dec 2024 16:14:45 +0000 Message-ID: <20241210161448.76799-5-donald.hunter@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241210161448.76799-1-donald.hunter@gmail.com> References: <20241210161448.76799-1-donald.hunter@gmail.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The ynl tool uses display-hint to know when to format IP addresses in printed output, but not to parse IP addresses from --json input. Add support for parsing ipv4 and ipv6 strings. Signed-off-by: Donald Hunter --- tools/net/ynl/lib/ynl.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py index 08ad2d8a874e..c9ed356d7ed2 100644 --- a/tools/net/ynl/lib/ynl.py +++ b/tools/net/ynl/lib/ynl.py @@ -536,9 +536,11 @@ class YnlFamily(SpecFamily): try: return int(value) except (ValueError, TypeError) as e: - if 'enum' not in attr_spec: - raise e - return self._encode_enum(attr_spec, value) + if 'enum' in attr_spec: + return self._encode_enum(attr_spec, value) + if attr_spec.display_hint: + return self._from_string(value, attr_spec) + raise e def _add_attr(self, space, name, value, search_attrs): try: @@ -571,7 +573,10 @@ class YnlFamily(SpecFamily): if isinstance(value, bytes): attr_payload = value elif isinstance(value, str): - attr_payload = bytes.fromhex(value) + if attr.display_hint: + attr_payload = self._from_string(value, attr) + else: + attr_payload = bytes.fromhex(value) elif isinstance(value, dict) and attr.struct_name: attr_payload = self._encode_struct(attr.struct_name, value) else: @@ -901,6 +906,18 @@ class YnlFamily(SpecFamily): formatted = raw return formatted + def _from_string(self, string, attr_spec): + if attr_spec.display_hint in ['ipv4', 'ipv6']: + ip = ipaddress.ip_address(string) + if attr_spec['type'] == 'binary': + raw = ip.packed + else: + raw = int(ip) + else: + raise Exception(f"Display hint '{attr_spec.display_hint}' not implemented" + f" when parsing '{attr_spec['name']}'") + return raw + def handle_ntf(self, decoded): msg = dict() if self.include_raw: From patchwork Tue Dec 10 16:14:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Hunter X-Patchwork-Id: 849117 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC293234982; Tue, 10 Dec 2024 16:15:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733847308; cv=none; b=RdSXADmAaqUBmp6lOser0JEePfURc6PtuxHv4AJfGk7VIaLJ1n6P5qOrp1DyRMLWQyhUZs2qf4CEUDtGDc8CrE4ipD2vtVLrSoCJMAdkd/KeI0BGsBtzEwVHo8TIU2jLt/gkK3Ilj4v/aB8ENn1/DuLs+MRu4vliPJNA1a7w44M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733847308; c=relaxed/simple; bh=INjc3lTxaTUv0xreNgPhd2hYLMGopGNiP17h3MeQ6GA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tBIo7/xGeJwJhVw9TCzfEYBvyYrIWthGyXMDB4q5BblgCrbQmQZ0JI563iPYjhKjszNSt3ePSpjd+QZQZyg80hh6dBJtuykg4EX6luTaND1TbLXj0tbBhs9DTfr1Udth8by+jcB6D2TSCn832LPVL0lERnSmlmmjav3FJG0xaY8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JOgPoLaJ; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JOgPoLaJ" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-434a736518eso64293825e9.1; Tue, 10 Dec 2024 08:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733847305; x=1734452105; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q+fKNnTxR7JlpdmFjGqdREB0oT6hlKwkDIMPk35TRKA=; b=JOgPoLaJCG+W8YX2I766gw6jQefNSpYWDIjdR8428wPvYKxJ0+ja6jBE5/waX5cZzC oAKIYnsRtZ+o70ng64kkIwhBb4N88C2NazJSu7eymC0N41CVzz9Cux9o2imiE8R5Jtow YS73hFFihaiGFo+kUREWrSn5j2Sfo+zaMThDXa88x6BkCZBaQvlxFbEYbkyTqof/8ISc V0eWR9Hpw3JqJ7TOb6QA8+ULI+YFo9w8eSSgv7oGo3SxukjlInZ45yKRvD079nPESymu 1Ef1zdJ3lhCx1q4Vr6OUBVIWNTHy/OPeYLftbpO80eil7lVHJ4If69gR4v8o3CBdv8ww Ddsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733847305; x=1734452105; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q+fKNnTxR7JlpdmFjGqdREB0oT6hlKwkDIMPk35TRKA=; b=iIUuNgCJYJ4R2UK2UqPM7TwAdoSxtdwBoap2b/NjcVTHnBg+XRuE3SycqVHHH1waJP QjK8xXQBsscjwextCEX+DY3BNhWUdXoCYuRoBp9FOqcAveHVKGrkTLNxTCnAp2ffCqzL gxYi8sOlIKAFvftqDgd7nH34LJ2y+2X8cbhhGqMR7CXzvPYuzvl/XDYy10Iop2Dd0gdi 6JiitghmgFEIc+ioomQjj7z5Y0Bp5W7YU20i89R/6M4WM3TrM+piTN5251SF6M2755Sn aKImzvc7X9JJxJo6NMG1jJ6cVMSa95Sy52NSmOIPjmTPXkvE/nzbKfQVPlZea6PhF3xU TGMg== X-Forwarded-Encrypted: i=1; AJvYcCUrwqtbgsJuMXUVxhcgb8L3g63OxHEOg9+sZ126GuW6TM9R8KDe4wzy9l2iCafMgwUgvujcO/fIK0ZWs5r1cQ==@vger.kernel.org X-Gm-Message-State: AOJu0YzM+lbKRViqoDVz2PHWcIepgfSzmnCUv7/BvKR/SIewusDN7lMw dI371wSergJJ17vfVOmAoyim94ZAKuSDxN8sJIqjj2e4DsXefLRA6w9R4Q== X-Gm-Gg: ASbGncu9YycyV4v1/Bz/dqvXxbnxQpKHPHRWjhIvVXcYvjeRZmUnBg66H3GWlrh57mS dPZC0S7iLYrd/C03BHpvSzyOqW7D+MuYSk2IzSByRuDxXqJj+TlQ/Xh/qadU2pim8Tj7ZcI7G5J fN9Wl24Ms4vlJySCU0M6jYNOZ0EHeDx+KmxNwtFdz1h8HmEW1QNGYTKJInK0nXAVUoPn/R0RQTM x2Xfxd7S859BPx9eqn7Y/U12PPwDF6FsbRIJIzEdlXTWlnNdHGblYeR/wDQZ5pqSgXMPJN/ X-Google-Smtp-Source: AGHT+IH5Rp/5Gazb1vICk8qkAqqI1T/UcFMLoV5iYK8V0f4SZz46M1FL/UYomfFbMxwdoqbo255kuQ== X-Received: by 2002:a05:600c:241:b0:436:18d0:aa6e with SMTP id 5b1f17b1804b1-43618d0ab9fmr22529025e9.5.1733847304380; Tue, 10 Dec 2024 08:15:04 -0800 (PST) Received: from imac.lan ([2a02:8010:60a0:0:75bb:8102:943a:2eb2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434f30bceadsm102383045e9.41.2024.12.10.08.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 08:15:03 -0800 (PST) From: Donald Hunter To: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Johannes Berg , linux-wireless@vger.kernel.org Cc: donald.hunter@redhat.com, Donald Hunter Subject: [PATCH net-next v2 6/7] netlink: specs: add s8, s16 to genetlink schemas Date: Tue, 10 Dec 2024 16:14:47 +0000 Message-ID: <20241210161448.76799-7-donald.hunter@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241210161448.76799-1-donald.hunter@gmail.com> References: <20241210161448.76799-1-donald.hunter@gmail.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add s8 and s16 types to the genetlink schemas to align scalar types across all schemas. Signed-off-by: Donald Hunter Reviewed-by: Jakub Kicinski --- Documentation/netlink/genetlink-c.yaml | 2 +- Documentation/netlink/genetlink-legacy.yaml | 2 +- Documentation/netlink/genetlink.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/netlink/genetlink-c.yaml b/Documentation/netlink/genetlink-c.yaml index 9660ffb1ed6a..1cfc8073a120 100644 --- a/Documentation/netlink/genetlink-c.yaml +++ b/Documentation/netlink/genetlink-c.yaml @@ -160,7 +160,7 @@ properties: type: string type: &attr-type enum: [ unused, pad, flag, binary, - uint, sint, u8, u16, u32, u64, s32, s64, + uint, sint, u8, u16, u32, u64, s8, s16, s32, s64, string, nest, indexed-array, nest-type-value ] doc: description: Documentation of the attribute. diff --git a/Documentation/netlink/genetlink-legacy.yaml b/Documentation/netlink/genetlink-legacy.yaml index 7520f63ec3d2..f98ed12a09c0 100644 --- a/Documentation/netlink/genetlink-legacy.yaml +++ b/Documentation/netlink/genetlink-legacy.yaml @@ -206,7 +206,7 @@ properties: type: &attr-type description: The netlink attribute type enum: [ unused, pad, flag, binary, bitfield32, - uint, sint, u8, u16, u32, u64, s32, s64, + uint, sint, u8, u16, u32, u64, s8, s16, s32, s64, string, nest, indexed-array, nest-type-value ] doc: description: Documentation of the attribute. diff --git a/Documentation/netlink/genetlink.yaml b/Documentation/netlink/genetlink.yaml index b036227b46f1..11c1592d49be 100644 --- a/Documentation/netlink/genetlink.yaml +++ b/Documentation/netlink/genetlink.yaml @@ -123,7 +123,7 @@ properties: type: string type: &attr-type enum: [ unused, pad, flag, binary, - uint, sint, u8, u16, u32, u64, s32, s64, + uint, sint, u8, u16, u32, u64, s8, s16, s32, s64, string, nest, indexed-array, nest-type-value ] doc: description: Documentation of the attribute.