From: Luca Vizzarro <Luca.Vizzarro@arm.com>
To: Dean Marx <dmarx@iol.unh.edu>,
Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech,
probb@iol.unh.edu, paul.szczepanek@arm.com,
yoan.picchi@foss.arm.com, jspewock@iol.unh.edu,
bruce.richardson@intel.com
Cc: dev@dpdk.org
Subject: Re: dts: add multicast set function to shell
Date: Thu, 1 Aug 2024 13:34:28 +0100 [thread overview]
Message-ID: <a1df7cc3-b002-47b7-a31c-646525f265cc@arm.com> (raw)
In-Reply-To: <20240708190858.26583-2-dmarx@iol.unh.edu>
Hi Dean, thank you for your work.
On 08/07/2024 20:08, Dean Marx wrote:
> + 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_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)
This assumes that we have port 0 and 1, but *technically* we shouldn't
be making assumptions about the environment in the framework. I'd rather
use show_port_info_all and sample from there what's available.
> + 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_output}"
> + )
> + raise InteractiveCommandExecutionError(
> + "Testpmd failed to set multicast mode on all ports."
> + )
next prev parent reply other threads:[~2024-08-01 12:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 19:08 dts: dynamic config test suite implementation Dean Marx
2024-07-08 19:08 ` dts: add multicast set function to shell Dean Marx
2024-08-01 12:34 ` Luca Vizzarro [this message]
2024-07-08 19:08 ` dts: add toggle option to send and capture Dean Marx
2024-08-01 12:50 ` Luca Vizzarro
2024-07-08 19:08 ` dts: dynamic config test suite Dean Marx
2024-08-01 12:56 ` Luca Vizzarro
2024-07-08 19:08 ` dts: dynamic config conf schema Dean Marx
2024-08-01 12:57 ` Luca Vizzarro
2024-08-01 13:15 ` dts: dynamic config test suite implementation Luca Vizzarro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1df7cc3-b002-47b7-a31c-646525f265cc@arm.com \
--to=luca.vizzarro@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=jspewock@iol.unh.edu \
--cc=juraj.linkes@pantheon.tech \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
--cc=yoan.picchi@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).