From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] net: fix problem in dequeuing from input_pkt_queue
Date: Thu, 20 May 2010 06:37:26 +0200 [thread overview]
Message-ID: <1274330246.2658.16.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTimv8YJD61uADUrHoeL4xGfE8wPPUwVpwJNZPFpu@mail.gmail.com>
Le mercredi 19 mai 2010 à 19:48 -0700, Tom Herbert a écrit :
> >> It should be okay? process_backlog only runs in softirq so bottom
> >> halves are already disabled, and I don't think flush_backlog runs out
> >> of an interrupt.
> >>
> >
> > Oh no. It is an IRQ handler.
> >
> Very well, I will fix that.
>
> Now I'm wondering, though, what the purpose of flush_backlog is...
> since __netif_receive_skb is called with interrupts enabled it's
> obvious flush_backlog won't catch all the skb's that reference the
> device go away. Is there a reason these packets need to be flushed
> and can't just be processed?
flush_backlog is called when device is dismantled.
No new packets should be generated by the device at this moment.
Could you please split your patch in units, I spent 20 minutes to review
it and come to same conclusion than Changli (need to disable interrupts
as they are currently disabled) and also :
input_queue_head_incr(sd); are _not_ needed in flush_backlog()
We are in the very last moments of the life of the device, in a very
unlikely situation (packets in flight, not already consumed by the cpu),
we are _dropping_ packets, so OOO means nothing at this point.
In dev_cpu_callback(), you reverse the order of input_pkt_queue /
process_queue.
Thats fine, but should be a single patch, because I am not sure the
input_queue_head_incr() are valid here, since we re-inject these packets
to netif_rx(). Could you clarify this point ?
Thanks !
next prev parent reply other threads:[~2010-05-20 4:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 21:47 [PATCH] net: fix problem in dequeuing from input_pkt_queue Tom Herbert
2010-05-19 23:45 ` Changli Gao
2010-05-19 23:58 ` Tom Herbert
2010-05-20 0:09 ` Changli Gao
2010-05-20 2:48 ` Tom Herbert
2010-05-20 4:37 ` Eric Dumazet [this message]
2010-05-20 6:05 ` Tom Herbert
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=1274330246.2658.16.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=xiaosuo@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