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 05EEC45B54; Wed, 16 Oct 2024 19:14:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75FBD40653; Wed, 16 Oct 2024 19:14:01 +0200 (CEST) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by mails.dpdk.org (Postfix) with ESMTP id 72A6A40653 for ; Wed, 16 Oct 2024 19:13:59 +0200 (CEST) Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-6cbf3f7272eso91526d6.3 for ; Wed, 16 Oct 2024 10:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1729098839; x=1729703639; 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=vOMtHOB8Vf12bY8asM7QilRC+hkYvUwiDU3Ck3MGyQs=; b=YJOxufI+yyc/d5HxT9PxEJY9T8wanOJMycDcdUquWkTrNvxgvP0Ph5x4HWfKygdzuZ Ej7EYy1sXZW16A/8B8m2IjtuTKo9JeFJ8JoIjB32YUeP8Dqh79BMvcKBIb6QkzwEQK1I 4mvjlhbYFuvGoPisawCz6g59q5hl9gZXaJNCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729098839; x=1729703639; 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=vOMtHOB8Vf12bY8asM7QilRC+hkYvUwiDU3Ck3MGyQs=; b=Icc9z3xyOsPs1Sqvz/r9ov+UPmDU/cwdS56vIocwJ8NNiwyMW6A95+w2IW1O3je/FU 2/axZk5H9qKsduJlDBo8UtMsGh4atfHHpWJXX8sOLkMmGIqGig1NUzH1Ic+IonrbCKXc uPQmBAxBx5rYbIDW+rgm4g3JKGpqVpS7MYrVtu1kLbdgnn2dXdvTF5ag5uyOZiaOZDfq 1FfnCWldyGH2N7CY2GFFgYbMHILdA4k2Did8HWCb4CEqWOuVhzIJOaYUrZR82xLfuzhN R/P4ZK/lT6gwPHMTF5mvC3SXLObALzVbl2XvWOdhWkm92mK8XoTKxNqJrTX5Ca9o7V9d uULA== X-Gm-Message-State: AOJu0Yz5pi3RcK+TU3IkfwJcEuNcS/q1mMYZS2txc6o4+4DMTh2YNnEo Ga1lFy8CDMz4xQPh6KQy0VmbCry6w/c7xkaK6NQdMw4xXWq/JGOxQVWHeymrwziiVWzB2BVIQba W X-Google-Smtp-Source: AGHT+IF4Jx1ONH+WdpQ1741e3wOtolqtrfhjkNd65Ml2LsWyDC31/7ovYzInVZDH/bizWOryIHRYkg== X-Received: by 2002:a05:6214:dcc:b0:6cb:e7e8:9e88 with SMTP id 6a1803df08f44-6cc37b4d6f0mr1118376d6.10.1729098838761; Wed, 16 Oct 2024 10:13:58 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1271:e2f8:4ec3:8bf3:864c]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cc2291dbbbsm19738756d6.38.2024.10.16.10.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 10:13:58 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, probb@iol.unh.edu, luca.vizzarro@arm.com, Honnappa.Nagarahalli@arm.com, yoan.picchi@foss.arm.com, paul.szczepanek@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v9 2/3] dts: add capability check for multicast filtering Date: Wed, 16 Oct 2024 13:13:06 -0400 Message-ID: <20241016171307.18635-3-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241016171307.18635-1-npratte@iol.unh.edu> References: <20240702192422.2480-2-npratte@iol.unh.edu> <20241016171307.18635-1-npratte@iol.unh.edu> MIME-Version: 1.0 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 The multicast address filter component of the mac filter test suite is definitively supported across all vendors. Thus, a simple capability check is added to ensure that this functionality is supported. Bugzilla ID: 1454 Signed-off-by: Nicholas Pratte --- dts/framework/remote_session/testpmd_shell.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index 6beec66e43..f350568b70 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -2086,6 +2086,27 @@ def get_capabilities_show_port_info( self.ports[0].device_capabilities, ) + def get_capabilities_mcast_filtering( + self, + supported_capabilities: MutableSet["NicCapability"], + unsupported_capabilities: MutableSet["NicCapability"], + ) -> None: + """Get multicast filtering capability from mcast_addr add and check for testpmd error code. + + Args: + supported_capabilities: Supported capabilities will be added to this set. + unsupported_capabilities: Unsupported capabilities will be added to this set. + """ + self._logger.debug("Getting mcast filter capabilities.") + command = f"mcast_addr add {self.ports[0].id} 01:00:5E:00:00:00" + output = self.send_command(command) + if "diag=-95" in output: + unsupported_capabilities.add(NicCapability.MCAST_FILTERING) + else: + supported_capabilities.add(NicCapability.MCAST_FILTERING) + command = str.replace(command, "add", "remove", 1) + self.send_command(command) + class NicCapability(NoAliasEnum): """A mapping between capability names and the associated :class:`TestPmdShell` methods. @@ -2217,6 +2238,10 @@ class NicCapability(NoAliasEnum): FLOW_SHARED_OBJECT_KEEP: TestPmdShellCapabilityMethod = functools.partial( TestPmdShell.get_capabilities_show_port_info ) + #: Device supports multicast address filtering. + MCAST_FILTERING: TestPmdShellCapabilityMethod = functools.partial( + TestPmdShell.get_capabilities_mcast_filtering + ) def __call__( self, -- 2.44.0