[{"id":3688468,"web_url":"http://patchwork.ozlabs.org/comment/3688468/","msgid":"<f7t4ikirmrg.fsf@redhat.com>","list_archive_url":null,"date":"2026-05-08T14:36:51","subject":"Re: [ovs-dev] [PATCH net-next v8 1/2] selftests: openvswitch: add\n vlan() and encap() flow string parsing","submitter":{"id":67184,"url":"http://patchwork.ozlabs.org/api/people/67184/","name":"Aaron Conole","email":"aconole@redhat.com"},"content":"Minxi Hou <houminxi@gmail.com> writes:\n\n> Add VLAN TCI formatting and parsing support to ovs-dpctl.py:\n>\n> - Add _vlan_dpstr() to decompose TCI into vid/pcp/cfi fields,\n>   with raw tci=0x%04x fallback when cfi=0 for round-trip safety.\n> - Add _parse_vlan_from_flowstr() boundary check for missing ')'.\n> - Add encap_ovskey subclass restricting nla_map to L2-L4 attributes\n>   (slots 0-21) that appear inside 802.1Q ENCAP, with metadata\n>   attributes set to \"none\".\n> - Check parse() return value for unrecognized trailing content.\n> - Support callable format functions in dpstr() output.\n> - Change OVS_KEY_ATTR_VLAN type from uint16 to be16 to match the\n>   kernel __be16 wire format; uint16 decodes in host byte order,\n>   which gives wrong values on little-endian architectures.\n> - Change OVS_KEY_ATTR_ENCAP type from none to encap_ovskey to\n>   enable recursive parsing of 802.1Q encapsulated flow keys.\n> - Add push_vlan action class with fields matching kernel struct\n>   ovs_action_push_vlan (vlan_tpid, vlan_tci as network-order u16).\n> - Add push_vlan dpstr format and parse with range validation\n>   (vid 0-4095, pcp 0-7, tpid 0-0xFFFF) and CFI forced to 1.\n> - Remove MAX_ENCAP_DEPTH constant and depth tracking -- the\n>   bracket-depth counter in the encap parser already handles\n>   nesting; the global depth limit was unnecessary.\n>\n> Signed-off-by: Minxi Hou <houminxi@gmail.com>\n> ---\n\nThere are probably some pylint flags in this patch, but as stated before\nit is okay because they are keeping the coding style in this file\nconsistent.\n\nReviewed-by: Aaron Conole <aconole@redhat.com>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ovs-dev@lists.linuxfoundation.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=fr222XLB;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)","smtp3.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=fr222XLB","smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp2.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=fr222XLB"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBsCF2bvSz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 00:37:11 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 725506163C;\n\tFri,  8 May 2026 14:37:09 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id I-myIXnXROCL; Fri,  8 May 2026 14:37:08 +0000 (UTC)","from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id A8A3B61634;\n\tFri,  8 May 2026 14:37:08 +0000 (UTC)","from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 80A1FC04EB;\n\tFri,  8 May 2026 14:37:08 +0000 (UTC)","from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id DC10BC04E7\n for <dev@openvswitch.org>; Fri,  8 May 2026 14:37:07 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id BE33040E8F\n for <dev@openvswitch.org>; Fri,  8 May 2026 14:37:07 +0000 (UTC)","from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id J_ylkVCUQWPE for <dev@openvswitch.org>;\n Fri,  8 May 2026 14:37:06 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id B3304406B5\n for <dev@openvswitch.org>; Fri,  8 May 2026 14:37:05 +0000 (UTC)","from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-hjtVq5rlMrWn7wVsOJGmkQ-1; Fri,\n 08 May 2026 10:36:58 -0400","from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 1FC75195607B; Fri,  8 May 2026 14:36:56 +0000 (UTC)","from RHTRH0061144 (unknown [10.22.65.142])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 7584318004A3; Fri,  8 May 2026 14:36:53 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections -\n client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org A8A3B61634","OpenDKIM Filter v2.11.0 smtp2.osuosl.org B3304406B5"],"Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=aconole@redhat.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp2.osuosl.org B3304406B5","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1778251024;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=jN9d8X3Cgq30OgxBEoKonpvu/xXGPBaIJxtjI3YZcmE=;\n b=fr222XLBf+7UlpJ9dJ2zTjneqwNBMYoot7HaSwB3MhoYFFVro0A955V95CwhRs2uNqmFzv\n 06Ywf5JfFnFDYocmnufkOedOy9EMBK3T1bLibbxy7kKrKK7ibGUl+zEC6WJhV5nYIDO37p\n ySrfFZ7QqdsFsnQ1dtvDMZpKvR5K9Vs=","X-MC-Unique":"hjtVq5rlMrWn7wVsOJGmkQ-1","X-Mimecast-MFC-AGG-ID":"hjtVq5rlMrWn7wVsOJGmkQ_1778251016","To":"Minxi Hou <houminxi@gmail.com>","In-Reply-To":"<20260508134308.2857449-2-houminxi@gmail.com> (Minxi Hou's\n message of \"Fri, 8 May 2026 21:43:07 +0800\")","References":"<20260508134308.2857449-1-houminxi@gmail.com>\n <20260508134308.2857449-2-houminxi@gmail.com>","Date":"Fri, 08 May 2026 10:36:51 -0400","Message-ID":"<f7t4ikirmrg.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.93","X-Mimecast-MFC-PROC-ID":"FWg2fiFR9PKY6v2AwzJ2n3EkMpTZuAjJxXRvxr6wMWo_1778251016","X-Mimecast-Originator":"redhat.com","Subject":"Re: [ovs-dev] [PATCH net-next v8 1/2] selftests: openvswitch: add\n vlan() and encap() flow string parsing","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","From":"Aaron Conole via dev <ovs-dev@openvswitch.org>","Reply-To":"Aaron Conole <aconole@redhat.com>","Cc":"dev@openvswitch.org, linux-kselftest@vger.kernel.org,\n netdev@vger.kernel.org, linux-kernel@vger.kernel.org, i.maximets@ovn.org,\n edumazet@google.com, horms@kernel.org, kuba@kernel.org, pabeni@redhat.com,\n shuah@kernel.org, davem@davemloft.net","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ovs-dev-bounces@openvswitch.org","Sender":"\"dev\" <ovs-dev-bounces@openvswitch.org>"}}]