From patchwork Thu Feb 24 18:54:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Szycik X-Patchwork-Id: 1597293 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=n1EzjSst; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K4MY31p67z9sGD for ; Fri, 25 Feb 2022 05:55:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0E91A400E0; Thu, 24 Feb 2022 18:55:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rvyns2TTvqYB; Thu, 24 Feb 2022 18:55:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id BDBEF4018A; Thu, 24 Feb 2022 18:55:13 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 101101BF321 for ; Thu, 24 Feb 2022 18:55:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 074E782A4F for ; Thu, 24 Feb 2022 18:55:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q6_T4404Kt3h for ; Thu, 24 Feb 2022 18:55:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp1.osuosl.org (Postfix) with ESMTPS id C7CB382A4E for ; Thu, 24 Feb 2022 18:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645728910; x=1677264910; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Jl9Nuy6eYMwpSob+m2uNdiexCkPRhSkr9+CZnwlWdXI=; b=n1EzjSstvpArr92lZTWpdeOdBk5H2v7xKXQMS23Mhxt9cCYKIsA9vP8I Y4ueglgMgzPPiBHVvQ3USttmLQbp2vF06qqX1Kj9lRZ5YVyxhTK4yzsN/ Z20ny6Sl/5XG+9I/8/iHt09Kqod5YlDzbpMqSSxeqBlwebOuBCeT2v4sV 3ph4bMqCZ2vtwt3yfvzWxu4e9VDtqSAyAXUHbHWpxUr8XJSx6TGirBa8V wHqV59iloUzetEaEhY9LeTP0Zx/CfJgPJBEQalsrT0Q1Ygd5ZUBFDRheA wXePHl+ozc8KwHRvdV/VuI0NR74q8zXvzkXCJulniBIC3CId9b1JgZqK5 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="338758297" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="338758297" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 10:55:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="628580873" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by FMSMGA003.fm.intel.com with ESMTP; 24 Feb 2022 10:55:06 -0800 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 21OIt5Yv018029; Thu, 24 Feb 2022 18:55:05 GMT From: Marcin Szycik To: netdev@vger.kernel.org Date: Thu, 24 Feb 2022 19:54:53 +0100 Message-Id: <20220224185500.18384-1-marcin.szycik@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH net-next v9 0/7] ice: GTP support in switchdev 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: jiri@resnulli.us, osmocom-net-gprs@lists.osmocom.org, laforge@gnumonks.org, intel-wired-lan@lists.osuosl.org, kuba@kernel.org, davem@davemloft.net, pablo@netfilter.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Add support for adding GTP-C and GTP-U filters in switchdev mode. To create a filter for GTP, create a GTP-type netdev with ip tool, enable hardware offload, add qdisc and add a filter in tc: ip link add $GTP0 type gtp role hsize ethtool -K $PF0 hw-tc-offload on tc qdisc add dev $GTP0 ingress tc filter add dev $GTP0 ingress prio 1 flower enc_key_id 1337 \ action mirred egress redirect dev $VF1_PR By default, a filter for GTP-U will be added. To add a filter for GTP-C, specify enc_dst_port = 2123, e.g.: tc filter add dev $GTP0 ingress prio 1 flower enc_key_id 1337 \ enc_dst_port 2123 action mirred egress redirect dev $VF1_PR Note: outer IPv6 offload is not supported yet. Note: GTP-U with no payload offload is not supported yet. ICE COMMS package is required to create a filter as it contains GTP profiles. Changes in iproute2 [1] are required to be able to add GTP netdev and use GTP-specific options (QFI and PDU type). [1] https://lore.kernel.org/netdev/20220211182902.11542-1-wojciech.drewek@intel.com/T --- v2: Add more CC v3: Fix mail thread, sorry for spam v4: Add GTP echo response in gtp module v5: Change patch order v6: Add GTP echo request in gtp module v7: Fix kernel-docs in ice v8: Remove handling of GTP Echo Response v9: Add sending of multicast message on GTP Echo Response, fix GTP-C dummy packet selection Marcin Szycik (1): ice: Support GTP-U and GTP-C offload in switchdev Michal Swiatkowski (1): ice: Fix FV offset searching Wojciech Drewek (5): gtp: Allow to create GTP device without FDs gtp: Implement GTP echo response gtp: Implement GTP echo request net/sched: Allow flower to match on GTP options gtp: Add support for checking GTP device type drivers/net/ethernet/intel/ice/ice.h | 1 + .../net/ethernet/intel/ice/ice_flex_pipe.c | 52 +- .../net/ethernet/intel/ice/ice_flex_pipe.h | 2 +- .../net/ethernet/intel/ice/ice_flex_type.h | 6 +- .../ethernet/intel/ice/ice_protocol_type.h | 19 + drivers/net/ethernet/intel/ice/ice_switch.c | 643 ++++++++++++++++-- drivers/net/ethernet/intel/ice/ice_switch.h | 9 + drivers/net/ethernet/intel/ice/ice_tc_lib.c | 105 ++- drivers/net/ethernet/intel/ice/ice_tc_lib.h | 3 + drivers/net/gtp.c | 549 +++++++++++++-- include/net/gtp.h | 42 ++ include/uapi/linux/gtp.h | 1 + include/uapi/linux/if_link.h | 2 + include/uapi/linux/if_tunnel.h | 4 +- include/uapi/linux/pkt_cls.h | 15 + net/sched/cls_flower.c | 116 ++++ 16 files changed, 1456 insertions(+), 113 deletions(-)