From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>,
netdev@vger.kernel.org
Cc: tglx@linutronix.de, jan.altenberg@linutronix.de,
vinicius.gomes@intel.com, kurt.kanzenbach@linutronix.de,
henrik@austad.us, richardcochran@gmail.com,
ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org,
mlichvar@redhat.com, willemb@google.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
eric.dumazet@gmail.com, jeffrey.t.kirsher@intel.com
Subject: Re: [PATCH v2 net-next 01/14] net: Clear skb->tstamp only on the forwarding path
Date: Fri, 13 Jul 2018 10:35:15 -0700 [thread overview]
Message-ID: <1e52c128-59f4-43ae-3487-059a84ae61c3@gmail.com> (raw)
In-Reply-To: <20180703224300.25300-2-jesus.sanchez-palencia@intel.com>
On 07/03/2018 03:42 PM, Jesus Sanchez-Palencia wrote:
> This is done in preparation for the upcoming time based transmission
> patchset. Now that skb->tstamp will be used to hold packet's txtime,
> we must ensure that it is being cleared when traversing namespaces.
> Also, doing that from skb_scrub_packet() before the early return would
> break our feature when tunnels are used.
>
> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
> ---
> net/core/skbuff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 1357f36c8a5e..c4e24ac27464 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -4898,7 +4898,6 @@ EXPORT_SYMBOL(skb_try_coalesce);
> */
> void skb_scrub_packet(struct sk_buff *skb, bool xnet)
> {
> - skb->tstamp = 0;
> skb->pkt_type = PACKET_HOST;
> skb->skb_iif = 0;
> skb->ignore_df = 0;
> @@ -4912,6 +4911,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
>
> ipvs_reset(skb);
> skb->mark = 0;
> + skb->tstamp = 0;
> }
> EXPORT_SYMBOL_GPL(skb_scrub_packet);
>
>
I believe we had some misunderstanding here.
What I meant by forwarding is the following case :
- We receive a packet.
- netstamp_wanted is >0 (because at least one packet capture is active)
- __net_timestamp() is called and does :
skb->tstamp = ktime_get_real();
Then this skb is forwarded into an interface where EDT is taken into
consideration by either a qdisc or a device.
Since CLOCK_TAI is a different base than CLOCK_REALTIME, we might have a problem.
Solutions for this problem :
1) Convert all our skb->tstamp usages to CLOCK_TAI base.
or
2) clear skb->tstamp in forwarding paths, including the ones not scrubbing the packet.
My preference is 1), even if it is a bit more work.
next prev parent reply other threads:[~2018-07-13 17:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 22:42 [PATCH v2 net-next 00/14] Scheduled packet Transmission: ETF Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 01/14] net: Clear skb->tstamp only on the forwarding path Jesus Sanchez-Palencia
2018-07-13 17:35 ` Eric Dumazet [this message]
2018-07-16 21:52 ` Jesus Sanchez-Palencia
2018-07-16 23:15 ` Eric Dumazet
2018-07-18 18:19 ` Jesus Sanchez-Palencia
2018-07-18 18:40 ` Dave Taht
2018-07-03 22:42 ` [PATCH v2 net-next 02/14] net: Add a new socket option for a future transmit time Jesus Sanchez-Palencia
2018-07-08 0:44 ` Eric Dumazet
2018-07-09 22:21 ` Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 03/14] net: ipv4: Hook into time based transmission Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 04/14] net: ipv6: " Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 05/14] net: packet: " Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 06/14] net/sched: Allow creating a Qdisc watchdog with other clocks Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 07/14] net/sched: Introduce the ETF Qdisc Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 08/14] net/sched: Add HW offloading capability to ETF Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 09/14] igb: Refactor igb_configure_cbs() Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 10/14] igb: Only change Tx arbitration when CBS is on Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 11/14] igb: Refactor igb_offload_cbs() Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 12/14] igb: Only call skb_tx_timestamp after descriptors are ready Jesus Sanchez-Palencia
2018-07-03 22:42 ` [PATCH v2 net-next 13/14] igb: Add support for ETF offload Jesus Sanchez-Palencia
2018-07-03 22:43 ` [PATCH v2 net-next 14/14] net/sched: Make etf report drops on error_queue Jesus Sanchez-Palencia
2018-07-04 13:37 ` [PATCH v2 net-next 00/14] Scheduled packet Transmission: ETF David Miller
2018-07-06 21:38 ` Stephen Hemminger
2018-07-09 15:24 ` Jesus Sanchez-Palencia
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=1e52c128-59f4-43ae-3487-059a84ae61c3@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=henrik@austad.us \
--cc=ilias.apalodimas@linaro.org \
--cc=ivan.khoronzhuk@linaro.org \
--cc=jan.altenberg@linutronix.de \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesus.sanchez-palencia@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kurt.kanzenbach@linutronix.de \
--cc=mlichvar@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=tglx@linutronix.de \
--cc=vinicius.gomes@intel.com \
--cc=willemb@google.com \
--cc=xiyou.wangcong@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).