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 B308E46093; Wed, 15 Jan 2025 17:30:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DC6A402B5; Wed, 15 Jan 2025 17:30:01 +0100 (CET) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by mails.dpdk.org (Postfix) with ESMTP id 623DD40298 for ; Wed, 15 Jan 2025 17:30:00 +0100 (CET) Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-7bcf33f698dso430878685a.2 for ; Wed, 15 Jan 2025 08:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1736958600; x=1737563400; 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=3mr/U1+okuq7Y6aAWrdKnheKJBopmh08qVMUdwe6nmE=; b=cevmZPf9oIwvTazJw1TX4yrpBgyPWJQhcW+e0uYddoJMCYYHnk1Y6MncMgl2c78F6r p2s4/zD/PcaLTXWe3fhpg4yqx4T08DTiOfYB1U+7kITZMJ20L0lEu40BUs2olTZCgC2m LZYo2mYO/SSH2fYhZzdRNt3b4Oh4CqzqxHluw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736958600; x=1737563400; 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=3mr/U1+okuq7Y6aAWrdKnheKJBopmh08qVMUdwe6nmE=; b=euC9eTuaJffwzW3MKIVo9C5RMiBMXwA7GAYKztfIvNKYgIsEs+B8jHTq5z1ul8yM7R qe9fl4Rj7SZR9A9XYwrx3DLx3E12coDlHjjnZ0tq4yjtDn5v9ynoM3uErTxr87Q/dIFP MUdTCtQakVG9Lfg7oGF6elQb/+eqplLNAJ3xr/gFKvTkEbe+EHqLOI5gN2H3MKBFacs/ 3P56h7HN3x0iIYF4sPlKspd8iNSbLsaF+6cF5qEoDzl7G9CN2dXZZvIKWrYUvSpeU/6Y fi1Q/dYSzLOhuzRyvAilDkiS/txo231N+WkTWGby+JmXy6nD+mA5O7BYvT5LUCK/p7Co bU2Q== X-Gm-Message-State: AOJu0YzJwzI48uOs3fOA5PYt1AdgNF6bwD6WbC4uQr5r4/zvzoNu2GTi GmmFLZD3fnKOL5e/rB7nE5GZslVCc5HKotlye+3M2fEslQbRKLN8Mkl0gRG2ZVA= X-Gm-Gg: ASbGncso/x6Vi7wTeRu9EbGJsQVNT6adPh18yHCRcqtshE2Y6tGuSFesHU5WcvKD1gN HvhW6Bf9XpnFttdIrdlESsHdodFLp7nb+KS7QftbHIr0P77i8WrLfJ+yh9lNc5qSXifyVY8Z0RW veBFxX3Ccm4foxyDwne6X6S5eAbR4rBLFug206xrSkIRw3wF6oNKEXEYBawj1xSyDvbbF+O5XES tMdYDJkiHhi5RTBIV2yMOqF9tu48GDB1303L84ufjWXMUvgUQZlhrP1pGcNas6LPyl0u6ljGrU2 7P4TYyTWrvzZiuUAcbh8rGQ+fvk= X-Google-Smtp-Source: AGHT+IEL6ZtTAhc85vEs2RstnDyHAGuP9FJiL/MJY42PXAYLaeBTvqm3e4g9tULoRUw7jsm3KYUE6g== X-Received: by 2002:a05:620a:4491:b0:7b6:cf71:2788 with SMTP id af79cd13be357-7bcd96fa15bmr4206242285a.11.1736958599719; Wed, 15 Jan 2025 08:29:59 -0800 (PST) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7bce323964esm728062285a.21.2025.01.15.08.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 08:29:59 -0800 (PST) From: Dean Marx To: probb@iol.unh.edu, npratte@iol.unh.edu, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com Cc: dev@dpdk.org, Dean Marx Subject: [PATCH v8 1/2] dts: add multicast set function to shell Date: Wed, 15 Jan 2025 11:29:58 -0500 Message-ID: <20250115162959.12975-1-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241010202104.15364-2-dmarx@iol.unh.edu> References: <20241010202104.15364-2-dmarx@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 Add set multicast function for changing allmulticast mode within testpmd shell. Signed-off-by: Dean Marx --- dts/framework/remote_session/testpmd_shell.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index aa55bd91d3..94ff14a0a6 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -1795,6 +1795,30 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats: return TestPmdPortStats.parse(output) + def set_multicast_all(self, on: bool, verify: bool = True): + """Turns multicast mode on/off for the specified port. + + Args: + on: If :data:`True`, turns multicast mode on, otherwise turns off. + verify: If :data:`True` an additional command will be sent to verify + that multicast mode is properly set. Defaults to :data:`True`. + + Raises: + InteractiveCommandExecutionError: If `verify` is :data:`True` and multicast + mode is not properly set. + """ + multicast_cmd_output = self.send_command(f"set allmulti all {'on' if on else 'off'}") + if verify: + stats0 = self.show_port_info(port_id=0) + stats1 = self.show_port_info(port_id=1) + if on ^ (stats0.is_allmulticast_mode_enabled and stats1.is_allmulticast_mode_enabled): + self._logger.debug( + f"Failed to set multicast mode on all ports.: \n{multicast_cmd_output}" + ) + raise InteractiveCommandExecutionError( + "Testpmd failed to set multicast mode on all ports." + ) + @requires_stopped_ports def csum_set_hw( self, layers: ChecksumOffloadOptions, port_id: int, verify: bool = True -- 2.44.0