From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F226429A0 for ; Thu, 31 Aug 2023 12:50:53 +0000 (UTC) Received: from out-247.mta1.migadu.com (out-247.mta1.migadu.com [IPv6:2001:41d0:203:375::f7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A75CF2 for ; Thu, 31 Aug 2023 05:50:49 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1693486247; 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=rBzsFF9Aekog2IqwVNJElwdWwC36Gc+4PxmW8O3uWXA=; b=Qel81u6H0iUgB/UTe9FW3bsMg+TNKvOTmwI48o2fEjQKmJEqgM9WLUXzL5iWMEoMrxPzsF A3XwLPIi/vfYUGuqka6ALU6HUEh+cgi5+aFY7li9i72ZnXjVlxU8rFWRmshCXCd4r0hKax g9gDSyHsL/81OkrezYOTFXVaovJnEUM= Date: Thu, 31 Aug 2023 08:50:42 -0400 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [Intel-wired-lan] [PATCH net] ixgbe: fix timestamp configuration code Content-Language: en-US To: "Pucha, HimasekharX Reddy" , "Brandeburg, Jesse" , "Nguyen, Anthony L" , Jakub Kicinski , Alexander Duyck , "Rustad, Mark D" , Darin Miller , Jeff Kirsher , Richard Cochran Cc: "netdev@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" References: <20230823221537.816541-1-vadim.fedorenko@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On 31/08/2023 06:18, Pucha, HimasekharX Reddy wrote: >> -----Original Message----- >> From: Intel-wired-lan On Behalf Of Vadim Fedorenko >> Sent: Thursday, August 24, 2023 3:46 AM >> To: Brandeburg, Jesse ; Nguyen, Anthony L ; Jakub Kicinski ; Alexander Duyck ; Rustad, Mark D ; Darin Miller ; Jeff Kirsher ; Richard Cochran >> Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; Vadim Fedorenko >> Subject: [Intel-wired-lan] [PATCH net] ixgbe: fix timestamp configuration code >> >> The commit in fixes introduced flags to control the status of hardware >> configuration while processing packets. At the same time another structure >> is used to provide configuration of timestamper to user-space applications. >> The way it was coded makes this structures go out of sync easily. The >> repro is easy for 82599 chips: >> >> [root@hostname ~]# hwstamp_ctl -i eth0 -r 12 -t 1 >> current settings: >> tx_type 0 >> rx_filter 0 >> new settings: >> tx_type 1 >> rx_filter 12 >> >> The eth0 device is properly configured to timestamp any PTPv2 events. >> >> [root@hostname ~]# hwstamp_ctl -i eth0 -r 1 -t 1 >> current settings: >> tx_type 1 >> rx_filter 12 >> SIOCSHWTSTAMP failed: Numerical result out of range >> The requested time stamping mode is not supported by the hardware. >> >> The error is properly returned because HW doesn't support all packets >> timestamping. But the adapter->flags is cleared of timestamp flags >> even though no HW configuration was done. From that point no RX timestamps >> are received by user-space application. But configuration shows good >> values: >> >> [root@hostname ~]# hwstamp_ctl -i eth0 >> current settings: >> tx_type 1 >> rx_filter 12 >> >> Fix the issue by applying new flags only when the HW was actually >> configured. >> >> Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices") >> Signed-off-by: Vadim Fedorenko >> --- >> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 28 +++++++++++--------- >> 1 file changed, 15 insertions(+), 13 deletions(-) >> > > Hi, > With patch also we are observing same issue. Hi, What kind of issue do you observe? The hardware doesn't support timestamping of all packets. The issue this patch fixes is that after failed attempt to setup the timestamping of all RX packets, the driver stops reading timestamps at all even though it reports that timestamping of PTP RX packets is enabled. > > # ./hwstamp_ctl -i eth10 > current settings: > tx_type 1 > rx_filter 12 > # ./hwstamp_ctl -i eth10 -r 1 -t 1 > current settings: > tx_type 1 > rx_filter 12 > SIOCSHWTSTAMP failed: Numerical result out of range > The requested time stamping mode is not supported by the hardware. > > Adapter details: Niantic (Spring Fountain) > > SUT info: > H/W: > Manufacturer: Intel Corporation > Product Name: S2600STQ > RAM: [62G/8G/49G] > CPU: Intel(R) Xeon(R) Platinum 8180 CPU @ 2.50GHz [112/112] > PF bus-info: 0000:d8:00.1 0x8086:0x10fb 0x8086 0x000c (0x01) > S/W: > OS: "Red Hat Enterprise Linux 8.6 (Ootpa)" 6.5.0-rc7_next-queue_28-Aug-2023-01755-g938672aefaeb > CMD: BOOT_IMAGE=(hd0,msdos2)/vmlinuz-6.5.0-rc7_next-queue_28-Aug-2023-01755-g938672aefaeb root=/dev/mapper/rhel_os--delivery-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel_os--delivery-swap rd.lvm.lv=rhel_os-delivery/root rd.lvm.lv=rhel_os-delivery/swap selinux=0 biosdevname=0 net.ifnames=0 rhgb quiet > FW firmware-version: 0x000161bf > PF version: 6.5.0-rc7_next-queue_28-Aug-202 > >