From: David Miller <davem@davemloft.net>
To: ja@ssi.bg
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] ipv4: Change rt->rt_iif encoding.
Date: Mon, 23 Jul 2012 17:43:12 -0700 (PDT) [thread overview]
Message-ID: <20120723.174312.898352203879290533.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LFD.2.00.1207240226340.2633@ja.ssi.bg>
From: Julian Anastasov <ja@ssi.bg>
Date: Tue, 24 Jul 2012 03:24:38 +0300 (EEST)
> On Mon, 23 Jul 2012, David Miller wrote:
>
>> Hmmm, the problem is that when we decapsulate VLAN devices, we're left
>> with the parent device's index in skb->skb_iif.
>
> Not sure if it is a problem with VLANs, can be also
> with some virtual devices but may be they use dev_forward_skb()
> where skb_iif is zeroed.
dev_forward_skb() gives the packet to netif_rx() which will thus send
the packet down to __netif_receive_skb() which will set the
skb->skb_iif to the new device's ifindex. It will not stay at zero
:-)
> I was also worrying about ip_mc_output looping packets with
> skb_iif because skb_clone copies the field but may be such loops
> happen only for locally originated traffic where skb_iif starts with
> 0.
Loopback of multicast packets is done in ip_mc_output(), via
the clone that you mention, via dev_loopback_xmit().
dev_loopback_xmit() gives the packet to netif_rx_ni() which again
lands it back at __netif_receive_skb(), which (with my changes)
will adjust the skb->skb_iif to match whatever sits in skb->dev
at the time.
It should be alright.
next prev parent reply other threads:[~2012-07-24 0:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 21:07 [PATCH 2/2] ipv4: Change rt->rt_iif encoding David Miller
2012-07-23 22:22 ` David Miller
2012-07-23 23:04 ` David Miller
2012-07-23 23:11 ` Julian Anastasov
2012-07-23 23:05 ` David Miller
2012-07-23 23:14 ` David Miller
2012-07-24 0:24 ` Julian Anastasov
2012-07-24 0:43 ` David Miller [this message]
2012-07-24 7:41 ` Julian Anastasov
2012-07-24 22:13 ` Nicolas de Pesloüan
2012-07-24 22:18 ` David Miller
2012-07-24 22:25 ` Nicolas de Pesloüan
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=20120723.174312.898352203879290533.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ja@ssi.bg \
--cc=netdev@vger.kernel.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 NNTP newsgroup(s).