Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5949108rwb; Tue, 22 Nov 2022 07:01:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf79YODI487drD1q1VOcX9172g88lk+WdNQKJDdAoADvZ5aETgw4SfTA3Gsk26zMj3AsOijX X-Received: by 2002:a17:906:8613:b0:7a6:a48b:5e2a with SMTP id o19-20020a170906861300b007a6a48b5e2amr4612929ejx.338.1669129318560; Tue, 22 Nov 2022 07:01:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669129318; cv=none; d=google.com; s=arc-20160816; b=iDzVZ32fp0RpM/1w6ROq7Dj3qBpO5FzKdVg9/Znnbq/CpuK2xjuqh6hPIpL9XirhGa lF2LhhpbRmQNRoMHqAFkrb1giQn2niBT/X0BIxhaGbyy1BdeGCG8UfhNfz5rJvvUdz2r CpbhpiERdVMU9o2RzBozgYwwpz+OamSwJILQzCEV3a1Ec/nSJd9AIH7LOC7KsB7WSiz9 9LWLeIi61thTEuRHDCnVlPV3LRE62/tgj6NEMpjLex+OLPhu4N13gVpPV3sPjnBfYIG+ rMsG5tl+IsuNb3o1+XJ+oGMiwz72AeZqvw7qDzSBs+Vi/yXm2JhKiGnc5816D8lX5Hig TLFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RhgdRkAbSgjlCLQ/dwJTtIG3mug5NVLJS7j9FGtckkU=; b=wcXIuxZUg07PzNQKxcPB94By4WaQOgJ2cGEOoPZh8iMh4Eeh9nadZ4Z0WWbUXQuvZI +Nr7Ejz5eB/dWUexXonRnqCF/PYSQacFJ9bfO5xPhwCrOI7Dr+B8WjBqi+2Zvpg+3Go+ 6WKcfTOpmxXRGhDd0nXXuQt7ayh97uvjIEuA2Z6Cu7PW3rlxFjhTKexO/CNBVMM9EtjK +V+agpbZKkauu3JKNav0Qg/RERZbxmLnx0+YgzKZIq5bLr0r7AsxcGLJ4tcEVNDiYOl1 dS2bvHdptELh2YahB0p0CqLMHLbWdnuzcCfCXQMZJ+AM3YoVSb2812feFKW3xAYcFmy2 QI6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F35HiLt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs14-20020a170906dc8e00b00715867834e3si13073427ejc.506.2022.11.22.07.01.34; Tue, 22 Nov 2022 07:01:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F35HiLt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232723AbiKVOFJ (ORCPT + 90 others); Tue, 22 Nov 2022 09:05:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233950AbiKVOFE (ORCPT ); Tue, 22 Nov 2022 09:05:04 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3C631E3C3 for ; Tue, 22 Nov 2022 06:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669125796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=RhgdRkAbSgjlCLQ/dwJTtIG3mug5NVLJS7j9FGtckkU=; b=F35HiLt6WfqaGBJlyAbgU3Dm04Cpd67hY6naSofBbGia56j2YsmRKfO6aaUoWJA5GYGamj dUK85xR1Dh8SOuy4gp8n1EHDZYKjyuuhbKGclyBMi/LftoNoWOboY/8Iej45XcRaSEgl2f pllKOhn9txDGGhD+Wv5L0KKa2RELwsw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-187-GvE4aIjuPjWke4fcVW1efA-1; Tue, 22 Nov 2022 09:03:10 -0500 X-MC-Unique: GvE4aIjuPjWke4fcVW1efA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23C762A5956D; Tue, 22 Nov 2022 14:03:10 +0000 (UTC) Received: from RHTPC1VM0NT.redhat.com (unknown [10.22.16.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7654040C6EC6; Tue, 22 Nov 2022 14:03:09 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: Pravin B Shelar , Jakub Kicinski , "David S. Miller" , Paolo Abeni , Eric Dumazet , Thomas Graf , dev@openvswitch.org, Eelco Chaudron , Ilya Maximets , Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [RFC net-next 0/6] Allow excluding sw flow key from upcalls Date: Tue, 22 Nov 2022 09:03:01 -0500 Message-Id: <20221122140307.705112-1-aconole@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Userspace applications can choose to completely ignore the kernel provided flow key and instead regenerate a fresh key for processing in userspace. Currently, userspace ovs-vswitchd does this in some instances (for example, MISS upcall command). This means that kernel spends time to copy and send the flow key into userspace without any benefit to the system. Introduce a way for userspace to tell kernel not to send the flow key. This lets userspace and kernel space save time and memory pressure. This patch set is quite a bit larger because it introduces the ability to decode a sw flow key into a compatible datapath-string. We use this as a method of implementing a test to show that the feature is working by decoding and dumping the flow (to make sure we capture the correct packet). Aaron Conole (6): openvswitch: exclude kernel flow key from upcalls selftests: openvswitch: add interface support selftests: openvswitch: add flow dump support selftests: openvswitch: adjust datapath NL message selftests: openvswitch: add upcall support selftests: openvswitch: add exclude support for packet commands include/uapi/linux/openvswitch.h | 6 + net/openvswitch/datapath.c | 26 +- net/openvswitch/datapath.h | 2 + .../selftests/net/openvswitch/openvswitch.sh | 101 +- .../selftests/net/openvswitch/ovs-dpctl.py | 1069 ++++++++++++++++- 5 files changed, 1183 insertions(+), 21 deletions(-) -- 2.34.3