lvs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeny B <abt-admin@mail.ru>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	netdev@vger.kernel.org,
	"lvs-devel@vger.kernel.org" <lvs-devel@vger.kernel.org>
Subject: Re: Fw: [Bug 209427] New: Incorrect timestamp cause packet to be dropped
Date: Fri, 9 Oct 2020 13:22:03 +0300	[thread overview]
Message-ID: <cbacae19-8a84-b7a9-8e92-1ca6b22b8b65@mail.ru> (raw)
In-Reply-To: <alpine.LFD.2.23.451.2009302010190.4321@ja.home.ssi.bg>

I just realized all my messages were bounced by mail server, this is 
last try


This fix works, however they should be applied for each of ipvs_xmit 
functions (e.g. ip_vs_nat_xmit(), ip_vs_dr_xmit(), etc.)

I look forward to seeing the patch in ml-5.x

Thank you!


On 9/30/2020 8:17 PM, Julian Anastasov wrote:
> 	Hello,
>
> On Wed, 30 Sep 2020, Eric Dumazet wrote:
>
>> On 9/29/20 7:35 PM, Stephen Hemminger wrote:
>>>
>>> then I noticed that in some cases skb->tstamp is equal to real ts whereas in
>>> the regular cases where a packet pass through it's time since kernel boot. This
>>> doesn't make any sense for me as this condition is satisfied constantly
>>>
>>> net/sched/sch_fq.c:439
>>> static bool fq_packet_beyond_horizon(const struct sk_buff *skb,
>>>                                      const struct fq_sched_data *q)
>>> {
>>>          return unlikely((s64)skb->tstamp > (s64)(q->ktime_cache + q->horizon));
>>> }
>>>
>>> Any ideas on what it can be?
>>>
>> Thanks for the detailed report !
>>
>> I suspect ipvs or bridge code needs something similar to the fixes done in
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=de20900fbe1c4fd36de25a7a5a43223254ecf0d0
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=41d1c8839e5f8cb781cc635f12791decee8271b7
>>
>> The reason for that is that skb->tstamp can get a timestamp in input path,
>> with a base which is not CLOCK_MONOTONIC, unfortunately.
>>
>> Whenever a packet is forwarded, its tstamp must be cleared.
>>
>> Can you try :
>>
>> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
>> index b00866d777fe0e9ed8018087ebc664c56f29b5c9..11e8ccdae358a89067046efa62ed40308b9e06f9 100644
>> --- a/net/netfilter/ipvs/ip_vs_xmit.c
>> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
>> @@ -952,6 +952,8 @@ ip_vs_prepare_tunneled_skb(struct sk_buff *skb, int skb_af,
>>   
>>          ip_vs_drop_early_demux_sk(skb);
>>   
>> +       skb->tstamp = 0;
>> +
> 	Should be after all skb_forward_csum() calls in ip_vs_xmit.c
>
>>          if (skb_headroom(skb) < max_headroom || skb_cloned(skb)) {
>>                  new_skb = skb_realloc_headroom(skb, max_headroom);
>>                  if (!new_skb)
> Regards
>
> --
> Julian Anastasov <ja@ssi.bg>
>

      reply	other threads:[~2020-10-09 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200929103532.0ecbc3b3@hermes.local>
2020-09-30  7:29 ` Fw: [Bug 209427] New: Incorrect timestamp cause packet to be dropped Eric Dumazet
2020-09-30 17:17   ` Julian Anastasov
2020-10-09 10:22     ` Evgeny B [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=cbacae19-8a84-b7a9-8e92-1ca6b22b8b65@mail.ru \
    --to=abt-admin@mail.ru \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).