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 DA85545905; Wed, 4 Sep 2024 21:23:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B66C427C8; Wed, 4 Sep 2024 21:23:55 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 2EF034025C for ; Wed, 4 Sep 2024 21:23:54 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2da4ea973bdso2048630a91.1 for ; Wed, 04 Sep 2024 12:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1725477833; x=1726082633; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lvirdjrEygx+EUbqjch6/itmUUR52Pb75v4FbWkho2o=; b=UvJ2cXabdGpjSsoY1PmaHnsWsGXEZgeZr4LXVgnbOCVrEpfdb/akZ2SfyZvDagej4D 5y2fR5Mwdl17NVtR/VBnwp3pAsGdPX1rM5XiWy9L7dbQY5fAIYyp35cjV+xywmkcgcQL 8c2O50BuXwfpxBtkFRmo5em4Pl3YvqYlDcXFY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725477833; x=1726082633; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lvirdjrEygx+EUbqjch6/itmUUR52Pb75v4FbWkho2o=; b=QpYnE2WBiASM9MALzC+IqEPLwnrcu1rlUMf0fKB3kmjNZmdXuqw01MMLaLS+xx47DX kXekIieYriuWXnvtOJIvnO/cjCfYtK2RYH1GAYpHZ5ChyBs5U9rNMEy8ko5deEF6hqep XV24+QtEA3oBfFboy+6cgU7+8J5mY0dflgf3XjoyYzaMOdodaL68Vz35P0UB2xKDC/sT iBKPvP50W2iaLfPgf5kYrOHfc65aeTP0nRcUkzGy/2YE+FyQbVQhXiIJkuu/Ce2AOLR5 qYeAJUgARVgpe2kZr10gARWOncxGbQwz0u2V68bjp/1lusLBt0jby2Tjg+Qf8tynptOs eyxw== X-Forwarded-Encrypted: i=1; AJvYcCWoegjYVA4vZgPAO51ZtmcFQNdO/WGEmWG7EMuSJxpKZqg9XGYdbwQoAo5qz1IL6j1Mkxk=@dpdk.org X-Gm-Message-State: AOJu0YwzH8QHKVxLs4UKx14GZw+2mCb8xikdvuqKsNgVqaPyi/GKcr3o e4aCgQdMr9jfvtRRpAodRfZz3d18sR1rFzeBcRso55l+XWTTHrcHOSSy0++RzcD0rov2CsqbZCF qNs8WaZ0tt861DYdNlWePpfNlgpKwonA7+QTYfQ== X-Google-Smtp-Source: AGHT+IGSXtDBjPZ2SqCH56Hjs+4CTSErGLITDEaYbV0dMx1wZq0zJ9kv1OQmA8gVbxz4HROeQm65UCONpJA0k+UncVU= X-Received: by 2002:a17:90a:150:b0:2da:802d:1f95 with SMTP id 98e67ed59e1d1-2da802d244emr4739768a91.5.1725477833051; Wed, 04 Sep 2024 12:23:53 -0700 (PDT) MIME-Version: 1.0 References: <20240823193459.23026-1-dmarx@iol.unh.edu> <20240823202244.9184-1-dmarx@iol.unh.edu> <20240823202244.9184-2-dmarx@iol.unh.edu> In-Reply-To: <20240823202244.9184-2-dmarx@iol.unh.edu> From: Jeremy Spewock Date: Wed, 4 Sep 2024 15:23:41 -0400 Message-ID: Subject: Re: [PATCH v2 1/2] dts: add VXLAN port method to testpmd shell To: Dean Marx Cc: 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, juraj.linkes@pantheon.tech, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Just a few comments on doc-strings, otherwise: Reviewed-by: Jeremy Spewock On Fri, Aug 23, 2024 at 4:22=E2=80=AFPM Dean Marx wrote= : > > Add rx_vxlan_port add/rm method to testpmd shell for adding > or removing a vxlan id to the specified port filter list. > > Signed-off-by: Dean Marx > --- > dts/framework/remote_session/testpmd_shell.py | 23 +++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framewor= k/remote_session/testpmd_shell.py > index 43e9f56517..00b75954ef 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -806,6 +806,29 @@ def show_port_stats(self, port_id: int) -> TestPmdPo= rtStats: > > return TestPmdPortStats.parse(output) > > + def rx_vxlan(self, vxlan_id: int, port_id: int, add: bool, verify: b= ool =3D True) -> None: > + """Add or remove vxlan id to filter list. It might read better if you replaced "to" here with "to/from". > + > + Args: > + vxlan_id: Number of VXLAN ID to add to port filter list. This is a little nit-picky, but it might be worth removing "Number of" here and replacing "add to" with "add to/remove from" so it is "VXLAN ID to add to/remove from port filter list." just so that it reflects that you can both add and remove using this method. > + port_id: Number of port to add VXLAN ID to. For this line I might be in favor of simplifying it down to something like "ID of the port to modify VXLAN filter of." That way it doesn't need all the slashes to account for both adding and removing. > + add: If :data:`True`, adds specified VXLAN ID, otherwise rem= oves it. > + verify: If :data:`True`, the output of the command is checke= d to verify > + the VXLAN ID was successfully added/removed from the por= t. > + > + Raises: > + InteractiveCommandExecutionError: If `verify` is :data:`True= ` and VXLAN ID > + is not successfully added or removed. > + """ > + action =3D "add" if add else "rm" > + vxlan_output =3D self.send_command(f"rx_vxlan_port {action} {vxl= an_id} {port_id}") > + if verify: > + if "udp tunneling add error" in vxlan_output: > + self._logger.debug(f"Failed to set VXLAN:\n{vxlan_output= }") > + raise InteractiveCommandExecutionError( > + f"Failed to set VXLAN:\n{vxlan_output}" > + ) > + > def _close(self) -> None: > """Overrides :meth:`~.interactive_shell.close`.""" > self.stop() > -- > 2.44.0 >