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.133.124]) by mail.toke.dk (Postfix) with ESMTPS id 097129FEFD9 for ; Tue, 18 Apr 2023 13:30:36 +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=LJysKfmt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681817435; 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=2NZNcaQomO+NKqJjtar1Xw2NrVLmqvUkGrhPIreowuY=; b=LJysKfmtQUMwUqcr+BfPU8ZWw/e+/gFfgvu7pWJnI+k5MW4cYwKqwntLYGk7S09LS5z/F+ 3DvuzN/xY5N9QJ7Uklbnd5y6yP0sTCpYsAomHm/FtNxlRXM30COEZip5NROJGmggksDD1D TXCNpWp8JFAKe9MO+hwFDC/o/JnGOU8= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-M59dBLjGNMOASGrXjpgdPg-1; Tue, 18 Apr 2023 07:30:32 -0400 X-MC-Unique: M59dBLjGNMOASGrXjpgdPg-1 Received: by mail-ej1-f71.google.com with SMTP id qk25-20020a170906d9d900b0094f0dd1166dso3127960ejb.9 for ; Tue, 18 Apr 2023 04:30:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681817431; x=1684409431; 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=2NZNcaQomO+NKqJjtar1Xw2NrVLmqvUkGrhPIreowuY=; b=SG2rXOQEIivmoT15m/x2YMEq4rJtWQxT7IWrKzDkK8g0VBwWbllJHu4a1ltQ+WSRep Zqt7R12pa9XLb8d1Np/vJDh4VNpf6qdMd4iN26K7g+BrMt3bwACUWvbNjkIFET1fZ7gt lOoQanZZAgYr8UWuJjl6jFNUB/cfKECryCIeUw9NuNzthyRPzKiKUe9BtaAuGyB/hgLd 6UEQh0dqqChsJM50BvPGupMIOhYY+2Naf/TPKBmTDUg9TmlhwwGXK8kRemKtF/oqmDU4 EzVit9Snghyg3XlCO0EYQxs4YNUyJMUW8mjcnDy2vP++NFegbCXyY7zjprdTAy29UAdU A3aQ== X-Gm-Message-State: AAQBX9f/gtXOaKhNNXEGEh1Zm3yWklGFxIDxIFh9ZZHpxktK/uKnnPYi 7PoZdXWTVCnWJUnOE8RyD368yRHwWWyRk8Kv251XeIYriyAB4/0COb6nyCAaBPEExCE74n23xuM tYtdMia9kZi1sL+nKsKmV X-Received: by 2002:a17:906:f843:b0:94e:aa8e:b56e with SMTP id ks3-20020a170906f84300b0094eaa8eb56emr9920079ejb.33.1681817431001; Tue, 18 Apr 2023 04:30:31 -0700 (PDT) X-Google-Smtp-Source: AKy350acIP+hvK0ByCevyOjLp2f/7rZYWRoDzXgAVCS6a3+YiQfrV/CAqZB6bAiO8cFkN23mV6I27Q== X-Received: by 2002:a17:906:f843:b0:94e:aa8e:b56e with SMTP id ks3-20020a170906f84300b0094eaa8eb56emr9920058ejb.33.1681817430677; Tue, 18 Apr 2023 04:30:30 -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 xd10-20020a170907078a00b0095328ce9c8bsm435698ejb.67.2023.04.18.04.30.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 04:30:30 -0700 (PDT) From: Jesper Dangaard Brouer X-Google-Original-From: Jesper Dangaard Brouer Message-ID: <231f26bf-4dc7-81ed-fd2d-91badb3af6b9@redhat.com> Date: Tue, 18 Apr 2023 13:30:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: "Song, Yoong Siang" , "bpf@vger.kernel.org" , Stanislav Fomichev , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vu?= =?UTF-8?Q?sen?= References: <168174338054.593471.8312147519616671551.stgit@firesoul> <168174343801.593471.10686331901576935015.stgit@firesoul> 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: Q63XFRREC5JUFRX3FV5WUHFA6LO6HYKL X-Message-ID-Hash: Q63XFRREC5JUFRX3FV5WUHFA6LO6HYKL 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, "netdev@vger.kernel.org" , "martin.lau@kernel.org" , "ast@kernel.org" , "daniel@iogearbox.net" , "Lobakin, Aleksander" , "Zaremba, Larysa" , "xdp-hints@xdp-project.net" , "intel-wired-lan@lists.osuosl.org" , "pabeni@redhat.com" , "Brandeburg, Jesse" , "kuba@kernel.org" , "edumazet@google.com" , "john.fastabend@gmail.com" , "hawk@kernel.org" , "davem@davemloft.net" X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next V1 3/5] igc: add XDP hints kfuncs for RX timestamp List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 18/04/2023 06.16, Song, Yoong Siang wrote: > On Monday, April 17, 2023 10:57 PM, Jesper Dangaard Brouer wrote: [...] >> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c >> b/drivers/net/ethernet/intel/igc/igc_main.c >> index 3a844cf5be3f..862768d5d134 100644 >> --- a/drivers/net/ethernet/intel/igc/igc_main.c >> +++ b/drivers/net/ethernet/intel/igc/igc_main.c [...] >> >> +static int igc_xdp_rx_timestamp(const struct xdp_md *_ctx, u64 *timestamp) { >> + const struct igc_xdp_buff *ctx = (void *)_ctx; >> + >> + if (igc_test_staterr(ctx->rx_desc, IGC_RXDADV_STAT_TSIP)) { >> + *timestamp = ctx->rx_ts; >> + >> + return 0; >> + } >> + >> + return -ENODATA; >> +} >> + >> +const struct xdp_metadata_ops igc_xdp_metadata_ops = { > Since igc_xdp_metadata_ops is used in igc_main.c only, suggest to make it static. I agree, and I acknowledge that you have already pointed this our earier, but I forgot when I rebased the patches. Same for 4/5. --Jesper