Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10493359rwr; Fri, 12 May 2023 08:50:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4nRfjPYifhwe5PRwnT3h6IhFt1N5umWt/gLRxV7YzmORGCsToftr7SMB3JTq4l1djbDHNo X-Received: by 2002:a05:6a21:920b:b0:f0:3e78:715b with SMTP id tl11-20020a056a21920b00b000f03e78715bmr25998345pzb.40.1683906639531; Fri, 12 May 2023 08:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683906639; cv=none; d=google.com; s=arc-20160816; b=vIuUHKok9u1C4BUMsQu/jO2yIUyhJsLSmprkLk1MbVKn5vvOq8PClvIoc1IhVsgzH8 JhRCEupyB7q3cXM6jiAh2E/eT2WVHQ2CW9VtfygqyrbgAn5bsYycJcBzd03A/g0b7gTR tbf9mZzimQLYsDS4easpkzCRBPQZB+dckFICTZsK+IaoPFOvtT+YGazP8+m0j/QhV8Xi 5Wv0tIOK/p4gpJLZAnmVvyCcOpYR+8eYFC4e7k79OlvtcPtmatXteob4k4v8DGmnbMFa nmj6JyD+as19+7CJ2zyQLXGMykh+q4wH2by7UzPMeru6UWuABkGXSxQ0Gai6C/Qe5Gf1 cEOg== 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=g0fR47CiqQtxZNncsSyPfFngy2BsPDjJRbv3PUPoMapVZoYScubRrMNf1h7PexepAx GoCJoJr9rhHXTVEXDa6qp4r7aKkO7meJVwq6Mag+xkpMbgHBBEkz4d6U5KKgonA+vPOl KFiRX0VfqNcdP/FxGCLiIyGOQNCLNuFQmu5jxJoPbt81nD4nMr7cru/KFPCPZxE5G1Ox yGGCUvhSEzcnrmRDMtXWhqWN6aLcyAHgIAPn30C+rwNx1Uu6vjw9ZJfuWer9vqHB1MVu 1xe5TZS7Dzn5gfYuzMHnPaKdMFyew9Ch58XvjOUr6NiXup7tLVlx+6yhFFmpWWMNvdFd AIAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nNUNzJ7n; 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 q16-20020aa78430000000b006436dfd441dsi10289614pfn.356.2023.05.12.08.50.25; Fri, 12 May 2023 08:50:39 -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=nNUNzJ7n; 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 S241673AbjELP2e (ORCPT + 99 others); Fri, 12 May 2023 11:28:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231637AbjELP2d (ORCPT ); Fri, 12 May 2023 11:28:33 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30D4812A; Fri, 12 May 2023 08:28:32 -0700 (PDT) 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-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="349653187" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="349653187" 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 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 RESEND bpf-next 00/15] new kfunc XDP hints and ice implementation 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 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