netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@intel.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Alexander Duyck <alexander.duyck@gmail.com>,
	"Rustad, Mark D" <mark.d.rustad@intel.com>,
	Darin Miller <darin.j.miller@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Richard Cochran <richardcochran@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH net] ixgbe: fix timestamp configuration code
Date: Thu, 31 Aug 2023 08:50:42 -0400	[thread overview]
Message-ID: <f7c7aeb7-c43a-23c0-1c93-2bcb79d4d689@linux.dev> (raw)
In-Reply-To: <BL0PR11MB3122FF925838E8F850787467BDE5A@BL0PR11MB3122.namprd11.prod.outlook.com>

On 31/08/2023 06:18, Pucha, HimasekharX Reddy wrote:
>> -----Original Message-----
>> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Vadim Fedorenko
>> Sent: Thursday, August 24, 2023 3:46 AM
>> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Jakub Kicinski <kuba@kernel.org>; Alexander Duyck <alexander.duyck@gmail.com>; Rustad, Mark D <mark.d.rustad@intel.com>; Darin Miller <darin.j.miller@intel.com>; Jeff Kirsher <jeffrey.t.kirsher@intel.com>; Richard Cochran <richardcochran@gmail.com>
>> Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; Vadim Fedorenko <vadim.fedorenko@linux.dev>
>> 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 <vadim.fedorenko@linux.dev>
>> ---
>>   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
> 
> 


  reply	other threads:[~2023-08-31 12:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 22:15 [PATCH net] ixgbe: fix timestamp configuration code Vadim Fedorenko
2023-08-24 14:49 ` Simon Horman
2023-08-31  5:18 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-08-31 12:50   ` Vadim Fedorenko [this message]
2023-09-07  6:39 ` Pucha, HimasekharX Reddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7c7aeb7-c43a-23c0-1c93-2bcb79d4d689@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=alexander.duyck@gmail.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=darin.j.miller@intel.com \
    --cc=himasekharx.reddy.pucha@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=mark.d.rustad@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).