From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mail.toke.dk (Postfix) with ESMTPS id 34F89A07446 for ; Tue, 16 May 2023 18:18:00 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KIhcMan/ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684253879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pTbzb7Ep8RynUGNflCJEtG2qlbhJbczpgr8r4KMw/zg=; b=KIhcMan/oHG1x39ew9KLk+UZDzpHAiwQGmPRXuyV493APf27BI1BUCKk1eFB745tQYguJB A0zebgPwCVgD+XGDDYRPXKJsOCQ4ElOmwEE0mqZxBDVX1hnkOJFUEBnVuHX3ljaTiJg8x8 HrXLOvtbTNx/IzSO7SNuTUOM9+nWOVw= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-299-grpaB6wEOqesfpHIvE_CgA-1; Tue, 16 May 2023 12:17:57 -0400 X-MC-Unique: grpaB6wEOqesfpHIvE_CgA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-96a0ce9215bso829594866b.2 for ; Tue, 16 May 2023 09:17:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684253876; x=1686845876; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pTbzb7Ep8RynUGNflCJEtG2qlbhJbczpgr8r4KMw/zg=; b=H2g5k/QJ7nT6hvWWFLCciGwl01wTG+iciCBp8q9EiUExB1xglApBD8TRITZgIXwygm uytbLFXzv3zDtUsSt8MB+rkrsJKqPZ6yFtTooS6qj597qzVxBS8Eg1BFQOoHF5yG099o aZsi3G5GsT/b7+/KvOMcVkTSsvUBuDX9Syz/YdolEhYSJ81ZljDE/6lcxpvVf+kzwzP+ ltnnWNzE2MGf1LICh2bj/0WTKTklw7t0KNSQksvyM8uIXkoxUjkumDYuAMbu82OcjaQ2 yO8GnALLP7HR9TY7VKbFkFYGaLBhSEtjBt4D2SwG1Cok4CqDVwzw81kzuOajJhsGj1Ow P3UQ== X-Gm-Message-State: AC+VfDxyFZaavv3QTI24yVh3kKvUJnuFHlN4Zz5H4MMGg0YBlf6zgCop qdOMmOKEC/GX2f8Vd4klrooVRnBcqKlixDaZnyuS4unLYPg5jl4DykbfFwNO+DPnHtEsJmy0ez/ dS5oG6Y5DCpJ2G5kl25Fe X-Received: by 2002:a17:907:a4b:b0:958:514f:d88a with SMTP id be11-20020a1709070a4b00b00958514fd88amr31234515ejc.34.1684253876128; Tue, 16 May 2023 09:17:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5V2oSLqxxdSSdm1migvaEijLTSkJkHnpzZwu83PoVjaStqNRNRdE43yFnAIJq9NJklVz44Aw== X-Received: by 2002:a17:907:a4b:b0:958:514f:d88a with SMTP id be11-20020a1709070a4b00b00958514fd88amr31234473ejc.34.1684253875788; Tue, 16 May 2023 09:17:55 -0700 (PDT) Received: from [192.168.42.222] (194-45-78-10.static.kviknet.net. [194.45.78.10]) by smtp.gmail.com with ESMTPSA id mm10-20020a170906cc4a00b00960005e09a3sm11160343ejb.61.2023.05.16.09.17.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 May 2023 09:17:55 -0700 (PDT) From: Jesper Dangaard Brouer X-Google-Original-From: Jesper Dangaard Brouer Message-ID: <47d535b9-a42a-3d5b-1ddd-8f58766e826b@redhat.com> Date: Tue, 16 May 2023 18:17:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Stanislav Fomichev , Larysa Zaremba References: <20230512152607.992209-1-larysa.zaremba@intel.com> <20230512152607.992209-7-larysa.zaremba@intel.com> In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: URCHOQASTHVUIQDUXX4BNXKMEI62QSEQ X-Message-ID-Hash: URCHOQASTHVUIQDUXX4BNXKMEI62QSEQ X-MailFrom: jbrouer@redhat.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: brouer@redhat.com, bpf@vger.kernel.org, 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 , 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 X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH RESEND bpf-next 06/15] ice: Support HW timestamp hint List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 12/05/2023 20.19, Stanislav Fomichev wrote: >> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c >> index 2515f5f7a2b6..e9589cadf811 100644 >> --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c >> +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c >> @@ -537,3 +537,25 @@ void ice_finalize_xdp_rx(struct ice_tx_ring *xdp_ring, unsigned int xdp_res, >> spin_unlock(&xdp_ring->tx_lock); >> } >> } >> + >> +/** >> + * ice_xdp_rx_hw_ts - HW timestamp XDP hint handler >> + * @ctx: XDP buff pointer >> + * @ts_ns: destination address >> + * >> + * Copy HW timestamp (if available) to the destination address. >> + */ >> +static int ice_xdp_rx_hw_ts(const struct xdp_md *ctx, u64 *ts_ns) >> +{ >> + const struct ice_xdp_buff *xdp_ext = (void *)ctx; >> + >> + if (!ice_ptp_copy_rx_hwts_from_desc(xdp_ext->rx_ring, >> + xdp_ext->eop_desc, ts_ns)) >> + return -EOPNOTSUPP; > Per Jesper's recent update, should this be ENODATA? > Yes, please :-) https://git.kernel.org/torvalds/c/915efd8a446b ("xdp: bpf_xdp_metadata use EOPNOTSUPP for no driver support") --Jesper