From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Tudor Cornea <tudor.cornea@gmail.com>
Cc: <stephen@networkplumber.org>, <linville@tuxdriver.com>,
<thomas@monjalon.net>, <pogonarumihai@gmail.com>, <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] net/af_packet: remove timestamp from packet status
Date: Tue, 28 Sep 2021 14:01:06 +0100 [thread overview]
Message-ID: <a97d3aac-b5e5-c7df-ce2d-00643bdbb464@intel.com> (raw)
In-Reply-To: <1632420804-398-1-git-send-email-tudor.cornea@gmail.com>
On 9/23/2021 7:13 PM, Tudor Cornea wrote:
> We should eliminate the timestamp status from the packet
> status. This should only matter if timestamping is enabled
> on the socket, but we might hit a kernel bug, which is fixed
> in newer releases.
>
> For interfaces of type 'veth', the sent skb is forwarded
> to the peer and back into the network stack which timestamps
> it on the RX path if timestamping is enabled globally
> (which happens if any socket enables timestamping).
>
> When the skb is destructed, tpacket_destruct_skb() is called
> and it calls __packet_set_timestamp() which doesn't check
> the flags on the socket and returns the timestamp if it is
> set in the skb (and for veth it is, as mentioned above).
>
> See the following kernel commit for reference [1]:
>
> net: packetmmap: fix only tx timestamp on request
>
> The packetmmap tx ring should only return timestamps if requested
> via setsockopt PACKET_TIMESTAMP, as documented. This allows
> compatibility with non-timestamp aware user-space code which checks
> tp_status == TP_STATUS_AVAILABLE; not expecting additional timestamp
> flags to be set in tp_status.
>
> [1] https://www.spinics.net/lists/kernel/msg3959391.html
>
> Signed-off-by: Mihai Pogonaru <pogonarumihai@gmail.com>
> Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/main, thanks.
prev parent reply other threads:[~2021-09-28 13:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 14:09 [dpdk-dev] [PATCH] " Tudor Cornea
2021-09-13 15:09 ` Stephen Hemminger
2021-09-13 17:25 ` Tudor Cornea
2021-09-13 17:23 ` [dpdk-dev] [PATCH v2] " Tudor Cornea
2021-09-20 17:48 ` Ferruh Yigit
2021-09-21 21:02 ` Tudor Cornea
2021-09-23 18:13 ` [dpdk-dev] [PATCH v3] " Tudor Cornea
2021-09-28 13:01 ` Ferruh Yigit [this message]
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=a97d3aac-b5e5-c7df-ce2d-00643bdbb464@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=linville@tuxdriver.com \
--cc=pogonarumihai@gmail.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=tudor.cornea@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).