From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8EB7245830; Wed, 21 Aug 2024 16:54:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 017C3427A8; Wed, 21 Aug 2024 16:53:37 +0200 (CEST) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mails.dpdk.org (Postfix) with ESMTP id 2CD4A42795 for ; Wed, 21 Aug 2024 16:53:32 +0200 (CEST) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5bed83489c3so5666087a12.3 for ; Wed, 21 Aug 2024 07:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1724252012; x=1724856812; darn=dpdk.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=cqcX3MhGJftS+hwVm4zY15+W82fGO9gj7oygWcfEn1c=; b=G/BSCkWzFjDdu4P+hOltyxy5Xau7JxT39e0chfyeBEdul23U4zfA0U8GhAXHj0ACqC dJ5Jy3/or0sLnxuxVnyVDM1HbIL83LMVwLEzfH2p3og91iPn4QOoO7HzOCYH8sI/jBVI Tj8EntAyI5R29dv8aMrU3D1srQNow1FO2QnVUhIuiJh1DnAoB78rtsG6i9HwWFYvhMQd NR4+M/lzT/CWu3nSQ8vXBi0miXInVsRSMVzkGv2fVzD0gTuJSPuq1+A8lfp3PKm8uwqo t9Ojj/JfKG29YfpkO/tVZA7cemZ0hHlfOCVb2pl42bBHEC1WOs0utofpOhJSOAq8Ces+ GEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724252012; x=1724856812; 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=cqcX3MhGJftS+hwVm4zY15+W82fGO9gj7oygWcfEn1c=; b=K4eyy/D6cM3k1uWYXZDjndqGYnB9mIK13qsxBWODCWH0zQyERojhOVROEdXYuYTwxv KgmSW2xpq2BH55fwzuoInA1isVVK1dbBt+E2WnHdnqVdG6HV/F5ubY7lZzUFNFg7Xint 1xmw/LcWKbGGz/rLQ4dOr525+ATHcfIuzpyCTQk7e0HKnDjiiUkHEHOQRmTsHZrjER19 DApumHA3U32CCHjUYdzHIqVvbLUOMhkdUX0i2YcE3XOyp2T2fETtjU5B+bTpEJwSTb5k F7DTlWfZtT2BsTGW/JVwf8TCZqyauEZTa6vyuNWNUWI+HR4F+auQFS3ileah6D01nY6m IXuw== X-Gm-Message-State: AOJu0Yz/a/cJUS1LrUZYaA0vljUUi7eiEvIhuNPw5a2Edp8Co7EEUS68 HHGBbsgcC3VQ2AJt0FwMeBpJnKoR2kgs0EQPq15ntfABkKGngQ5cjGQ4UWF+FTLx6CVXJjnkNm7 YFrc= X-Google-Smtp-Source: AGHT+IHc1ftkiP1Oj9w/6xqV1nL9dDwASZsN/wggFDTDLQVZhYXz2Qmwq9PzDEcRQEs8MilvT1GrQg== X-Received: by 2002:a17:906:bc27:b0:a7a:ab1a:2d65 with SMTP id a640c23a62f3a-a866f9c83f1mr203891766b.67.1724252011600; Wed, 21 Aug 2024 07:53:31 -0700 (PDT) Received: from localhost.localdomain ([84.245.121.236]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8680c4725csm52434866b.91.2024.08.21.07.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 07:53:31 -0700 (PDT) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu, dmarx@iol.unh.edu, alex.chapman@arm.com Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH v3 12/12] dts: add NIC capabilities from show port info Date: Wed, 21 Aug 2024 16:53:15 +0200 Message-Id: <20240821145315.97974-13-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821145315.97974-1-juraj.linkes@pantheon.tech> References: <20240301155416.96960-1-juraj.linkes@pantheon.tech> <20240821145315.97974-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add the capabilities advertised by the testpmd command "show port info" so that test cases may be marked as requiring those capabilities: RUNTIME_RX_QUEUE_SETUP RUNTIME_TX_QUEUE_SETUP RXQ_SHARE FLOW_RULE_KEEP FLOW_SHARED_OBJECT_KEEP These names are copy pasted from the existing DeviceCapabilitiesFlag class. Dynamic addition of Enum members runs into problems with typing (mypy doesn't know about the members) and documentation generation (Sphinx doesn't know about the members). Signed-off-by: Juraj Linkeš --- dts/framework/remote_session/testpmd_shell.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index f83569669e..166ffc827e 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -1200,6 +1200,24 @@ def get_capabilities_rxq_info( else: unsupported_capabilities.add(NicCapability.SCATTERED_RX_ENABLED) + def get_capabilities_show_port_info( + self, + supported_capabilities: MutableSet["NicCapability"], + unsupported_capabilities: MutableSet["NicCapability"], + ) -> None: + """Get all capabilities from show port info and divide them into supported and unsupported. + + Args: + supported_capabilities: Supported capabilities will be added to this set. + unsupported_capabilities: Unsupported capabilities will be added to this set. + """ + self._update_capabilities_from_flag( + supported_capabilities, + unsupported_capabilities, + DeviceCapabilitiesFlag, + self.ports[0].device_capabilities, + ) + """ ====== Decorator methods ====== """ @@ -1332,6 +1350,24 @@ class NicCapability(NoAliasEnum): RX_OFFLOAD_VLAN: TestPmdShellCapabilityMethod = partial( TestPmdShell.get_capabilities_rx_offload ) + #: Device supports Rx queue setup after device started. + RUNTIME_RX_QUEUE_SETUP: TestPmdShellCapabilityMethod = partial( + TestPmdShell.get_capabilities_show_port_info + ) + #: Device supports Tx queue setup after device started. + RUNTIME_TX_QUEUE_SETUP: TestPmdShellCapabilityMethod = partial( + TestPmdShell.get_capabilities_show_port_info + ) + #: Device supports shared Rx queue among ports within Rx domain and switch domain. + RXQ_SHARE: TestPmdShellCapabilityMethod = partial(TestPmdShell.get_capabilities_show_port_info) + #: Device supports keeping flow rules across restart. + FLOW_RULE_KEEP: TestPmdShellCapabilityMethod = partial( + TestPmdShell.get_capabilities_show_port_info + ) + #: Device supports keeping shared flow objects across restart. + FLOW_SHARED_OBJECT_KEEP: TestPmdShellCapabilityMethod = partial( + TestPmdShell.get_capabilities_show_port_info + ) def __call__( self, -- 2.34.1