Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp939007rwd; Tue, 16 May 2023 09:30:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4az72oIBZOZbiF6oY1/x2Rsbp+MuAbOa5EYb0JA64elJSYuavOhVsx8glY4g75lw+EilGB X-Received: by 2002:a05:6a00:234c:b0:646:3c2:4d30 with SMTP id j12-20020a056a00234c00b0064603c24d30mr39978714pfj.30.1684254652761; Tue, 16 May 2023 09:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684254652; cv=none; d=google.com; s=arc-20160816; b=sj9KjNEadWAohZSXMuK+kOP5VKOQC3po7soaFdwYhKCnsMCG2AJhQMubXuDFZHBPak 5kMrO4/ZQpO2EHmpc/WmpNNm1owqYXDgpvNQwlvpDf2oDIfuFuq/Xak8G7/bm5rrV09+ IlokBpMGFpj5pj6FpPRJfs+0Pb0YMFrGqN1PpUkJBud4LUbbzGqXLsRtyMya3puDxp8w zQDpgV+UECf1XN7p/vRkNFCWQRnAWliv22AiXrplJ7UbTZ1xeVUZDpNxzKe7EqkxNoe/ Aqut4Mqg55m/oPQvMVuSw8qT6nM/zu8CFhC/R6f22okjbONjMxSLUaqg8AjLu1WfJ9VE YfJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :to:content-language:subject:cc:user-agent:mime-version:date :message-id:from:dkim-signature; bh=pTbzb7Ep8RynUGNflCJEtG2qlbhJbczpgr8r4KMw/zg=; b=gMaOBOMTiT/+m0XJpN7zd0Hskr9oTEP1h3sB3m4eLiR4svjauDMHnWlSf9wrUo1jgn UKOCNR7tqwXa8V66myq3GixkaftRbW3M/g2SoPLpZuoVflC5sKQ3dc1KnEcn65Poyklv jy12BWGgHe11TJscNCUlcatWkX/sAo2nKy/QUgFC4LFu13U4hDSVSq3ck5BEvUJ0K7aD EvCMhoR28BwYgO9XUugFFBNGzX+WwjIGRwVs0OjZ26lidknbY1fd2Bd1JwV8qXofu1BG r28RoB7lfMJSGDmARGV9lVA6C53qBHchim5wwqvWY7mYwqIzNglcAU8lKmzd2tgbTXmW 5nZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="KIhcMan/"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a056a00000100b0063d2608a875si20220350pfk.374.2023.05.16.09.30.40; Tue, 16 May 2023 09:30:52 -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=@redhat.com header.s=mimecast20190719 header.b="KIhcMan/"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbjEPQSv (ORCPT + 99 others); Tue, 16 May 2023 12:18:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjEPQSu (ORCPT ); Tue, 16 May 2023 12:18:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CC9B559E for ; Tue, 16 May 2023 09:18:00 -0700 (PDT) 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-310-giqnEBwqOliFm9480bKRBQ-1; Tue, 16 May 2023 12:17:57 -0400 X-MC-Unique: giqnEBwqOliFm9480bKRBQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94a34d3e5ebso1360868066b.3 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=XYMMfd9auiurEeNWPJvpINUS1yOSa1axphlUlXew6n06e/wLsJcamcaiWy4MszBV04 02DeUZ741q9xnSSTNY3R5yvUYSAHi26IM71jgckBDGKJVaEl/XinMqvgnRQIYF/gycZb b5QbrwJcopXamRuRwFnMuJwK+MCDsBLouYSrHuxG9MXTKXJ8ZYWp6XL34TNddI0k7iyz JMogi8OaXRrWeN6KAn00z2B23e3of/DBi5ut05Spx4TFiUDhW1Pm6W72KwhZlc0XlVcF ITGPFwhCCU2q2iQZvS8nznbFlsMOrtBuiNoVGwnP68bFhRohzt3ipXanVk1ka9vFbjCY ElbA== X-Gm-Message-State: AC+VfDxFpe5e2lrNMy38pNY5Hi1m57bvAWBLSXWJOBcbWNEF57eBYTg8 VMzIkOTC/1y9bjnLxOPqSmn1lRi20oE4EpDuO9Vtzv4fWHwjacsN895yYYDZhF8lbNrFqwH+Qxb 5vOvv9R/dq8W+fBm5xpHOG8as X-Received: by 2002:a17:907:a4b:b0:958:514f:d88a with SMTP id be11-20020a1709070a4b00b00958514fd88amr31234511ejc.34.1684253876125; Tue, 16 May 2023 09:17:56 -0700 (PDT) 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 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 Subject: Re: [PATCH RESEND bpf-next 06/15] ice: Support HW timestamp hint Content-Language: en-US To: Stanislav Fomichev , Larysa Zaremba References: <20230512152607.992209-1-larysa.zaremba@intel.com> <20230512152607.992209-7-larysa.zaremba@intel.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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