From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mail.toke.dk (Postfix) with ESMTPS id C35699B40A4 for ; Mon, 7 Nov 2022 18:32:22 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=X4IxC2bn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667842348; x=1699378348; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N1bnCz4fk3zMX9lzTCpsSxKGgJYz7Wz+oYj3aAcVq6I=; b=X4IxC2bn9F4IV3Y9/mE3SW9j/OeS5KAwikiIiFEiW9FkOgPs8rAETxHz 7kseYYPPx8hSRwDeSKay5gHZeakRWB7sN9kGswDft1L6wBfqiYvm2y/B4 I2RAjGZYbzi1wFofTDojedtIihpr1R7rsWmebbOaQUVLXlEVHsMdrWgD3 +uUPM3cGMMCbweBAFm681sD91j0FoDiqG6+luQ+TSircWb6nCvwtFfGZO XmQoFK0Dwu9TSQ5RzduhT1fJmXKTy4a1Aac1X6JowYKqsBLiOISfmZehy PPtJXwd5rDPlOikQ2tgmdOr7hlNDLw5TrhreTXwwqd5R7hYtJeqBODI9s w==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="372607972" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="372607972" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 09:14:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="761167231" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="761167231" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga004.jf.intel.com with ESMTP; 07 Nov 2022 09:14:45 -0800 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 2A7HEhNj031969; Mon, 7 Nov 2022 17:14:43 GMT From: Alexander Lobakin To: Stanislav Fomichev Date: Mon, 7 Nov 2022 18:11:30 +0100 Message-Id: <20221107171130.559191-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: <20221104032532.1615099-1-sdf@google.com> <20221104032532.1615099-11-sdf@google.com> <20221104143547.3575615-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Message-ID-Hash: XEUFNJUON57POHRTHVG2VFDSHI2X437F X-Message-ID-Hash: XEUFNJUON57POHRTHVG2VFDSHI2X437F X-MailFrom: alexandr.lobakin@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alexander Lobakin , bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org X-Mailman-Version: 3.3.5 Precedence: list Subject: [xdp-hints] Re: [RFC bpf-next v2 10/14] ice: Support rx timestamp metadata for xdp List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Stanislav Fomichev Date: Fri, 4 Nov 2022 11:21:47 -0700 > On Fri, Nov 4, 2022 at 7:38 AM Alexander Lobakin > wrote: > > > > From: Stanislav Fomichev > > Date: Thu,3 Nov 2022 20:25:28 -0700 [...] > > Hey, > > > > FYI, our team wants to write a follow-up patch with ice support > > added, not like a draft, more of a mature code. I'm thinking of > > calling ice C function which would process Rx descriptors from > > that BPF code from the unrolling callback -- otherwise, > > implementing a couple hundred C code lines from ice_txrx_lib.c > > would be a bit too much :D > > Sounds good! I would gladly drop all/most of the driver changes for > the non-rfc posting :-) > I'll probably have a mlx4 one because there is a chance I might find > HW, but the rest I'll drop most likely. > (they are here to show how the driver changes might look like, hence > compile-tested only) > > Btw, does it make sense to have some small xsk selftest binary that > can be used to test the metadata with the real device? > The one I'm having right now depends on veth/namespaces; having a > similar one for the real hardware to qualify it sounds useful? > Something simple that sets up af_xdp for all queues, divers some > traffic, and exposes to the userspace consumer all the info about > frame metadata... > Or maybe there is something I can reuse already? There's XSk selftest already and recently Maciej added support for executing it on a physical device (via `-i ` cmdline arg)[0]. I guess the most optimal solution is to expand it to cover metadata cases as it has some sort of useful helper functions / infra? In the set I posted in June, I simply expanded xdp_meta selftest, but there weren't any XSk bits, so I don't think it's a way to go. > > > > > + } else if (func_id == xdp_metadata_kfunc_id(XDP_METADATA_KFUNC_RX_TIMESTAMP_SUPPORTED)) { > > > + /* return true; */ > > > + bpf_patch_append(patch, BPF_MOV64_IMM(BPF_REG_0, 1)); > > > + } else if (func_id == xdp_metadata_kfunc_id(XDP_METADATA_KFUNC_RX_TIMESTAMP)) { > > > > [...] > > > > > -- > > > 2.38.1.431.g37b22c650d-goog > > > > Thanks, > > Olek [0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a693ff3ed5610a07b1b0dd831d10f516e13cf6c6 Thank, Olek