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 23C7145AF5; Thu, 10 Oct 2024 01:00:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B555040156; Thu, 10 Oct 2024 01:00:32 +0200 (CEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 33F94400D6 for ; Thu, 10 Oct 2024 01:00:31 +0200 (CEST) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7e9e38dd5f1so254716a12.0 for ; Wed, 09 Oct 2024 16:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1728514830; x=1729119630; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kKsLIz4SYiqj9XA4Zo6wuV+Gxu9PTvE0pF9fEqD4jio=; b=R7GPCribt6jzTXrNXuFq6Ga0K9yQp6fJe0ycQD7bdUaSr9BAOxtZARskhgrOiHtu4r wbhMh9+KVZjDrgPNvtKVUHQSrLCMMDC4/k3iC6SSTSm8ajDB4WVa6BWAiWctTp5EMpuU N2MappuMKs6TGULxJPdoSgoMPncyx2M2SG/NI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728514830; x=1729119630; h=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=kKsLIz4SYiqj9XA4Zo6wuV+Gxu9PTvE0pF9fEqD4jio=; b=HX01Ybe+gwn81c5AtiGM+7RtNXz0LPkEiE4owR6Yes+berOPMsIyNa7OLb9fmdIteO ZErc91bLRwsxslgcq0JuVqmibx8EqSKwlqFn4f68k9GkFY8kpqVm4anD4eARNkVxzzaU cbaZUZ5sYyHOTSKxo0Ow5dZNxlmMRvIh4YWAiP7VDJaIBoML2k0XFKOhBA250WeEQDLO pJrsrevUtSfah9TDLMSsGCKkWKHHarThBPuZlS5TB6X+ALmdxgFLayVp6varYj4M0vBR AZXvxuwMPJrR/L8i3ERjdCFD6N86RTbGN3r5GTNnHAksezMV1J6Dn3K3z9tKoCo7glD+ +ONQ== X-Forwarded-Encrypted: i=1; AJvYcCVEwilM9L7pkQG6BZ/m+Yz8SCRVJ8W3jPKmz3oaoOa5LvrJlZ9tNTnoK2Pg62UDXFif4no=@dpdk.org X-Gm-Message-State: AOJu0Yzk8OneCF0LqxBztZYxugJ0LlH/MHs4wJZBTt87PoAoTd3adXlN RLyM80ZRqGPkgoLine7UXOtO6ETFizvgQEyJ7AKRRplsY7P3kSS9ZgiHVsj+9DK2oPkjhbk49G7 pL4W8bb+X0VJ592SZccBeJ02Hib05suJWGcz9+g== X-Google-Smtp-Source: AGHT+IE0USQiVwK5WWI+hD2hQLO+zR/tm9G7wh2PKz+tjuzzTk3ynkP4sXqQOYWILbhPcnjhzBCRHEr/DcfM3axchR4= X-Received: by 2002:a17:902:d506:b0:1fd:8eaf:ea73 with SMTP id d9443c01a7336-20c63758316mr66771425ad.35.1728514830300; Wed, 09 Oct 2024 16:00:30 -0700 (PDT) MIME-Version: 1.0 References: <20240702192422.2480-2-npratte@iol.unh.edu> <20241008204520.17275-1-npratte@iol.unh.edu> <20241008204520.17275-2-npratte@iol.unh.edu> In-Reply-To: <20241008204520.17275-2-npratte@iol.unh.edu> From: Patrick Robb Date: Wed, 9 Oct 2024 18:59:11 -0400 Message-ID: Subject: Re: [PATCH v6 1/2] dts: add methods for setting mac and multicast addresses To: Nicholas Pratte Cc: Honnappa.Nagarahalli@arm.com, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, juraj.linkes@pantheon.tech, paul.szczepanek@arm.com, dmarx@iol.unh.edu, dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000073166e0624133872" 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 --00000000000073166e0624133872 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Actually, I do have one thought. On Tue, Oct 8, 2024 at 4:45=E2=80=AFPM Nicholas Pratte wrote: > + def set_mac_addr(self, port_id: int, mac_address: str, add: bool, > verify: bool =3D True) -> None: > + """Add or remove a mac address on a given port's Allowlist. > + > + Args: > + port_id: The port ID the mac address is set on. > + mac_address: The mac address to be added to or removed from > the specified port. > + add: If :data:`True`, add the specified mac address. If > :data:`False`, remove specified > + mac address. > Should we replace "add" with "set" or an equivalent? Add=3DTrue means add. Add=3Dfalse doesn't necessarily mean remove... set=3DTrue and set=3DFalse r= eads a little clearer for a function where the boolean is adding/removing something. But, it's just a thought - add is probably fine if you think that that's what reads best. --00000000000073166e0624133872 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Actually, I do have one thought.
On Tue, O= ct 8, 2024 at 4:45=E2=80=AFPM Nicholas Pratte <npratte@iol.unh.edu> wrote:
+=C2=A0 =C2=A0 def set_mac_addr(self, port= _id: int, mac_address: str, add: bool, verify: bool =3D True) -> None: +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Add or remove a mac address = on a given port's Allowlist.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Args:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 port_id: The port ID the mac add= ress is set on.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mac_address: The mac address to = be added to or removed from the specified port.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 add: If :data:`True`, add the sp= ecified mac address. If :data:`False`, remove specified
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mac address.

Should we replace "add" with "= ;set" or an equivalent? Add=3DTrue means add. Add=3Dfalse doesn't = necessarily mean remove... set=3DTrue and set=3DFalse reads a little cleare= r for a function where the boolean is adding/removing something. But, it= 9;s just a thought - add is probably fine if you think that that's what= reads best.=C2=A0
=C2=A0
--00000000000073166e0624133872--