[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1280874970.17972.51.camel@w-sridhar.beaverton.ibm.com>
Date: Tue, 03 Aug 2010 15:36:10 -0700
From: Sridhar Samudrala <sri@...ibm.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Changli Gao <xiaosuo@...il.com>,
Krishna Kumar2 <krkumar2@...ibm.com>,
bhutchings@...arflare.com, davem@...emloft.net, mst@...hat.com,
netdev@...r.kernel.org, therbert@...gle.com
Subject: Re: [PATCH v3 1/2] core: Factor out flow calculation from
get_rps_cpu
On Tue, 2010-08-03 at 10:32 +0200, Arnd Bergmann wrote:
> On Tuesday 03 August 2010, Changli Gao wrote:
> > > I am confused by the call sites of macvlan_dev.receive and
> > > macvlan_dev.forward. They both are possible to be called in both
> > > RX(skb->data points to network header) and TX(skb->data points to
> > > ethernet) paths. The current code in macvtap shows that
> > > macvlan_dev.receive should be called in network layer, and
> > > macvlan_dev.forward should be called in dev layer. Am I correct?
> > >
> >
> > After checking the code carefully, I find macvlan_dev.receive is
> > called in network layer(RX path), and macvlan_dev.forward is called in
> > dev layer(TX path). The current code hasn't any issue. Your solution
> > won't work, as macvtap_forward is called in dev layer, when skb->data
> > points to ethernet header already.
>
> Yes, that is correct. Forward is used for "bridge" mode, where we
> can send data between two macvlan/macvtap endpoints directly, as
> opposed to the default "vepa" mode, where all data is always sent
> out to the lowerdev and may be returned by an adjacent switch in
> hairpin configuration.
macvtap_forward() is also used in the normal receive path as
macvtap_receive() has a direct call to macvtap_forward() after
updating skb->data to point to the ethernet header.
Thanks
Sridhar
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists