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 35D09458F4; Tue, 3 Sep 2024 21:13:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C08EC40279; Tue, 3 Sep 2024 21:13:24 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 0F1174026A for ; Tue, 3 Sep 2024 21:13:23 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7d4fa972cbeso448215a12.2 for ; Tue, 03 Sep 2024 12:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1725390802; x=1725995602; 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=Kjs7B5KmvpXBtNUrL+CvrHcI6QMZnvc4Jk+XV0qGUwI=; b=XyikNzfVumypAkq+j7j8s9Z/K10EdbQ86XznLyEyPTZzJck5YXgb5FzhsZ5x0NUkXL lUmkGI3raw1u1OcTIQnDpkiZMlHOnIrmeHVJTfsE+wd6KBQFnz31sn5P9+i2isJ7sSJ4 PASAIC28NPf2XzMUWXlBet0NpSyILBHnYBkME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725390802; x=1725995602; 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=Kjs7B5KmvpXBtNUrL+CvrHcI6QMZnvc4Jk+XV0qGUwI=; b=YADdLr4NN/TFW4foc8BnzexOqMxWIKAO5x5y/s8P9nqyKILWTjLYW6bVGlpvPpAuEa RaEXnI2XVRp83JIU9+dgi4tfaY9el3X9idIINKWcv1Q3ECG+Z4e/SyWoDxbfR8ir/eN9 teg2WHLSdLixzfL/l/iUaG0QaiYNibahDS0B4wDa+XvmpH1egQlNxjkVhofCl0L6ITWt SwTJ/o6rPEJkmkiEsRlBciGLlMybvCA4p+I/HQFF2yojU58gSFyzbDJgrbhWSMo85uqZ Vh0ACDaPnUvsQlx9gOHx+72ClO12D6Y+xT/qciAmPznNr+RjKPHNGJnEAq1a/jRaK4zq pAVA== X-Forwarded-Encrypted: i=1; AJvYcCVjfWE+n8DF1qJvUYh5hYCvLSOaciF6xVPizrpGET6qe7nAZcHO8k7JSSgwABFZcYQbXyE=@dpdk.org X-Gm-Message-State: AOJu0YyzFqHJ8asMI93MdUD/rowR4mfEW9+aRT9Oe8FeKqoutfi9auZP YGBRrZj+HLjo/6lIMw9RmGp94GPMlh6x1pKFmOAHGmYS7vhw9Tu23Yn/lOe0d+8T0bDx/k3jEOx rKnW4n8k07tyjOD5GVqk9F/7UM76rtKUVfbYNAw== X-Google-Smtp-Source: AGHT+IENBY3dTzFwXR9moJv0ojs/tP5mvG3RAhFDEgPPh3NStirjnjgg94cj/vWOIGYMq+1l/9AHoADMNCKiuedad1Y= X-Received: by 2002:a17:902:f650:b0:206:88fa:54a6 with SMTP id d9443c01a7336-20688fa580emr46178505ad.21.1725390801792; Tue, 03 Sep 2024 12:13:21 -0700 (PDT) MIME-Version: 1.0 References: <20240301155416.96960-1-juraj.linkes@pantheon.tech> <20240821145315.97974-1-juraj.linkes@pantheon.tech> <20240821145315.97974-9-juraj.linkes@pantheon.tech> In-Reply-To: <20240821145315.97974-9-juraj.linkes@pantheon.tech> From: Dean Marx Date: Tue, 3 Sep 2024 15:13:32 -0400 Message-ID: Subject: Re: [PATCH v3 08/12] dts: add NIC capability support To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu, alex.chapman@arm.com, dev@dpdk.org Content-Type: multipart/alternative; boundary="000000000000d70ca306213bd9cc" 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 --000000000000d70ca306213bd9cc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 21, 2024 at 10:53=E2=80=AFAM Juraj Linke=C5=A1 wrote: > Some test cases or suites may be testing a NIC feature that is not > supported on all NICs, so add support for marking test cases or suites > as requiring NIC capabilities. > > The marking is done with a decorator, which populates the internal > required_capabilities attribute of TestProtocol. The NIC capability > itself is a wrapper around the NicCapability defined in testpmd_shell. > The reason is twofold: > 1. Enums cannot be extended and the class implements the methods of its > abstract base superclass, > 2. The class also stores an optional decorator function which is used > before/after capability retrieval. This is needed because some > capabilities may be advertised differently under different > configuration. > > The decorator API is designed to be simple to use. The arguments passed > to it are all from the testpmd shell. Everything else (even the actual > capability object creation) is done internally. > > Signed-off-by: Juraj Linke=C5=A1 > Reviewed-by: Dean Marx --000000000000d70ca306213bd9cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 21, 2024 at 10:53=E2=80=AFAM = Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech> wrote:
Some= test cases or suites may be testing a NIC feature that is not
supported on all NICs, so add support for marking test cases or suites
as requiring NIC capabilities.

The marking is done with a decorator, which populates the internal
required_capabilities attribute of TestProtocol. The NIC capability
itself is a wrapper around the NicCapability defined in testpmd_shell.
The reason is twofold:
1. Enums cannot be extended and the class implements the methods of its
=C2=A0 =C2=A0abstract base superclass,
2. The class also stores an optional decorator function which is used
=C2=A0 =C2=A0before/after capability retrieval. This is needed because some=
=C2=A0 =C2=A0capabilities may be advertised differently under different
=C2=A0 =C2=A0configuration.

The decorator API is designed to be simple to use. The arguments passed
to it are all from the testpmd shell. Everything else (even the actual
capability object creation) is done internally.

Signed-off-by: Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech>

Reviewed-by: Dean Marx <dmarx@iol.unh.edu>=C2=A0
--000000000000d70ca306213bd9cc--