Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2548122rwi; Fri, 28 Oct 2022 08:18:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4MwW15GiknlS47TU4sI1hDLW6GrNfzrsUYEyYEHvp5TmGxg5gj3yO0WFbFZ633dL5NYEdu X-Received: by 2002:a17:907:7e9a:b0:796:7a21:1520 with SMTP id qb26-20020a1709077e9a00b007967a211520mr41793704ejc.236.1666970331864; Fri, 28 Oct 2022 08:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666970331; cv=none; d=google.com; s=arc-20160816; b=PFA2vXqWDmjamK664l43cDIV6gRAKO5FaXzcajImy86xWqTz/iXTOL8IKtzrI5SoRw zZ7UCMXXPkpVEgIICAtIPuQW0bnUp27dUr13ILvdyCxsbXj/HDFzWJH3Kn8BT6CATViD fDdCJeBKzwcrujyGqPbDq4WZM91MGXijLY0Z4imfQtQE9QuoS6mD5ChvuaVFNYZNfWc1 TreeXo0UuO1l2gQfS/LSNlPOtz5q3BgcbXtYeSeRquFOu/qQ1ZL9V8M0uIZYRE5W+bGj 1+UErTlIvVDlmLzrP55+wS+moS81Dhmx7vOETdE0Sizm9H3xei2TKQgrdqUUJQr7IetJ rn8A== 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=BhQ/Y28FeORzN/qnsgQGuUOSuZlZ+HAuZRKW4zyw2zo=; b=OCoc9TWFmMRwPRSFOA4FKOgYOliAZpiBEMUR6r8tp/PcdDf+Tf8qyjPVFoZ2jh5eKM AiMg7Km0v4FuEWWsjY81Ldx0p4njJ+p8LOxHKBZbEEc5TfzqrIhJWSNSSTFCs8mDGzWF ZLvGHfL58Lrqtdh5ba3Rs0sK3ms7tw+n+e1ScwaW8us9Neo7piC5E+X00GAseWgYuoOJ 2Y9qZR9H2EXiQi2FRiu57gTmnevoSHv2WIAB0fMnAb2Blz3r+9jm5mwTA3YwCFnJ/c8B tRawzck1+QLqgGuLYvsAIepuceQxB88WeoPVOcpC8j7WBeCxdLP9AQPrHeBHVwVtiMh6 ff5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=D6DhsgAF; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a17090631d400b0078df1c345dcsi4213093ejf.535.2022.10.28.08.18.25; Fri, 28 Oct 2022 08:18:51 -0700 (PDT) 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=@microchip.com header.s=mchp header.b=D6DhsgAF; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230491AbiJ1OqI (ORCPT + 99 others); Fri, 28 Oct 2022 10:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbiJ1OqE (ORCPT ); Fri, 28 Oct 2022 10:46:04 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F24C6F53FA; Fri, 28 Oct 2022 07:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1666968360; x=1698504360; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=imq47/+Noj3WKRGIKDUDp/xqp6YkLz1rcK39RDMgFmQ=; b=D6DhsgAF6VvI8PxZ53jePQlBp6LangDh5T1V2ntV4P0GvHHYCc7WSDJE UWdKBW0CBIKLejQ2RfWE+D7NCaelSX3nIhRh/MRExtzoeATFTRTH/Fsmv 1Fkug2QC7/GitfvVbBFDQo3Ks59TVFuZdReM9hNI4wdhtx0j7B2Tt5wRG hNbCukbT1uFvjgICQsLnsexhkLShS14vB+68geAaHkfit4AE+/FtAJDfE JSeq2o1+IVYoNmaWcei/1KRMavBsJnAuyNITYNCZ8KJBZFMqU8sx2K2/Y 8Glh3cCp7km+umTRD9MIHFu+CgIQkW8kAXjFuYy9gM+yg2PTgkTwWAK3A g==; X-IronPort-AV: E=Sophos;i="5.95,221,1661842800"; d="scan'208";a="184379656" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Oct 2022 07:45:53 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Fri, 28 Oct 2022 07:45:51 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 28 Oct 2022 07:45:47 -0700 From: Steen Hegelund To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: Steen Hegelund , , Randy Dunlap , "Casper Andersson" , Russell King , Wan Jiabing , "Nathan Huckleberry" , , , , "Daniel Machon" , Horatiu Vultur , Lars Povlsen Subject: [PATCH net-next v2 0/5] Extend TC key support for Sparx5 IS2 VCAP Date: Fri, 28 Oct 2022 16:45:35 +0200 Message-ID: <20221028144540.3344995-1-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham 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 This provides extended tc flower filter key support for the Sparx5 VCAP functionality. It builds on top of the initial IS2 VCAP support found in this series: https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/ Overview: ========= The added flower filter key (dissector) support is this: - ipv4_addr (sip and dip) - ipv6_addr (sip and dip) - control (IPv4 fragments) - portnum (tcp and udp port numbers) - basic (L3 and L4 protocol) - vlan (outer vlan tag info) - tcp (tcp flags) - ip (tos field) The IS2 VCAP supports classified VLAN information which amounts to the outer VLAN info in case of multiple tags. Functionality: ============== Before frames can match IS2 VCAP rules with e.g an IPv4 source address, the IS2 VCAPs keyset configuration must include keyset that contains a IPv4 source address and this must be configured for the lookup/port/traffic-type that you want to match on. The Sparx5 IS2 VCAP has the following traffic types: - Non-Ethernet frames - IPv4 Unicast frames - IPv4 Multicast frames - IPv6 Unicast frames - IPv6 Multicast frames - ARP frames So to cover IPv4 traffic the two IPv4 categories must be configured with a keyset that contains IPv4 address information such as the VCAP_KFS_IP4_TCP_UDP keyset. The IPv4 and IPv6 traffic types are configured with useful default keysets, in later series we will use the tc template functionality when we want to change these defaults. Delivery: ========= This is current plan for delivering the full VCAP feature set of Sparx5: Version History: ================ v2 Split one of the KUNIT tests into 3 tests to fix a kernel robot build warning. v1 Initial version Steen Hegelund (5): net: microchip: sparx5: Differentiate IPv4 and IPv6 traffic in keyset config net: microchip: sparx5: Adding more tc flower keys for the IS2 VCAP net: microchip: sparx5: Match keys in configured port keysets net: microchip: sparx5: Let VCAP API validate added key- and actionfields net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API .../microchip/sparx5/sparx5_tc_flower.c | 410 +++++++++++++++- .../microchip/sparx5/sparx5_vcap_impl.c | 168 ++++++- .../net/ethernet/microchip/vcap/vcap_api.c | 251 +++++++++- .../ethernet/microchip/vcap/vcap_api_client.h | 13 + .../ethernet/microchip/vcap/vcap_api_kunit.c | 447 ++++++++++++++++++ 5 files changed, 1256 insertions(+), 33 deletions(-) -- 2.38.1