netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Thomas Graf <tgraf@suug.ch>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH 2/3] [VLAN]: Update iif when receiving via VLAN device
Date: Wed, 28 Jun 2006 08:22:43 -0400	[thread overview]
Message-ID: <1151497363.5203.47.camel@jzny2> (raw)
In-Reply-To: <20060628101832.GW1376@postel.suug.ch>

On Wed, 2006-28-06 at 12:18 +0200, Thomas Graf wrote:
> * jamal <hadi@cyberus.ca> 2006-06-27 09:07
[..]
> > Note the meta-setter (been sitting on it for too long) also set the
> > input_dev.
> 
> Could you share that piece of code so I don't have to duplicate
> that effort?
> 

I will look it up and send it your way - it is not complete (I have
changed machines twice since i first wrote it). Or maybe the intent of
your question was to ask how was the setting of input_dev was done?

> > BTW, in regards to the VLANs, what is wrong with using the
> > netdev->iflink to figure the real device? 
> 
> 
> vlan1
>           ifb1
> vlan2
> vlan3
>           ifb2
> vlan4
> 
> dhcp daemon would bind to ifb1 and use pktinfo cmsg to figure
> out whether the packet was received on vlan1 or vlan2, the
> actual physical device is of no interest anymore.
> 

Let me see if i understood correctly:
you have a device from both vlan1 and vlan2 both being redirected to
ifb1? and vlan 3, 4=> ifb2?
And i take it to make it interesting vlan1,2 on eth0 and vlan3,4 ontop
of eth1? note the iflink would/should reflect eth1/2. If you had bonding
or bridging in between it gets more interesting. But you are saying
you are no longer interested in the info that it came via eth1/2 at some
point, correct? 
Note, in such a case: iflink rewriting will do it just fine
but then you loose the original info (I think it would be good to not
loose such info to know the origin). I dont know if cmsg uses iflink at
all - they probably look at the ifindex.

Ok, now question: why are you binding on top of ifb? we could have
redirected this to ipip, or tun0 or loopback or eql etc where it may
equally not have made sense to bind to. I can see something like this
making sense for bonding or bridging but not as a generic answer for all
netdevices.

> Looking at your ifb code I see that you set skb->dev based on
> iif and update iif unconditionally. I see a lot of problems
> with this, firstly iif is already updated in the mirred action,
> secondly iif doesn't necessarily point to the device the packet
> was last seen on. Could you maybe explain the policy of iif
> you have in mind, it doesn't seem very consistent.
> 

The concept is to use ifb as a transitionary device. Packets come into
it from either the ingress side of the stack or egress and get returned
on the same side/spot they were found - with ifb represented as the
input device. What ifb does is independent of what mirred does (we could
redirect to other devices other than ifb).
 
Now that i pay attention to your patch i think i see the complications
it is introducing (i am not done yet)- and i did warn about this in the
discussion _and_ didnt we agree to leave this stuff alone? Can we drop
this change please?

> BTW, why does ifb have a hard header length? The resulting
> push and pull only slows things down.

Good question. I know there were a lot of oddities i had to deal with
when different link layers cross over (some have smaller headers than
other and yet others had none ;->)
I will have to go and look at my notes test cases and get back to you; 

It does work as it is right now (I only notice a pull - there is no
push).

cheers,
jamal 


  reply	other threads:[~2006-06-28 12:22 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 [this message]
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
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=1151497363.5203.47.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).