From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (unknown [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CCA446054; Thu, 16 Jan 2025 20:33:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 462E040E25; Thu, 16 Jan 2025 20:33:09 +0100 (CET) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by mails.dpdk.org (Postfix) with ESMTP id 0DA2040E18 for ; Thu, 16 Jan 2025 20:33:08 +0100 (CET) Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-467b086e0easo8113431cf.1 for ; Thu, 16 Jan 2025 11:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1737055987; x=1737660787; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xBMckM+D9yv9M8Bo2r2KvHCk6EvHpP8KvijQik1w53U=; b=CQS8VfhI9Uw2s8jEw+c3Wts65MQOQtgBnXgK3wNkTgVtEiHq/MW+CdSnBMdpMct1iW yLLYf8kWhuPKOY0pJdll8n8y5O5HQQiDqERZaE2J+smvAHoqnn7+7kMCzXJqb2rTCHVv /7/V1FDPltpFrzX+tyOgDtWSsIswnFM3vZlL4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737055987; x=1737660787; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xBMckM+D9yv9M8Bo2r2KvHCk6EvHpP8KvijQik1w53U=; b=dOlVcaLkhIYySIOlhd7xO9vqKKxh1wAsdQ4qccgbd0i1npyXzfOIpyFVdd7RLfd7ZF BRYXi6V8bzkiRn2uOqKCe0k12xgN6KIOpEnJrP13lZX1nFzuZj7EMPrqLxKwSpJdGA8L 0hQNPOE59myEzVWeo3Bl5rhVEWObuPi4tcN9p8mP20MIkj2owG1g3vcxKOwHoZ+PoyTY ijzO6c4ZReL2vmdILbWMbTlSTLt/O71rQfUiI3EZbmPIOQExbMsw7Y8FgsfCFA3lypLX RfByhn+IcAqJ28UbbmLnWFb97nt7SUHeDPtg3dUfR2ZJ9A2lT585kZSCVNui279YZm7f v0Iw== X-Gm-Message-State: AOJu0YwdvDOnqxXNGfDNgxY7HRkC/XFsMlawp+9nNi7O1PnwZrP9rgSU 7G5jF3T6aZvgglxm0uT8aHtZIipgd/iIGNz4HEUo5FgO1Waqh9sPB4tLG5ywvKU= X-Gm-Gg: ASbGncuTnU6ddZUbYQykchNU0HMTD/zDDxlE2gELDk7jYEVF+cDmWkS67v6xKk3by9e Fy0tgvadudeRD0foO/tbF4Yu+L4ZehI7J180lY2WHmMxFWy9cYbgh7KfPlfzL3XtvzYW5y6nZRd upgb1eWWOjDNsqi2EyiV1BRYoZsDwQj+Z3vdxg3LvWJ8wQmXO4f27CbRhX0m5wmhIE/eFT14vnc uanDbRFq1M5eo+62qIXyNLa3N1b2ISpax4z/NzTDSJGZmcmQ+BnbuP4CKSU1xcGXrPqVADlou2t eRfT/bwaWOksLJ0wAiwWYgME3cA= X-Google-Smtp-Source: AGHT+IELKTqxXzDwAZFGftkgExtaZip5Zg1gqXnrpJDn1jpwhM6ajRxlZsLemD+BLMJZI21I4ez7bw== X-Received: by 2002:a05:622a:449:b0:467:86fa:6b72 with SMTP id d75a77b69052e-46c7108dc89mr444138441cf.12.1737055987300; Thu, 16 Jan 2025 11:33:07 -0800 (PST) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46e1042efa5sm2667961cf.66.2025.01.16.11.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 11:33:06 -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 v1] dts: fix multicast set function in testpmd shell Date: Thu, 16 Jan 2025 14:33:07 -0500 Message-ID: <20250116193307.23213-1-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 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 Fixes verification method in multicast set function by changing the stats capture to use show_port_info_all(). This way, the method will continue to work even after DTS lifts the restriction on port topologies. Fixes: abf8a3bc793b ("dts: add multicast set function to shell") Signed-off-by: Dean Marx --- dts/framework/remote_session/testpmd_shell.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index d25952e2fa..37cd981264 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -1795,7 +1795,7 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats: return TestPmdPortStats.parse(output) - def set_multicast_all(self, on: bool, verify: bool = True): + def set_multicast_all(self, on: bool, verify: bool = True) -> None: """Turns multicast mode on/off for the specified port. Args: @@ -1809,9 +1809,8 @@ def set_multicast_all(self, on: bool, verify: bool = True): """ 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): + port_stats = self.show_port_info_all() + if on ^ all(stats.is_allmulticast_mode_enabled for stats in port_stats): self._logger.debug( f"Failed to set multicast mode on all ports.: \n{multicast_cmd_output}" ) -- 2.44.0