From patchwork Fri Feb 2 14:00:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Marcolini X-Patchwork-Id: 13542912 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 637EF7AE4C for ; Fri, 2 Feb 2024 13:59:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706882371; cv=none; b=HLJAy9hktIAA8Z6kdDHxB2hFXvr1svDdQFCg0BEyqnkWviB4Pk2I+M5M2lsW+S3I6fFKlMmElCoiNsXQqRWYCb3jSicLRgmKxilPgEMqXQdcog/wyI6BnHN6XMBxKbhc7sSnZF3D1PLZNDJqJURvTTLTkdopUOwfGFk9AlOGIqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706882371; c=relaxed/simple; bh=bmKVu8OffFhgFuX1cXDUBGshCdSoeVA8i4J9IJR6zKM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mEDQPA2wIWFfON0KUm/03sOgh+hlvQTF5t1mu8RSVmQk3OM6iBIq+JpBy/vKHkmjTDfRKvUEgZ1EkHNSdHa1I5U5+vHYqFy6jXXhBbLnGF553DStPLStpEJj3gQelAMAMrQTtbf5kX6uSfMJEQJi4fOoK74mlx3BHOxRryCKvNk= 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=BhzPb0RF; arc=none smtp.client-ip=209.85.221.42 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="BhzPb0RF" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33b0f36b808so1274559f8f.3 for ; Fri, 02 Feb 2024 05:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706882367; x=1707487167; 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=qI9Nn+orREYV3tFeNmLiAx+8tefrOGcSLtSvYGqoguA=; b=BhzPb0RFSIi2wX5nlm7WESfTILHcDbAWkQa2+MQFLsT4asm6DmYU8tNCIhfWQcwPbz bROUwYaD6Zs+AlkDAhrR8ArJTGccVcNSOduv4V1mKSRC4B93nYln49kv7UCnx8JhRzxs LuKDKbw8W7to68KNSZU+9lVL2EVTul69QEODTFZ8RrsCSYmm4BmruuSnSw4oTbMs+rk/ gFWFhkmU7ohtvTmNMkZ4qkyUkq9YY7FpKFviqn23YXNYLkYZrRbugYWHbTVkwVmv22/H zQNUPnDlDmxSwio/2qImNrfQiJl0EiicdFxLcb5KKBUvl0G2cKBcRN4WVXMoGQlG6g7a 3HLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706882367; x=1707487167; 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=qI9Nn+orREYV3tFeNmLiAx+8tefrOGcSLtSvYGqoguA=; b=f7lDTAlr30JCmiL8ln1rAWWBsPRGOVrGkna7//K3s8Zp4NgPzctBQSUnHRHi0799/e IwFkqgAdMhNcCCIoQCR/9Wqsg4bi+CfyhK8qb+VCqZ5TBiwWvzUqH/nh2BX25b9TZJfM Htj9WYYuNTvbzvfuomyK4ElRRG0224EQAfZclpmoHNrv2gI4+XQB/t7hTy8wCTU5YszS wwirycCwCboHFGfCSmFnve5mWNP7XnacfssB9XuQLeg8vaGJ0OWfRqeYHIY9e3MtIQM8 Cv/g9voWSfGpNFnUcDYDJaAkzhpV6K7kRuy59WuEwqg3rN0BTl9P5zODzWPtmP0NStbA L82Q== X-Gm-Message-State: AOJu0Yw2YzYWJiQHX6VYwlnDkS1iX37v4Er5WT7GIhZMBif/a/o1re+O T1S1KwzL7sSBdv7T8Ju0jG0EKX3yRZpMCOa/4yTVnES0TfauziS+ X-Google-Smtp-Source: AGHT+IH5KZPEaYzes6+FyosWngGkUsfiOtjqK1b4T2rWU063G/5K5ST6W33fCOJ/5jrOj7Y78Fhspg== X-Received: by 2002:adf:fd82:0:b0:33b:e62:63c7 with SMTP id d2-20020adffd82000000b0033b0e6263c7mr5091745wrr.61.1706882367265; Fri, 02 Feb 2024 05:59:27 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXQe6ZtULhTszKSi6EYneO7jYsbGcW7TCY+kZw5Z/PBii8692Ag207G1X61NM4MripZacOa1iy/VVFFmQpWvs0DFgZWGT53iEBIxk9iylgElijAW4yd5gtnd6BeiUS9o7Qu2s21x/VLbewVknzSh39mBt7yJ3eNq6GV+aM50FvRyQXvjx3LxSU42iMrZU/lLAqdVSpQ9v20TNwEGBOPntDYmZI825sfrlmkVLfXC4fYYxa7hel/oPuKUcg/k5HyuE7yBfZb3Ogm0qQ2YnMYvpdaQFpv6ZttjgkJIGm99y6aDn9za6a2QYT48IXvQdB2rTfHtlyq965Okfct6v3vzlLnbSyKIC6KMd0q Received: from localhost.localdomain ([2001:b07:646f:4a4d:e17a:bd08:d035:d8c2]) by smtp.gmail.com with ESMTPSA id x16-20020adff0d0000000b0033b1ab837e1sm2003952wro.71.2024.02.02.05.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:59:26 -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 v3 net-next 1/3] tools: ynl: correct typo and docstring Date: Fri, 2 Feb 2024 15:00:03 +0100 Message-ID: <7c1e8ddb4625efae01eeb06b4e42b7a7d6e0065f.1706882196.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 --- 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 Fri Feb 2 14:00:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Marcolini X-Patchwork-Id: 13542913 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.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 5E79D1854 for ; Fri, 2 Feb 2024 13:59:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706882373; cv=none; b=eohY8mZ3FUpiCKL1ND6KzRfO7YhwMi8h+cqlx+BOXW+vVp+Fvl/2uOpWZtLxUo+Nzu7RPP6FTyr8zbfjSIciA1JhWRLCi9AcbSLb9AVTlJ5DaFBgLX2Sz6s2Gwe+mIEuwLAdTbzlnq3QuWg/8G9wBn0y7mJHiXl5Pum43SJJ0YY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706882373; c=relaxed/simple; bh=9yUub+tmhQyaYt/OP6yNREYuhAW4psGC+k6GPQHLRd8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cK2KV8jE/IMWrHPgrrFujp9qb0kdLSh+Q0x5pbkEPTJsBD5iVb4raujrmfsi3wQ4XABDq2ioq+4HGbM4nkX/6DkXd2UTj4ulhWJRYBktQRnPtBNXFikgMc2AqV34LTcxqOxYwaHvbrdNCrAFWsy+nsp5251eBzvMFkAtxTiWJw4= 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=Dt3ltq+C; arc=none smtp.client-ip=209.85.221.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="Dt3ltq+C" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33adec41b55so1335226f8f.0 for ; Fri, 02 Feb 2024 05:59:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706882369; x=1707487169; 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=evNUwN+eT+XSWL/lY0Dea6vZTvLFeK9DIXg8vnwMUJI=; b=Dt3ltq+CZe3PleT7vkwB2vWpxMmmoCQ2i3OIbmBX68T7/OdtdcoysybLqzm+cEthN6 rUlGnfOes/hbOPqGWc9Uhzu4oodqL0Pt04FF20OamHJw5WFq0DJsgIEbPJiv0Y58cyp3 +6k3u4MNcoLOg0qzG3TQ0x8hP+rvOTAoLtpoShOp6LWNtx7mq7lkovxKZva+C8Tt+yBV goKmxP/w0IkDg4WNjboWEpdFzQfpR0J8C7Baw6aZ5N8izDVV6wJYzTta5UHTpwg8VSJT pfS6qYGf4Y6JF/r5Y8rR24upXuNEzNM92ADkDGldc267G8nfVk/cwdQWhntwq6bPHvOg qsdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706882369; x=1707487169; 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=evNUwN+eT+XSWL/lY0Dea6vZTvLFeK9DIXg8vnwMUJI=; b=HMSDVHf0WyNex5COrwLxa+p6oCjX305OxGIaGBMtSZS+TQX/QSKpdl7qsZJEv45Gqn SowkxS2dBGEnCrPpeRJ1DkYfjDpjg0f1B+55PXh3j7ZwiWsjN5SwEz+LGDJk05JgBuR7 lJZ9wMJYiK74HQDxBvkAzCQUnroSOJx7/ZyLJbkijgvWGEbGZvPybBealWD5rxJrWSN7 7tV7T3+9Q3czrTTgJY195c6IpgY3RcrSQmGhsRvFkk1EzwOUNWEoWNyqzygHtwBeEMTk XS2+UiOWuWftCKquO/C5t4FxBv8u+L+gn3aPMH4XPpaZXuwEZ9+GkESotAIhUySjc6+o oVog== X-Gm-Message-State: AOJu0YxQlS7z2i+KvDxS9EDd+uOjJ8l0h1675RUAf2ith7XEtvE279gZ 8rY0WCOYM2rLRd/OLfEYTCKV4rSvBUOPK7yCun3d/67kvb1fqK5m X-Google-Smtp-Source: AGHT+IEWEZ3c7VukqBPa77IFiu61BHr7B77konrTPgD64yJNRvnG3Iv9iOcUrtYFSKiSzim89gWBgw== X-Received: by 2002:adf:a19b:0:b0:33a:e5e5:5124 with SMTP id u27-20020adfa19b000000b0033ae5e55124mr3764555wru.20.1706882369284; Fri, 02 Feb 2024 05:59:29 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU/dW7+T25W062EuRTcWpKLg2EEKvKQFg3CmDqFZJHU2dPqrcgisUMyx7RFh7lLrFxJ5gYx1sKWZW4qgQb8u7wkEXJkzhKripcTW1RM9m0Cv8JS0wo2iCVNj8F68uMHvM9HsrTfu3Cc0RZo/DXge/USrvaSywZablSdcK6GnZZvyzkAXAStzOSv2YW1XGHAuudgkzTcwkaGycx+s/vLqBu7z6hAXyUMIFblQck82W7uCztjFUs57w4RvwvnssL0uZk56azci2BldBVwbk5o024duA1LtSCoFVQ/Up6euC4FXh5wvFD1LRHniAJrclI93Lr5umhdsdVzVG1oZNMum7PVxgbJPieMrjzm Received: from localhost.localdomain ([2001:b07:646f:4a4d:e17a:bd08:d035:d8c2]) by smtp.gmail.com with ESMTPSA id x16-20020adff0d0000000b0033b1ab837e1sm2003952wro.71.2024.02.02.05.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:59:28 -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 v3 net-next 2/3] doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry Date: Fri, 2 Feb 2024 15:00:04 +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 Add multi-attr attribute to tc-taprio-sched-entry to specify multiple entries. Signed-off-by: Alessandro Marcolini Reviewed-by: Donald Hunter --- 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 Fri Feb 2 14:00:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Marcolini X-Patchwork-Id: 13542914 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 3B2167AE4C for ; Fri, 2 Feb 2024 13:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706882386; cv=none; b=d69CwPIVwjYNQpkhgikeIRcjF8ZM1np+hbG5hWu5ejnOENXsWqRTX10c6NFIe1rEkuRGnRKgY3W8pl2s1ngPIdgV6aNu9jbRAQGiFVwuUGUbso/blFnuOzN6AA1j77REOHx316ka14lxyVYtQ8MKQHwZlT6r28yl3i6HfxiBkcc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706882386; c=relaxed/simple; bh=Ls4bZ3kXJ5xX1hRkaYsgKcB0ggzLvWWupUkIeLD5n/Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dbn01yTd7fEZjooU+fcYfCATN3FGqkVEgUN9jbhdWs6EMPty/v/y9kNF+dQ73H+hW5Z1R1SOA5WJMx/AZL6EhFNevmWZIq1tAXZU2WI0ldmEWaSqvY5gzEY1pUGJiSYbOaxHqVztKFeR0b79R0pRBgPtsjZqHHqu2TWC+G2R9t0= 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=L4MHtVhZ; arc=none smtp.client-ip=209.85.128.41 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="L4MHtVhZ" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40ef64d8955so19055615e9.3 for ; Fri, 02 Feb 2024 05:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706882373; x=1707487173; 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=VQxGcuk2wJM51qDiz0MU2m8IcoS7QKse3nkS/aiS/KQ=; b=L4MHtVhZPiQyNsVoS6HB82bHuEcQzETArdWW7jmMtnS/wvxRy7NXJz0gW8ZKSMPqLp E1UQ+Au3E4kOiFe6z8P19Mo3uHbXvR/+qAROAO79cB6RUmXz/WeMICb7QJHFIRfg8iJ9 aZ5NMTgxfMaM1l4ikB/vYXB+3/h6Hbzh1Afe7haKFqdOv38M5wgdoxdV+YoyvSK7X/9i itiOxtNvMoUONjF0BB0lJkT74WcLHwCrCBiWVj7ODuIyhPYbJxTX3rxm+uYdbwaZoOCu izAfruBuqDu0S+GWByzQpIwU/lzW+sZwm4la+VNJuWsyeozuLfA0pIHMf0KTtg2EHyXs RVbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706882373; x=1707487173; 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=VQxGcuk2wJM51qDiz0MU2m8IcoS7QKse3nkS/aiS/KQ=; b=ErbT5PXgf1CNUb+wZmCLJmwtfJ9TQyNEtHig/XHYomYoADznIDSOH9RF0zgbrn/lRy KfC6f/H59n/k0u/e9AU02lA+80C756dYCiH3upqOthuVsZWnEeLwxUoJJoijcBL6gAMW HBqp0jtdDlEHGuz4jwwfpf+rQBgQyRVPd7rcVMB6c3XFp/o5CrLwYLEbxfr2FEbhxjSf CcGMzJmpPpll3bTX65Y62VDIdkQKwOI+tPLIV17cjp+0a+lUoBrdpTXWUvqvrFyYSqQ7 nO2o4ucwBUfoiORKANKQCvvH9YXKMaCzgGN2ABEnhe7bDhU3VtnLbCmt55febBwNJMzl mJ4w== X-Gm-Message-State: AOJu0Yx2uyCeAtBlFAC2j6QyFpRr1bCCwg5g+ce7jfVPWnQSGYMwZYHR 8/vylHdzl/KeNKl/vGh3wTPExzMu7HQarCkhew2xOxZZr3+Jla8l X-Google-Smtp-Source: AGHT+IFFVwJLpPNojIrEZVu/GjZH0xizIikOI18rq84uDKUp9u6IW/8pBneyKVY5UVqGngp9VDHp1A== X-Received: by 2002:a05:600c:35cd:b0:40e:b313:b8db with SMTP id r13-20020a05600c35cd00b0040eb313b8dbmr6048101wmq.28.1706882373104; Fri, 02 Feb 2024 05:59:33 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUNFMRK5EkJrTYek+989NrBlowpF+Roghe1ZKu0bk0X3/k/pfGSdWrE6k8pscExspjMun4ZT+Z4f3lgI63bzV0qClCOFiJr/ll6ZPvrtjFYGj6XHdu7k1iCgmLyoQV1wNwDkeNavSm4RfLHJM+YmVVRO3iZ+NyckawoqMF6eyB33vN/z2d99D7UhvcWNo6f0DcXS3jNlZQTHRGbwrfCt9waH+u0lv5fTstG0P89+u/+i2eMGJOvJLyEA7lYrYqOcfXzMAblogmekIMK8BaoX9XJvPMX1LnX4T8nG2pSL7RWI1Aw38iKrFSq/XKgSUAzr5M5mqXbmWXGrdNCg33afNH6grlvpExrLIad Received: from localhost.localdomain ([2001:b07:646f:4a4d:e17a:bd08:d035:d8c2]) by smtp.gmail.com with ESMTPSA id x16-20020adff0d0000000b0033b1ab837e1sm2003952wro.71.2024.02.02.05.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:59:30 -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 v3 net-next 3/3] tools: ynl: add support for encoding multi-attr Date: Fri, 2 Feb 2024 15:00:05 +0100 Message-ID: <9399f6f7bda6c845194419952dfbcf0d42142652.1706882196.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 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py index 0f4193cc2e3b..d5779d023b10 100644 --- a/tools/net/ynl/lib/ynl.py +++ b/tools/net/ynl/lib/ynl.py @@ -444,6 +444,11 @@ 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''