netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <hadi@cyberus.ca>
To: Thomas Graf <tgraf@suug.ch>
Cc: kaber@trash.net, netdev@vger.kernel.org,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 2/3] [VLAN]: Update iif when receiving via VLAN device
Date: Sun, 09 Jul 2006 11:00:32 -0400	[thread overview]
Message-ID: <1152457232.5124.127.camel@jzny2> (raw)
In-Reply-To: <20060709141933.GM14627@postel.suug.ch>

On Sun, 2006-09-07 at 16:19 +0200, Thomas Graf wrote:
> * Jamal Hadi Salim <hadi@cyberus.ca> 2006-07-09 10:03
> > On Sun, 2006-09-07 at 15:33 +0200, Thomas Graf wrote:
> > > That's not gonna work, dev->queue_lock may be held legimitately
> > > by someone else than an underlying dev_queue_xmit() call.
> > > 
> > 
> > If there is a legitimate reason then it wont work. I cant think of one
> > though.
> 
> See sch_generic.c, it's documented. A simple grep on queue_lock
> would have told you the same.
> 

If you mean that the device will also try to grab the qlock there, then
that is fine still for the serialization. It all starts at
dev_queue_xmit.

> > This is also another approach that would work. If you think its simpler
> > go ahead and shoot a patch.
> 
> It's not simpler, it's correct, while your patch is wrong.
> 

Ok, calm down, will you? Man, you make it very hard to follow Daves
Tibetan approach. Let me tell you exactly how i feel about your
approach: It is unnecessarily complex. The approach i posted is not only
fine, it works with only 4-5 lines of code; i have numerous tests
against it over a long period of time. I was trying to be polite and
follow Daves advice not to insist it has to be done my way - it almost
seems impossible with you trying to nitpick on little unimportant
details.

> > A->*->A is a no-no.
> > And in some cases it is fine to let the user just fsck themselves
> > because then they will understand it is a bad idea [1] when shit
> > happens. OTOH, if there was a KISS way of doing it (as in the ifb case,
> > why not).
> 
> I remind you that you started mentioning this A->*->A case while
> talking about tx deadlocks that were supposed to be prevented with
> the !from check or something along that lines. I can't really tell
> because you explain it differently in every posting.
> 

Because you are looking for preciseness at the micro/code level and i am
trying to explain at the conceptual/macro level (I have to adjust to
your mode but it is hard for me because i dont think at our level that
matters). When i sense you didnt understand me the last time, I try to
explain it better. The deadlock happens on transmit. If you want to be
precise, it happens when dev_queue_xmit is invoked. If you want more
preciseness, when the queue lock is contended. If you want more
preciseness, the code sample that i showed you should help illustrate
it.

> > Yes, of course otherwise i wouldnt bother to comment on any patches.
> 
> So maintain the code and fix your bugs.

Ok, I dont think this is gonna work - I may have to give up on getting
any resolution. 

Heres the suggestion again and you can still shoot a patch:
- If we can avoid doing anything at mirred that is the most preferable
approach. i.e get the change for free. In other words if it complicates
things it is not worth it. Someone redirecting eth0 to eth0 on egress
deserves whats happening to them.

- Try it against Herberts patch. It may resolve something or may require
an adjustment to Herberts patch so we can kill two birds with one stone
i.e get it for free. I dont know. I guess i shouldnt say "i dont know"
it is not precise, my point is you may find things when you attempt the
change. The patch is in Daves 2.6.18 tree.

- Iam fine with your suggestion to use a flag. The problem is not which
scheme you use - it is whether the change at such a crucial path in the
stack would be acceptable to other people.

Anyways, I am off.

cheers,
jamal


  reply	other threads:[~2006-07-09 15:00 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 14:54 [PATCHSET] Towards accurate incoming interface information Thomas Graf
2006-06-25 22:00 ` [PATCH 1/3] [NET]: Use interface index to keep input device information Thomas Graf
2006-06-25 22:00 ` [PATCH 2/3] [VLAN]: Update iif when receiving via VLAN device Thomas Graf
2006-06-26 17:04   ` Patrick McHardy
2006-06-26 17:46     ` David Miller
2006-06-26 18:24       ` Patrick McHardy
2006-06-26 18:44       ` Thomas Graf
2006-06-26 22:29         ` Patrick McHardy
2006-06-26 22:49           ` Patrick McHardy
2006-06-27 10:03           ` Thomas Graf
2006-06-27 13:07             ` jamal
2006-06-28 10:18               ` Thomas Graf
2006-06-28 12:22                 ` jamal
2006-06-28 13:01                   ` Thomas Graf
2006-06-28 13:46                     ` jamal
2006-06-29  8:51                       ` Thomas Graf
2006-06-29 20:55                         ` Thomas Graf
2006-06-29 23:23                         ` jamal
2006-06-29 23:39                           ` Thomas Graf
2006-06-29 23:47                             ` David Miller
2006-06-30  0:08                               ` jamal
2006-06-30  0:12                                 ` David Miller
2006-06-30  0:26                                   ` jamal
2006-06-30  0:29                                     ` David Miller
2006-06-30  0:44                                       ` Ben Greear
2006-06-30  0:48                                       ` jamal
2006-06-30  0:55                                         ` Thomas Graf
2006-06-30  1:18                                           ` jamal
2006-06-30  0:03                             ` jamal
2006-06-30  0:46                               ` Thomas Graf
2006-06-30  1:11                                 ` jamal
2006-06-30 13:08                                   ` Thomas Graf
2006-06-30 13:20                                     ` Nicolas Dichtel
2006-06-30 13:57                                     ` jamal
2006-06-30 14:15                                       ` Thomas Graf
2006-06-30 14:35                                         ` jamal
2006-06-30 15:40                                           ` Ben Greear
2006-06-30 16:32                                           ` Thomas Graf
2006-06-30 17:13                                             ` Thomas Graf
2006-06-30 17:18                                               ` Patrick McHardy
2006-06-30 17:32                                                 ` jamal
2006-06-30 17:42                                                   ` Patrick McHardy
2006-06-30 17:44                                                     ` Thomas Graf
2006-06-30 19:40                                                     ` jamal
2006-06-30 20:17                                                       ` David Miller
2006-06-30 17:42                                                   ` Thomas Graf
2006-06-30 19:34                                                     ` jamal
2006-06-30 20:08                                                       ` Thomas Graf
2006-06-30 20:42                                                         ` jamal
2006-06-30 17:27                                               ` Ben Greear
2006-06-30 21:09                                               ` jamal
2006-06-30 21:20                                                 ` Thomas Graf
2006-06-30 21:35                                                   ` jamal
2006-06-30 23:22                                                     ` Thomas Graf
2006-07-01  2:23                                                       ` jamal
2006-07-01 11:51                                                         ` Thomas Graf
2006-07-01 13:47                                                           ` jamal
2006-06-30 17:19                                             ` jamal
2006-06-30 17:33                                               ` Patrick McHardy
2006-06-30 19:59                                                 ` jamal
2006-06-30 20:30                                                   ` Thomas Graf
2006-06-30 20:33                                                     ` David Miller
2006-06-30 20:54                                                       ` jamal
2006-06-30 21:10                                                         ` Thomas Graf
2006-06-30 21:31                                                           ` jamal
2006-06-30 23:45                                                             ` Thomas Graf
2006-07-01  2:59                                                               ` jamal
2006-07-01 11:28                                                                 ` Thomas Graf
2006-07-01 13:35                                                                   ` jamal
2006-07-08 10:54                                                                     ` Thomas Graf
2006-07-08 14:14                                                                       ` Jamal Hadi Salim
2006-07-08 14:29                                                                         ` Jamal Hadi Salim
2006-07-08 23:46                                                                         ` Thomas Graf
2006-07-08 23:48                                                                           ` Thomas Graf
2006-07-09 12:52                                                                           ` Jamal Hadi Salim
2006-07-09 13:17                                                                             ` Jamal Hadi Salim
2006-07-09 13:33                                                                             ` Thomas Graf
2006-07-09 14:03                                                                               ` Jamal Hadi Salim
2006-07-09 14:19                                                                                 ` Thomas Graf
2006-07-09 15:00                                                                                   ` Jamal Hadi Salim [this message]
2006-07-09 15:54                                                                                     ` Thomas Graf
2006-07-09 23:06                                                                                       ` Jamal Hadi Salim
2006-07-01  2:47                                                   ` Patrick McHardy
2006-06-30 17:34                                               ` Thomas Graf
     [not found]                                     ` <44A52435.20909@6wind.com>
2006-06-30 13:36                                       ` Thomas Graf
2006-06-30 13:43                                         ` Nicolas Dichtel
2006-06-30 17:01                                       ` Patrick McHardy
2006-06-30 17:02                                         ` Patrick McHardy
2006-06-25 22:00 ` [PATCH 3/3] [PKT_SCHED]: Add iif meta match Thomas Graf
2006-06-27 15:07 ` [PATCHSET] Towards accurate incoming interface information Thomas Graf
2006-06-27 20:24   ` David Miller

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=1152457232.5124.127.camel@jzny2 \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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).