Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp905121lqs; Fri, 14 Jun 2024 08:54:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGcogtJ4mku2ANouH4T7SjcgZ8nGfApm6BUQinxwgNU5bvQfvtLdcRZLH0wmNtco7973nll0/typcS2a9qLf+L2FYmnQBWkUlQfYzgVw== X-Google-Smtp-Source: AGHT+IFn9GOH4VP7e8z9BawWqy58STpeo4q0RI/Ht9kgJFrxE5XyxmXu6oAkXCPFW9JBRDxEqOpE X-Received: by 2002:a50:935b:0:b0:57c:620c:8f76 with SMTP id 4fb4d7f45d1cf-57cbd8b9e9amr2121273a12.26.1718380472749; Fri, 14 Jun 2024 08:54:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718380472; cv=pass; d=google.com; s=arc-20160816; b=mi23ugTjoIKPQRDY6Mmk15DVeXFJ1Tj/8fwPpvrxt0vMXpt+aX262/Z2bM7tHzK1+o grhcxJTNHvKaYndBYMkXCcfZWbBCxZ39ud/FpHDX1AU30Nx1NocCC01zcUkG8gX/gJlh DNfDTS0/9YT7Y5lQVcuPYjNBQSFixSfcc3tHfevSzSjDC+ZSuZE4TVwZRVqCQx5CDaX8 Hl2twQD4NYKVibErnK+hsMah+oeg41+iDLp0CPmierAewrpip7YG9lJ2qhp/lL6rjAkW lJ0U7NWUsbRhT0b4a1T53yDEahKe/UshN3ryxbU7HtURXHCn6FuKZYy1Md65MzrWTizA CAPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=XXSISRWdLPH55gILPs1QDZPjGYmbQZf+3emJmLMYoF0=; fh=Sfbpm/MW67v/8+X8YroGcAoEbw1ZDYuePYH4gckvy0M=; b=WonUBMb4i6nJmbjQk2cpJv/j+OpsE3LozEAV7ZebZ7S7f5S4HJtmftCCQg3M+bPLi9 OeGyxlFVeaFQ9wJPvf3fT+UhgFunNZofX+Tj80wbanLxL5sx9y+0ODLD5c2FxJ0IqBX3 IQM8t9Gv4BqmGiazZo3jYQE6MBeQ3q/s8q02dzhSKN6TucSzg53CMMWeTu0G/MotAci1 s7jAKRPhrQvHQH/RQWgZ1geC/VPBZiS2fPQFOS2pNCAb5vXj7n892r05iJ5z7SuAZqHR kxm/Uull74Q5yjSYDu+NS6OknHPapOhDb7nJG/+awNqTha91JVgt52eMj9fqGSEQmkJR 3W3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Goj4LckA; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-215188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb72d6324si1872137a12.42.2024.06.14.08.54.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 08:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Goj4LckA; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-215188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 52BEA1F21CCF for ; Fri, 14 Jun 2024 15:54:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFC4E16C696; Fri, 14 Jun 2024 15:54:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Goj4LckA" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF263364A1 for ; Fri, 14 Jun 2024 15:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718380464; cv=none; b=tb426WHTNdfcKq1dLrn9Mnmvd7oocEzQk+fESxhTYfTJuDGnaKCcA6QXKWvMm8REoWTHuoIkCqAKOgsuKuwE5cM/FGbb1XsD72sWV2i5oJaboz10CoYDLnRKjJhKAjOM7niF6fA9YzXDk+O5fhKrPivfMpNBWcqLlDDns66Lrwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718380464; c=relaxed/simple; bh=re2luL8iC9nwDSyqmpDwVK+KGaKcJDoncjJcQqFPp2I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=fa4LvPdSHSZR1VRaQ2j0nAUWFu0Fguzgj87PJTFwflnKYPvilrQpo0/g59sLrxuG3C2mZpL4jqcjQnMq4Y03WpvyjVl4AT4j5TvK9C+hOi09tPEow/dD4iMjCeVLQUcE5umM+XvbOD5AY9vACAi1CDptl28zfLKfkjcFe+KmRy4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Goj4LckA; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718380461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XXSISRWdLPH55gILPs1QDZPjGYmbQZf+3emJmLMYoF0=; b=Goj4LckAkAqfVUn6ZogzkgXHISRPKTtBzDpDwPS16rH7/NmXyAMuTxWTVglgQs4Snp2PJQ vx1Iofaahgwg5ow9a1pyRrLaK/krEamQZm3hjaRsLznR8KCg8gyAQR82R0UCC3aX69M//r 2XHsiJINPC8xGuu+dAQGbh2IyPkiJiU= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-03G28qcNMiCIIHnS0WSTbg-1; Fri, 14 Jun 2024 11:54:18 -0400 X-MC-Unique: 03G28qcNMiCIIHnS0WSTbg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E598119560B9; Fri, 14 Jun 2024 15:54:16 +0000 (UTC) Received: from RHTRH0061144 (unknown [10.22.16.41]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D35CA19560BF; Fri, 14 Jun 2024 15:54:13 +0000 (UTC) From: Aaron Conole To: =?utf-8?Q?Adri=C3=A1n?= Moreno Cc: netdev@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/2] selftests: openvswitch: set value to nla flags In-Reply-To: (=?utf-8?Q?=22Adri=C3=A1n?= Moreno"'s message of "Tue, 11 Jun 2024 15:03:45 +0000") References: <20240603183121.2305013-1-amorenoz@redhat.com> <20240603183121.2305013-2-amorenoz@redhat.com> Date: Fri, 14 Jun 2024 11:54:11 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Adri=C3=A1n Moreno writes: > On Mon, Jun 03, 2024 at 03:02:46PM GMT, Aaron Conole wrote: >> Adrian Moreno writes: >> >> > Netlink flags, although they don't have payload at the netlink level, >> > are represented as having a "True" value in pyroute2. >> > >> > Without it, trying to add a flow with a flag-type action (e.g: pop_vla= n) >> > fails with the following traceback: >> > >> > Traceback (most recent call last): >> > File "[...]/ovs-dpctl.py", line 2498, in >> > sys.exit(main(sys.argv)) >> > ^^^^^^^^^^^^^^ >> > File "[...]/ovs-dpctl.py", line 2487, in main >> > ovsflow.add_flow(rep["dpifindex"], flow) >> > File "[...]/ovs-dpctl.py", line 2136, in add_flow >> > reply =3D self.nlm_request( >> > ^^^^^^^^^^^^^^^^^ >> > File "[...]/pyroute2/netlink/nlsocket.py", line 822, in nlm_request >> > return tuple(self._genlm_request(*argv, **kwarg)) >> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > File "[...]/pyroute2/netlink/generic/__init__.py", line 126, in >> > nlm_request >> > return tuple(super().nlm_request(*argv, **kwarg)) >> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > File "[...]/pyroute2/netlink/nlsocket.py", line 1124, in nlm_request >> > self.put(msg, msg_type, msg_flags, msg_seq=3Dmsg_seq) >> > File "[...]/pyroute2/netlink/nlsocket.py", line 389, in put >> > self.sendto_gate(msg, addr) >> > File "[...]/pyroute2/netlink/nlsocket.py", line 1056, in sendto_gate >> > msg.encode() >> > File "[...]/pyroute2/netlink/__init__.py", line 1245, in encode >> > offset =3D self.encode_nlas(offset) >> > ^^^^^^^^^^^^^^^^^^^^^^^^ >> > File "[...]/pyroute2/netlink/__init__.py", line 1560, in encode_nlas >> > nla_instance.setvalue(cell[1]) >> > File "[...]/pyroute2/netlink/__init__.py", line 1265, in setvalue >> > nlv.setvalue(nla_tuple[1]) >> > ~~~~~~~~~^^^ >> > IndexError: list index out of range >> > >> > Signed-off-by: Adrian Moreno >> > --- >> >> Acked-by: Aaron Conole >> >> I don't know which pyroute2 version I had used when I tested this >> previously, but even on my current system I get this error now. Thanks >> for the fix. >> > > Thanks Aaron. I'll resend as v2 with your ack as a stand-alone patch > since the other patch of this series will be fixed by your soon-to-come > series. Thanks! >> > tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/to= ols/testing/selftests/net/openvswitch/ovs-dpctl.py >> > index b76907ac0092..a2395c3f37a1 100644 >> > --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py >> > +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py >> > @@ -537,7 +537,7 @@ class ovsactions(nla): >> > for flat_act in parse_flat_map: >> > if parse_starts_block(actstr, flat_act[0], False): >> > actstr =3D actstr[len(flat_act[0]):] >> > - self["attrs"].append([flat_act[1]]) >> > + self["attrs"].append([flat_act[1], True]) >> > actstr =3D actstr[strspn(actstr, ", ") :] >> > parsed =3D True >>