Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99262C25B78 for ; Wed, 22 May 2024 19:36:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3983E82175; Wed, 22 May 2024 19:36:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Zw5JBFENrkE2; Wed, 22 May 2024 19:36:30 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 17DEB8216D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1716406590; bh=MSgFtnOO1GjPP37/lR6asDAxpZVUcIfcvHlVzRTCS6U=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=DQyxFlaHfW0eG9MxEBeSu95IA0IcPz14FLqSawnly09As6LH6W2lNmEV3Va5Gw7hb RxMq0dVy78dN4+Zk9A5iwX4TXzBUemt48OYQCqv9I2QozApTOLxZiDoNbevraIB9mk iGj6Ui+lqBsrS1qyoPTK2DR5JEMImCxUA5WWd4KlU0Gq0Z8Ew7xElvJQ91+txyZyPP w37Pw+dnZIyT+Cg7hgwXXbHJsQGvQTPGAMU1c8THx1P9WSjmW0NmUGNosFZFfg3SJg qZObuBsduYkfGxE3BQCo1WRncsdGoCvqxV8cNHTKV1xQiFiyGBKo50boWVlcqWDUvD q2JblqMuC/DVw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 17DEB8216D; Wed, 22 May 2024 19:36:30 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 406131C5EE4 for ; Wed, 22 May 2024 19:36:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2970A406C4 for ; Wed, 22 May 2024 19:36:28 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ghRd-5w3mpD7 for ; Wed, 22 May 2024 19:36:26 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.11; helo=mgamail.intel.com; envelope-from=ahmed.zaki@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 263BC406C1 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 263BC406C1 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by smtp4.osuosl.org (Postfix) with ESMTPS id 263BC406C1 for ; Wed, 22 May 2024 19:36:25 +0000 (UTC) X-CSE-ConnectionGUID: 0uebZWj0Q/+IbiZftMhrYw== X-CSE-MsgGUID: A03uMSwARzCU0AdGetpI3Q== X-IronPort-AV: E=McAfee;i="6600,9927,11080"; a="23256249" X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208";a="23256249" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 12:36:24 -0700 X-CSE-ConnectionGUID: 388mn/TKRoW1Gx1QCMS7gg== X-CSE-MsgGUID: XxDEZMg/QPiYuG/0itfcpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208";a="33254150" Received: from spandruv-desk1.amr.corp.intel.com (HELO azaki-desk1.intel.com) ([10.125.109.214]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 12:36:22 -0700 From: Ahmed Zaki To: intel-wired-lan@lists.osuosl.org Date: Wed, 22 May 2024 13:35:49 -0600 Message-ID: <20240522193602.164331-1-ahmed.zaki@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716406586; x=1747942586; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=26ypwy57eOHxl+wHW1JMRPim2BLWZhQrRXAXKu7JdqM=; b=HUkBXMug7JZM2NKkam02cH0CktsKeEsmmbDQYnaU6IGDQAJfOPucL07K R0RoD+dI01cjw/OzMcEJfByHFzWsVre8oSfrfqdoSzcBEW/h+uPUVCmDj +aESzdz3iF53E4ehXmXT1OSbsAB2y+zVI8dPq4gtjP2m/VFxJ872JGsm/ AqIyXQ8iWxekwuy66XNwek+X7mQuLlbG5j8JIUSfmlqvrH0VoNvcfKI// NjIWdZxH+DMrwVLmHG2upkHt+Bn6Rk5Yj6OaWIPuzf3M9aVF7JD5mabTQ pQWp/2ntP0Sn3Q3siNpmi6DYfRKg6Tj4DNonS64U1W6LCvs+X2C24QBmu w==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HUkBXMug Subject: [Intel-wired-lan] [PATCH iwl-next 00/13] ice: iavf: add support for TC U32 filters on VFs X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmed Zaki Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" The IntelĀ® Ethernet 800 Series is designed with a pipeline that has an on-chip programmable capability called Dynamic Device Personalization (DDP). A DDP package is loaded by the driver during probe time. The DDP package programs functionality in both the parser and switching blocks in the pipeline, allowing dynamic support for new and existing protocols. Once the pipeline is configured, the driver can identify the protocol and apply any HW action in different stages, for example, direct packets to desired hardware queues (flow director), queue groups or drop. Patches 1-8 introduce a DDP package parser API that enables different pipeline stages in the driver to learn the HW parser capabilities from the DDP package that is downloaded to HW. The parser library takes raw packet patterns and masks (in binary) indicating the packet protocol fields to be matched and generates the final HW profiles that can be applied at the required stage. With this API, raw flow filtering for FDIR or RSS could be done on new protocols or headers without any driver or Kernel updates (only need to update the DDP package). These patches were submitted before [1] but were not accepted mainly due to lack of a user. Patches 9-11 extend the virtchnl support to allow the VF to request raw flow director filters. Upon receiving the raw FDIR filter request, the PF driver allocates and runs a parser lib instance and generates the hardware profile definitions required to program the FDIR stage. These were also submitted before [2]. Finally, patches 12 and 13 add TC U32 filter support to the iavf driver. Using the parser API, the ice driver runs the raw patterns sent by the user and then adds a new profile to the FDIR stage associated with the VF's VSI. Refer to examples in patch 13 commit message. [1]: Link: https://lore.kernel.org/netdev/20230904021455.3944605-1-junfeng.guo@intel.com/ [2]: Link: https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20230814/036333.html Ahmed Zaki (2): iavf: refactor add/del FDIR filters iavf: add support for offloading tc U32 cls filters Junfeng Guo (11): ice: add parser create and destroy skeleton ice: parse and init various DDP parser sections ice: add debugging functions for the parser sections ice: add parser internal helper functions ice: add parser execution main loop ice: support turning on/off the parser's double vlan mode ice: add UDP tunnels support to the parser ice: add API for parser profile initialization virtchnl: support raw packet in protocol header ice: add method to disable FDIR SWAP option ice: enable FDIR filters from raw binary patterns for VFs drivers/net/ethernet/intel/iavf/iavf.h | 30 + .../net/ethernet/intel/iavf/iavf_ethtool.c | 59 +- drivers/net/ethernet/intel/iavf/iavf_fdir.c | 85 +- drivers/net/ethernet/intel/iavf/iavf_fdir.h | 13 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 148 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 25 +- drivers/net/ethernet/intel/ice/Makefile | 2 + drivers/net/ethernet/intel/ice/ice_common.h | 1 + drivers/net/ethernet/intel/ice/ice_ddp.c | 10 +- drivers/net/ethernet/intel/ice/ice_ddp.h | 13 + .../net/ethernet/intel/ice/ice_flex_pipe.c | 96 +- .../net/ethernet/intel/ice/ice_flex_pipe.h | 7 +- drivers/net/ethernet/intel/ice/ice_flow.c | 106 +- drivers/net/ethernet/intel/ice/ice_flow.h | 4 + drivers/net/ethernet/intel/ice/ice_parser.c | 2389 +++++++++++++++++ drivers/net/ethernet/intel/ice/ice_parser.h | 540 ++++ .../net/ethernet/intel/ice/ice_parser_rt.c | 860 ++++++ drivers/net/ethernet/intel/ice/ice_type.h | 1 + drivers/net/ethernet/intel/ice/ice_vf_lib.c | 2 +- drivers/net/ethernet/intel/ice/ice_vf_lib.h | 8 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 6 +- .../ethernet/intel/ice/ice_virtchnl_fdir.c | 400 ++- include/linux/avf/virtchnl.h | 13 +- 23 files changed, 4726 insertions(+), 92 deletions(-) create mode 100644 drivers/net/ethernet/intel/ice/ice_parser.c create mode 100644 drivers/net/ethernet/intel/ice/ice_parser.h create mode 100644 drivers/net/ethernet/intel/ice/ice_parser_rt.c -- 2.43.0