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 D820D45A38; Thu, 26 Sep 2024 14:31:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D6EB4028B; Thu, 26 Sep 2024 14:31:03 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id E84EA4025D for ; Thu, 26 Sep 2024 14:31:01 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-42ca4e0299eso7927845e9.2 for ; Thu, 26 Sep 2024 05:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1727353861; x=1727958661; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=R0eTw2nJOrLvCx/G0BYGtuMAUlj1VZbe432V24IAzyI=; b=u2BS/MafQLdT9yIZ2+AuraeGpWvFhwfyqH0k18KA4tr02d8LMfFClYGImzXkAvmWpm 1kFUzqL0sULR1Lx6jQd00cjwHFCznFun2gMvraYGZtT4z9KRmofLVGyru7b6sJR9Km8j W5l14RHhxpCsIwQZH2au+/kjwvK2GKh7/rz+bsPAjUOtDAxqwWK5sATZxwNLndn/1q6O tafLHHdoZO43+L6EZnnDGQxkyhsv4kLw7AkBM+UqqdnB9BFbu7VtnpIeDqBJh01oxKXo IxCbsd0LGlWj5QbQOqpTdBQy7pj/3KmGzKwVTHn0w8VPfBvvNDKR/bfgWUZIe3brsSP7 8HbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727353861; x=1727958661; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=R0eTw2nJOrLvCx/G0BYGtuMAUlj1VZbe432V24IAzyI=; b=tS/eIVVz/5109FcT1mcl2Zy4Fem832SmqyBU90yWw9zXl4uKkucu1v1Q3805ryioPq 1kLJ2sdT8JZLq+93CJdM9AWpORDuADQ/mNls22zK37ISIE/tRQCPy5jwVkC2v5lSD62V Cyq0Y3VXMGAElPCwTWxj+6jdW78ouBFs39HtCqAtE7Wd7Og05/rGEjR77de4Z5EiRXsE l0H+aAktpuKPeBjsU5C1K8U+kjamTx9X95r/H0AIG8e97kxvg4XjZrwhZdwc/iYWAwO4 Mx3+lcvnGk50TebTObGD9kQU++LWQUm6IVj4JFkx9AHbHFSinV7MGrOrU4MMUjKNNslw zilg== X-Gm-Message-State: AOJu0Ywl3Zcym2r2L8oCiegGwhoAdZ3fpNFlcQgvsOeuG/D5koMLsJlx k+FJ0nhYy+Eld78Wmnp0LeLOW1JJMCydaJl07NZ4BfBaBhNudLbmN0rLDmZ4gvQ= X-Google-Smtp-Source: AGHT+IGWdndL5foQkyfCzqAE0kpNWxwICjYrhnz9xuTdhrTdnE/slV4HHvS/RJGQeSK7mKTHrS7NRA== X-Received: by 2002:a05:600c:1c26:b0:425:7bbf:fd07 with SMTP id 5b1f17b1804b1-42e96103a1amr40131065e9.5.1727353861113; Thu, 26 Sep 2024 05:31:01 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e969e1902sm45998925e9.4.2024.09.26.05.31.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Sep 2024 05:31:00 -0700 (PDT) Message-ID: <51c16b44-ecd7-4a8f-85a4-296e8552eb07@pantheon.tech> Date: Thu, 26 Sep 2024 14:30:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/1] dts: rework packet addressing To: jspewock@iol.unh.edu, 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 Cc: dev@dpdk.org References: <20240904152827.11914-1-jspewock@iol.unh.edu> <20240925182141.15404-1-jspewock@iol.unh.edu> <20240925182141.15404-2-jspewock@iol.unh.edu> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240925182141.15404-2-jspewock@iol.unh.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py > + def _adjust_addresses(self, packets: list[Packet], expected: bool = False) -> list[Packet]: > + # The packet is routed from TG egress to TG ingress regardless of whether it is > + # expected or not. > + if ip_src_is_unset: > + l3_to_use.src = self._tg_ip_address_egress.ip.exploded > + > + if ip_dst_is_unset: > + l3_to_use.dst = self._tg_ip_address_ingress.ip.exploded 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 = "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. > + ret_packets.append(Ether(packet.build())) > > - return Ether(packet.build()) > + return ret_packets > > def verify(self, condition: bool, failure_description: str) -> None: > """Verify `condition` and handle failures.