Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10460263rwr; Fri, 12 May 2023 08:24:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CziTK39Cg7fWybKRno8OwJIDQxKuhuVkyIPtIIY+U8Vmm3jjO9QQuYUoqxtivM8bInZWC X-Received: by 2002:a05:6a20:9382:b0:104:d7e6:a8f2 with SMTP id x2-20020a056a20938200b00104d7e6a8f2mr702863pzh.3.1683905064048; Fri, 12 May 2023 08:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683905064; cv=none; d=google.com; s=arc-20160816; b=VGAR+dVP521Zz/29a9IB1x3AuXx3tkXB6I/o6UX33Dv/GFC1s9Ehqauvjrb2sbcYfO NSDe6nm2OTEA5x3YrqMLtF2VyrvogvC41BQibzeirHAmOht002AyscR2DzCf10xtqKoK joxinrGvGpujnSTBlFBtKeNqIhxYFmVGdzKgfxrDhlq8NzDbK/P0ra3sgv1m/escEqjM S+5mh5zRwU2HeiR2LuLloTn4BII65X46LqoKLaMQaOh6c4xbONks7+h79wZ6VPHiVYnD cymVK/ldklgDKKIULVpLQ6PvCf26BFgSzEVGD0fG9svUJ0ZLDUmAdVS/ZjjfnWqj3XRk YUwg== 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=ax1C/ll2YzFcaj6q31gLlC1mquKmV07Q+4neH/uRlgc=; b=eO+VwWcZ8ZzZv01SYCUoIMjGTqNGX7diKNBmQ1rcgb8sHQyZGyUlhi7LUewpWSpQ/z 3Dku2EF8l2frp4AAZP92XIuZZnQSXvMOYhbM1dwYA/gXeny2q2F2UablpF1bxyUEZASH 54cd/2X8ZiF18IckKiVlK9gpAndhodAyOs56YtgQIQrep/9U3SR+bF0FAkNTTu8tiBHg P5jfehQPbnbzImX9OBAP2R+Yb3HpV+mIvbq2ZvzXX0A8NQVsojK6shMQjSord8rt3tFW 1BccJMV5R0FrIqZfM0Tdudv7PpWWxdUawPGf8YI4ZCagHnLZA2xb0ZDfPCOhnFM/HiV1 6SFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WFEy9yqr; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l26-20020a63701a000000b0051b3ea27f98si10183260pgc.629.2023.05.12.08.24.08; Fri, 12 May 2023 08:24:24 -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=@intel.com header.s=Intel header.b=WFEy9yqr; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241765AbjELPTo (ORCPT + 99 others); Fri, 12 May 2023 11:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241600AbjELPTm (ORCPT ); Fri, 12 May 2023 11:19:42 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 779E4C0; Fri, 12 May 2023 08:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683904781; x=1715440781; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=AEHmn3N8eoQi8YuZE7vwKcyyiqTTaYlvbYO6EcoCop8=; b=WFEy9yqrQpncjAqwMNQSXsPIwGfRwiedwaMMxFtVwEfig5IDJJztqcTy vXMvfxVbU5xAKRqRkk+eU3e/aS1nRWN3tceYuL5k3EHFQ2DDPsjJRdWHI d87xOSz8hoslAfBadfOwpCUomf0A83MSoV3jYwzAYzx/GZcu3FopakFvu A42hp5XSl6qrb5p6bA4gJlAdlM9g1MQu7uyPEGb/kjYzJw16mT+ho5MS3 QOMOzVqM5MMzVHn4QlL2DMbtn67LvrB9leC4LqbqnnKyH/5jTRFw+gAK6 TnYP7cDvtNSvT4yx9ueNd55mDZCWcCXyzXq9odKKGXrp/yN9hyBiPs5Pd A==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="349651128" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="349651128" 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:19:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="1030118846" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="1030118846" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmsmga005.fm.intel.com with ESMTP; 12 May 2023 08:19:35 -0700 Received: from lincoln.igk.intel.com (lincoln.igk.intel.com [10.102.21.235]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 2306C35FB7; Fri, 12 May 2023 16:19:34 +0100 (IST) From: Larysa Zaremba To: bpf@vger.kernel.org Cc: Larysa Zaremba , Stanislav Fomichev , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Jakub Kicinski , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Jiri Olsa , Jesse Brandeburg , Tony Nguyen , Anatoly Burakov , Jesper Dangaard Brouer , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next 00/15] new kfunc XDP hints and ice implementation Date: Fri, 12 May 2023 17:16:24 +0200 Message-Id: <20230512151639.992033-1-larysa.zaremba@intel.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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(-) -- 2.35.3