From patchwork Fri Jul 15 13:04:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Szycik X-Patchwork-Id: 12919277 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1CF0C43334 for ; Fri, 15 Jul 2022 13:05:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232344AbiGONFE (ORCPT ); Fri, 15 Jul 2022 09:05:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbiGONFD (ORCPT ); Fri, 15 Jul 2022 09:05:03 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A3B73FA3C for ; Fri, 15 Jul 2022 06:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657890302; x=1689426302; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5vNuiax7PnFW6vFk7c1tktuDD1nUBAqUy/yn8ZhC6bI=; b=S1Vp2WxK14R7czB71rp2TbBol46q4rl0ML4YsNVaLptTPY/hIQryktAF eSZZm1t8j7JK/DNhMES+u/w8qsUI5UDKtbJmAWtaIz9B+jFDDtV0i9K7E 21xAQhS89Wdm/u30/vsfGqL0eMrrG1uN3W5yDdn/nzpZhGXupuk0aXYkb /qk2Fq3ut/eJQ3ZlHoSiONC6kvjwkrWu/jotPtU7soLwOvMWoS3QlkHDd pn0eGsZdnmcdMMJH2aEhfCypk4ySsJNG02aWL1tNKMvPQXwjNBoG1XKAj 0kvdXJfZHpLMHTTe40kKbjeiIx9zoZCiJ5sLlw8jA7b7c/Boppe1RfcIv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="266202815" X-IronPort-AV: E=Sophos;i="5.92,274,1650956400"; d="scan'208";a="266202815" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2022 06:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,274,1650956400"; d="scan'208";a="600489618" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga007.fm.intel.com with ESMTP; 15 Jul 2022 06:04:57 -0700 Received: from rozewie.igk.intel.com (rozewie.igk.intel.com [10.211.8.69]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 26FD4tXK013793; Fri, 15 Jul 2022 14:04:55 +0100 From: Marcin Szycik To: netdev@vger.kernel.org Cc: anthony.l.nguyen@intel.com, davem@davemloft.net, xiyou.wangcong@gmail.com, jesse.brandeburg@intel.com, gustavoars@kernel.org, baowen.zheng@corigine.com, boris.sukholitko@broadcom.com, edumazet@google.com, kuba@kernel.org, jhs@mojatatu.com, jiri@resnulli.us, kurt@linutronix.de, pablo@netfilter.org, pabeni@redhat.com, paulb@nvidia.com, simon.horman@corigine.com, komachi.yoshiki@gmail.com, zhangkaiheb@126.com, intel-wired-lan@lists.osuosl.org, michal.swiatkowski@linux.intel.com, wojciech.drewek@intel.com, alexandr.lobakin@intel.com, gnault@redhat.com, mostrows@speakeasy.net, paulus@samba.org, Marcin Szycik Subject: [RFC PATCH net-next v5 0/4] ice: PPPoE offload support Date: Fri, 15 Jul 2022 15:04:26 +0200 Message-Id: <20220715130430.160029-1-marcin.szycik@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Add support for dissecting PPPoE and PPP-specific fields in flow dissector: PPPoE session id and PPP protocol type. Add support for those fields in tc-flower and support offloading PPPoE. Finally, add support for hardware offload of PPPoE packets in switchdev mode in ice driver. Example filter: tc filter add dev $PF1 ingress protocol ppp_ses prio 1 flower pppoe_sid \ 1234 ppp_proto ip skip_sw action mirred egress redirect dev $VF1_PR Changes in iproute2 are required to use the new fields (will be submitted soon). ICE COMMS DDP package is required to create a filter in ice. v5: fix endianness when processing compressed protocols v4: * PPPoE header validation * added MPLS support * added support for compressed PPP protocol field * flow_dissector_key_pppoe::session_id stored in __be16 * new field: flow_dissector_key_pppoe::type * always add an ethtype lookup if PPP/PPPoE options are provided (to prevent setting incorrect ethtype) * rebase v3: * revert byte order changes in is_ppp_proto_supported from previous version * add kernel-doc for is_ppp_proto_supported * add more CC v2: cosmetic changes Marcin Szycik (1): ice: Add support for PPPoE hardware offload Wojciech Drewek (3): flow_dissector: Add PPPoE dissectors net/sched: flower: Add PPPoE filter flow_offload: Introduce flow_match_pppoe drivers/net/ethernet/intel/ice/ice.h | 1 + .../net/ethernet/intel/ice/ice_flex_pipe.c | 5 +- .../ethernet/intel/ice/ice_protocol_type.h | 11 ++ drivers/net/ethernet/intel/ice/ice_switch.c | 165 ++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_tc_lib.c | 71 +++++++- drivers/net/ethernet/intel/ice/ice_tc_lib.h | 8 + include/net/flow_dissector.h | 13 ++ include/net/flow_offload.h | 6 + include/uapi/linux/pkt_cls.h | 3 + net/core/flow_dissector.c | 85 ++++++++- net/core/flow_offload.c | 7 + net/sched/cls_flower.c | 61 +++++++ 12 files changed, 427 insertions(+), 9 deletions(-)