lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB618095F79E53B077E922F900B89C9@SJ1PR11MB6180.namprd11.prod.outlook.com>
Date:   Mon, 17 Apr 2023 02:53:13 +0000
From:   "Zulkifli, Muhammad Husaini" <muhammad.husaini.zulkifli@...el.com>
To:     "Song, Yoong Siang" <yoong.siang.song@...el.com>,
        "Bezdeka, Florian" <florian.bezdeka@...mens.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        "Eric Dumazet" <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        "John Fastabend" <john.fastabend@...il.com>,
        "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
        Vedang Patel <vedang.patel@...el.com>,
        "Joseph, Jithu" <jithu.joseph@...el.com>,
        Andre Guedes <andre.guedes@...el.com>,
        "Brouer, Jesper" <brouer@...hat.com>,
        "Stanislav Fomichev" <sdf@...gle.com>,
        "Keller, Jacob E" <jacob.e.keller@...el.com>,
        David Laight <David.Laight@...LAB.COM>
CC:     "xdp-hints@...-project.net" <xdp-hints@...-project.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>
Subject: RE: [PATCH net v3 1/1] igc: read before write to SRRCTL register

Hi Florian,

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Song, Yoong Siang
> Sent: Sunday, 16 April, 2023 10:19 AM
> To: Bezdeka, Florian <florian.bezdeka@...mens.com>; Brandeburg, Jesse
> <jesse.brandeburg@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; David S . Miller <davem@...emloft.net>;
> Eric Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>;
> Paolo Abeni <pabeni@...hat.com>; Alexei Starovoitov <ast@...nel.org>;
> Daniel Borkmann <daniel@...earbox.net>; Jesper Dangaard Brouer
> <hawk@...nel.org>; John Fastabend <john.fastabend@...il.com>;
> Fijalkowski, Maciej <maciej.fijalkowski@...el.com>; Vedang Patel
> <vedang.patel@...el.com>; Joseph, Jithu <jithu.joseph@...el.com>; Andre
> Guedes <andre.guedes@...el.com>; Brouer, Jesper <brouer@...hat.com>;
> Stanislav Fomichev <sdf@...gle.com>; Keller, Jacob E
> <jacob.e.keller@...el.com>; David Laight <David.Laight@...LAB.COM>
> Cc: xdp-hints@...-project.net; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; stable@...r.kernel.org; intel-wired-
> lan@...ts.osuosl.org; bpf@...r.kernel.org
> Subject: Re: [Intel-wired-lan] [PATCH net v3 1/1] igc: read before write to
> SRRCTL register
> 
> On Saturday, April 15, 2023 5:20 PM, Florian Bezdeka
> <florian.bezdeka@...mens.com> wrote:
> >On 14.04.23 17:49, 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.
> >>
> >
> >Hi all,
> >
> >I'm actually searching for the root cause of a similar problem (RX
> >timestamp lost) that I can reproduce here, but the setup is slightly
> different. The setup:
> >
> >- igc driver
> >- i225/226 network card
> >- When starting to transmit frames using XDP with zero copy enabled
> >  another application (ptp4l) complains about missing RX timestamps
> >- Loading the XDP program has already been removed (not needed for
> >  TX only)
> >- ptp4l is using the traditional socket API
> >- The RX timestamps seem to come back once we stop sending frames
> >  using XDP
> >
> >The "zero copy support" enabled part is important. If ZC support is not
> >requested everything works fine.
> >
> >Any ideas?

Are you observing similar issue like below?
ptp4l: timed out while polling for tx timestamp
ptp4l: increasing tx_timestamp_timeout may correct this issue

If yes, only TXSTAMPO register is used for both PTP and non-PTP packets in 
the current driver code. There is a possibility that the time stamp 
for a PTP packet will be lost when there is a lot of traffic when multiple 
applications request for hardware transmission timestamps. 
Few months back, I submitted a patch series to enable the DMA 
Timestamp for non-ptp packet which can resolve the above issue.
https://lore.kernel.org/netdev/20221018010733.4765-1-muhammad.husaini.zulkifli@intel.com/T/
Will continuing back the activity soon.

But you might want to try with series submitted by Vinicius as well.
This patch series add support for four sets of timestamping register.
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230228054534.1093483-2-vinicius.gomes@intel.com/
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230228054534.1093483-3-vinicius.gomes@intel.com/
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230228054534.1093483-4-vinicius.gomes@intel.com/

Would it be possible for you to try any of the above patch series
and see if that fixes your problem?

Thanks,
Husaini



> >
> >Best regards,
> >Florian
> >
> 
> Hi Florian,
> 
> You means this patch does not help on your issue?
> Need to understand more on the setup and behavior to tell.
> Are ptp4l and XDP ZC Tx apps running on same queue or separate queue?
> I suggest you to run " sudo hwstamp_ctl -i eth0 -r 1 " multiple times in the
> middle to check the behavior.
> 
> Thanks & Regards
> Siang
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@...osl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ