Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp937578rwi; Mon, 31 Oct 2022 09:14:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zbgy1r6m2D13f5xmGVLwno8cYCOLiGutj/HZe9xPTMVEoPb6ZOd1bMa/Ibjasv6a6tLW2 X-Received: by 2002:a63:d202:0:b0:46f:930:ea56 with SMTP id a2-20020a63d202000000b0046f0930ea56mr13603477pgg.275.1667232859759; Mon, 31 Oct 2022 09:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667232859; cv=none; d=google.com; s=arc-20160816; b=cuxV2KKzrpIdp+kNoXwx1Sl31knQhkkLF8f8LxQJCiw8lwVIkv2nSLD7ipWn6sckHk 95j4gJaIGCfaJxgBKD8Ye7CQEczDLR8tiiA9rbuCbSGnZUnDnC0NAVvfemOGTuAM12ws c1kbnurqWeFrJKYVgL+vKVDmPeAnEWUWafRAuLkIlNMp35t5Eg/hV9zaFHXkjvcfmWEE uj6/ynAEC4yHmGxH5iQFQIQJT3liUucSINXC+3VtuSrY15elPCVDpSTYB6Jsmx0+FtRW z3aVARHxr7TvYfXWUT898IZCqsRE+G0kOQgbii8SGmYSLe3uGpixRTXkkBPoAzIvBmT+ UbvQ== 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=Awd9W40x/cNwZmvcK4harphUnhb0ap/oDejlE8Zszdc=; b=ihLZkE6HzvWCAEpnpckzgPHZEiLmlenysnCUS2MnQ22qHyBn3rDAmz4zgX6rd759QK HD7xygnvgVi7i5RBkikkz7FCnSlH1x1NinKACy5y6D0E2MZG+EJJqfOh3VY9aGPC3req a1QFxwUlYssxSF9QNQmzKAlT6j8jdQVzqmyVn2rhBLL86UNNcSDMuZgILoudeAN6ZC/Q ZoqnNNpqIHdOblbcy2zHvk1zCtMEm+n8uzoPsG2FIdv995OrFLa+xdyGRj7z/yVHH3WW p6OqziutaTm8A4/gcPcS0HdN6p31/mv+ZokNsVPitoPtOWsCZPwh6607HicIOWa8lRaP WZnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=1KGmHtGU; 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 j185-20020a638bc2000000b0046f42e65a9dsi9162294pge.10.2022.10.31.09.14.05; Mon, 31 Oct 2022 09:14:19 -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=1KGmHtGU; 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 S231754AbiJaP4X (ORCPT + 98 others); Mon, 31 Oct 2022 11:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231768AbiJaP4S (ORCPT ); Mon, 31 Oct 2022 11:56:18 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF1C120AD; Mon, 31 Oct 2022 08:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1667231775; x=1698767775; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=80f4HZVTfE0Mk23Sb6KLpI02M8VOwh1pWJXydvd9DPE=; b=1KGmHtGUsKZHB4n+ihhZRXWZZ+ajRZNp1Z9Ufx4JHPkAnrXM+iIWDaKK 8SPvJ9o1IPxW4APyw2+NpxtMAV1KUqJlW4hKGcmpUNsiqwrBixJq5482s wvrDUYQs0iWR2T6kHlfEGX1AvMtfNFDz7fKWo7fqyaMvzVpeJTw+ZpdjW 9JZCinAFmxJVo3qvORTuU1+1mNUBpynlXPpVn7hDgj3Fkpa6kT0WeifdR R/+3eXJkWaAnqacU+JpcZPUorUv23C3cyzWygCvM9pwr7gT9xHEJoIf+U du4f1Y0CTQ2LzX3yQ0GSs1xxmCwbGWU7SY/UjgP1N1DaKNrkz3U4Hbdjg A==; X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="197768443" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 31 Oct 2022 08:56:14 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Mon, 31 Oct 2022 08:56:14 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Mon, 31 Oct 2022 08:56:10 -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 v3 0/5] Extend TC key support for Sparx5 IS2 VCAP Date: Mon, 31 Oct 2022 16:56:02 +0100 Message-ID: <20221031155607.3615381-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=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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: ================ v3 Add some more details to the explanation in the commit message about support for MAC_ETYPE keysets and "protocol all" as well as the classified VLAN information. This is done to help testing the feature. No implementation changes in this version. 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