From patchwork Fri May 12 15:25:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larysa Zaremba X-Patchwork-Id: 1780684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=b48P05gU; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QHt2Y3xPpz20KD for ; Sat, 13 May 2023 01:28:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B82F04095A; Fri, 12 May 2023 15:28:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B82F04095A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1683905315; bh=HM0UiDJGjbwR5d5Qgxrn79EikQ2dwyEINKxzWOgZ/dQ=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=b48P05gUCb8pWNG2iEYDq1qdihWTm0CMHBNORPHMkzrEhpfeqBW9Yhgd0JHQ4trK5 3FlMeo2cbIU3oElVk5qp7MFNQdWOvU6ku2pGKa0ShhqBxRbgdogxMUvsRYDMoZW0Su EtTuLyH+R2rzq14ZCfP1D6bDJOsi8TW8GDhf0pNVryp1IzCQmAmRDjssURUGAUiWjd uuYCQzM9KBXToVtkwldeglwEq2C/7pUtbGu2cfKrDWw+hpKZmk9e9rCMyl9LiffJp+ Wgkqo44nsog7no65U+nj/9Y45XzkQ1ro4oTx20fgM2b8a50vdIXlerNYPCK/Ojg3r4 FKKfx25W1EiHA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7trHC9PJmbUv; Fri, 12 May 2023 15:28:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 7EC634095C; Fri, 12 May 2023 15:28:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7EC634095C 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 30C1F1BF2CB for ; Fri, 12 May 2023 15:28:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1693A81327 for ; Fri, 12 May 2023 15:28:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1693A81327 X-Virus-Scanned: amavisd-new at osuosl.org 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 VkrlBMtGA2Xw for ; Fri, 12 May 2023 15:28:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6E84081312 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by smtp1.osuosl.org (Postfix) with ESMTPS id 6E84081312 for ; Fri, 12 May 2023 15:28:32 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="349653190" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="349653190" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 08:28:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="1030124377" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="1030124377" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmsmga005.fm.intel.com with ESMTP; 12 May 2023 08:28:27 -0700 Received: from lincoln.igk.intel.com (lincoln.igk.intel.com [10.102.21.235]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 4277835FB7; Fri, 12 May 2023 16:28:25 +0100 (IST) From: Larysa Zaremba To: bpf@vger.kernel.org Date: Fri, 12 May 2023 17:25:52 +0200 Message-Id: <20230512152607.992209-1-larysa.zaremba@intel.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 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=1683905312; x=1715441312; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=AEHmn3N8eoQi8YuZE7vwKcyyiqTTaYlvbYO6EcoCop8=; b=nNUNzJ7nr5CdvAzQDnBtw2Tb9BHPQ4HTE7oWft9oXHVMHptO+/98sXb6 XNskRFcfeMlQy8cZgnJNyci4QiSkYEA9IBwN9XN+Jdnuz2wbUiXQGMpIK HovC9JMoVT+ffaWActPWv7B8mxFscU6vvXbbqi+0qNfsYcnwme4qxceVM 8iNOdrTzChIvooNHhOGcMiBa8yVAxOmXtN4s8z6xEy8c7JDYIJGTjQZ4b oLgDPThYtX2IOqrFwB38EGd/bzw9XNCA0OFZk62Ur0GC13qlJluqrp4hw FANT0qaHmmJ1BxKynIijNlrb9mc96yqaUnoOytjTEF8o5AZc7phSPt47a Q==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nNUNzJ7n Subject: [Intel-wired-lan] [PATCH RESEND bpf-next 00/15] new kfunc XDP hints and ice implementation 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: Anatoly Burakov , Alexei Starovoitov , Andrii Nakryiko , Song Liu , Tony Nguyen , Stanislav Fomichev , Maryam Tahhan , xdp-hints@xdp-project.net, Daniel Borkmann , John Fastabend , Jesse Brandeburg , intel-wired-lan@lists.osuosl.org, Jesper Dangaard Brouer , Yonghong Song , Larysa Zaremba , KP Singh , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Olsa , Martin KaFai Lau Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" This series introduces XDP hints support into ice driver and adds new kfunc hints that utilize hardware capabilities. - patches 01-04 refactors driver descriptor to skb fields processing code, making it more reusable without changing any behavior. - patches 05-08 add support add support for existing hints (timestamp and hash) in ice driver. - patches 09-12 introduce new kfunc hints, namely 2 VLAN tag hints (ctag & stag separately) and "checksum level", which is basically a CHECKSUM_UNNECESSARY indicator. Then those hints are implemented in ice driver. - patches 13-15 adjust xdp_hw_metadata to account for new hints. - in particular, patch 14 lifts the limitation on data_meta size to be 32 or lower, because all the information that needs to be passed into AF_XDP from XDP in xdp_hw_metadata no longer fits into 32 bytes. Aleksander Lobakin (1): net, xdp: allow metadata > 32 Larysa Zaremba (14): ice: make RX hash reading code more reusable ice: make RX HW timestamp reading code more reusable ice: make RX checksum checking code more reusable ice: Make ptype internal to descriptor info processing ice: Introduce ice_xdp_buff ice: Support HW timestamp hint ice: Support RX hash XDP hint ice: Support XDP hints in AF_XDP ZC mode xdp: Add VLAN tag hint ice: Implement VLAN tag hint xdp: Add checksum level hint ice: Implement checksum level hint selftests/bpf: Allow VLAN packets in xdp_hw_metadata selftests/bpf: Add flags and new hints to xdp_hw_metadata Documentation/networking/xdp-rx-metadata.rst | 14 +- drivers/net/ethernet/intel/ice/ice.h | 2 + .../net/ethernet/intel/ice/ice_lan_tx_rx.h | 412 +++++++++--------- drivers/net/ethernet/intel/ice/ice_main.c | 1 + drivers/net/ethernet/intel/ice/ice_ptp.c | 23 +- drivers/net/ethernet/intel/ice/ice_ptp.h | 18 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 13 +- drivers/net/ethernet/intel/ice/ice_txrx.h | 23 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 311 +++++++++++-- drivers/net/ethernet/intel/ice/ice_txrx_lib.h | 13 +- drivers/net/ethernet/intel/ice/ice_xsk.c | 16 +- include/linux/netdevice.h | 3 + include/linux/skbuff.h | 13 +- include/net/xdp.h | 16 +- kernel/bpf/offload.c | 6 + net/core/xdp.c | 36 ++ .../selftests/bpf/progs/xdp_hw_metadata.c | 49 ++- tools/testing/selftests/bpf/xdp_hw_metadata.c | 29 +- tools/testing/selftests/bpf/xdp_metadata.h | 36 +- 19 files changed, 738 insertions(+), 296 deletions(-)