Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2020 06:17:10 +0000
From:      <Gabriel.Moyano@dlr.de>
To:        <ricera10@gmail.com>
Cc:        <freebsd-net@freebsd.org>, <kostikbel@gmail.com>
Subject:   RE: HW timestamping e1000
Message-ID:  <b4b4bef7ee914d0784072ab3e0ce9d44@dlr.de>
In-Reply-To: <CA%2Bb0zg_eO==QZkmq2HxOZvOhp0kcri0rcDw=25bcGkeAPHWPqA@mail.gmail.com>
References:  <798afa552a794a0f9c07aa2fca422ea3@dlr.de> <20200602115343.GO48478@kib.kiev.ua> <CA%2Bb0zg_eO==QZkmq2HxOZvOhp0kcri0rcDw=25bcGkeAPHWPqA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Thanks Konstantin for your previous answer.

@Eric: Thanks for asking. The NIC model is 82574L. According to the datasheet, it supports HW timestamping but no mbuf with the flag M_TSTMP is created in iflib. Would be nice to ask Intel if they are planning to update the driver.

I’ve also seen that in Linux there is another socket option (SO_TIMESTAMPING) for HW timestamping. Additionally there are 2 things in Linux that caught my attention:

·         a ioctl option called SIOCSHWTSTAMP, which is used to configure the HW timestamping

·         PTP Hardware Clock character devices


Is it planned to add similar things in FreeBSD?

Regards,
Gabriel

From: Eric Joyner [mailto:ricera10@gmail.com]
Sent: Donnerstag, 11. Juni 2020 17:51
To: Konstantin Belousov
Cc: Moyano Heredia, Victor Gabriel; freebsd-net@freebsd.org
Subject: Re: HW timestamping e1000

Like Konstantin said, it might only be possible on some e1000 cards. Could you tell me which card you're using? If the device name shows up as igb, then it's likely it does support it.

That said, I'm not an expert on HW timestamping, so I'm not sure what features are supported or how well they're implemented. I can try forwarding some of your questions to someone who knows more about it at Intel, if you have any.

- Eric

On Tue, Jun 2, 2020 at 4:54 AM Konstantin Belousov <kostikbel@gmail.com<mailto:kostikbel@gmail.com>> wrote:
On Tue, Jun 02, 2020 at 10:46:00AM +0000, Gabriel.Moyano@dlr.de<mailto:Gabriel.Moyano@dlr.de> wrote:
> Hi everybody,
>
> Currently I am writing a piece of code to test HW timestamping on e1000 during reception, which runs on FreeBSD 12, but unfortunately it seems that it isn't working.
>
> The socket is created and configured as follows:
>
> sockfd = socket(AF_INET, SOCK_DGRAM, 0);
> int on = 1;
> setsockopt(sockfd, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on));
>
> After recvmsg() is called, cmsg_type of received control messages are printed out with help of the control message routines (https://www.freebsd.org/cgi/man.cgi?query=CMSG_DATA). SCM_TIME_INFO should be printed out but it's not.
>
> Is there any configuration missing? Does e1000 support HW timestamping right?
>
> I will appreciate any help.

Hardware timestamping is only implemented for Mellanox ConnectX-4 and hier,
and Chelsio Terminators (T4 and newer ?).  It might be doable for Intel
some cards, but not all of them.
_______________________________________________
freebsd-net@freebsd.org<mailto:freebsd-net@freebsd.org> mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org<mailto:freebsd-net-unsubscribe@freebsd.org>"


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b4b4bef7ee914d0784072ab3e0ce9d44>