From patchwork Sat Feb 3 13:16:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Marcolini X-Patchwork-Id: 13544247 X-Patchwork-Delegate: kuba@kernel.org 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 C6AE65D72F for ; Sat, 3 Feb 2024 13:16:15 +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=1706966177; cv=none; b=gCIikLGlbCmhGUcRSB0CE73svWZ3rIcS7ERcvyZZK2KvT5MQWDx1sQH9C99/Uz6DJWHPIvSS1cXqlyseQlt0lzZZM/KFmNj5pszoagP50/DPI+kj+W/Xk//lj/paaHH3qpUQ8rf55PCF6h60nvP4eb0slo42A/eojBzIEL4godo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706966177; c=relaxed/simple; bh=q1VfIyh7r7+MD4cr7Svyd+HjENDCjukI0tOGzzk4XSE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IxBcTsRTF8P56qtMvJKr5gKAudhf2yhiykgXI7nRByzOVXOIVpGpbWQAViMFuewaiaJqVnvYNioHhVbfOuwEE2eVaypf2kDoiSLgdD1RTHaW0Nmodm8FkR5EZ7r2iyWt0AjfEywlSO5+3SkNz17mRAz9KwqswfbrJSve4nszzdQ= 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=hjpkSFrb; 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="hjpkSFrb" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40fc65783aeso13542215e9.2 for ; Sat, 03 Feb 2024 05:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706966174; x=1707570974; 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=w40yUWxDjUscjW0n4ZOrqPO0/XOzhBMxz2Id2+l7x2Y=; b=hjpkSFrbQSkiKrj84EWs+2TWBYhwlD6d5NwoAG7+w0XXoWchI4qge0+2lITCKXj/Tl wlosV3vB73/3TEqZGcIfPdWpBWVfqirgWqJvBY1z7VKEPM7WUXprqP0uYZtIgrTGEeyV Re9ur8RpanX52oRXj0y+rkktfqGGliCofwKJZ/lMvr3olXbrSW9b4C0zUBC+U/JYS+Ut 3zgZ4qqAHwcCZ3NHnGf8rF1Z+uffzmkDz6TR/2B8vlqtrvQ9ML46X5+qoo3GvEtTAnXu ePzLBM0yjYhR3A3vU5bGx9Ti+4exg3APG9/7XoRLVYH2HBAeEuK9jpyPJy+++5uEa+9n qqJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706966174; x=1707570974; 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=w40yUWxDjUscjW0n4ZOrqPO0/XOzhBMxz2Id2+l7x2Y=; b=JbEb7vzgKg4sUFHKcfbppoFhz+N+ePY3gmS42+cN5JGl2kW6O6skSkjzGM0lVBMsVQ kBHIRPp5mMbCV01dHVmGcn9wlhj+yqBb7TmYmZz2WAf8UnOfXqPMIZXSIVAc3iSTFqSM LaLCR1EQq9Jcp3BwYhxWG+SSgOfV9nbHta5tmqjnYSSVdB6waevAmM6FyBBLR8f2VUH2 FK7Sg7mivQYgLKlv1gM2jBVap8VTxY15JN1uXsrxUwL8WSr4SZ+6RzX/DqKICQ9dbuHx GKHC+A0S1BGIK+sw6ycjEcjsKpU91U0OgVbtcmP89eyxaG0RmxHdyh2rHWBOqhP8/i/v /WHw== X-Gm-Message-State: AOJu0YzlnZ60gsqO0URLQ1fOn0ykcQT0D0vb7J73K5aBKyqdwW05xja/ kJ/X0mm6pDfiYPh7U00HMp02XWnCLU4rflNHBuxdo7UAl4+zq3Dx6ROpMCcoLfIB6Q== X-Google-Smtp-Source: AGHT+IGL6UQGS8E32VWptNT2zeY8V1sSJuJOtMPt0O9Tvgktq35IRLl7w6iE5VM2bWOFbaHcpKpDLQ== X-Received: by 2002:a05:6000:d2:b0:33b:159d:6bdf with SMTP id q18-20020a05600000d200b0033b159d6bdfmr5331185wrx.52.1706966173731; Sat, 03 Feb 2024 05:16:13 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUEoZvXFtpI2lb+l33Y+0HzZ6fLHz5UkLap99qvRhf2p0gWX1Olz5dQnJVa3yEanOedEnQlo5ssjDwk5YTDr4kwoV271snRg0hNyX/drmEqpl6fvWQppL3Hw+pzGcsikT06kUD8rOspZixTR17Od7CLD+0RsgQRD4UGJDY4rdxLQWtOhxVXq6XXhAm8w4BE9fywDXUWsFKjI30WsdmSN+7P0a2uDmOtzCFhIHHkEnbjdKLtZIPByAigQD27klo6kDd02L7b9K2YcUoVCd0/OCWcB7EJiA8mmJ+DqWMPx1pe/S4YtWFbJYRtDipaY6VXbefBjY5xI2WnsnnCFzge2elMwV/LB6drPr7l Received: from localhost.localdomain ([2001:b07:646f:4a4d:e17a:bd08:d035:d8c2]) by smtp.gmail.com with ESMTPSA id g10-20020a5d554a000000b0033ad47d7b86sm4036456wrw.27.2024.02.03.05.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 05:16:13 -0800 (PST) From: Alessandro Marcolini To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, donald.hunter@gmail.com, sdf@google.com, chuck.lever@oracle.com, lorenzo@kernel.org, jacob.e.keller@intel.com, jiri@resnulli.us Cc: netdev@vger.kernel.org, Alessandro Marcolini Subject: [PATCH v4 net-next 1/3] tools: ynl: correct typo and docstring Date: Sat, 3 Feb 2024 14:16:51 +0100 Message-ID: <6ab1dea7fb1f635c0d8b237f03a49eaa448c2bf4.1706962013.git.alessandromarcolini99@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Correct typo in SpecAttr docstring. Changed SpecSubMessageFormat docstring. Signed-off-by: Alessandro Marcolini Reviewed-by: Donald Hunter Reviewed-by: Jakub Kicinski --- tools/net/ynl/lib/nlspec.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py index 5d197a12ab8d..fbce52395b3b 100644 --- a/tools/net/ynl/lib/nlspec.py +++ b/tools/net/ynl/lib/nlspec.py @@ -144,7 +144,7 @@ class SpecEnumSet(SpecElement): class SpecAttr(SpecElement): - """ Single Netlink atttribute type + """ Single Netlink attribute type Represents a single attribute type within an attr space. @@ -308,10 +308,9 @@ class SpecSubMessage(SpecElement): class SpecSubMessageFormat(SpecElement): - """ Netlink sub-message definition + """ Netlink sub-message format definition - Represents a set of sub-message formats for polymorphic nlattrs - that contain type-specific sub messages. + Represents a single format for a sub-message. Attributes: value attribute value to match against type selector From patchwork Sat Feb 3 13:16:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Marcolini X-Patchwork-Id: 13544248 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 4E7DD5D918 for ; Sat, 3 Feb 2024 13:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706966179; cv=none; b=A+RJqKSbBa8UwTa4Qok4Hk7kJs3N5rraIFKtbQjflbHv9ZhMQmN5ebwAfXSIJbCBaXDnBADszRbfoHluYhpox+Pla5r2ysmzKUDUgQiybqznaU3QO/Jt028GMpUELITIlLIf9xxpJqKbATIGMl+Hit616vwYyBgfQ/EdIaDUMlo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706966179; c=relaxed/simple; bh=SufO4SisrqdNuAdlQSD8f1+t+sqzLesB0pkVm3vdQLQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eI9LaUDmfPXoLbRys75laOHNfgyq3VGWKWBlwBQtd0rOymauCDP9sxHvd4vyEsyeA5kqv5RkSwt8e4s5HIKXPqAeelJ/ABTde8STZqexYTLk/JaRpOU7X78Wf08LGQOAc4BoMGYGG7Frzj38hhliD+zvMjXFw6g7+j868PVZjTw= 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=fwKImRee; arc=none smtp.client-ip=209.85.128.53 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="fwKImRee" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40fafae5532so25933465e9.1 for ; Sat, 03 Feb 2024 05:16:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706966176; x=1707570976; 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=2jtjHJmf8NGfxI/AeQqH21JUkyak3vq/9nte9PtORp4=; b=fwKImRee3sn61UgRoX7Mc5rk9aBazrUMZsJeBUEB02rIgu6YH45ri5xtXuabB+wa2t XBAV8RFNtwF6r7Ng8cVqSBYYvnMyfQzHjW/fk705BqIbJK/baYhbDHqth90mMe5qEWGw gkhaixGp6nk1bFiof0G9dLgy+CQ6vrKxYmXQkgRkaGYJLisFhGbNWagEyC6wBhm/IJRD cql7eIupFyx1M3BJEhxVmzDvjQuO2jHmE8ewoKo12vh4BdNQIZpf/w0JzFfPNxkXxih2 oo6TLYy76DmJv8rUG54RAe1K2VIab6ppNGhlJ5W3Nw+8D6JFnWDK1Co5V+/BZmSdvMqq 2ISQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706966176; x=1707570976; 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=2jtjHJmf8NGfxI/AeQqH21JUkyak3vq/9nte9PtORp4=; b=g+c+eEhYr87VzYM1T5X7bFFsEZNvTRedRyIZxlEV8jquAXxZV9ZOEqugyIhIIaIyvw dGlAPEyWOiRizCk/QivbDwOk6kCkE6vOX4AilsR7qV8OIZ6jwl6EFJfwXHIIwXGh5f3p LTZJwpOntpwxhydb6REsQ8KKSCPYn9isi8cQCkP7S/NqKlBH62qxGQocy2nM++6amZ3K +Bz1Z5H3i3yF2EfbgtId7K+Baan4Bcf5OY5yusuPuTv8pYfaEARifawsF+6m92hjtlvm laRFYNJBtvf/rV+g/Xsh074VUq3/VGoqPRQigAg2KHF62WecDc3hNbgP7nAqAsTG/s5a BLHg== X-Gm-Message-State: AOJu0YxOi9dRbLHwT0/pB/kJ7FKzHTmO/hvNwHYWnLogR1ToJJua06j0 9oS0eABgTcDZpErHNPA/QoMKyBtwr02lJ32h/Xu5hCC9s1lXXL6a X-Google-Smtp-Source: AGHT+IG72Zih5bY/2VGy40TD7eZeToDE9Nrc8IybRfk5Gd6s+2vc2w3VQd3W3FqDp7Cb8i+iP4TEBg== X-Received: by 2002:adf:e7cc:0:b0:33b:287d:412c with SMTP id e12-20020adfe7cc000000b0033b287d412cmr1974182wrn.43.1706966176148; Sat, 03 Feb 2024 05:16:16 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW1yfytZxAH8wy98zm1vv7f66Nxw4j5ol2AK+MfIvdA/poB9Mz0wkqU2zumXX8Kt6CFpXxkcP5T+fVxHByWbuPO0z2N9ejnr8zW9VkFQp6QD5mOM9PEh1Xb3wWPwc05qMmmFYVjxLYo8X9BGzlT4sZP1M6TLIqiu27lF5Cp+7itvimZANYJ1m/WXMsPHKQ+kdB3utlFMnTGCSM4kNNW76PXCyxgoxwZ6lH/LIBVVSpLjzZichm9slTzOX7dbe/YU/uhF4f12mgoohIYZh8+w1TUeEwRfR2zC1TPV9ApWdCJAwDQreB6VGSzf9Qc+ApnQ7Z1m0YqeMdgAfDRuCHVpHhBjg8AfUMvrw3l Received: from localhost.localdomain ([2001:b07:646f:4a4d:e17a:bd08:d035:d8c2]) by smtp.gmail.com with ESMTPSA id g10-20020a5d554a000000b0033ad47d7b86sm4036456wrw.27.2024.02.03.05.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 05:16:15 -0800 (PST) From: Alessandro Marcolini To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, donald.hunter@gmail.com, sdf@google.com, chuck.lever@oracle.com, lorenzo@kernel.org, jacob.e.keller@intel.com, jiri@resnulli.us Cc: netdev@vger.kernel.org, Alessandro Marcolini Subject: [PATCH v4 net-next 2/3] doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry Date: Sat, 3 Feb 2024 14:16:52 +0100 Message-ID: <0ba5088ea715103a2bce83b12e2dcbdaa08da6ac.1706962013.git.alessandromarcolini99@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Add multi-attr attribute to tc-taprio-sched-entry to specify multiple entries. Signed-off-by: Alessandro Marcolini Reviewed-by: Donald Hunter Reviewed-by: Jakub Kicinski --- Documentation/netlink/specs/tc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml index 4b21b00dbebe..324fa182cd14 100644 --- a/Documentation/netlink/specs/tc.yaml +++ b/Documentation/netlink/specs/tc.yaml @@ -3376,6 +3376,7 @@ attribute-sets: name: entry type: nest nested-attributes: tc-taprio-sched-entry + multi-attr: true - name: tc-taprio-sched-entry attributes: From patchwork Sat Feb 3 13:16:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Marcolini X-Patchwork-Id: 13544249 X-Patchwork-Delegate: kuba@kernel.org 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 F36AB5D90F for ; Sat, 3 Feb 2024 13:16:19 +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=1706966181; cv=none; b=PoYERsfiP3kCKrVhwC5dZfrkMXcC1WYR1HNVHb+UYWbsh4MLw6puToiesFL3MWJwvGiHGF4HAoWGuVSWKgCHa8qKPHSXy4bK8Pl69cKexvcX5HSFUDFzN4kJX/DFdQ6PoJlmaj5h8OAdTTHLIAEYbrS7yErB17Gp2jRT9l26e+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706966181; c=relaxed/simple; bh=S79peVpsL+uvEe0Fg4btssQoZVVg/l6OxtKoUTn/NdU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L3WQJXD2bYW8QBhrqxE6vWixdojXU5vS+19IyhHISJqOb6n0WIm4Zg2J6E6I/Xo30rr4jsGqnRkSLspPE2kCaOWqFzUao/bnyf3YGO1gqM7NW2n64SNM71CBBRZKgqGczdo1bxb/ibcRY0GJpDAghmn/BiiJ2yX3V+TAh31PxE4= 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=ZqHIS7jS; 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="ZqHIS7jS" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40fc6343bd2so13826115e9.1 for ; Sat, 03 Feb 2024 05:16:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706966178; x=1707570978; 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=z9RqJ7tzw7+pTpCWrxQiyfUDDLrGWEmWuymHg0ncth4=; b=ZqHIS7jSWJnmPa1aH1eW68CujqBYpg/pr6wBfycCefnY1NQbb/51GNc/gDyKoufjB/ UFuN3gjNSsptu5uHR1jVCQJmdfRBIEUKF9qOTlVDgiXA4BehmcpwwSLIiRj1B5fbkVfz U2Ijp+BmpXCn+yg4ckn4Rk5dZ2KKPaSBy3xo0QHdR8HTMirH82QcjTK7oP7ETbfk467N Tsr/6XAAi/2g9sNq6H0f2OwOIgLZCIVwfrzUxiUf8HWBTqFepz02xHHVELYzalNbRu5A Yiz6oIe57ZsmAQWHZH22CfXZU5/2xUt6aoOfW6+9+CPzdU3xsffoo6MAJ3LOwzshokZA +nmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706966178; x=1707570978; 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=z9RqJ7tzw7+pTpCWrxQiyfUDDLrGWEmWuymHg0ncth4=; b=Afnkqait85HX5qYzTaW/64mD9Ur04SqcJbNcrgbrOgwWU1a7ZTEE1zXxcLBCZfeOUC LmETCLIM1G+rFkVXxzuuTnmdOQqt2WHCuq/D779p/j1WP8+n+7nqa5sm61PBPyEOzavw DywGkEt7rnXzuSU3yV+s2wnqjf4l/wyi+9TwBezfXVf8d6YhmvsktLerrf5dNeBLrE6L 6D1dqfAXJIHc3fhiofSEjXWu2+LxQtXB1JPLyl7YwqmdPdPaHGkwXz1LE5koXtaEeHjE OIagub+rsU8W9bI0gYSMpsdjtNP3wYia66h2RXnDfr4vUDLD2tWzD2bfRh4+X/dW7sp8 6NgQ== X-Gm-Message-State: AOJu0YzZ4Mnpj2kEYhg6Q1Bona+yNF9ZWP6kesHcxQMi8dobDBvvWGzH B+7VUlcGY0McWte53i5+BuUD7m0lY6ZVRMArUgK05GQ4vMKScIP/ X-Google-Smtp-Source: AGHT+IEWlKggZWFK4Ikz3p3hW6w2FBefRlJhV1LwkRuu7p1vYlMunBFq4j3T7/1a20k0EFeOmTu2YQ== X-Received: by 2002:a05:600c:5007:b0:40f:d34d:d4ea with SMTP id n7-20020a05600c500700b0040fd34dd4eamr567179wmr.31.1706966178126; Sat, 03 Feb 2024 05:16:18 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWtvsrkvu3AwuUDABguvJDY9UrIT7MaDDqnJzbgoQTOP+0i0QXUXNsmNxgOAzj5ukb76ExMQeDwYSd5ZAVIfkX/k5OkENqwZun32OrveXMy+pbBJwpzlsZcCzvfXYrI2whgABefFTUSliR9XR6Sb2jTq3ykfz6Jxgx/nrpakddjoZgk2RrjPCTskIVNQtCsHDzdixo51KEzdP+GInfXTu5gS9VKMrmYVv/KwOfmGpe4Ff6ppyF8E1WhEX8PuZW7B98UjKOwHT7VR2TzB+MmhAK6Kybk67DBmQkSyGYqWxMQaa77kONzCHx1VDEl+8Bgf3AAToJDFyXMKIBwidglnI7Wje+sAQtmF1kd Received: from localhost.localdomain ([2001:b07:646f:4a4d:e17a:bd08:d035:d8c2]) by smtp.gmail.com with ESMTPSA id g10-20020a5d554a000000b0033ad47d7b86sm4036456wrw.27.2024.02.03.05.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 05:16:17 -0800 (PST) From: Alessandro Marcolini To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, donald.hunter@gmail.com, sdf@google.com, chuck.lever@oracle.com, lorenzo@kernel.org, jacob.e.keller@intel.com, jiri@resnulli.us Cc: netdev@vger.kernel.org, Alessandro Marcolini Subject: [PATCH v4 net-next 3/3] tools: ynl: add support for encoding multi-attr Date: Sat, 3 Feb 2024 14:16:53 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Multi-attr elements could not be encoded because of missing logic in the ynl code. Enable encoding of these attributes by checking if the attribute is a multi-attr and if the value to be processed is a list. This has been tested both with the taprio and ets qdisc which contain this kind of attributes. Signed-off-by: Alessandro Marcolini Reviewed-by: Donald Hunter Reviewed-by: Jakub Kicinski --- tools/net/ynl/lib/ynl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py index 0f4193cc2e3b..3f5a7d5388a9 100644 --- a/tools/net/ynl/lib/ynl.py +++ b/tools/net/ynl/lib/ynl.py @@ -444,6 +444,13 @@ class YnlFamily(SpecFamily): except KeyError: raise Exception(f"Space '{space}' has no attribute '{name}'") nl_type = attr.value + + if attr.is_multi and isinstance(value, list): + attr_payload = b'' + for subvalue in value: + attr_payload += self._add_attr(space, name, subvalue, search_attrs) + return attr_payload + if attr["type"] == 'nest': nl_type |= Netlink.NLA_F_NESTED attr_payload = b''