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 5983345A3A; Thu, 26 Sep 2024 19:02:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3C404067E; Thu, 26 Sep 2024 19:02:45 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id 72B6440672 for ; Thu, 26 Sep 2024 19:02:44 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2e0afd945d4so429044a91.0 for ; Thu, 26 Sep 2024 10:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1727370163; x=1727974963; 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=c4VlFGACDcjBYelf8XtzFiZIz9sUcpx0EIEhrUt1sUQ=; b=L6f1eEghSPIjQp6CxpJ6FDYuzVq/qZnRWt4Tv/ySSjdgmrThsNGRkYRPts9qz4eVRc wlLrFgqUycks9yAXvJDdiEwJcllyE8URXOsLo75w6EkyRrPwGjyXOocZ6QQFTqNVsZ2q Zc+MCJVAtHWPPRCqcG6GIWY7WFKNi2YpmSdi8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727370163; x=1727974963; 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=c4VlFGACDcjBYelf8XtzFiZIz9sUcpx0EIEhrUt1sUQ=; b=QaoPR7nhd+wgtJmtILiJwaAYY4nQRug6sOFpQzenYe/zowPh+juMzTC81Q06VhnYFX nzsSVUPDEM/nTFZ32Gqs2ohOUYKspN0+QsTr462BDwxnvEbi0t/jK5yPuBNcM/dw6keJ g34mPtZyIlcbasuf+BFgp1ypivphbRypSKqKW/iDsYGOUC2iv41YL0M4p36nhwJ7FMC7 Xymz7Kja6lMqVbdgJ2Aqu5jdTi6BEAXsUGe8/5oEX205chssGt36OwaYdOCReFm4+q1v LOwovL16vHl29KlCgJtNelMjEQcMCsLyrCukw3lfBxc4FSbjPGDVDMgf+JPRbA8w1g3L JgUw== X-Forwarded-Encrypted: i=1; AJvYcCWnD8KoF9dZ1KKtBbWkuM+jgVPhCitKkPtOYIMRuzoC7cTcKdYXtS/7K18ZczYYnum7S7I=@dpdk.org X-Gm-Message-State: AOJu0YxHJqmKEZeMBHVUiE+MeNpVrSVWYdnUHz+QU4MDfMoW4mQxLxKy mgqFtxDwDZ7oSmVMD44QIvy/YcsOlT6YFTx011miE2l+FMadJrhs7jmc5Z0yK7oSzcg8iAFXOTR iq8RrXFK0+C1cSFSbqIdYcQ4uXzpc3MwzMfTrYA== X-Google-Smtp-Source: AGHT+IEcLKrt8QBObaxFJ1neq7Th12euvvo6+w+a+29ERKC9nXPeJNfUeMDE59ZxknBIm6p0yT35LxiMx4DAIb1QwhM= X-Received: by 2002:a17:90a:9a83:b0:2d8:d58b:52c8 with SMTP id 98e67ed59e1d1-2e0b8b22578mr431102a91.19.1727370163460; Thu, 26 Sep 2024 10:02:43 -0700 (PDT) MIME-Version: 1.0 References: <20240904152827.11914-1-jspewock@iol.unh.edu> <20240925182141.15404-1-jspewock@iol.unh.edu> <20240925182141.15404-2-jspewock@iol.unh.edu> <51c16b44-ecd7-4a8f-85a4-296e8552eb07@pantheon.tech> In-Reply-To: <51c16b44-ecd7-4a8f-85a4-296e8552eb07@pantheon.tech> From: Jeremy Spewock Date: Thu, 26 Sep 2024 13:02:32 -0400 Message-ID: Subject: Re: [PATCH v3 1/1] dts: rework packet addressing To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: wathsala.vithanage@arm.com, alex.chapman@arm.com, Luca.Vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, npratte@iol.unh.edu, yoan.picchi@foss.arm.com, thomas@monjalon.net, 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 On Thu, Sep 26, 2024 at 8:31=E2=80=AFAM Juraj Linke=C5=A1 wrote: > > > > diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py > > > + def _adjust_addresses(self, packets: list[Packet], expected: bool = =3D False) -> list[Packet]: > > + # The packet is routed from TG egress to TG ingress regard= less of whether it is > > + # expected or not. > > + if ip_src_is_unset: > > + l3_to_use.src =3D self._tg_ip_address_egress.ip.explod= ed > > + > > + if ip_dst_is_unset: > > + l3_to_use.dst =3D self._tg_ip_address_ingress.ip.explo= ded > > So this is where l3_to_use also appears. This could also be in the same > if branch, right? As you mentioned, ip_src_is_unset is only going to be > true in that branch. > > Now that I look at it, we're mixing the update of l2 addresses (starting > with pkt_src_is_unset =3D "src" not in packet.fields) with l3 addresses > (starting with num_ip_layers right below that). We could first do l2 > addresses, then l3 addresses. And I don't think we even need the > *_is_unset variables, they're only used once. That is true, I can change it to work in this way instead. > > > + ret_packets.append(Ether(packet.build())) > > > > - return Ether(packet.build()) > > + return ret_packets > > > > def verify(self, condition: bool, failure_description: str) -> No= ne: > > """Verify `condition` and handle failures. >