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 7AED5A0227E for ; Sun, 30 Apr 2023 07:03:18 +0200 (CEST) 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=ljJUkKVh DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682830999; x=1714366999; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=q7SEF4bArk/xxwIRZ987yc+xrZpMH3afDQGaBkiO/LA=; b=ljJUkKVhRivC4GlPcL6EysxM60oBqJgCh28djb4HmWAw2eMWDUhkXFrV eZ3dtosfGdjqp4hoJ4PIIlgR37Bffv7lS8Z+rCOtLIfXd9e5ZZuhA6D33 pyX7dU3nHU3uaiQp9gWN4Nrt7sFmxKMm6r6CZs/XvNkVzeetJAIwTFHLi l4c/gz2g7RpGuqxm84Z4+AGBJbN4BAidbfcxTjt73YGEqIlROugbWsUYu pWlnio66qEWF6ibzojwmFykUDc/dwholGLNrZeKU06PqUthIffi/pTAR0 uZeMKLdqBEVv8DwBe64RngeyDBzrMDYO1OQd1q1Ii/dZhsgmWr9q0HgXH A==; X-IronPort-AV: E=McAfee;i="6600,9927,10695"; a="411108970" X-IronPort-AV: E=Sophos;i="5.99,238,1677571200"; d="scan'208";a="411108970" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2023 22:03:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10695"; a="941652643" X-IronPort-AV: E=Sophos;i="5.99,238,1677571200"; d="scan'208";a="941652643" Received: from naamamex-mobl.ger.corp.intel.com (HELO [10.13.12.36]) ([10.13.12.36]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2023 22:03:08 -0700 Message-ID: <7733369a-c3a6-89d4-fb32-ab2bcdc1def0@linux.intel.com> Date: Sun, 30 Apr 2023 08:03:06 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Song Yoong Siang , Jesse Brandeburg , Tony Nguyen , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Maciej Fijalkowski , Vedang Patel , Jithu Joseph , Andre Guedes , Jesper Dangaard Brouer , Stanislav Fomichev References: <20230413151222.1864307-1-yoong.siang.song@intel.com> From: "naamax.meir" In-Reply-To: <20230413151222.1864307-1-yoong.siang.song@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: VR6MSE4AU6G3MNN3HC3LF4CCJ2GU34BF X-Message-ID-Hash: VR6MSE4AU6G3MNN3HC3LF4CCJ2GU34BF X-MailFrom: naamax.meir@linux.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: xdp-hints@xdp-project.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, intel-wired-lan@lists.osuosl.org, bpf@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [Intel-wired-lan] [PATCH net 1/1] igc: read before write to SRRCTL register List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 4/13/2023 18:12, Song Yoong Siang wrote: > igc_configure_rx_ring() function will be called as part of XDP program > setup. If Rx hardware timestamp is enabled prio to XDP program setup, > this timestamp enablement will be overwritten when buffer size is > written into SRRCTL register. > > Thus, this commit read the register value before write to SRRCTL > register. This commit is tested by using xdp_hw_metadata bpf selftest > tool. The tool enables Rx hardware timestamp and then attach XDP program > to igc driver. It will display hardware timestamp of UDP packet with > port number 9092. Below are detail of test steps and results. > > Command on DUT: > sudo ./xdp_hw_metadata > > Command on Link Partner: > echo -n skb | nc -u -q1 9092 > > Result before this patch: > skb hwtstamp is not found! > > Result after this patch: > found skb hwtstamp = 1677762212.590696226 > > Fixes: fc9df2a0b520 ("igc: Enable RX via AF_XDP zero-copy") > Cc: # 5.14+ > Signed-off-by: Song Yoong Siang > --- > drivers/net/ethernet/intel/igc/igc_base.h | 7 +++++-- > drivers/net/ethernet/intel/igc/igc_main.c | 5 ++++- > 2 files changed, 9 insertions(+), 3 deletions(-) Tested-by: Naama Meir